Adaptive Mesh Quantization for Neural PDE Solvers

Winfried van den Dool, Maksim Zhdanov, Yuki M Asano, Max Welling

Abstract

Physical systems commonly exhibit spatially varying complexity, presenting a significant challenge for neural PDE solvers. While Graph Neural Networks (GNNs) can handle the irregular meshes required for complex geometries and boundary conditions, they still apply uniform computational effort across all nodes regardless of the underlying physics complexity. This leads to inefficient resource allocation where computationally simple regions receive the same treatment as complex phenomena. We address this challenge by introducing Adaptive Mesh Quantization (AMQ): spatially adaptive quantization across mesh node, edge and cluster features, dynamically adjusting the bit-width used by a quantized model. We propose an adaptive bit-width allocation strategy driven by a lightweight auxiliary model that identifies high-loss regions in the input mesh. Our framework demonstrates consistent Pareto improvements over uniformly quantized baselines, yielding up to 50% improvements in performance at the same cost.

Introduction: The Efficiency Gap in Neural PDE Solvers

Simulating physical systems—such as airflow over a vehicle or fluid dynamics in industrial pipes—is computationally intensive. While Graph Neural Networks (GNNs) have emerged as efficient "neural surrogates" for traditional Partial Differential Equation (PDE) solvers, they suffer from a fundamental inefficiency: uniform resource allocation. In most simulations, vast regions of the mesh represent "simple" physics (smooth, predictable flow), while complex phenomena (turbulence, shocks) are localized. Standard uniform quantization reduces precision across the entire mesh, often sacrificing accuracy in critical areas to save power in trivial ones.

Conceptual overview of Adaptive Mesh Quantization showing how different regions of a mesh are assigned different bit-widths based on complexity.

Adaptive Mesh Quantization (AMQ)

The AMQ framework addresses this by dynamically "focusing" computational precision where it is needed most. The system consists of three core components:

  1. The Bit Assigner (Auxiliary Model): A lightweight GNN that runs before the main model. Its job is to predict the "local complexity" of each node in the mesh. It is trained to predict the loss of the main model at each node, effectively acting as a proxy for where the simulation is likely to struggle.
  2. Spatially Adaptive Allocation: Based on the Bit Assigner’s output, the mesh nodes are sorted. A fixed budget (e.g., "30% of nodes get 8-bit, 70% get 4-bit") is then applied, ensuring that the most difficult regions receive the highest precision.
  3. Hardware-Efficient Mixed-Precision MLPs: To make this practical on real hardware, the authors developed an optimized linear layer. Instead of running separate operations for different bit-widths, they "flatten" the mixed-precision activations into a single bit-string that can be processed in a single, efficient matrix multiplication.
Detailed architecture of the AMQ framework, including the training loop (A), the message-passing layer (B), and the bit assigner logic (C).

Experimental Evaluation

The framework was validated across four diverse and challenging PDE benchmarks: 2D Darcy Flow, 3D aerodynamics (ShapeNet-Car), large-scale unsteady fluid dynamics (EAGLE), and 2D hyper-elasticity.

Key Results

  • Efficiency Gains: In the ShapeNet-Car task, the adaptive model matched the performance of a full 8-bit model while using only half the computational resources.
  • Accuracy Recovery: On large-scale datasets, converting just 10% of the nodes from 4-bit to 8-bit recovered roughly half of the accuracy loss incurred by moving from a full 8-bit to a full 4-bit model.
  • Negligible Overhead: The auxiliary model is so small (often just ~1% of the total MACs) that its cost is almost entirely offset by the savings it generates in the main model.

Discussion and Insights

A key innovation in AMQ is using model loss as a proxy for complexity. This captures both inherent physical complexity and the specific struggles of the quantized model. Additionally, the use of graph diffusion to smooth complexity weights ensures stable training and coherent bit-assignment. This results in a "Pareto win": for any given computational budget, the adaptive approach is more accurate than the uniform approach; conversely, for any target accuracy, the adaptive approach is cheaper.

While AMQ shows significant improvements, its full potential may rely on future hardware that natively supports arbitrary mixed-precision. Currently, the method is optimized for 4-bit and 8-bit operations common on modern GPUs. Future work may explore dynamic bit-budgets that adjust based on global error metrics rather than fixed ratios.

Summary updated

BibTeX
@article{dool2025adaptive,
  author = {Winfried van den Dool and Maksim Zhdanov and Yuki M Asano and Max Welling},
  title = {{Adaptive Mesh Quantization for Neural PDE Solvers}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=NN17y897WG},
}
Figure