--- license: mit library_name: pytorch tags: - physics - pde - scientific-machine-learning - flow-matching - neural-pde-solver - surrogate-model --- # Latent Generative Solvers (LGS) — pretrained checkpoints Weights for **Latent Generative Solvers for Generalizable Long-Term Physics Simulation** (Zituo Chen, Sili Deng; [arXiv:2602.11229](https://arxiv.org/abs/2602.11229)). Code: . LGS couples a **Physics VAE (PhyVAE)**, which maps states from twelve PDE families into a shared latent physical manifold, with a **Pyramidal Flow-Forcing Transformer (PFlowFT)**, which predicts the next latent state by input-noised flow matching over a four-frame history pooled to 2/4/8/16 resolution. ## Files | Folder | Model | Trainable params | Recommended inference | |---|---|---|---| | `phyvae/` | PhyVAE-Large (`PFFT_VAE`, c16p16: 3×128×128 → 16×16×16) | 249.16M | posterior mean for encoding | | `pflowft/` | PFlowFT-Small (`LGS`, dim 768, 12 layers, 12 heads) — **latest, recommended** | 138.09M | 1 Euler NFE, release-manifold transition | | `pflowft_submission/` | PFlowFT-Small — checkpoint of the originally submitted paper version | 138.09M | 20 Euler NFE, release-manifold transition | Each folder has `model.safetensors` (weights only, float32) and `config.json` (constructor arguments, source-checkpoint SHA-256, and for `pflowft` the full training protocol). PFlowFT state dicts additionally hold 4.19M fixed positional buffers (`lgs_pred.s_pos*`). Both PFlowFT checkpoints were trained against this exact frozen PhyVAE (SHA-256 of its training checkpoint: `ad2674f4…8e08`). ## Usage ```bash git clone https://github.com/chenzituo/latent-generative-solver.git && cd latent-generative-solver pip install -r requirements.txt && export PYTHONPATH=$PWD ``` ```python from lgs_hub import load_lgs, rollout vae, model, cfg = load_lgs("pflowft", device="cuda") # frames: four tensors, oldest first, each (B, 3, 128, 128) in the normalized c3p128 corpus layout fields = rollout(vae, model, frames, steps=10, nfe=cfg["recommended_inference"]["nfe"]) ``` A CUDA GPU with flash-attn is required. ## Results Relative L2 error (L2RE, %, lower is better) on the **test split** of all 16 systems, measured with `eval_rebuttal/dense_rollout.py` for this release: 10% seeded test subset (seed 0, first 32 batches of 8 per system; 3,294 windows, 2,816 at step 20), release-manifold transition (each prediction is decoded and re-encoded before re-entering the four-frame history), bf16. Means are sample-weighted within each system, then averaged uniformly over systems; the 20-step column covers the 11 systems with at least 20 future frames. | Checkpoint | Euler NFE / step | 1-step | 5-step | 10-step | 20-step | |---|---|---|---|---|---| | `pflowft` (latest) | 1 | **7.97** | **16.90** | **24.63** | **41.07** | | `pflowft_submission` | 20 | 11.30 | 25.69 | 36.83 | 57.75 | These numbers come from the current evaluation harness and are not a reproduction of the paper's tables. `pflowft` was selected on the validation split (1/5/10-step L2RE 6.67/13.96/21.29% over 7,510 validation windows); the test split was evaluated once, after selection. ## Training - **Data.** Unified c3p128 corpus of 16 systems from FNO Navier–Stokes (FNO-v3/v4/v5), PDEArena (PA-NS, PA-NSC, PA-SWE), PDEBench (PB-CNSL, PB-CNSH, PB-SWE) and The Well (W-GS, W-AM, W-SWE, W-RB, W-SF, W-TR, W-VE); 8:1:1 train/validation/test split. See `preprocess/DOWNLOAD.md` in the code repository for sources. - **PhyVAE.** KL-VAE trained on the pooled corpus (KL weight 1e-3), AdamW, cosine schedule, bf16. - **PFlowFT (`pflowft_submission`).** Input-noised flow matching over frozen PhyVAE latents, AdamW (β = 0.9, 0.995), cosine schedule, global batch 64. - **PFlowFT (`pflowft`, latest).** Same architecture and frozen PhyVAE, retrained from scratch (seed 3, 200k updates) and then refined by pooled continuation phases (180k further updates) with hard-family reweighting, a self-conditioned two-step rollout loss, clean-endpoint training (p = 0.75) and a relative flow loss. Every phase was selected on the validation split only; the test split was not used for selection. ## Intended use and limitations Research use: next-step and autoregressive forecasting for the 16 corpus systems at 128² and as a pretrained starting point for adaptation to new 2D PDE systems. It is not a general-purpose PDE solver: inputs must follow the corpus channel layout and normalization; accuracy degrades with rollout length, on systems outside the training families, and at other resolutions without fine-tuning. Predictions are not guaranteed to conserve physical invariants. ## Citation ```bibtex @article{chen2026latent, title = {Latent Generative Solvers for Generalizable Long-Term Physics Simulation}, author = {Chen, Zituo and Deng, Sili}, journal = {arXiv preprint arXiv:2602.11229}, year = {2026} } ```