Learning Modular Simulations for Homogeneous Systems

Jayesh K. Gupta, Sai Vemprala, Ashish Kapoor · DOI

Abstract

Traditional physics-based simulators are modular but difficult to construct, while data-driven machine learning models are flexible but often brittle and non-modular. We present Message-Passing Neural ODEs (MP-NODE), a framework that combines the continuous-time modeling of Neural ODEs with the relational capabilities of Graph Neural Networks. By learning the dynamics of individual components and their interactions via unsupervised message passing, MP-NODE enables the simulation of complex multi-body systems that generalize to unseen configurations and scales without additional training.

Introduction

Simulating complex dynamical systems is a fundamental challenge in science and engineering. While "white-box" simulators based on first principles are highly modular, they require significant domain expertise. Conversely, "black-box" neural simulators can learn directly from data but typically fail when the system's topology or scale changes—for instance, a model trained on a two-pendulum system cannot easily adapt to a three-pendulum configuration.

MP-NODE addresses this gap by focusing on modularity. It learns a universal interaction rule for a single subsystem, allowing an arbitrary number of these modules to be composed into a larger, coherent simulation.

Methodology: Message-Passing Neural ODEs

The MP-NODE framework integrates two powerful architectural paradigms:

  1. Neural Ordinary Differential Equations (Neural ODEs): These model the hidden states of a system as a continuous-time process, making them ideal for physical dynamics.
  2. Graph Neural Networks (GNNs): These handle relational data by passing "messages" between nodes in a graph.
The MP-NODE architecture models individual node dynamics using Neural ODEs ($f_\theta$) augmented with message-passing (MP) to capture interactions.

In MP-NODE, each component of a system is represented as a node. Instead of a global state transition, the model defines a local Neural ODE for each node. This ODE processes the node's internal state and incoming messages from neighbors to compute both the next state and the outgoing messages. Crucially, the weights $f_\theta$ are shared across all nodes, ensuring that the model learns a generalizable "rule of interaction" rather than a specific system state.

Experimental Evaluation

The framework was tested across five diverse systems:

  • Coupled Pendulums: Mechanical systems with spring connections.
  • Lorenz Attractor: Chaotic dynamics in coupled configurations (Lorenz3 and Lorenz10).
  • Gene Dynamics: Biological networks on 4x4 and 8x8 grids.
  • Kuramoto System: Synchronization of coupled oscillators.
  • Quadrotor Swarm: High-dimensional coordination for heavy-lift tasks.

Key Results and Generalization

A defining feature of MP-NODE is its zero-shot generalization. A model trained on a 3-node Lorenz system can simulate a 10-node system with high accuracy without further training. This is possible because the learned interaction logic is independent of the total number of nodes.

Comparison between the modular MP-NODE approach (left) and a standard Encoder-Processor-Decoder GNN architecture (right).

Furthermore, MP-NODE demonstrates significant efficiency in fine-tuning. For large-scale systems like Lorenz10, fine-tuning a pre-trained module was 10x to 20x more efficient than training a baseline model from scratch. The model also showed topology independence, successfully generalizing from Barabási-Albert networks to Erdős-Rényi and Watts-Strogatz structures in gene dynamics tasks.

Discussion and Limitations

While MP-NODE represents a significant step toward modular data-driven simulation, several areas for future work remain:

  • Homogeneity: The current model assumes all nodes are identical. Future iterations could incorporate encoder-decoder structures to handle heterogeneous components.
  • Topology Inference: The system currently requires a known graph structure. Inferring connections from raw data would increase its utility in "black-box" scenarios.
  • Temporal Latency: The model assumes instantaneous communication, which may not reflect real-world distributed systems with significant network lag.

Conclusion

MP-NODE provides a scalable and modular approach to learning the dynamics of homogeneous systems. By combining the strengths of continuous-time modeling and relational learning, it enables simulators that are both data-driven and as flexible as physical building blocks.

Summary updated

BibTeX
@inproceedings{gupta2022learning,
  author = {Jayesh K. Gupta and Sai Vemprala and Ashish Kapoor},
  title = {{Learning Modular Simulations for Homogeneous Systems}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=f2MyWR-6HrQ},
}
Figure