Learning Modular Simulations for Homogeneous Systems

Jayesh K Gupta, Sai Vemprala, Ashish Kapoor

TL;DR

Researchers at Microsoft have developed Message-Passing Neural ODEs (MP-NODE), a framework that simulates complex systems by modeling individual components rather than the entire assembly. By combining the continuous-time modeling of Neural ODEs with the relational power of Graph Neural Networks, MP-NODE enables "plug-and-play" simulation that generalizes to new system configurations without retraining from scratch.

What Problem Does This Paper Address?

In engineering, we often deal with "multibody systems"—think of a swarm of drones carrying a heavy load or a network of pendulums connected by strings. Traditionally, modeling these requires either hand-coded physics (which is labor-intensive) or "black-box" machine learning (which is data-hungry and brittle).

The major gap in current ML-based simulators is modularity. If you train a model to simulate three drones, that model usually becomes useless if you add a fourth drone or change how they are connected. You have to retrain the entire system from scratch. This paper tackles the challenge of learning a "subsystem" model that is smart enough to understand its own dynamics and how to interact with its neighbors, regardless of the overall system's size or shape.

Methods

The authors introduce Message-Passing Neural ODEs (MP-NODE). The architecture is a hybrid of two powerful ideas:

  1. Neural ODEs: Instead of predicting the next state in discrete steps, these models learn the derivative of the system, allowing for continuous-time simulation and better handling of complex physics.
  2. Graph Neural Networks (GNNs): These handle the "who is talking to whom" part of the system.
Comparison of the proposed MP-NODE architecture (left) with a standard Graph Network simulator (right). MP-NODE continuously integrates both physical states and hidden message variables.

The Secret Sauce: Augmented State Messages In a standard Neural ODE, the model only tracks the physical state (like position and velocity). In MP-NODE, the authors augment this state with a "message" variable.

  • Each node (subsystem) calculates its own evolution.
  • Nodes exchange these hidden "message" variables with their neighbors based on the system's graph topology.
  • An aggregator (like a simple mean) combines incoming messages, which then influence the node's next state.

Crucially, the weights are shared across all nodes. The model doesn't learn "Drone A" and "Drone B"; it learns the universal "Drone-ness" and how any drone reacts to its neighbors.

Datasets

The researchers evaluated MP-NODE across five diverse dynamical systems:

  • Coupled Pendulum: Two identical pendulums connected by a string.
  • Lorenz Attractor: Chaotic systems (Lorenz3 and Lorenz10) coupled in a fully connected network.
  • Gene Dynamics: Biological regulatory networks simulated on $4 \times 4$ and $8 \times 8$ grids using various graph types.
  • Kuramoto System: A classic model for synchronization in large sets of coupled oscillators.
  • Quadrotor Swarm: A high-stakes robotics task where 3 or 6 drones must coordinate to carry a heavy load through a narrow doorway.

Key Insights and Ideas

  • Zero-Shot Generalization: This is the "aha" moment. A model trained on a system with only 3 nodes (Lorenz3) can be used to simulate a system with 10 nodes (Lorenz10) immediately, with no additional training. It recognizes the underlying interaction rules.
  • Messages as "Implicit Physics": The message variables effectively learn to represent complex interaction forces (like the tension in a string or aerodynamic turbulence) without the researchers having to write down a single physics equation.
Simulation results for a coupled pendulum system. The bottom row shows the norm of the learned message variables, which dynamically adapt to represent the implicit physical interaction forces between the pendulums.
  • Transfer Learning Efficiency: When the system changes significantly, "fine-tuning" a pre-trained MP-NODE is orders of magnitude faster than training a standard model from scratch. It already understands the basic "vocabulary" of the subsystem's movement.
  • The "Goldilocks" Message Size: The authors found that increasing the size of the message vector improves accuracy, but only up to a point. For the Kuramoto system, a message dimension of 7 was the sweet spot; beyond that, the gains were marginal.

Key Results

  • Finetuning vs. Scratch: In the Lorenz10 test, the MP-NODE finetuned from a 3-node model achieved a low error rate significantly faster than a model trained from scratch. Quantitatively, the "error $\times$ epochs" metric for finetuning was roughly 10-20 times lower than training from scratch.
  • Topology Transfer: In Gene Dynamics, a model trained on one type of connection (Barabási-Albert) performed excellently on entirely different connection types (Erdős-Rényi and Watts-Strogatz) with test errors as low as $0.0023$.
  • Robotic Scaling: In the quadrotor swarm, MP-NODE successfully scaled from 3 to 6 drones, outperforming the "Learning to Simulate" (L2S) baseline which struggled as the system complexity increased.

Limitations and Future Work

  • Homogeneous Only: Currently, the framework assumes all parts of the system are the same (e.g., all drones or all pendulums). It cannot yet handle "heterogeneous" systems where a drone might be connected to a ground robot.
  • Graph Knowledge: The model requires the user to provide the "graph structure" (who is connected to whom). In some real-world scenarios, these connections might be unknown or change dynamically.
  • Communication Delays: The current model assumes messages are passed instantly. In real-world distributed systems, lag or latency between components could break the simulation.
  • Physical Constraints: Because it is purely data-driven, the model can still produce "unphysical" predictions in extreme, unseen scenarios. Integrating hard physical constraints (like conservation of energy) is a suggested next step.

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