NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Generative Adaptation of Dynamics to Environmental Shifts via Weight-space Diffusion

Ruikun Li, Huandong Wang, Jingtao Ding, Yuan Yuan, Qingmin Liao, Yong Li

TL;DR

DynaDiff is a novel generative meta-learning framework that adapts physical dynamics models to new environments by directly generating their neural network weights using a conditional diffusion model. By bypassing traditional, slow gradient-based fine-tuning and massive foundation models, it synthesizes highly accurate, environment-specific expert models from just a short snippet of observed trajectory data.

What Problem Does This Paper Address?

Predicting complex physical systems (like fluid dynamics or climate patterns) using machine learning is notoriously difficult when environmental conditions shift—such as changes in fluid viscosity or external forces. Standard approaches either rely on massive foundation models that require heavy computational resources or meta-learning techniques that require slow, gradient-based fine-tuning at test time.

Furthermore, existing attempts to directly generate model weights usually flatten the parameters into simple sequences, destroying the network's structural topology. They also optimize using standard mean squared error (MSE), which fails to capture whether two numerically different weight sets actually behave the same way functionally.

Methods

The authors introduce DynaDiff, which shifts the adaptation paradigm from gradient-based tuning to direct weight synthesis in a structured latent space. The core components include:

  • Weight Graph Representation: Instead of flattening weights, DynaDiff organizes neural network parameters into a graph based on the forward data flow, preserving structural connectivity and skip connections.
  • Functional Weight VAE: A node-attention Variational Autoencoder compresses the weight graph into a low-dimensional latent space. Crucially, it uses a functional loss that measures how similar the outputs of the reconstructed model are to the original, rather than just comparing raw parameter values.
  • Dynamics-Informed Prompter: To condition the generation process without knowing exact environmental parameters, a hybrid prompter extracts macroscopic physical features (like energy and enstrophy statistics) and microscopic spectral features (via FFT and a GRU) from a short sequence of observations.
  • Latent Diffusion Model: A Transformer-based conditional diffusion model operates within the VAE's smooth latent space to generate completely tailored expert weights based on the prompter's condition.
Figure 1. Paradigms for dynamics adaption.

Datasets

The framework was evaluated across four simulated partial differential equation (PDE) systems and one real-world climate dataset:

  1. Cylinder Flow: Simulating turbulent fluid flow around a cylinder using the lattice Boltzmann method.
  2. Lambda-Omega: A reaction-diffusion system.
  3. Kolmogorov Flow: A chaotic 2D fluid flow system.
  4. Navier-Stokes Equations: Standard fluid dynamics equations with varying external driving forces.
  5. ERA5 Dataset: Real-world global reanalysis weather data, specifically evaluating wind speeds across different subregions.

Key Insights and Ideas

  • Function Over Form: Neural networks can have completely different numerical weight values but identical physical behavior. Training the VAE with a functional loss creates a smooth, continuous weight manifold that makes diffusion generation much more stable and accurate.
  • Topology Matters: Treating weights as a graph that mirrors the network architecture provides a powerful inductive bias, significantly outperforming sequence-based models like standard Transformers that flatten weights.
  • Linear Parameter Scaling: The generator's parameter count scales linearly with the target model's depth and width rather than exponentially, making it highly scalable for practical architectures.
  • Outperforming the Optimizer: Surprisingly, the generated weights sometimes outperformed models trained directly via gradient descent optimization, suggesting that DynaDiff successfully captures the true underlying manifold and avoids getting stuck in local optima.

Key Results

  • Accuracy Boost: DynaDiff improved average prediction accuracy by 10.78% over competitive baselines across the tested environments.
  • Efficiency Gains: By generating weights directly, test-time adaptation is roughly 3× faster than meta-learning methods that require iterative fine-tuning.
  • Zero-Shot Generalization to Unseen Physics: When trained on Cylinder Flow, Lambda-Omega, and Navier-Stokes, DynaDiff successfully generalized to a completely held-out physical law (Kolmogorov Flow), achieving the longest accurate prediction horizon in zero-shot settings.
DynaDiff framework overview showing training and testing phases

Limitations and Future Work

Currently, DynaDiff is constrained to generating expert models with a fixed architecture (e.g., a specific Fourier Neural Operator structure). The authors note that a fixed architecture might not be optimal for all levels of environmental complexity. They suggest that a promising future direction is extending the framework to synthesize heterogeneous, dynamically tailored model architectures on the fly.

Summary updated

BibTeX
@inproceedings{li2026generative,
  author = {Ruikun Li and Huandong Wang and Jingtao Ding and Yuan Yuan and Qingmin Liao and Yong Li},
  title = {{Generative Adaptation of Dynamics to Environmental Shifts via Weight-space Diffusion}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=VFCf4CSfzw},
}
Figure