Video Generation Models
Video generation models are deep generative systems that learn to synthesize temporally coherent sequences of image frames conditioned on text, image, or other modalities, representing one of the most computationally and architecturally challenging frontiers in generative AI. They matter because they compress the full complexity of visual perception — spatial structure, motion dynamics, physical plausibility, and semantic consistency — into a single learned model, enabling applications from film production to world-model simulation. A counterintuitive fact: the hardest problem in video generation is not generating realistic individual frames, but enforcing temporal consistency — a model that generates perfect frames independently will still produce flickering, incoherent video unless it explicitly models inter-frame dependencies.
Video generation is fundamentally a problem of learning a probability distribution over high-dimensional spatiotemporal tensors — a video is not a sequence of independent images, but a single object in space where time, height, width, and channel dimensions are all jointly dependent. The "aha moment" is realizing that modern video generators succeed by factorizing this intractable joint distribution into manageable pieces: a spatial model (typically a 2D or 3D UNet / transformer) combined with a temporal model (causal attention, recurrent layers, or temporal convolutions) trained together end-to-end, often inside a compressed latent space to keep compute tractable. Every architectural choice — 3D convolutions vs. pseudo-3D, full 3D attention vs. spatial-then-temporal — is really a different bet on how to factorize space and time efficiently.
How It Works
The Video as a Spatiotemporal Tensor
A raw video clip is a tensor where is the number of frames, is the spatial resolution, and is the number of channels (typically 3 for RGB). Even at modest resolution — say frames of — this is a 3.1M-dimensional object, making direct pixel-space generation computationally catastrophic. The near-universal solution is to first encode video into a compressed latent space using a pretrained video VAE, then generate in that latent space.
Video Latent Diffusion
The dominant paradigm today is latent diffusion applied to the spatiotemporal tensor. A video encoder maps to , typically with spatial downsampling and optional temporal compression. The diffusion forward process adds Gaussian noise:
Explanation: At diffusion timestep , the clean latent is interpolated toward pure Gaussian noise; is the cumulative noise schedule controlling the signal-to-noise ratio. Here is the cumulative product of the noise schedule . The reverse process learns to denoise by training a neural network where is the conditioning signal (e.g., CLIP text embeddings):
Explanation: The model is trained to predict the noise added to the latent at each diffusion timestep; minimizing this MSE loss is equivalent to maximizing a variational lower bound on the data log-likelihood.
Temporal Attention and 3D Architectures
The core architectural challenge is extending 2D spatial operations to handle the time axis. Two dominant strategies exist:
Pseudo-3D (factorized) attention decomposes full 3D self-attention into separate spatial and temporal passes. For a feature map , we reshape and apply:
Explanation: Spatial attention flattens the spatial dimensions while treating each frame as a separate batch element, so each pixel attends only to other pixels within the same frame. A causal or bidirectional temporal attention layer then operates across frames at each spatial location:
Explanation: Temporal attention lets each spatial position attend across all frames; the mask (set to for future frames in autoregressive settings) enforces causality when needed.
Classifier-Free Guidance for Video
Video generators universally use classifier-free guidance (CFG) to boost prompt adherence. During training, the conditioning is randomly dropped with probability . At inference, the effective score is:
Explanation: The unconditional prediction is extrapolated toward the conditional prediction by guidance scale , trading sample diversity for fidelity to the text prompt — higher produces sharper, more prompt-faithful but less diverse videos.
PyTorch Sketch: Temporal Attention Block
```python import torch import torch.nn as nn class TemporalAttention(nn.Module): """Causal temporal self-attention over T frames at each spatial position.""" def __init__(self, dim: int, n_heads: int = 8): super().__init__() self.n_heads = n_heads self.head_dim = dim // n_heads self.qkv = nn.Linear(dim, 3 * dim, bias=False) self.proj = nn.Linear(dim, dim) def forward(self, x: torch.Tensor) -> torch.Tensor:
# x: (B, T, H, W, C) B, T, H, W, C = x.shape x_flat = x.reshape(B H W, T, C) # spatial pos as batch qkv = self.qkv(x_flat) # (BHW, T, 3*C) q, k, v = qkv.chunk(3, dim=-1)
# Reshape for multi-head attention def reshape_heads(t): return t.view(B H W, T, self.n_heads, self.head_dim).transpose(1, 2) q, k, v = map(reshape_heads, (q, k, v))
# Causal mask mask = torch.triu( torch.full((T, T), float('-inf'), device=x.device), diagonal=1 ) attn = (q @ k.transpose(-2, -1)) / self.head_dim**0.5 + mask attn = attn.softmax(dim=-1) out = (attn @ v).transpose(1, 2).reshape(B H W, T, C) out = self.proj(out) return out.reshape(B, T, H, W, C) ```
Jonathan Ho is a research scientist at Google DeepMind who completed his PhD at UC Berkeley under Pieter Abbeel, specializing in deep generative models and reinforcement learning. His 2020 paper "Denoising Diffusion Probabilistic Models" established the modern DDPM framework that virtually all video diffusion models build upon, and he directly extended it to video in the 2022 paper "Video Diffusion Models" which introduced the 3D UNet architecture for spatiotemporal denoising. Surprisingly, Ho's original DDPM paper was initially rejected from ICLR 2020 before becoming one of the most influential generative modeling papers of the decade with thousands of citations.
Uriel Singer is a research scientist at Meta AI whose 2022 paper "Make-A-Video" introduced a landmark approach to text-to-video generation by bootstrapping from a pretrained text-to-image model (trained on image-text pairs) and then learning motion priors separately from unlabeled video data — elegantly sidestepping the scarcity of text-video paired data. The key insight was that spatial appearance and semantic grounding could be inherited from the image model, while only temporal dynamics needed to be learned from video. This decoupled training strategy has influenced nearly every subsequent large-scale video generation system.
Intuition
Imagine you are a film director with total amnesia between shots — if you could only look at one frame at a time while directing, your film would be visually beautiful but completely incoherent: actors would teleport, physics would reset, objects would change color randomly. Video generation models face exactly this problem if they process frames independently. The solution is like giving the director a storyboard that shows all frames simultaneously — the model can then ensure that the character's hand reaching toward the door in frame 8 actually grasps the handle in frame 12. In diffusion terms, this means the noise being removed from frame is informed by what neighboring frames look like, so all frames are denoised together in a coordinated choreography rather than independent performances. The VAE compression is like rehearsing the storyboard in thumbnail sketches before committing to full resolution — it's the same story, just cheaper to work with.