Downloads · 30 days
27
47% of all-time downloads
empirischtech/poseidon-b-joint-cyl-kh
poseidon-b-joint-cyl-kh is a image-to-image model from empirischtech. Use it when you need one image transformed into another. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
Paper: Measuring and Mitigating Forgetting when Extending a PDE Foundation Model to Simulated Flow Regimes (Representations for the Physical Sciences Workshop @ NeurIPS 2026)
Downloads · 30 days
27
47% of all-time downloads
All-time downloads
58
Public
Repo size
631 MB
Likes
0
Public
Click a slice to open those files.
.bin631 MB · 100%
From the Hugging Face model README
Paper: Measuring and Mitigating Forgetting when Extending a PDE Foundation Model to Simulated Flow Regimes (Representations for the Physical Sciences Workshop @ NeurIPS 2026)
A fine-tuned checkpoint of Poseidon-B (scOT, ~158M parameters) extended to two flow regimes that are absent from Poseidon's pretraining distribution, added simultaneously in a single training run:
The goal of this checkpoint is to add these new regimes without catastrophic forgetting of Poseidon's original families. It is trained jointly on the two new regimes together with a small replay buffer of two pretraining families, so that after adaptation the original families remain near (or below) their original error while the two new regimes are fit well.
Research model. Like the base model, this is intended for research use only.
ScOT (Swin-V2-style multiscale operator transformer, swinv2 backbone), identical to Poseidon-B — the new regimes were added without changing the architecture or the input/output channels.(ρ, u, v, p) on a 128 × 128 grid.t = k / (T − 1), where k is the frame step and T the trajectory length on the 21-frame cadence the model was trained on (see Usage).ρ = 1 in fluid, ρ = 0 in solid — so the geometry enters through an existing channel and doubles as a geometry mask. No extra input channels are added.Key config values (see config.json): image_size=128, num_channels=4,
num_out_channels=4, embed_dim=96, depths=[8,8,8,8], num_heads=[3,6,12,24],
window_size=16, use_conditioning=true.
Full fine-tuning from Poseidon-B with a joint data mixture (new regimes at weight 1.0,
replay families at weight 0.25):
| Dataset | Role | Sampling weight |
|---|---|---|
| Cylinder (train) | new regime | 1.0 |
| KHC (train) | new regime | 1.0 |
| CE | replay (retention) | 0.25 |
| RP | replay (retention) | 0.25 |
Hyperparameters:
2e-4, weight decay 1e-5L1, gradient clipping at 1.0T = 21 frames; frame step k ∈ [1, 12]Per-family normalization is used: each family is normalized by its own channel statistics
(the exact stats used are shipped in norm_stats_used.json). The binary geometry channel is
left un-normalized.
Reported as per-channel NRMSE (RMSE divided by the channel's value range), with a no-change persistence baseline for reference. All numbers below are 3-seed means.
New regimes
| Regime | Metric | Value |
|---|---|---|
| Cylinder | lead-2 NRMSE | 0.018 |
| KHC (holdout) | NRMSE (self-normalized) | 0.0377 |
Both are well below their persistence baselines.
Retention on Poseidon's pretraining families (factor relative to the unchanged base model; < 1.0 = improved, > 1.0 = degraded):
| Family | In replay buffer? | Relative to pretrained |
|---|---|---|
| CE | yes | 0.63× |
| RP | yes | 0.69× |
| CRP | no (held-out probe) | 1.16× |
| CE-KH | no (held-out probe) | 0.77× (density channel) |
All four tracked families land between 0.63× and 1.16× their original error, i.e. the two new regimes were added while the original families were largely retained or improved — including families that were never placed in the replay buffer.
Rollout stability (cylinder). Autoregressive rollout over held-out trajectories stays stable: median NRMSE grows only from ~0.007 to ~0.017 over 20 steps, with field correlation above 0.9 at every step (median ≈ 0.985 at step 20).
128 × 128 grid; claims are restricted to wake-scale
dynamics (fine scales are smoothed).1/20 of the trajectory window; shorter leads degrade sharply.The checkpoint is saved in Hugging Face save_pretrained format (config.json +
pytorch_model.bin) and loads with the scOT model class. Two conventions matter for
getting the reported accuracy:
norm_stats_used.json), and de-normalize the output with the same statistics.T = 21 frames.
The time input is the normalized lead t = k / (T − 1) = k / 20, where k is the frame
step on that 21-frame cadence. A raw trajectory at a different frame count must first be
resampled to 21 frames (e.g. by evenly spaced index selection) for the lead time to be
meaningful. k = 2 (t = 0.1) is the canonical lead this checkpoint was selected on.import numpy as np
import torch
from scOT.model import ScOT # from the Poseidon / scOT codebase
model = ScOT.from_pretrained("rwmasood/poseidon-b-joint-cyl-kh").eval().cuda()
# Cylinder channel statistics used at training time (from norm_stats_used.json).
# Channels are (rho, u, v, p). For the cylinder regime rho encodes the body: 1=fluid, 0=solid.
mean = torch.tensor([0.992431640625, 0.9874249696731567,
-6.629727431572974e-05, 0.9546216726303101]).view(1, 4, 1, 1).cuda()
std = torch.tensor([0.08666647970676422, 0.1872677057981491,
0.15668894350528717, 0.11970974504947662]).view(1, 4, 1, 1).cuda()
# A raw trajectory of physical fields (rho, u, v, p), shape (n_frames, 4, 128, 128).
traj = np.load("cylinder_case.npy")
# Resample to the 21-frame cadence the model was trained on.
T = 21
idx = np.linspace(0, traj.shape[0] - 1, T).round().astype(int)
traj = torch.from_numpy(traj[idx]).float().cuda()
# Predict frame i + k from frame i, with lead time k / (T - 1).
i, k = 0, 2
x = (traj[i:i + 1] - mean) / std
t = torch.full((1,), k / (T - 1), device=x.device) # 2 / 20 = 0.1
with torch.no_grad():
pred_norm = model(pixel_values=x, time=t).output # scOT returns a ScOTOutput with `.output`
pred = pred_norm * std + mean # de-normalize to physical units
For the KHC regime, swap in that family's statistics instead:
# KHC channel statistics (rho, u, v, p), from norm_stats_used.json
mean = torch.tensor([1.4987393617630005, 0.15815676748752594,
-0.00015812707715667784, 11.184250831604004]).view(1, 4, 1, 1)
std = torch.tensor([0.32741427421569824, 0.6542320847511292,
0.4637199640274048, 3.0745689868927]).view(1, 4, 1, 1)
Autoregressive rollout: feed the model's de-normalized prediction back in as the next input.
Sanity check: on the 30 held-out cylinder trajectories at lead 2 (21-frame cadence), this checkpoint gives a mean per-channel NRMSE of ≈ 0.017, matching the reported cylinder number.
config.json — model configuration (ScOT / swinv2)pytorch_model.bin — model weightsnorm_stats_used.json — per-family normalization statistics (cylinder, KHC, CE, RP)transformers==4.29.2 (the version the base model config targets).scOT package is required to instantiate the model class.Fine-tuned from camlab-ethz/Poseidon-B
Cylinder and KHC training data were generated with the PyFR solver.
If you use this checkpoint, please cite:
@inproceedings{yourkey2026,
title = {Measuring and Mitigating Forgetting when Extending a PDE Foundation Model to Simulated Flow Regimes},
author = {Wasif Masood and Shaoib Noor},
booktitle = {Representations for the Physical Sciences (RPS) Workshop at NeurIPS 2026, Paris, 2026.},
year = {2026},
url = {https://openreview.net/forum?id=XwMrQSsWF3}
}
Released under CC-BY-NC-4.0, inheriting the base model's license (research/non-commercial use).