GNS (Graph Network-based Simulator)
A learned particle simulator that passes messages on a graph of particles to predict their accelerations.
Physics and weather · 262 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Physics and weather
- Parameters
- 1.6M
- Operations
- 262
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICML 2020
- Cited by
- 573 (as of 27 October 2026)
- Authors
- Alvaro Sanchez-Gonzalez, Jonathan Godwin, Tobias Pfaff and others
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16927
- Graph hash
- 2cb0f11a7f544943b4e0f8398dc79b7eafb2727aa87e4aa022cda1cd4adc7d5d
- Skeleton hash
- 2631071fa51509bd264de91d3747de4027cb4902437b4f0371d8bebde4ebd6aa
- Architecture hash
- ce52780210c17f29c3d702b7e9d8998dd59f4bafe7497f5777413cd3a1d8fa74
- Diagram SHA-256
- 7679efbc311289cf7753130bc1b663982ff6f2409ceff759a4590bf7f007e57a
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
GNS, short for Graph Network-based Simulators, is a learned physics simulator. It represents the state of a physical system with particles, expressed as nodes in a graph, and computes the dynamics by learned message-passing. The paper applies it to fluids, rigid solids and deformable materials interacting with one another.
The model follows an encode-process-decode scheme. The encoder assigns a node to each particle and adds edges between particles within a connectivity radius, the processor performs M rounds of learned message-passing over the latent graph, and the decoder outputs per-particle accelerations that an Euler integrator turns into the next position and velocity. Each particle's input holds its position, a sequence of 5 previous velocities and features for static material properties. The learned functions are multilayer perceptrons with two hidden layers and a layer size of 128.
The models are trained on one-step data, and to limit the build-up of error over long rollouts the input velocities are corrupted with random-walk noise during training. Across all experiments the paper used one set of hyperparameters: the relative encoder variant, 10 steps of message-passing and unshared parameters in the processor. In one generalization test the model was unrolled for 5000 steps on a scene that reached 85k particles, 34x more than during training.
Key idea. GNS represents a physical system as particles in a graph and learns its dynamics through message-passing, generalizing to more particles and longer rollouts than it saw in training.
- gns
- graph network-based simulator
- graph network simulator
- learning to simulate
- learned physics simulator
- particle-based simulation
- fluid simulation
- message passing
- physical simulation
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{sanchezgonzalez2020learningsimulatecomplexphysics,
title={Learning to Simulate Complex Physics with Graph Networks},
author={Alvaro Sanchez-Gonzalez and Jonathan Godwin and Tobias Pfaff and Rex Ying and Jure Leskovec and Peter W. Battaglia},
year={2020},
eprint={2002.09405},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2002.09405},
}