Demystify Generative Modeling: Introduction to the 2Ws-1H Framework
What, Why, and How is all you need!
Table of Contents
Introduction
Why am I Writing This?
To Whom is this Series?
The 2Ws-1H Framework
A Glimpse of the List of Topics
Limitations
Recap
Next Steps
1. Introduction
Generative modeling is one of the booming AI fields right now. No one could deny how cool it is to see that picture of Pope Francis when he wears that white puffy coat. This advancement in generative modeling applications results from the recent development of the diffusion algorithm, which has opened the door to so many possibilities for building creative AI applications (i.e., using AI to bring children’s drawings to life).
Like any market or industry where supply and demand play a huge role in the consumption process of its customers, there is still a significant shortage of resources that demystify what is happening in the generative modeling field. With the fast growth of this field, most articles and resources become outdated very quickly. Such a situation can make those who consume these resources feel overwhelmed and disappointed at the same time. Overwhelmed by the sheer number of resources out there, and disappointed by their ineffectiveness.
That's why this series of articles is written. It aims to fill this gap by helping you stay focused on the main thread of the field. You don't have to distract yourself with any off-topic or subproblems that do not contribute to your understanding of the main building blocks.
2. Why Am I Writing This?
So, why am I writing this? The goal of this series is to help you have that 'Aha!' moment – the moment when you finally find what you've been seeking after a long search. The goals of this series can be summarized in the following points:
Clear Explanation: It aims to provide you with simple and direct explanations without using too much jargon.
Main Thread Focus: The focus will be on the most important and key topics in the field of generative modeling. We will skip any insignificant topics that may not be useful for you.
Staying Updated: We will keep you informed about the latest advancements in the field of generative modeling and what you should focus on.
2Ws-1H Formula: We will break down concepts into three levels of detail using these three tools: what, why, and how.
3. To Whom is this Series?
This series is designed for anyone interested in learning about generative modeling in depth. It is written for those who want to go into the tiny details of the algorithms, techniques, and tricks that make these generative models produce these fine results. The series targets these categories of learners:
Beginner: This is someone who is just started, and wants a guide that helps them to understand the concepts in depth.
Researcher: This is someone who is involved in research of the generative modeling field, and wants to learn about a specific thing about an algorithm.
Professional: This is someone who wants to use these algorithms and models in production and wants to learn how they can do that.
4. The 2Ws-1H Framework
This series follows a very simple approach to explaining any topic: the 2Ws-1H framework. The 2Ws refer to providing answers to the 'What' and 'Why' questions when explaining a topic, while the 1H refers to answering the 'How' question.
The advantage of such an approach is that it helps you see a concept from different angles. The 'Why' satisfies your curiosity and keeps your brain releasing the dopamine of interest. The 'How' assists you in delving deeper into each algorithm sub-component, providing more details on how each sub-component works and how they function together.
In the case of the generative modeling field, we will explore various algorithms and concepts that form the building blocks of this field.
4.1 The Definition: What is this “algorithm”?
As we discussed earlier, the “What” component focuses on providing a high-level summary of the following questions:
What is this algorithm about?
Why do we need this algorithm, and why does it work?
How does this algorithm work, and How does it learn from data?
A visual component of the general architecture. (A high level of how the system works from the input to the output.)
4.2 The Reason: Why does this “algorithm” work?
The “Why” component explores the reasons behind the development of those algorithms. It tries to highlight the reasons for making this algorithm works better than its predecessors. Specifically, it tries to address the following questions:
What are the reasons for inventing this algorithm?
Why does this algorithm work better than its peers?
4.3 The Methodology: How does this “algorithm” work?
On the other hand, the “How” component dives deeper into those algorithms and provides a very detailed explanation of their building blocks and working mechanisms. It will address the following sections:
1. Components
Here, we will dive deeper into the main components of each algorithm. We will try to explain each component in detail. Here are the main components that we will be addressing:
a. Data
One of the important aspects that learners should be focusing on when they learn about a machine algorithm, is to know what kind of data that algorithm could process. Some algorithms can process a single modality of data and some algorithms could process different modalities. Examples of such data:
Tabular Data
Image Data
Text Data
Audio Data
Video Data
Time Series Data
b. Model
This part will focus on explaining the forward, and backward processes of each algorithm. It will explore the model architecture in more depth, showing how the data flows through the network to produce the result. It includes the following sections:
Architecture: A general visualization of the model architecture, where the main components of the model are shown.
Forward Pass: Here we show the full journey of the data moving through the network, starting from the input source till we get the final result.
c. Loss Function
A model without a loss function is useless. A model can’t learn anything if an objective function is not provided, because it is the guide that communicates what the model designer wants the model to do. Here we will explore what kind of loss function is used, and what makes it a good choice for this model.
2. Math
This section will go over the math that is used to develop and derive the model. We will explain in detail what kind of assumption they have used, the full flow of each proof, and the tiny detail of each aspect of the algorithm, such as the loss function, and optimization procedures.
3. Metrics
if you cannot measure it, it does not exist.
This is true, a machine-learning algorithm can’t be tracked if we don’t have metrics that show us how good or bad that algorithm is doing. Here are the metrics that will be discussed:
Training Metrics: These are the metrics that are used to track the algorithm during the training process.
Evaluation Metrics: These are the metrics that are used to assess the model after being trained.
4. Coding
In this part, we will explain how to implement the algorithm from scratch. We will be using the TensorFlow framework when writing the code of these algorithms. Here are some of the main components that will be implemented:
Data Preprocessing.
Model.
Loss Function.
Training.
5. Topics
Here are some of the main topics that we will be discussing:
Architectures
Variational Autoencoders (VAE).
Variational Autodecoder (VAD).
Generative Adversarial Networks (GANs).
Diffusion-based Models.
Energy-based Models.
Transformer-based Models.
Techniques
Concept Personalization.
Visuo-Lingual Encoding.
Co-reference Resolution.
And more!
Before Goodbye!
7. Next Steps
“OK, now what are the next steps?” Alright!
We will start this series by explaining the current state-of-the-art algorithm in generative modeling, the Denoising Diffusion algorithm, or what is known as Diffusion Models.
In the next posts, we will dive deep into each component of the diffusion algorithm in a way that will let you code it right away after reading the post! So, subscribe, and STAY TUNED.
Want to Cite this Article?
@article{khamies2023demystify,
title = "Demystify Generative Modeling: Introduction to the 2Ws-1H Framework",
author = "Waleed Khamies",
journal = "Zitoon.ai",
year = "2023",
month = "Aug",
url = "https://publication.zitoon.ai/demystify-generative-modeling-introduction"
}
Any oversights in this post?
Please report them through this Feedback Form, we really appreciate that!
New to this Series?
New to the “Generative Modeling Series”? Here you can find the previous articles in this series [link to the full series].
Thank you for your reading!
We appreciate your reading! If you would like to receive the following posts in this series in your email, please feel free to subscribe to the ZitoonAI Newsletter. Come and Join the Family!