JEPA and generative models

Prediction of the latent of the answer, or of a distribution of fields, instead of one field.

Outcome: Explain predicting a representation instead of the field itself; say what collapse is and how a regulariser guards against it; read lift and drag off a latent space with a linear probe; say in two sentences what diffusion and flow-matching surrogates add.

Builds on Cross-attention and latent space, Decoders and volume fields

A JEPA (joint-embedding predictive architecture) predicts a latent representation of the answer instead of the answer itself. The idea comes from self-supervised learning on images (I-JEPA, Assran et al. 2023): the argument for it is that a full field holds far more numbers than the few quantities read from it, and a model trained in the latent need not spend its capacity on every one of them. This lesson follows one example in aerodynamics, AeroJEPA (Giral et al. 2026): from the geometry and flight condition, it predicts the latent of the flow field, and decodes a field only when one is needed.

Figure 9-1. From geometry, a context encoder and a predictor produce flow tokens; in training only, a target encoder supplies the tokens to compare them with.

Two encoders and a predictor

  1. Context encoder. The geometry point cloud becomes a fixed set of latent tokens, as in latent space.
  2. Predictor. Conditioned on angle of attack, Reynolds or Mach number, it maps geometry tokens to predicted flow tokens.
  3. Target encoder. During training only, the solver's flow field is encoded into target tokens. The loss compares these with the predicted tokens.
  4. Decoder. A query decoder (decoders) reads the field at any point from the predicted tokens, only when a field is needed. AeroJEPA trains it at the same time, with a reconstruction loss on the field, so the tokens stay decodable.

Collapse

Predictions and targets both come from networks that change during training, so there is a trivial way to make the loss zero, called collapse.

DefinitionCollapse

Every input is mapped to the same vector, so the loss is zero and the latent space carries no information.

JEPAs mainly guard against it in one of two ways. I-JEPA takes the target encoder out of gradient training and updates it as a slow moving average of the context encoder. LeJEPA (Balestriero and LeCun 2025) adds a term to the loss instead, and AeroJEPA follows it: SIGReg (sketched isotropic Gaussian regularisation) pushes the latent vectors of a batch towards an isotropic Gaussian cloud.

Cost and linear probes

Once the geometry is encoded, the cost of the predicted latent does not depend on how many field points are queried later; decoding does. AeroJEPA was tested on up to about 15 million surface and 50 million volume points per case (HiLiftAeroML). The authors also report that a linear probe, a linear regression from the latent (theirs is a ridge regression), recovers lift and drag from the predicted flow tokens, and control-surface deflections from the geometry tokens.

Figure 9-2 shows a probe on the site's own data: the POD of 45 CpC_p distributions.

Figure 9-2. The site’s 45 precomputed designs (α −4° to 12°, sweep 16° to 40°) on the first two POD coefficients of their chordwise solver pressure, coloured by lift (dark blue lowest, dark red highest): a straight-line probe, fitted on the same 45, reads lift off the map. The inset is the selected design’s solver −Cp along the chord.

Example 9-2 does the same on the download: the four-mode POD of Example 3-5, fitted here on the 44 Latin-hypercube runs, then a linear regression from each run’s four coefficients to CLC_L, scored on the 12 test runs.

Example 9-2. A linear probe on a PCA of the aircraft’s pressure, with scikit-learn
import numpy as np
from sklearn.decomposition import PCA
from sklearn.linear_model import LinearRegression
from aircraft import load_runs, split_runs

d = load_runs()
train, val, test, in_box = split_runs(d)
fit = np.r_[train, val]                      # the 44 LHS runs
pca = PCA(n_components=4, svd_solver="full").fit(d["cp"][fit])1
z = pca.transform(d["cp"])                   # 4 numbers per run
probe = LinearRegression().fit(z[fit], d["CL"][fit])2
r2 = probe.score(z[test], d["CL"][test])3
print(f"R2 on the 12 test runs: {r2:.4f}")
  1. The PCA is fitted to the 44 Latin-hypercube runs only: each run’s 2,000 values of CpC_p become 4 coefficients, the “latent” here.
  2. The probe: a straight-line map from the 4 coefficients to the stored CLC_L.
  3. score returns R2R^2 on runs that neither the PCA nor the probe saw, 8 of them outside the training box.

Example 9-2 prints R2 on the 12 test runs: 1.0000.

The price, as the authors state it: compared with the direct-regression surrogates they measure against, AeroJEPA trades peak full-field accuracy for compact, reusable representations. In their selective-decoding experiment, it did better than the direct-regression models they compared it with.

Generative surrogates

AeroJEPA still gives one answer per input. A generative surrogate learns a distribution of fields instead, and draws samples from it. Diffusion models (Ho, Jain and Abbeel 2020) learn to remove noise step by step, turning random noise into a plausible field. Flow matching (Lipman et al. 2023) learns a velocity field that carries noise to data along smooth paths, often with fewer steps than diffusion (a velocity in the space of possible fields, not a flow velocity).

For physics this can give two things. One is a spread of plausible answers where the flow is chaotic (turbulence, separation), if its statistics are checked against the solver. The other is rollouts more stable than those of plain one-step models (time stepping and rollouts): PDE-Refiner (Lippe et al. 2023) and a benchmark of autoregressive diffusion models (Kohl et al.) report this on 1D and 2D flows, the benchmark finding them on par with U-Nets trained by unrolling. The price is several network evaluations per sample instead of one.