Recovering Missing Degrees of Freedom in Simulation-Trained Field-Level Generative Models

Masato Shirasaki, Shiro IkedaarXiv 2026 · arXiv

TL;DR

Simulation-trained generative models in cosmology often suffer from "variance shrinkage," where they accurately learn average behaviors but fail to capture the full range of physical variability due to finite training data. This paper introduces physics-informed latent corrections to the dynamics of Continuous Normalizing Flows, allowing models to recover missing variability and improve robustness against out-of-distribution data without requiring additional expensive simulations.

What Problem Does This Paper Address?

In modern cosmology, "field-level inference" is the gold standard for extracting information from observational data, especially in the "nonlinear regime" where simple analytical models fail. Researchers increasingly turn to deep generative models trained on high-fidelity simulations to emulate these complex structures.

However, these models face a fundamental bottleneck: the "limited simulation budget." High-fidelity simulations are computationally expensive, and training on a finite dataset often leads to variance shrinkage. The model learns to reproduce the "average" universe well but underestimates the realization-to-realization variability (the "scatter"). This isn't just a statistical quirk; it means the model is missing effective degrees of freedom, which leads to overconfident and potentially biased inferences when applied to real-world data that might differ slightly from the training set.

Methods

The authors employ a Continuous Normalizing Flow (CNF) to map simple Gaussian random fields into complex, non-Gaussian weak-lensing maps. The baseline model uses Fourier Neural Operators (FNOs) to ensure the generative process respects physical symmetries like translation and rotation.

The core innovation is the introduction of physics-informed latent modifications to the flow's velocity field ($v$): $$v(\mathbf{x}, c, t, \theta) = A(c, t, \theta) [v_0(\mathbf{x}, c, t) + B(c, t, \theta)] + C(\mathbf{x}, c, t, \theta)$$

  • Term A (Multiplicative): Modulates the overall growth of structure.
  • Term B (Additive): Captures large-scale mean-field shifts.
  • Term C (Residual): Describes position-dependent fluctuations.

These corrections are controlled by a small number of latent parameters ($\theta$). Instead of retraining the entire neural network, the authors optimize only these latent correction parameters by minimizing the sliced Wasserstein distance between the generated maps and the original simulations. For inference, they use the Metropolis-adjusted Langevin algorithm (MALA) to jointly sample the latent variables and the underlying physical fields.

Datasets

  • Training: 10,000 realizations of gravity-only weak-lensing simulations from the $\kappa$TNG suite.
  • Out-of-Distribution (OoD) Test Set 1 (Hydro): Full-physics simulations from IllustrisTNG that include baryonic effects (like gas cooling and black hole feedback) not present in the training data.
  • Out-of-Distribution (OoD) Test Set 2 (Source-z): Gravity-only simulations but with source redshifts shifted outside the range covered by the training set.

Key Insights and Ideas

  • Variance Shrinkage as a Diagnostic: Rather than viewing variance shrinkage as a failure, the authors treat it as a diagnostic tool to identify "missing degrees of freedom" in the learned dynamics.
  • Latent Variables as Nuisance Parameters: During inference, the model "learns" to use these new latent directions to absorb mismatches between the training and target distributions. For example, if the real data has suppressed power due to baryonic effects, the inference procedure automatically shifts the latent variables to compensate.
  • Dynamics vs. Post-processing: Unlike simple global rescaling of an output image, these corrections act on the generative dynamics themselves. This naturally produces physically realistic, scale-dependent responses in the power spectrum (see the inset in Figure 1a).
Figure 1: (a) Recovery of field variance distribution. (b) Latent variable shifts during OoD inference. (c) Improvement in OoD shift metric.

Key Results

  • Restoring Variability: The latent-enhanced model successfully broadens the distribution of field variance, bringing it into much closer agreement with the true simulation scatter compared to the "latent-free" baseline (Figure 1a).
  • Improved Robustness: In out-of-distribution tests, the latent-enhanced model consistently reduced the discrepancy between inferred and true responses. The "OoD shift metric" ($D^2$) showed significant improvement for both baryonic and redshift shifts (Figure 1c).
  • Active Utilization: The model doesn't just have more "noise"; it actively uses the latent degrees of freedom. In Figure 1b, the coherent shift of the latent posterior mean ($\Delta \mu_\theta$) demonstrates that the inference engine uses these parameters to systematically correct for model mismatches.
  • Baseline Limitations: As shown in Figure 2, the baseline model (without latents) significantly underestimates the realization-to-realization scatter (bottom row), even though it captures the mean statistics well (third row).
FIG. 2. Validation of the baseline flow model. The first row shows a representative realization from the κTNG simulations, while the second row shows a sample generated by the baseline flow model. Field values are normalized by the standard deviation of each tomographic channel. The generated maps visually reproduce the non-Gaussian and highly skewed structures present in the simulations, and preserve the strong correlations across tomographic channels. The third row compares the mean power spectrum and peak-count statistics between the simulations and generated samples. The curves show (Flow −True)/σTrue, where σTrue denotes the realization-to-realization scatter measured from the simulations. The gray band indicates agreement within 0.5σ. The flow model accurately reproduces the average power spectra of all tomographic combinations and also captures the peak-count statistics. Since peak counts are a representative non-Gaussian observable beyond the two-point function, this agreement demonstrates that the model successfully learns non-Gaussian information in addition to the power spectrum. The fourth row shows the ratio of realization-to-realization scatter, σFlow/σTrue, for the same summary statistics. Although the mean statistics are reproduced accurately, the scatter is systematically suppressed for both power spectra and peak counts. This variance shrinkage motivates the latent corrections introduced in Section II.B.

Limitations and Future Work

  • Partial Covariance Recovery: While the model restores a substantial fraction of missing variability, the full covariance structure of weak-lensing observables is only partially recovered.
  • Higher-Order Statistics: It remains an open question which specific latent corrections are needed to perfectly reproduce higher-order statistics and non-trivial covariance structures.
  • Generalization: While demonstrated on CNFs, the authors suggest this approach could extend to diffusion and score-based models.
  • Theoretical Guidance: Future work could leverage theoretical frameworks like Effective Field Theory (EFT) to provide even more rigorous physics-informed guidance for constructing these latent degrees of freedom.

Summary updated

Abstract

Simulation-trained generative models are emerging as a powerful framework for field-level inference in cosmology, particularly in strongly nonlinear regimes where analytical approaches become intractable. However, the finite size of training datasets often leads to variance shrinkage, indicating that part of the realization-level variability of the underlying physical process is not captured by the learned generative dynamics. In this Letter, we interpret variance shrinkage as a diagnostic of missing effective degrees of freedom and introduce physics-informed latent modifications to the generative dynamics of a continuous normalizing flow. We show that these latent corrections recover a substantial fraction of the missing variability without requiring additional training simulations. Using weak-lensing field-level inference as a representative cosmological application, we further demonstrate through posterior analysis that the learned latent directions are actively exploited during inference and behave as effective nuisance parameters that absorb part of the mismatch between the training and target distributions. As a result, the model exhibits improved robustness to out-of-distribution shifts in field-level inference. Our work establishes variance shrinkage as a practical diagnostic for identifying missing degrees of freedom in simulation-trained generative models and provides a framework for recovering them through physics-informed modifications of generative dynamics.
BibTeX
@misc{shirasaki2026recovering,
  author = {Masato Shirasaki and Shiro Ikeda},
  title = {{Recovering Missing Degrees of Freedom in Simulation-Trained Field-Level Generative Models}},
  year = {2026},
  eprint = {2611.02627},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.02627},
}
Figure