Table of Contents
Fetching ...

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

Niccolò Grillo, James Rowbottom, Pietro Liò, Carola Bibiane Schönlieb, Stefania Fresca

TL;DR

<3-5 sentence high-level summary> HypeR addresses the inefficiencies of classical adaptive mesh refinement by proposing a unified, learning-based framework that jointly optimizes mesh topology (h) and vertex geometry (r) via deep reinforcement learning on a hypergraph representation. It introduces a dual-swarm MDP with a single, shared neural backbone that produces continuous vertex relocations and discrete refinement decisions, guaranteed to avoid mesh tangling through a diffusion-based Diffformer mechanism. Across four benchmark 2D PDEs, HypeR achieves 6–10x error reductions at comparable element counts and demonstrates strong generalization to unseen geometries and larger domains, while delivering substantial speedups over traditional refinement strategies. This work establishes joint hr-adaptivity learned policies as a powerful approach for automated, high-quality mesh generation in scientific computing contexts.

Abstract

Adaptive mesh refinement is central to the efficient solution of partial differential equations (PDEs) via the finite element method (FEM). Classical $r$-adaptivity optimizes vertex positions but requires solving expensive auxiliary PDEs such as the Monge-Ampère equation, while classical $h$-adaptivity modifies topology through element subdivision but suffers from expensive error indicator computation and is constrained by isotropic refinement patterns that impose accuracy ceilings. Combined $hr$-adaptive techniques naturally outperform single-modality approaches, yet inherit both computational bottlenecks and the restricted cost-accuracy trade-off. Emerging machine learning methods for adaptive mesh refinement seek to overcome these limitations, but existing approaches address $h$-adaptivity or $r$-adaptivity in isolation. We present HypeR, a deep reinforcement learning framework that jointly optimizes mesh relocation and refinement. HypeR casts the joint adaptation problem using tools from hypergraph neural networks and multi-agent reinforcement learning. Refinement is formulated as a heterogeneous multi-agent Markov decision process (MDP) where element agents decide discrete refinement actions, while relocation follows an anisotropic diffusion-based policy on vertex agents with provable prevention of mesh tangling. The reward function combines local and global error reduction to promote general accuracy. Across benchmark PDEs, HypeR reduces approximation error by up to 6--10$\times$ versus state-of-art $h$-adaptive baselines at comparable element counts, breaking through the uniform refinement accuracy ceiling that constrains subdivision-only methods. The framework produces meshes with improved shape metrics and alignment to solution anisotropy, demonstrating that jointly learned $hr$-adaptivity strategies can substantially enhance the capabilities of automated mesh generation.

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

TL;DR

<3-5 sentence high-level summary> HypeR addresses the inefficiencies of classical adaptive mesh refinement by proposing a unified, learning-based framework that jointly optimizes mesh topology (h) and vertex geometry (r) via deep reinforcement learning on a hypergraph representation. It introduces a dual-swarm MDP with a single, shared neural backbone that produces continuous vertex relocations and discrete refinement decisions, guaranteed to avoid mesh tangling through a diffusion-based Diffformer mechanism. Across four benchmark 2D PDEs, HypeR achieves 6–10x error reductions at comparable element counts and demonstrates strong generalization to unseen geometries and larger domains, while delivering substantial speedups over traditional refinement strategies. This work establishes joint hr-adaptivity learned policies as a powerful approach for automated, high-quality mesh generation in scientific computing contexts.

Abstract

Adaptive mesh refinement is central to the efficient solution of partial differential equations (PDEs) via the finite element method (FEM). Classical -adaptivity optimizes vertex positions but requires solving expensive auxiliary PDEs such as the Monge-Ampère equation, while classical -adaptivity modifies topology through element subdivision but suffers from expensive error indicator computation and is constrained by isotropic refinement patterns that impose accuracy ceilings. Combined -adaptive techniques naturally outperform single-modality approaches, yet inherit both computational bottlenecks and the restricted cost-accuracy trade-off. Emerging machine learning methods for adaptive mesh refinement seek to overcome these limitations, but existing approaches address -adaptivity or -adaptivity in isolation. We present HypeR, a deep reinforcement learning framework that jointly optimizes mesh relocation and refinement. HypeR casts the joint adaptation problem using tools from hypergraph neural networks and multi-agent reinforcement learning. Refinement is formulated as a heterogeneous multi-agent Markov decision process (MDP) where element agents decide discrete refinement actions, while relocation follows an anisotropic diffusion-based policy on vertex agents with provable prevention of mesh tangling. The reward function combines local and global error reduction to promote general accuracy. Across benchmark PDEs, HypeR reduces approximation error by up to 6--10 versus state-of-art -adaptive baselines at comparable element counts, breaking through the uniform refinement accuracy ceiling that constrains subdivision-only methods. The framework produces meshes with improved shape metrics and alignment to solution anisotropy, demonstrating that jointly learned -adaptivity strategies can substantially enhance the capabilities of automated mesh generation.

