NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

GNNRL-Smoothing: A Prior-Free Reinforcement Learning Model for Mesh Smoothing

Zhichao Wang, Xinhai Chen, Chunye Gong, Bo Yang, Liang Deng, Yufei Sun, Yufei Pang, Jie LiuarXiv 2024 · DOI

Abstract

Mesh smoothing is a fundamental step in numerical simulations, ensuring that the underlying grid elements maintain high geometric quality to prevent computational instability. While traditional heuristic and optimization-based methods exist, they often face a trade-off between speed and accuracy. This paper presents GNNRL-Smoothing, a novel reinforcement learning (RL) framework that learns to optimize mesh quality from scratch. By employing a dual-agent system—one for continuous node movement and another for discrete edge flipping—and a Graph Transformer for state encoding, the model achieves state-of-the-art performance on 2D and 3D meshes. Notably, GNNRL-Smoothing is prior-free, requiring no expert demonstrations, and performs over seven times faster than traditional optimization methods.

Introduction

In fields such as fluid dynamics and structural analysis, the quality of a mesh—the collection of polygons representing a geometry—directly impacts simulation accuracy. Distorted or "skinny" elements can lead to significant errors or solver failure. Traditional smoothing techniques generally fall into two categories: fast but potentially invalidating heuristic methods (e.g., Laplacian smoothing) and high-quality but computationally expensive optimization methods.

Recent attempts to apply artificial intelligence to this problem have largely relied on "crutches," such as supervised learning from massive datasets or imitation learning from traditional solvers. Furthermore, most existing AI models focus solely on node relocation, ignoring the critical role of mesh topology (connectivity). GNNRL-Smoothing addresses these gaps by providing a prior-free, dual-optimization approach that handles both geometry and topology.

Methodology

The GNNRL-Smoothing architecture is built upon a reinforcement learning paradigm where an agent interacts with a mesh environment to maximize geometric quality.

The GNNRL-Smoothing reinforcement learning framework, illustrating the interaction between the mesh environment and the dual-agent policy.

State Encoding and Dual-Agent System

The model utilizes a Graph Transformer (GT) to encode the mesh state, leveraging the inherent graph structure of meshes to ensure permutation invariance and handle varying neighborhood sizes. The decision-making process is split between two specialized agents:

  1. Node Smoothing Agent: Uses the Twin Delayed Deep Deterministic Policy Gradient (TD3) algorithm to determine continuous node displacements in 2D or 3D space.
  2. Connectivity Improvement Agent: Employs a Double Dueling Deep Q-Network (D3QN) to make discrete decisions regarding edge flipping, allowing the model to optimize the mesh's underlying topology.

Reward Function

To remain prior-free, the reward function is based purely on geometric quality metrics, such as aspect ratio. For 3D surface meshes, a local quadratic surface fitting reward ($r_f$) is introduced. This reward penalizes the agent for moving nodes away from the original geometric surface, ensuring that the smoothing process preserves the shape's essential features without "melting" the geometry.

Experimental Results

The model was trained on a synthetic dataset of 20 randomly generated 2D meshes and evaluated on diverse 2D and 3D benchmarks, including complex airfoil shapes and high-resolution 3D surface models from the AIM@SHAPE library.

Performance and Efficiency

GNNRL-Smoothing demonstrated a significant speed advantage, running 7.16 times faster than traditional optimization-based smoothing methods. In 2D benchmarks, it consistently achieved state-of-the-art minimum mesh quality ($q_{min}$), outperforming both traditional heuristics and previous AI-based approaches.

Training performance metrics: (a) Average reward comparison showing the model's independence from traditional smoothing "crutches", and (b) the convergence of the Laplacian smoothing ratio.

Independence from Traditional Priors

A key finding of this research is the model's true independence. Analysis of previous RL models revealed a dependency on traditional Laplacian smoothing to achieve convergence. As shown in the training plots, GNNRL-Smoothing maintains high average rewards and converges successfully even without such external assistance, proving it can discover effective smoothing strategies purely through geometric rewards.

Impact of Topology Optimization

Ablation studies highlighted the necessity of the connectivity agent. In one challenging test case, the inclusion of edge flipping improved the minimum mesh quality from 0.252 to 0.391. This demonstrates that node movement alone is insufficient for resolving severe mesh distortions caused by poor initial connectivity.

Conclusion and Future Work

GNNRL-Smoothing represents a significant step forward in automated mesh generation. By combining GNN-based state encoding with a dual-agent RL strategy, the framework provides a fast, high-quality, and prior-free solution for mesh smoothing. While the current surface fitting reward acts as a "soft constraint," future work will explore the integration of "hard" projection constraints directly into the GNN architecture and extend the model to 3D volumetric (tetrahedral) meshes.

Summary updated

BibTeX
@misc{wang2024gnnrl,
  author = {Zhichao Wang and Xinhai Chen and Chunye Gong and Bo Yang and Liang Deng and Yufei Sun and Yufei Pang and Jie Liu},
  title = {{GNNRL-Smoothing: A Prior-Free Reinforcement Learning Model for Mesh Smoothing}},
  year = {2024},
  eprint = {2410.19834},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.19834},
}
Figure