Conditional diffusion model (DDPM/DDIM) and Spatial JEPA trained to predict the evolution of 2D physics simulations from The Well dataset collection by Polymathic AI.
Given the current state of a physical system (e.g. turbulent radiative layer), the model predicts the next time step. Can be run autoregressively to generate multi-step rollout trajectories.
Architecture
Conditional DDPM (62M parameters)
Component
Details
Backbone
U-Net with 4 resolution levels (64→128→256→512 channels)
Conditioning
Previous frame concatenated to noisy target along channel dim
Time encoding
Sinusoidal positional embedding → MLP (256-d)
Residual blocks
GroupNorm → SiLU → Conv3x3 → +time_emb → GroupNorm → SiLU → Dropout → Conv3x3
Attention
Multi-head self-attention at bottleneck (16x48 spatial, 768 tokens)
Noise schedule
Linear beta: 1e-4 → 0.02, 1000 timesteps
Parameterization
Epsilon-prediction (predict noise)
Sampling
DDPM (1000 steps) or DDIM (50 steps, deterministic)
The JEPA learns compressed dynamics representations without generating pixels, useful for downstream tasks and transfer learning.
Training
Dataset
Trained on turbulent_radiative_layer_2D from The Well (Polymathic AI, NeurIPS 2024 Datasets & Benchmarks):
2D turbulent radiative layer simulation
Resolution: 128 × 384 spatial, 4 physical field channels
90 trajectories × 101 timesteps = 7,200 training samples
6.9 GB total (HDF5 format)
Diffusion Training Config
Parameter
Value
Optimizer
AdamW (lr=1e-4, wd=0.01)
LR schedule
Cosine with 500-step warmup
Batch size
8
Mixed precision
bfloat16
Gradient clipping
max_norm=1.0
Epochs
100
GPU
NVIDIA RTX A6000 (48GB)
Training time
~7 hours
Diffusion Training Results
Metric
Value
Final train loss
0.028
Val MSE (single-step)
743.3
Rollout MSE (10-step mean)
805.1
Training loss curve, validation metrics, comparison images (Condition | Ground Truth | Prediction), and rollout videos (GT vs Prediction side-by-side) are all available on the WandB run.
JEPA Training Config
Parameter
Value
Optimizer
AdamW (lr=3e-4, wd=0.05)
LR schedule
Cosine with 500-step warmup
Batch size
16
Mixed precision
bfloat16
Gradient clipping
max_norm=1.0
EMA schedule
Cosine 0.996 → 1.0
Epochs
100
GPU
NVIDIA RTX A6000 (48GB)
Training time
~1.5 hours
JEPA Training Results
Metric
Value
Final train loss
4.07
Similarity (sim)
0.079
Variance (VICReg)
1.476
Covariance (VICReg)
0.578
Loss progression: 4.55 (epoch 0) → 3.79 (epoch 2) → 4.07 (epoch 99, converged ~epoch 50). The VICReg regularization keeps representations from collapsing while the similarity loss learns dynamics prediction.
Full JEPA training metrics available on the WandB run.
Single-step evaluation: DDIM-50 sampling on 4 validation batches, MSE against ground truth
Multi-step rollout: 10-step autoregressive prediction from a validation sample
Video logging: Side-by-side GT vs Prediction video logged to WandB as mp4
Comparison images: Condition | Ground Truth | Prediction for each field channel (RdBu_r colormap)
Rollout MSE curve: Per-step MSE showing prediction degradation over horizon
The Well Dataset
The Well is a 15TB collection of 16 physics simulation datasets (NeurIPS 2024). This project works with any 2D dataset from The Well — just change --dataset: