HypeR Adaptivity: Joint hr-Adaptive Meshing via Hypergraph Multi-Agent Deep Reinforcement Learning

Niccolò Grillo, James Rowbottom, Pietro Liò, Carola-Bibiane Schönlieb, Stefania FrescaarXiv 2025 · DOI

Abstract

Adaptive mesh refinement is essential for the efficient numerical solution of partial differential equations (PDEs). While h-adaptivity (element splitting) and r-adaptivity (vertex relocation) are well-established, their joint optimization, known as hr-adaptivity, remains computationally challenging. We introduce HypeR, a deep reinforcement learning framework that treats the mesh as a swarm of hypergraph agents to jointly optimize shape and connectivity. By utilizing a Hypergraph Neural Network (HGNN) and a diffusion-based relocation operator, HypeR achieves a 6–10× reduction in error compared to state-of-the-art methods. Our results demonstrate that HypeR produces high-quality meshes that generalize zero-shot to complex geometries and large-scale domains.

Introduction

The Finite Element Method (FEM) is a fundamental tool for solving complex physics problems, yet its performance is intrinsically linked to the quality of the underlying mesh. To maintain computational efficiency, researchers employ adaptive meshing to concentrate resolution in regions of high solution gradients. Traditional approaches typically focus on either h-adaptivity (splitting elements) or r-adaptivity (moving vertices). While h-adaptivity is limited by the initial mesh topology, r-adaptivity cannot add resolution where it is fundamentally lacking.

Combining these into hr-adaptivity is considered the "holy grail" of mesh generation but is notoriously difficult to implement due to the high cost of auxiliary PDE solves and the reliance on hand-crafted heuristics. HypeR addresses this by framing mesh adaptation as a Multi-Agent Reinforcement Learning (MARL) problem, enabling the simultaneous optimization of mesh connectivity and vertex positions through a learned policy.

Methods

HypeR utilizes a "dual-swarm" MARL approach, representing the mesh as a hypergraph where vertices are nodes and elements are hyperedges. This structure allows for sophisticated information exchange between agents.

Hypergraph Representation and Swarm Intelligence

By treating every vertex and element as an independent agent, HypeR facilitates coordinated decision-making. Element agents decide on discrete splitting actions, while vertex agents determine continuous relocation. A Hypergraph Neural Network (HGNN) enables bidirectional communication: element agents identify areas requiring higher resolution, while vertex agents monitor and mitigate geometric distortion.

The HypeR framework iteratively refines a mesh through a single forward pass of the policy, jointly optimizing vertex positions and element connectivity.

Policy Architecture and Constraints

The framework is trained using Proximal Policy Optimization (PPO). To ensure mesh validity and prevent "tangling" (where elements invert), the authors incorporate a Diffformer block. This diffusion-based operator constrains vertex movement to a "safe zone" relative to neighboring nodes. As illustrated in the figure above, the refinement process is iterative, with each step requiring only a single forward pass of the HypeR policy.

Results

The HypeR framework was benchmarked across four 2D PDE domains: Poisson equations, unsteady heat diffusion, Stokes flow, and linear elasticity.

Performance and Accuracy

HypeR consistently outperformed existing methods, achieving a 6–10× reduction in approximation error compared to ASMR++ (the previous state-of-the-art RL method) at identical element counts. In terms of computational efficiency, HypeR provided speedups of 4× to over 100× relative to brute-force uniform refinement.

Generalization and Mesh Quality

The "swarm" logic employed by HypeR proves to be highly scale-invariant. Policies trained on simple $1 \times 1$ domains generalized to $6 \times 6$ domains and complex geometries (such as bow-tie shapes) without retraining. Qualitatively, HypeR generates meshes with smooth transitions and precise alignment with solution contours, effectively mimicking expert-level manual refinement.

Discussion and Conclusion

HypeR demonstrates that learning the relationship between mesh geometry and topology can significantly break the "accuracy ceiling" of traditional adaptive methods. By leveraging hypergraph-based swarm intelligence, the framework provides a robust and scalable solution for high-fidelity simulations. While currently focused on 2D stationary problems, the underlying mathematical framework is extensible to 3D domains and fully time-dependent solvers, representing a major step forward in autonomous mesh generation.

Summary updated

BibTeX
@misc{grillo2025hyper,
  author = {Niccolò Grillo and James Rowbottom and Pietro Liò and Carola-Bibiane Schönlieb and Stefania Fresca},
  title = {{HypeR Adaptivity: Joint hr-Adaptive Meshing via Hypergraph Multi-Agent Deep Reinforcement Learning}},
  year = {2025},
  eprint = {2512.10439},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.10439},
}
Figure