Paper Structure

This paper contains 92 sections, 55 equations, 12 figures, 2 tables.

Figures (12)

  • Figure 1: A high-level schematic of the HypeR framework at inference. Starting from an initial coarse mesh $\mathcal{T}^{(0)}$, the HypeR policy network is applied iteratively. At each step, the network takes the current mesh $\mathcal{T}^{(n)}$ and, in a single forward pass, jointly outputs the refinement vector $b^{(n)}$ and the vertex relocation map $\Phi(\mathcal{Z}^{(n)})$ to produce the next adapted mesh $\mathcal{T}^{(n+1)}$.
  • Figure 2: Hypergraph representation of the mesh $\mathcal{T}^{(n)}$. A zoomed-in region of the mesh on the L-shaped domain shows its modeling by the hypergraph $\mathcal{H}^{(n)}$. This encoding creates a one-to-one mapping where each mesh vertex (red dot) is treated as a hypergraph node, and each triangular element is represented as a hypergraph hyperedge (purple) connecting its constituent nodes.
  • Figure 3: HypeR policy (actor) network architecture. The mesh hypergraph $\mathcal{H}^{(n)}$ provides vertex features ($f_z$) and element features ($f_K$), which are first projected onto a latent space by a linear embedding layer (P). The resulting embeddings ($h_z^{(0)}, h_K^{(0)}$) are processed by $L$ dual hypergraph convolutional (HConv) layers to produce the final embeddings $h_z^{(L)}$ and $h_K^{(L)}$. These are fed into two distinct agent policy heads: (1) the vertex-agent head generates a multivariate Gaussian policy $\mathcal{N}(\mu, \Sigma)$ by using a stack of $L$ Difformer layers to produce the mean $\mu$ and a separate MLP to produce the covariance $\Sigma$, and (2) the element-agent head uses a MLP to generate a probability vector $p$ for the Bernoulli refinement policy $\mathcal{B}e(p)$. The corresponding value (critic) heads, which share the same hypergraph backbone, are omitted for clarity.
  • Figure 4: Overview of one HypeR training step, transitioning from mesh $\mathcal{T}^{(n)}$ (1) to $\mathcal{T}^{(n+1)}$ (5). The PPO loop (blue box) begins with the hypergraph state $\mathcal{H}^{(n)}$ (2), which is fed into the joint actor-critic network. The network outputs policy distributions and value estimates $V^{(n)}$. The policy $\pi_{\theta}$ samples a joint action $A^{(n)}$ (3), consisting of continuous vertex relocations ($\sim \mathcal{N}$) and binary element refinements ($\sim \text{Bernoulli}$). Applying these actions produces the intermediate relocated mesh $\widetilde{\mathcal{T}}^{(n)}$ (4) and the final refined mesh $\mathcal{T}^{(n+1)}$ (5). Per-agent rewards $R^{(n)}$ are computed via FEM solves. The full transition tuple (state, action, reward, value) is stored in the rollout buffer. Once the trajectory is complete, GAE is applied retroactively to compute the advantages $\hat{\mathcal{A}}^{(n)}$ used for the vectorized PPO update (dashed line).
  • Figure 5: Representative HypeR refinements across four PDE problems (rows) for five penalty settings (columns). At inference time we set an element-penalty feature on hyperedges that controls the cost of adding elements; moving left to right the penalty decreases and the final mesh density increases. This single policy thus can be seen as producing a continuum of meshes by varying a single scalar input.
  • ...and 7 more figures