Macrocanonical Generator Networks: Data-Efficient Neural Surrogates for Amortized Physics Simulation

Niall Jeffrey, Benjamin D. WandeltarXiv 2026 · arXiv

TL;DR

Macrocanonical Generator Networks (MGNs) enable the creation of high-fidelity neural surrogates for complex physics simulations using as little as a single training example. By matching multiscale statistics in expectation rather than per-sample, MGNs achieve a million-fold speedup over traditional simulators while preserving the realistic fluctuations essential for downstream scientific tasks like simulation-based inference.

What Problem Does This Paper Address?

In fields like cosmology and fluid dynamics, high-fidelity simulations are the gold standard for understanding the universe. However, these simulations are notoriously slow—often taking days of supercomputer time to generate a single realization. This "computational bottleneck" makes tasks that require thousands of simulations, such as uncertainty quantification or parameter inference, nearly impossible.

While deep generative models (like GANs or Diffusion models) are popular surrogates, they typically require massive datasets to learn the underlying physics. In many scientific domains, we only have a handful of "ground truth" simulations. Existing "microcanonical" methods can synthesize new samples from a single example by matching its statistics exactly, but they are slow, iterative, and—crucially—they eliminate the natural sample-to-sample fluctuations that are physically necessary for accurate statistical inference.

Methods

The authors introduce Macrocanonical Generator Networks, a framework that bridges classical statistical physics with modern deep learning.

  1. Macrocanonical vs. Microcanonical: In statistical physics, a "microcanonical" ensemble has fixed properties for every state. In contrast, a "macrocanonical" ensemble only fixes properties in expectation (on average). MGNs train a neural network to produce samples that match the target's multiscale statistics (specifically Wavelet Phase Harmonics) on average, allowing individual samples to fluctuate naturally.
  2. Amortized Generation: Unlike previous iterative methods that optimize pixels for every new image, MGNs train a global generator (a convolutional U-Net). Once trained, generating a new physical field takes just one forward pass through the network.
  3. Inductive Biases for Stability: To prevent the network from "collapsing" (i.e., just memorizing the training image), the authors use a residual parameterization initialized near the identity map and a low learning rate. This ensures the generator starts by passing through its input noise and only slowly learns to warp it into the target physics, preserving the "entropy" or diversity of the outputs.
Figure 1: Macrocanonical generator networks (centre) turn a small set of expensive simulator outputs (left; turbulence and cosmology targets, Section 5) into large ensembles of new realizations matching the chosen statistical features (e.g. wavelet phase harmonics) of the targets, unlocking downstream scientific machine-learning tasks (right) that are intractable with the expensive simulator alone.

Datasets

The researchers evaluated MGNs on two challenging stationary physical processes:

  • MHD Turbulence: 2D snapshots of magnetohydrodynamic turbulence, which features complex, non-Gaussian structures across many scales.
  • Cosmic Web (Quijote suite): 2D density slices of the large-scale structure of the universe. This is a standard benchmark in cosmology where simulations are extremely expensive.
  • Baselines: They compared their results against state-of-the-art generative models including WGAN-GP, Flow Matching, and Denoising Diffusion Probabilistic Models (DDPM).

Key Insights and Ideas

  • Stationarity is a Superpower: For physical processes that are "stationary" (their statistics don't change if you shift the image), a single large simulation contains a wealth of information. One image essentially provides thousands of "local" examples of the same physics.
  • Training as Optimization: The authors prove that training the generator with gradient descent is mathematically equivalent to a "preconditioned" version of the iterative pixel-optimization used in older methods. This provides a theoretical bridge between deep learning and classical texture synthesis.
  • Fluctuations are Data: In scientific inference, knowing how much a signal varies is just as important as knowing its average. Because MGNs match statistics in expectation, they successfully reproduce the realistic "scatter" seen in real simulations, which GANs and Diffusion models often fail to do when data is scarce.

Key Results

  • Extreme Data Efficiency: MGNs successfully learned to generate realistic turbulence and cosmic web structures from just one training realization. In this regime, standard models like GANs and Diffusion simply memorized the training image.
  • Massive Speedup: The trained generator is $10^6$ times faster per sample than the original physics simulator and $10^3$ times faster than previous iterative synthesis methods.
  • Downstream Success: In a "Simulation-Based Inference" (SBI) task to measure dark energy, pre-training an inference model on MGN-generated data significantly outperformed models trained only on the limited "real" simulations available.
Figure 2: Simulation-based inference of the dark-energy fraction ΩDE from 2-D density images (Section 5). (a, b) A validation example before and after the observational effects (i.e. masking). (c) Posterior after fine-tuning on N “real” simulations. (d) Validation NLL against N (inc. standard deviation with 3 seeds) using cosmologies in the ΩDE training range. The surrogate-pretrained model improves on the prior before any “real” simulation is used and consistently outperforms the baseline.

Limitations and Future Work

  • Feature Dependence: The method relies on choosing the right "feature statistics" (like Wavelet Phase Harmonics). If these statistics don't capture a specific physical property, the generator won't either.
  • Stationarity Requirement: The current framework is designed for stationary processes with periodic boundaries. Adapting this to non-stationary systems (like a simulation of a specific galaxy or a weather system with complex boundaries) remains an open challenge.
  • Convergence Guarantees: While the authors provide strong theoretical motivation and empirical evidence for why MGNs avoid mode collapse, a general mathematical proof for convergence to a maximum-entropy distribution is still missing.

Summary updated

Abstract

Many scientific simulations are computationally expensive, limiting their use in simulation-based inference, uncertainty quantification, and decision making. We introduce macrocanonical generator networks, a framework for learning fast, data-efficient neural surrogates for amortized simulation of stationary physical processes by matching multiscale statistics of a target process. Inspired by microcanonical maximum-entropy synthesis, which matches feature statistics per sample by inner-loop optimization, our approach instead trains a neural generator to satisfy the same constraints in expectation, preserving physically realistic sample-to-sample fluctuations. We prove that gradient-descent training induces preconditioned gradient-descent dynamics in sample space that inherit the symmetry-preservation properties of the microcanonical gradient descent of Bruna and Mallat, amortizing its per-sample inner-loop optimization into a single training run after which every sample is generated in one forward pass. We further show that residual generator parameterizations initialized near the identity, trained with a small learning rate, preserve entropy locally during early optimization and mitigate mode collapse. Experiments on cosmology and fluid simulations show that macrocanonical generators recover realistic samples from extremely small training sets, in some cases a single training example, while generating new realizations more than $10^6$ times faster per sample than the reference simulator and more than $10^3$ times faster than microcanonical gradient descent. The trained generators can be reused for downstream pretraining, including simulation-based inference, providing a data-efficient route to multi-fidelity scientific machine learning workflows.
BibTeX
@misc{jeffrey2026macrocanonical,
  author = {Niall Jeffrey and Benjamin D. Wandelt},
  title = {{Macrocanonical Generator Networks: Data-Efficient Neural Surrogates for Amortized Physics Simulation}},
  year = {2026},
  eprint = {2611.05157},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.05157},
}
Figure