Reducing operator complexity in Algebraic Multigrid with Machine Learning Approaches

Ru Huang, Kai Chang, Huan He, Ruipeng Li, Yuanzhe XiarXiv 2023 · DOI

Introduction

Algebraic Multigrid (AMG) is a premier iterative method for solving the massive linear systems that arise from partial differential equations (PDEs) in scientific computing. By constructing a hierarchy of increasingly coarse grids, AMG efficiently resolves errors across multiple scales. However, a significant bottleneck known as "operator complexity" often degrades performance in large-scale parallel environments. This paper explores a novel machine learning-based approach to mitigate this issue by intelligently sparsifying coarse-grid operators.

The Operator Complexity Challenge

In standard AMG, coarse-grid operators are typically defined using the Galerkin product. While mathematically robust, this process frequently causes matrices to become significantly denser at coarser levels. As the number of non-zeros per row (RNZ) increases, memory consumption and communication overhead in parallel computing environments spike, often negating the convergence benefits of the multigrid hierarchy.

Sparsity patterns and statistics showing how row non-zeros (RNZ) increase as the grid coarsens, leading to higher operator complexity.

The challenge lies in finding "non-Galerkin" operators that are much sparser than the original Galerkin product but remain "spectrally equivalent," ensuring that the solver's convergence rate does not deteriorate.

Proposed ML-Based Sparsification

To address this, the authors propose a data-driven framework that utilizes Neural Networks (NNs) to generate sparse coarse-grid operators. The framework employs a multi-head attention architecture—similar to those used in Transformers—to capture complex relationships between grid points and their neighbors.

Methodology

The process is divided into three distinct stages:

  1. Sparsity Pattern Selection: A multi-head attention network ($NN_1$) predicts the "location probability" for entries in a stencil, identifying which neighbors are most critical for maintaining spectral properties.
  2. Numerical Value Computation: A second network ($NN_2$) computes the optimal numerical values for the selected entries.
  3. Hadamard Product: The final operator ($\\mathcal{A}_c$) is constructed by multiplying the predicted values by a mask derived from the top-$k$ probabilities.
The proposed neural network architecture for predicting sparsity patterns and numerical values to construct efficient coarse-grid operators.

Crucially, the model is trained using a loss function based on algebraically smooth test vectors, ensuring the learned operators preserve the low-frequency error-correction properties essential for AMG.

Experimental Evaluation

The model was evaluated on several numerical "stress-test" problems, including the 3-D Poisson’s Equation, the 2-D Anisotropic Rotated Laplacian, and 2-D Linear Elasticity. A key strength of this approach is its scalability: models trained on very small meshes (e.g., $9 \times 9$) successfully generalized to problems up to 256 times larger ($511 \times 511$). This "train small, solve large" capability makes the offline training cost negligible compared to the online performance gains.

Key Findings and Results

  • Complexity Reduction: In rotated Laplacian tests, the ML approach successfully reduced stencils from 9 points to 5 points without increasing the iteration count required for convergence.
  • Spectral Equivalence: The eigenvalues of the ML-generated operators remained consistent across different mesh sizes, indicating that the networks learned the underlying physics of the PDEs.
  • Superior Performance: The ML framework consistently outperformed traditional non-ML sparsification methods, such as Sparsified Smooth Aggregation (SpSA), particularly in challenging anisotropic cases.

Conclusion and Future Directions

By leveraging multi-head attention, this research demonstrates that machine learning can effectively solve the operator complexity problem in AMG for structured grids. Future work aims to extend these techniques to unstructured meshes using Graph Convolutional Networks (GCNs) and to incorporate physical symmetries through equivariant neural networks, potentially broadening the impact to complex engineering simulations and fluid dynamics.

Summary updated

BibTeX
@misc{huang2023reducing,
  author = {Ru Huang and Kai Chang and Huan He and Ruipeng Li and Yuanzhe Xi},
  title = {{Reducing operator complexity in Algebraic Multigrid with Machine Learning Approaches}},
  year = {2023},
  eprint = {2307.07695},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.07695},
}
Figure