Phaedra: Learning High-Fidelity Discrete Tokenization for the Physical Science
Organizations: ETH AI Center · IBM Research Europe · Seminar for Applied Mathematics, ETH Zurich · Swiss Data Science Center, ETH Zurich
Abstract
Tokens are discrete representations that allow modern deep learning to scale by transforming high-dimensional data into sequences that can be efficiently learned, generated, and generalized to new tasks. While foundational for image and video generation, the application of tokens to physical simulation remains nascent. Because existing tokenizers are designed for the perceptual requirements of natural images, they struggle with scientific data, which exhibits large dynamic ranges and requires exact preservation of physical and spectral properties. In this work, we investigate the performance of a suite of image tokenizers across metrics designed to measure PDE fidelity. Observing that these baselines struggle to simultaneously capture fine geometric details and precise physical magnitudes, we propose Phaedra, a novel tokenizer inspired by classical shape-gain quantization and the paradigm of basis functions coupled with continuous coefficients. Phaedra acts as a highly effective nonlinear compression algorithm, massively reducing dataset footprints while maintaining physical fidelity. We demonstrate that Phaedra consistently improves reconstruction across diverse 2D gridded PDE solutions, generalizes robustly to unseen PDE types and real-world Earth observation data, and is competitive with continuous models in downstream proof-of-concept operator learning and masked autoencoding tasks.
Figures & tables
| Method | (Tokens) | ||||
|---|---|---|---|---|---|
| VQ-VAE | 1 | Id. | VQ | Id. | |
| FSQ | 1 | Id. | FSQ | Id. | |
| VQ-VAE-2 | 2 | Scale Split | VQ 2 | Con.+Ups. | |
| VAR | Residual | FSQ | Add | ||
| Phaedra | 2 | Channel Split | FSQ 2 | Learn |
Appendix figures & tables46 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Dataset | nMAE | nRMSE | ||
|---|---|---|---|---|---|
| Continuous | ID | 0.672 | 1.122 | 2.98 | 98.4% |
| OD 1 | 1.154 | 2.079 | 3.40 | 99.2% | |
| OD 2 | 1.967 | 2.821 | 3.02 | 97.0% | |
| Phaedra | ID | 1.522 | 2.489 | 5.96 | 93.6% |
| OD 1 | 1.224 | 2.435 | 6.47 | 98.1% | |
| OD 2 | 3.147 | 4.237 | 5.83 | 77.6% |
| Ablation | Low-freq retention | High-freq retention |
|---|---|---|
| Zero Amplitude | – | (artifacts) |
| Zero Morphological | – | – |
| Model | Parameters | Channel Mult. | Codebook Size | Token Count 128 |
|---|---|---|---|---|
| Continuous AE | 97M | - | - | |
| FSQ | 97M | 8640 | 1024 | |
| IBQ | 97M | 16384 | 1024 | |
| VQ-VAE2 | 97M | 20480 | 1280 | |
| VAR small | 97M | 8640 | 1704 | |
| VAR large | 112M | 8640 | 2728 |
| Parameter | Value |
|---|---|
| Optimizer | AdEMAMix |
| Base Learning Rate | |
| Optimizer Betas | ( =0.5, =0.9, =0.99) |
| AdEMAMix | 2.0 |
| Weight Decay | 0.01 |
| EMA Decay | 0.999 |
| Dataset Name | Initial Conditions | Vars | Train/Val/Test | Steps/Traj |
| CEU Gauss | Gaussian density perturbations | 4 | 9,640/120/240 | 21 |
| CEU KH | Kelvin–Helmholtz instability | 4 | 9,640/120/240 | 21 |
| CEU RC | Curved interface Riemann | 4 | 9,640/120/240 | 21 |
| CEU Riemann | 4-Quadrant Riemann interaction | 4 | 9,640/120/240 | 21 |
| INS Gauss | Gaussian vortex field | 2 | 19,640/120/240 | 21 |
| INS Sine | Sinusoidal perturbations | 2 | 19,640/120/240 | 21 |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| Continuous AE | CEU Gauss | 0.4413 | 0.3192 | 0.2958 | 0.3928 |
| CEU KH | 0.6495 | 0.3481 | 0.4031 | 0.5411 | |
| CEU RC | 2.3518 | 1.5309 | 1.5208 | 1.4503 | |
| CEU Riemann | 0.4697 | 0.6683 | 0.5064 | 0.3952 | |
| INS Gauss | — | 0.2655 | 0.2679 | — | |
| INS Sines | — | 0.2888 | 0.3274 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| Continuous AE | CEU Gauss | 0.6654 | 0.4270 | 0.4450 | 0.6197 |
| CEU KH | 1.3745 | 0.5130 | 0.7470 | 0.8017 | |
| CEU RC | 4.8338 | 2.5375 | 2.5300 | 2.6390 | |
| CEU Riemann | 0.9652 | 0.9132 | 0.8846 | 0.7325 | |
| INS Gauss | — | 0.3753 | 0.3591 | — | |
| INS Sines | — | 0.4071 | 0.4645 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| Continuous AE | CEU Gauss | 10.81 | 4.94 | 5.09 | 11.11 |
| CEU KH | 29.07 | 6.56 | 10.57 | 7.40 | |
| CEU RC | 80.56 | 34.85 | 34.90 | 44.92 | |
| CEU Riemann | 22.18 | 16.26 | 16.02 | 16.22 | |
| INS Gauss | — | 2.00 | 2.00 | — | |
| INS Sines | — | 4.22 | 4.52 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| AE Continuous | CEU Gauss | 7.1022 | 1.4656 | 1.4148 | 6.4110 |
| CEU KH | 2.5600 | 1.5330 | 6.2576 | 6.4077 | |
| CEU RC | 2.4214 | 2.2839 | 2.1390 | 2.2797 | |
| CEU Riemann | 2.0933 | 5.9525 | 3.1555 | 1.7560 | |
| INS Gauss | — | 1.2037 | 1.2210 | — | |
| INS Sines | — | 0.9001 | 1.0462 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| Continuous AE | CEU Gauss | 99.99 | 99.83 | 99.82 | 99.99 |
| CEU KH | 99.98 | 99.86 | 93.92 | 100.00 | |
| CEU RC | 96.65 | 89.54 | 90.00 | 99.91 | |
| CEU Riemann | 99.88 | 99.00 | 99.04 | 99.89 | |
| INS Gauss | — | 99.83 | 99.85 | — | |
| INS Sines | — | 99.70 | 99.67 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| Continuous AE | CEU Gauss | 99.5375 | 98.6984 | 98.6770 | 99.5449 |
| CEU KH | 99.1300 | 97.3549 | 89.8986 | 99.7914 | |
| CEU RC | 97.7406 | 96.5632 | 96.6366 | 98.1140 | |
| CEU Riemann | 99.1136 | 98.7110 | 98.7952 | 99.3907 | |
| INS Gauss | — | 98.8140 | 98.7005 | — | |
| INS Sines | — | 98.1300 | 98.0971 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| Continuous AE | CEU Gauss | 1.7245 | 3.1961 | 3.1904 | 1.8379 |
| CEU KH | 2.7869 | 3.3842 | 4.3291 | 0.5914 | |
| CEU RC | 3.4748 | 3.7626 | 3.7706 | 3.1601 | |
| CEU Riemann | 2.8192 | 3.3568 | 3.3694 | 2.5334 | |
| INS Gauss | — | 6.1458 | 6.2652 | — | |
| INS Sines | — | 6.3145 | 6.3756 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| FSQ | CEU Gauss | 94.3750 | 89.1551 | 89.3403 | 94.2361 |
| CEU KH | 93.4259 | 87.8704 | 92.8356 | 94.7222 | |
| CEU RC | 98.4838 | 99.0162 | 98.9815 | 98.3681 | |
| CEU Riemann | 96.0301 | 94.2477 | 94.2245 | 92.9398 | |
| INS Gauss | — | 53.7500 | 54.4792 | — | |
| INS Sines | — | 86.7014 | 88.2523 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| FSQ | CEU Gauss | 10.4052 | 9.9868 | 9.9988 | 10.3707 |
| CEU KH | 9.7379 | 9.8794 | 10.5237 | 11.5640 | |
| CEU RC | 12.0170 | 12.0983 | 12.1081 | 11.9914 | |
| CEU Riemann | 10.3948 | 10.1950 | 10.2560 | 10.0298 | |
| INS Gauss | — | 8.7338 | 8.7793 | — | |
| INS Sines | — | 10.4527 | 10.5076 | — |
| Model | Dataset | ||||
|---|---|---|---|---|---|
| FSQ | CEU Gauss | 20.4305 | 23.6296 | 23.5377 | 20.6941 |
| CEU KH | 25.5333 | 24.4507 | 19.5239 | 11.5686 | |
| CEU RC | 8.1044 | 7.4829 | 7.4079 | 8.3005 | |
| CEU Riemann | 20.5100 | 22.0374 | 21.5712 | 23.3010 | |
| INS Gauss | — | 33.2113 | 32.8633 | — | |
| INS Sines | — | 20.0666 | 19.6474 | — |
| Model | Dataset | nMAE | nRMSE | Utilization | ||
|---|---|---|---|---|---|---|
| Continuous AE | CEU RKH, | 2.6836 | 4.5891 | 5.1315 | 0.9788 | — |
| CEU AIR, | 0.4410 | 1.1844 | 4.0184 | 0.9998 | — | |
| INS SVS, | 0.3382 | 0.4635 | 1.0631 | 0.9985 | — | |
| POI, | 0.7140 | 1.0170 | 1.27e-08 | 0.9671 | — | |
| DAR, | 0.4245 | 0.6117 | 1.6570 | 0.9981 | — | |
| ALC, | 1.4171 | 1.9240 | 3.6923 | 0.9894 | — |
| Dataset | Model | nMAE | nRMSE | r | r |
|---|---|---|---|---|---|
| Sentinel-2 L2A | Continuous | 21.583 60.032 | 30.169 69.422 | 3.687 6.950 | 5.790 8.281 |
| FSQ | 31.650 79.865 | 52.845 113.701 | 5.880 9.838 | 10.113 15.647 | |
| Phaedra 4 | 23.719 58.275 | 31.756 67.894 | 4.572 7.132 | 6.446 8.490 | |
| Phaedra 8 | 30.178 56.766 | 41.157 65.523 | 6.394 6.389 | 9.276 7.392 | |
| Sentinel-2 L1C | Continuous | 21.198 50.801 | 33.021 60.200 | 4.214 6.814 | 7.303 8.156 |
| FSQ | 22.098 21.393 | 51.321 47.126 | 5.904 4.410 | 13.675 9.907 |
| nMAE | nMSE | r | r | |
|---|---|---|---|---|
| Continuous | 0.023 ± 0.000 | 0.034 ± 0.001 | 3.575 ± 0.144 | 5.254 ± 0.216 |
| FSQ | 0.062 ± 0.001 | 0.091 ± 0.001 | 9.567 ± 0.330 | 14.003 ± 0.482 |
| Phaedra 4 | 0.042 ± 0.000 | 0.059 ± 0.001 | 6.391 ± 0.250 | 9.117 ± 0.362 |
| Phaedra 8 | 0.156 ± 0.003 | 0.231 ± 0.006 | 23.912 ± 1.098 | 35.491 ± 1.679 |
| nMAE | nMSE | r | r | |
|---|---|---|---|---|
| Continuous | 0.022 ± 0.001 | 0.037 ± 0.001 | 0.080 ± 0.002 | 0.133 ± 0.004 |
| FSQ | 0.062 ± 0.002 | 0.095 ± 0.002 | 0.224 ± 0.006 | 0.342 ± 0.007 |
| Phaedra 4 | 0.038 ± 0.001 | 0.063 ± 0.002 | 0.138 ± 0.004 | 0.226 ± 0.007 |
| Phaedra 8 | 0.121 ± 0.004 | 0.192 ± 0.006 | 0.437 ± 0.015 | 0.690 ± 0.022 |
| Model | Density | Velocity (avg.) | Pressure |
|---|---|---|---|
| FSQ | 0.98 | 5.94 | 0.79 |
| Phaedra | 0.52 | 0.37 |
| Model | Dataset | Average | Strategy | CI 95 | ||||
|---|---|---|---|---|---|---|---|---|
| FNO | KH | 6.24 | 11.18 | 32.23 | 0.54 | 12.55 | 6-6-2 | |
| FNO | RC | 26.31 | 53.62 | 53.42 | 9.16 | 35.63 | 6-6-2 | |
| FNO | RKH | 10.08 | 26.36 | 25.67 | 4.54 | 16.66 | 6-6-2 | |
| CNO | KH | 5.06 | 9.10 | 25.93 | 0.51 | 10.15 | 2-step | |
| CNO | RC | 22.65 | 44.44 | 44.66 | 7.94 | 29.92 | 2-step | |
| CNO | RKH | 6.79 | 18.83 | 18.50 | 3.17 | 11.82 | 6-6-2 |
| Model | Dataset | |||||||
|---|---|---|---|---|---|---|---|---|
| FNO | KH | 6.63 | 7.43 | 8.23 | 9.20 | 10.34 | 11.60 | 13.10 |
| CNO | KH | 5.15 | 5.97 | 6.73 | 7.70 | 8.80 | 10.05 | 11.72 |
| ViT | KH | 5.20 | 5.53 | 6.06 | 6.81 | 7.67 | 8.53 | 9.71 |
| Continuous Transformer | KH | 6.15 | 6.08 | 6.32 | 6.86 | 7.59 | 8.40 | 9.42 |
| VQ-VAE-2 | KH | 12.19 | 11.11 | 10.80 | 11.54 | 12.48 | 13.76 | 15.28 |
| FSQ | KH | 6.78 | 7.64 | 8.24 | 8.98 | 10.09 | 11.09 | 11.99 |
| Model Size | |||||||
|---|---|---|---|---|---|---|---|
| 5M | |||||||
| 38M | |||||||
| 200M |
| Model | Dataset | Relative Error | W1 |
|---|---|---|---|
| FSQ | KH | 5.84 | 1.71 |
| FSQ | RC | 29.16 | 21.71 |
| FSQ | RKH | 9.45 | 8.19 |
| Phaedra | KH | 4.75 | 1.21 |
| Phaedra | RC | 22.17 | 12.50 |
| Phaedra | RKH | 7.27 | 5.52 |