TL;DR
Modern AI foundation models conquer text and video by chopping continuous reality into discrete "tokens," yet applying off-the-shelf image tokenizers to physics simulations fails because scientific data demands exact magnitudes and wide dynamic ranges, not just plausible textures. Enter Phaedra, a novel tokenizer that untangles what a physical feature looks like (its shape) from how intense it is (its energy). By bridging discrete sequence modeling with the rigorous mathematics of differential equations, Phaedra shrinks massive scientific datasets by roughly 95% while giving standard transformers the precision needed to model turbulent fluids, weather, and satellite imagery.
What Problem Does This Paper Address?
If you want to build a universal foundation model for physics—capable of digesting fluid flows, satellite imagery, and symbolic equations all in one transformer—turning continuous spatial fields into discrete tokens is the obvious path forward. Naturally, researchers tried repurposing state-of-the-art image tokenizers (like VQ-VAE or Nvidia Cosmos) by treating physical fields like pictures. It turns out, physics makes for terrible "natural images."
The authors identify three reasons why image tokenizers break on scientific data:
- Perceptual vs. Physical Fidelity: Image tokenizers optimize for human eyeballs—they happily hallucinate plausible-looking textures at the expense of pixel-exact math, violating conservation laws in the process.
- Unbounded Dynamic Range: Pixels live neatly between 0 and 255. Physical fields—like shockwaves or atmospheric pressure—have heavy-tailed distributions with extreme outliers.
- The Amplitude–Morphology Conflict: With a single discrete codebook, you face an impossible choice: make it semantically rich to capture diverse shapes (vortices, boundaries), or make it exponentially huge to capture subtle intensity shifts. Do both at once, and you either smear out fine structures or botch the energy scale.
Methods
Think of how a physicist represents a wave: a set of basis functions describing the shape, multiplied by scalar coefficients describing the amplitude. Drawing inspiration from classical Shape-Gain Quantization, Phaedra builds this intuition directly into a neural autoencoder using standard Finite Scalar Quantization (FSQ)—which snaps continuous values onto a fixed grid rather than relying on unstable learned codebooks—with a clever twist.
Here is what is new:
- Dual-Latent Factorization: Instead of quantizing the encoder's output all together, Phaedra splits the latent channels into two parallel streams: a multi-dimensional morphology branch ($z_\mu$) for local geometry, and a single-channel amplitude branch ($z_\alpha$) for local energy magnitude.
- Split-FSQ Quantization: Morphology is quantized across multiple dimensions to create a rich dictionary of reusable spatial patterns. Amplitude, being "strongly continuous," is treated as a 1D line quantized at ultra-high density (1,024 discrete levels), wrapped in a scaling module so extreme outliers don't saturate the activation function.
- Learned Recombination: Rather than forcing a strict mathematical multiplication, a learnable convolution mixes the quantized shape and amplitude tokens back together before decoding, trained purely with $L_1$ reconstruction and commitment losses.
Datasets
No new datasets are introduced; instead, the authors assemble a comprehensive gauntlet of existing simulations and real-world observations:
- In-Distribution Pretraining: 2D fluid dynamics corpus (Compressible Euler and Incompressible Navier-Stokes equations).
- Zero-Shot PDE Generalization: Unseen boundary/initial conditions ($\text{OD}_1$: curved Riemann problems, airfoils) and entirely unseen physics ($\text{OD}_2$: Poisson, Darcy flow, Allen-Cahn, Acoustic Wave).
- Real-World Zero-Shot: Sentinel-2 L1C multispectral satellite imagery (and Sentinel-1 radar/DEMs), ERA5 global weather reanalysis, and grayscale ImageNet-1k.
Key Insights and Ideas
- Disentanglement happens for free: Phaedra uses no special loss function to force morphology and amplitude apart. Simply giving one branch multidimensional capacity and the other high-precision scalar resolution naturally separates them—swapping amplitude tokens between two unrelated images transfers 99% of the macroscopic energy while leaving local high-frequency edges behind.
- Discreteness acts as a physical regularizer: Continuous autoencoders beat discrete ones on familiar training data, as expected. Yet when tested zero-shot on unfamiliar boundary conditions ($\text{OD}_1$), the continuous autoencoder's error degrades by 70%, whereas Phaedra actually improves. Snapping fields into discrete morphological primitives prevents overfitting to dataset-specific quirks.
- Discrete tokens shine when physics gets violent: On smooth fluid flows, continuous and discrete downstream transformers tie. On shock-dominated flows (Riemann-curved Euler), a transformer trained on continuous autoencoder latents blows up (119% error), while Phaedra's regularized token space keeps dynamics stable (27.2% error).
Key Results
- In-Domain Reconstruction: Reduces normalized MAE (nMAE) by over 40% compared to the strongest discrete baselines (1.522 vs. 2.603 for FSQ) while keeping minimal spectral coherence ($\gamma_{\min}$) at 93.6%, virtually eliminating high-frequency smoothing.
- Massive Compression: Compresses a 65.0 GB NetCDF fluid dataset down to 3.44 GB (94.7% space savings), nearly doubling the compression of a continuous autoencoder. At $512^2$ resolution with $16\times 16$ downsampling, theoretical savings hit 99.7%.
- Crushing Vision Foundation Tokenizers: On $512^2$ PDEs ($16\times$ compression), Phaedra slashes nMAE by over $6\times$ compared to Nvidia Cosmos (2.33 vs. 14.53) and avoids Cosmos's catastrophic local variance blow-ups on Sentinel-2 satellite data.
- Downstream Tasks: In operator learning and 75% masked autoencoding, a 38M-parameter transformer trained on Phaedra tokens matches or beats Fourier/Convolutional Neural Operators (FNO/CNO), ViTs, and standard tokenizers, scaling monotonically up to 200M parameters.
Limitations and Future Work
- Independent Channels: Phaedra tokenizes physical variables (like density, velocity, and pressure) one by one, ignoring tight physical couplings between fields. Joint-channel tokenization remains unexplored.
- Soft Separation: Because a nonlinear convolutional decoder mixes the streams, amplitude and morphology aren't strictly orthogonal in a linear sense.
- Uniform 2D Grids: Evaluations focus on 2D regular grids. While a 3D convolutional extension is straightforward, handling irregular meshes, point clouds, and unifying multi-dimensional fields with symbolic PDE equations into one shared vocabulary are left for future work.
Summary updated