Constraint-based graph network simulator

Yulia Rubanova,Alvaro Sanchez-Gonzalez,Tobias Pfaff,Peter Battaglia
DOI: https://doi.org/10.48550/arXiv.2112.09161
2022-01-28
Abstract:In the area of physical simulations, nearly all neural-network-based methods directly predict future states from the input states. However, many traditional simulation engines instead model the constraints of the system and select the state which satisfies them. Here we present a framework for constraint-based learned simulation, where a scalar constraint function is implemented as a graph neural network, and future predictions are computed by solving the optimization problem defined by the learned constraint. Our model achieves comparable or better accuracy to top learned simulators on a variety of challenging physical domains, and offers several unique advantages. We can improve the simulation accuracy on a larger system by applying more solver iterations at test time. We also can incorporate novel hand-designed constraints at test time and simulate new dynamics which were not present in the training data. Our constraint-based framework shows how key techniques from traditional simulation and numerical methods can be leveraged as inductive biases in machine learning simulators.
Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is that in the field of physical simulation, most of the existing neural - network - based methods directly predict future states from the previous state without making full use of the constraints in the system. Traditional simulation engines usually select states that satisfy these constraints by modeling the constraints of the system. Therefore, this paper proposes a constraint - based learning simulation framework, in which a scalar constraint function is implemented using a Graph Neural Network (GNN), and the future prediction is calculated by solving the optimization problem defined by the learned constraints. Specifically, the paper proposes the "Constraint - based Graph Network Simulator" (C - GNS). This model defines a single learned constraint function to indicate whether the future state is consistent with the current and previous states. By conditioning on the previous state, this method can capture temporal dynamics in its learned constraint function. When predicting future states, a gradient - based solver is used to iteratively optimize the proposed state to minimize the learned constraint. The model is trained end - to - end by back - propagating the loss gradient through the solver. Crucially, the model is trained directly on the observed trajectory data and does not need to know the real constraints governing the system dynamics. The learned constraint function only needs to produce the same solutions as the real constraints, while their objective landscapes may be different (for example, the learned constraint function may be convex, while the real constraint may not be). The main contributions of the paper are as follows: 1. **Improving simulation accuracy**: By applying more solver iteration times at test time, the simulation accuracy for larger systems can be improved. 2. **Flexible constraint integration**: New hand - designed constraints can be introduced at test time and jointly satisfied with the learned constraints. 3. **Comparison with existing methods**: In multiple physical simulation fields (such as ropes, bouncing balls and irregular rigid bodies, splashing fluids), the roll - out predictions generated by C - GNS are more accurate than those of the state - of - the - art graph network simulators (such as Graph Net Simulator). In summary, this paper aims to provide a more accurate and flexible physical simulation method by combining constraint modeling in traditional simulation methods and Graph Neural Networks in machine learning.