Learning Controllable Adaptive Simulation for Multi-resolution Physics
1
Tailin Wu*(吴泰霖), Takashi Maruyama*, Qingqing Zhao*, Gordon Wetzstein, Jure Leskovec
Stanford University
ICLR 2023, notable-top-25%
*equal contribution
Outline
2
Simulation is a core task in science
3
Problem definition and significance
4
Problem definition: Simulate a multi-resolution system in a accurate and efficient way.
Significance: Many physical systems in science and engineering are multi-resolution: parts of the system is highly dynamic and need to resolve to fine-grained resolution, while other parts are more static.
Weather prediction
Galaxy formation
Laser-plasma particle acceleration
Preliminaries: classical solvers and limitations
5
Classical solvers:
Based on Partial Differential Equations (PDEs)
(1) Small time interval to ensure numerical stability, or use implicit method.
(2) For multi-resolution systems, typically need to resolve to the lowest resolution
Pros and challenges:
Discretize the PDE, then use finite difference, finite element, finite volume, etc. to evolve the system.
mesh
grid
discrete time index
discrete cell id
Preliminaries: Deep learning-based surrogate models
6
Recently, deep learning based surrogate modeling has emerged as attractive alternative to replace or complement classical solvers. They:
Limitation of today’s method for multi-resolution physics:
1. Deep learning-based surrogate models: prior works mainly focus on learning the evolution with low prediction error, without directly optimizing the computational cost
7
[1] Pfaff, Tobias, et al. "Learning mesh-based simulation with graph networks." arXiv preprint arXiv:2010.03409 (2020).
Architectural backbone: MeshGraphNets [1]
8
[1] Pfaff et al. ICLR 2021
Limitation of today’s method for multi-resolution physics:
9
2. Classical solvers:
Our contribution
10
We introduced the first deep learning-based surrogate model, which jointly learns the evolution and optimize computational cost.
(Wu et al., ICLR 2023, spotlight)
Key component is a GNN-based reinforcement learning (RL) agent, which learns to coarsen or refine the mesh, to achieve a controllable tradeoff between prediction error and computational cost.
Architecture
11
The policy network predicts the number of edges to refine or coarsen , and which edges to refine or coarsen .
: evolution model, evolving the system while keeping the mesh topology
: policy, which locally refines or coarsens the mesh
Architecture
12
The policy network predicts the number of edges to refine or coarsen , and which edges to refine or coarsen .
: evolution model, evolving the system while keeping the mesh topology
: policy, which locally refines or coarsens the mesh
Architecture
13
The policy network predicts the number of edges to refine or coarsen , and which edges to refine or coarsen .
: evolution model, evolving the system while keeping the mesh topology
: policy, which locally refines or coarsens the mesh
Architecture
14
The policy network predicts the number of edges to refine or coarsen , and which edges to refine or coarsen .
: evolution model, evolving the system while keeping the mesh topology
: policy, which locally refines or coarsens the mesh
Action space: refinement and coarsening
15
(1) Refining an edge
(2) Coarsening an edge
There are also constraints that need to be satisfied, e.g. if two edges are on the same face, they cannot be both refined or coarsened.
Learning the evolution model
The loss is based on the multi-step prediction error of the evolution model, compared with the ground-truth.
16
Learning the policy
17
for S steps
Learning the policy : reward
18
Reward:
Reward is based on the improvement of both error and computational cost.
[1] Sutton, et al. NIPS 1999
is also an input to the policy
for S steps
for S steps
Learning the policy : actor objective
19
Objective for the actor :
advantage
log prob. for taking
the action
entropy regularizer
sg: stop gradient
REINFORCE
Learning the policy : critic objective
20
Objective for the critic (value function) :
value target
Here for the value target, we do not use a bootstrapped version of which assumes infinite horizons. Instead we use the reward defined as improvement error and computation within S steps of rollout.
Experiment 1
(1) Burgers’ equation (from the benchmark in [1])
21
[1] Brandstetter, Johannes, Daniel Worrall, and Max Welling. "Message passing neural PDE solvers." ICLR 2022
Experiment 1
Example rollout:
22
Added cells
removed cells
Experiment 1
Example rollout:
23
24
25
Result table:
Compared to state-of-the-art (FNO, MP-PDE) models and strong baselines, our model achieves large error reduction (average of 33.4%)
Ours
26
Result table:
Compared to ablation LAMP (no remeshing), our full model can reduce error (49.1%), by only modest increase computational cost.
Ours
Experiment 1
27
Fig. 3 shows the average error and # nodes over full test trajectories. We see that
With increasing , LAMP is able to reduce # nodes, with only slight increase in error.
Experiment 1
28
Fig. 3 shows the average error and # nodes over full test trajectories. We see that
With increasing , LAMP improves the Pareto frontier over other models
Experiment 2: results
29
Experiment 2: example visualization
30
ground-truth (fine-grained)
MeshGraphNets + GT remeshing
MSE: 5.91e-4
Experiment 2: example visualization
31
LAMP + heuristic remeshing
ground-truth (fine-grained)
MSE: 6.38e-4
Experiment 2: example visualization
32
LAMP + no remeshing
ground-truth (fine-grained)
MSE: 6.13e-4
Experiment 2: example visualization
33
ground-truth (fine-grained)
LAMP
MSE: 5.80e-4
34
Other examples:
Summary
35
Summary
3. Experiments in 1D PDE and mesh-based simulation demonstrate LAMP’s capability,
outperform previous state-of-the-art.
36
Paper:
Code:
Future opportunities
37
2. Inverse design
Up to millions to billions of nodes
Welcome collaborations (email Tailin Wu, tailin@cs.stanford.edu)!