Swarm Reinforcement Learning For Adaptive Mesh Refinement

Niklas Freymuth,Philipp Dahlinger,Tobias Würth,Simon Reisch,Luise Kärger,Gerhard Neumann
2023-10-10
Abstract:Adaptive Mesh Refinement (AMR) enhances the Finite Element Method, an important technique for simulating complex problems in engineering, by dynamically refining mesh regions, enabling a favorable trade-off between computational speed and simulation accuracy. Classical methods for AMR depend on heuristics or expensive error estimators, hindering their use for complex simulations. Recent learning-based AMR methods tackle these issues, but so far scale only to simple toy examples. We formulate AMR as a novel Adaptive Swarm Markov Decision Process in which a mesh is modeled as a system of simple collaborating agents that may split into multiple new agents. This framework allows for a spatial reward formulation that simplifies the credit assignment problem, which we combine with Message Passing Networks to propagate information between neighboring mesh elements. We experimentally validate our approach, Adaptive Swarm Mesh Refinement (ASMR), on challenging refinement tasks. Our approach learns reliable and efficient refinement strategies that can robustly generalize to different domains during inference. Additionally, it achieves a speedup of up to $2$ orders of magnitude compared to uniform refinements in more demanding simulations. We outperform learned baselines and heuristics, achieving a refinement quality that is on par with costly error-based oracle AMR strategies.
Multiagent Systems,Machine Learning,Numerical Analysis
What problem does this paper attempt to address?
### Problems the paper attempts to solve The paper aims to address the challenges in Adaptive Mesh Refinement (AMR). Specifically, AMR is an important technique in the Finite Element Method (FEM). It improves the simulation accuracy of complex engineering problems by dynamically refining mesh regions while maintaining the computing speed. However, traditional AMR methods rely on heuristic methods or expensive error estimators, which limits their application in complex simulations. Although some recent learning - based AMR methods have attempted to solve these problems, these methods can currently only be applied to simple examples and cannot be extended to more complex tasks. To this end, the paper proposes a new method - Adaptive Swarm Reinforcement Learning (ASMR). This method models the AMR problem as a novel Adaptive Swarm Markov Decision Process (ASMDP), in which each mesh element is regarded as a simple collaborative agent and can be split into multiple new agents. By combining Message Passing Networks (MPNs) and a spatial reward mechanism, ASMR can learn reliable refinement strategies in complex tasks and robustly generalize to different domains during the inference process. ### Main contributions 1. **Proposing a new Markov Decision Process (MDP)**: This process naturally integrates local rewards and is suitable for swarm systems where agents may split over time. 2. **Combining MPNs and a new spatial reward mechanism**: This method can reliably and efficiently extend the learned AMR to static meshes with thousands of elements. 3. **Validating the effectiveness on multiple partial differential equations (PDEs)**: The experimental results show that ASMR not only outperforms existing learning - based methods and traditional methods, but also achieves a refinement quality comparable to oracle - based heuristic methods without the need for expensive error estimation. 4. **Open - source code**: To promote research in this field, the authors released the first code library of AMR based on reinforcement learning, including all the methods and tasks mentioned in the paper. ### Experimental verification The paper carried out experimental verification on a series of PDEs that require complex refinement strategies, including unsteady - state heat diffusion problems and linear elasticity tasks. The experimental results show that ASMR can generate high - quality refined meshes on multiple tasks, and is 2 to 100 times faster in computing speed than uniform refinement. In addition, ASMR also demonstrates robust generalization ability in different domains and initial conditions. ### Summary By proposing the ASMDP framework and combining MPNs and the spatial reward mechanism, ASMR successfully solves the problems existing in traditional AMR methods, especially the scalability and efficiency problems when dealing with complex tasks. This method not only outperforms existing methods in performance, but also provides a new direction for future AMR research.