12 Generative AI
What is Generative AI?
Generative Artificial Intelligence refers to AI systems that can generate new content (text, images, molecules, proteins, code, etc.) that is similar to the training data distribution, but not identical.
- Discriminative AI: predict labels given input
- Generative AI: model the data distribution and generate new samples
Core Objective
Generative AI aims to approximate the true data distribution:
This is usually achieved via Maximum Likelihood Estimation (MLE):
Autoregressive Factorization
For structured data such as text or sequences, the joint probability is decomposed as:
This autoregressive modeling strategy is the foundation of modern language models (e.g., GPT).
Neural Parameterization
Neural networks are used to parameterize conditional probabilities:
where is typically implemented using Transformer architectures.
Major Families of Generative Models
Autoregressive Models
- Example: GPT
- Advantages: stable training, explicit likelihood
- Limitation: sequential generation is slow
Variational Autoencoders (VAE)
Objective:
Used for latent representation learning and structured generation.
Generative Adversarial Networks (GAN)
Two-player game:
Produces sharp samples but is difficult to train.
Diffusion Models
Forward noising process:
Reverse denoising learns to generate high-quality samples.
Transformers as the Backbone
Transformers dominate generative AI because they:
- Model long-range dependencies
- Scale efficiently with parameters and data
- Support multi-modal inputs (text, image, molecules)
From Models to Foundation Models
Evolution trend:
- Single-task multi-task
- Single-modal multi-modal
- Task-specific foundation models
Examples include GPT-style large language models.
Generative AI for Science
Scientific objects can be treated as symbolic sequences:
- Molecules graphs / SMILES
- Proteins amino acid sequences
Training Pipeline
Pretraining
Learn general structure by minimizing negative log-likelihood over massive datasets.
Supervised Fine-Tuning (SFT)
Align models with instruction-following behavior.
Reinforcement Learning from Human Feedback (RLHF)
Optimize expected reward:
Capabilities and Limitations
Strengths
- Text and code generation
- Pattern discovery
- Large-scale hypothesis exploration
Limitations
- Hallucinations
- Weak numerical precision
- Limited physical grounding