Automated Grammar-based Algebraic Multigrid Design With Evolutionary Algorithms
Authors: Dinesh Parthasarathy, Wayne Mitchell, Arjun Gambhir, Harald Köstler, Ulrich Rüde
Organizations: Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU), Erlangen, Germany · Lawrence Livermore National Laboratory, USA · CERFACS, Toulouse, France and Department of Applied Mathematics, VSB-Technical University of Ostrava, Ostrava, Czech Republic
Although multigrid is asymptotically optimal for solving many important partial differential equations, its efficiency relies heavily on the careful selection of the individual algorithmic components. In contrast to recent approaches that can optimize certain multigrid components using deep learning techniques, we adopt a complementary strategy, employing evolutionary algorithms to construct efficient multigrid cycles from proven algorithmic building blocks. Here, we will present its application to generate efficient algebraic multigrid methods with so-called flexible cycling, that is, level-specific smoothing sequences and non-recursive cycling patterns. The search space with such non-standard cycles is intractable to navigate manually, and is generated using genetic programming (GP) guided by context-free grammars. Numerical experiments with the linear algebra library, hypre, demonstrate the potential of these non-standard GP cycles to improve multigrid performance both as a solver and a preconditioner.
Figures & tables
Figure 1: A high-level overview of the proposed automated AMG design workflow: given an input problem, the approach uses grammars, evolutionary algorithms, and high-performance solvers to generate flexible AMG cycles. Nodes in the resulting cycles are color-coded to indicate different smoothing operations.
Figure 3: An overview of the software setup for the automated AMG design.
solver
ordering
Spre
ν1
Spost
ν2
wi
wo
default
lexicographic
SGSFl1
1
SGSBl1
1
n/a
n/a
tuned 1
C-F
SGSFl1
1
SGSFl1
1
n/a
n/a
tuned 2
C-F
SGSFH
1
SGSFH
1
1.1
0.9
tuned 3
lexicographic
SGSFl1
1
SGSFl1
1
n/a
n/a
tuned 4
C-F
SJacobil1
1
SJacobil1
1
n/a
n/a
tuned 5
lexicographic
SGSFH
1
SGSFH
1
1.1
0.9
Table 1: BoomerAMG parameters for default and tuned reference AMG solvers.
Figure 4: Evolution of AMG individuals with respect to cost per iteration and convergence rate , progressing from an initial random population to the final generation (clockwise from top left: initial population , generation 1 , generation 10 , generation 100 ). The dots represent the individuals, and are colored separately, representing each of the five independent runs of the G3P algorithm.
Figure 5: AMG cycling structure for the selected GP solvers, excluding the depiction of weighting parameters ωi , ω0 , ω , and α .
configuration
default
tuned 1
tuned 2
tuned 3
tuned 4
tuned 5
tuned 6
c1
c2
c3
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
1
1
1
381
22
375
19
351
17
349
21
403
16
324
18
379
18
1
1
1e-3
399
19
276
11
289
11
279
14
295
9
280
13
258
10
1
1
1e-5
398
19
275
11
288
11
278
14
298
9
280
13
256
10
1
1e-3
1e-3
365
21
190
9
194
9
219
13
178
7
236
13
236
11
1
1e-3
1e-5
365
21
189
9
193
9
219
13
178
7
235
13
236
11
Table 2: Performance of reference solvers (top) and GP solvers (bottom) for different anisotropy configurations from eq. 15 with 106 unknowns.
default
tuned 1
tuned 2
tuned 3
tuned 4
tuned 5
tuned 6
Nd
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
T(ms)
N
100
402
19
259
11
275
11
276
14
286
9
278
13
258
10
200
485
20
336
12
324
11
342
15
387
10
317
13
330
11
300
530
21
380
13
368
12
352
15
448
11
350
14
406
13
400
572
22
460
15
452
14
395
16
496
12
361
14
448
14
500
591
22
573
17
498
15
419
17
550
13
404
15
489
15
Table 3: Weak scaling results of the anisotropic Poisson problem, from the initial problem D~ with 106 unknowns scaled to 109 unknowns, for reference solvers (top) and GP solvers (bottom).
Figure 6: Convergence plots of GP -31, default V(1,1) , and ‘tuned-1’ V(1,1) AMG solver on problem D~ (left), and the eigenvalue distribution of the respective iteration matrices on a smaller 103 variant (right).
Figure 7: Initial conditions of the zrad3D problem. A source is applied to the left side of the block as it is pictured above. As the problem evolves, radiation flows through the block, and the matter and radiation fields come into equilibrium with each other.
Figure 8: (Left) Final population of evolved PCG programs, shown as blue dots, with the resulting Pareto front highlighted in red line. (Right) Comparison of solve time and CG iterations between the selected GP-PCG programs and the reference PCG configurations for the proxy D~ .
Figure 9: Visual representation of the GP-57 AMG preconditioner cycle.
Figure 10: Performance of GP-PCG solvers compared to reference solvers, measured over the first 40 time steps of the zrad3D problem with 106 DOFs.
default
tuned
GP-57
speedup
DOFs
T(s)
N
T(s)
N
T(s)
N
η1
η2
1M
9.0
267
8.8
373
5.4
172
1.66
1.63
8M
12.4
323
11.8
433
7.7
210
1.60
1.53
64M
15.2
387
14.7
519
9.2
240
1.66
1.60
Table 4: Weak scaling results of default, tuned and GP preconditioned CG solvers for the zrad3D problem evaluated over the first 40 time steps on the RZHound system.
Figure 11: (Left) The relative contribution of diagonal versus off-diagonal elements in the system matrix throughout the simulation. (Right) CG convergence of the electron conduction problem with a simple diagonal preconditioner.
Figure 12: CG convergence on the radiation diffusion (left) and electron conduction (right) systems across the simulation, using the hybrid solver interface with the GP-57 preconditioner, and a convergence threshold set to 0.65 .
Solving the pressure-Poisson equation remains the primary computational bottleneck in incompressible unstructured flow solvers primarily due to the inherent sensitivity of traditional linear solvers to mesh irregularities. This work introduces a data-driven algebraic multigrid (AMG) smoother that uses a modified graph convolutional isomorphism network (GCIN). The graph neural network predicts optimal polynomial coefficients to construct a sparse pseudo-inverse operator across diverse grid topologies. The coefficients are optimized to reduce the residual after each V-cycle iteration. By directly capturing the algebraic structure of the system from the sparse coefficient matrix, the proposed method maintains the solver's linearity while adapting to local anisotropies in unstructured grids. Our framework demonstrates significant performance gains by reducing the number of V-cycles required for a given tolerance and delivering wall-clock speedups from 4% to 37% across diverse benchmarks. Notably, the model exhibits robust generalization by maintaining efficiency on meshes up to 128 times larger than those seen in training, and by accelerating the solver's convergence on unseen industry-relevant problems such as the AirfRANS dataset.
Eric Chillón, Artur K. Lidtke, Nguyen Anh Khoa Doan +1
Faculty of Mechanical Engineering, Delft University of Technology, The Netherlands · Maritime Research Institute Netherlands, The Netherlands · Department of Aeronautics, Imperial College London, United Kingdom
The scalable solution of large sparse linear systems is a bottleneck in scientific computing and graph analysis. While algebraic multigrid (AMG) offers optimal linear scaling, its performance is severely constrained by the trade-off between the sparsity and convergence quality of coarse-grid operators. Classical AMG heuristics struggle to balance these objectives, often sacrificing stability or performance for sparsity. We propose RAPNet, a graph neural network (GNN) framework that resolves this trade-off by learning to generate sparse, robust coarse operators directly from the sparse algebraic system. Key to our approach is a level-wise training strategy that enables learning from small subgraphs and generalization to million-node domains, bypassing the bottlenecks of prior neural AMG attempts. RAPNet executes exclusively during the solver setup phase, ensuring that the solve phase retains its favorable computational properties. We show that our method outperforms classical non-Galerkin baselines on diverse PDE discretizations and graph Laplacians, making it particularly effective for multi-query tasks such as eigenproblems, time-dependent simulations, and inverse or design problems.
Yali Fink, Ido Ben-Yair, Lars Ruthotto +1
Institute for Interdisciplinary Computational Sciences, Faculty of Computer and Information Science, Ben-Gurion University of the Negev, Be’er Sheva, Israel · Department of Mathematics and Computer Science, Emory University, Atlanta, GA, USA.
Solving large, sparse linear systems is a core task in scientific computing, and efficient iterative solvers rely critically on effective and robust preconditioning. While classical methods such as algebraic multigrid (AMG) are highly scalable, their robustness can degrade on indefinite or nonsymmetric systems where heuristics originally developed for elliptic PDEs are less reliable. Recently, Graph Neural Networks (GNNs) have emerged as data-driven preconditioners; yet, the practical impact of imposing an AMG-style hierarchy remains underexplored for general sparse matrices. In this work, we propose a Graph Neural Multilevel Preconditioner (GMP) that adopts an AMG hierarchy as a structural prior and learns smoothing, restriction, and interpolation operators in a unified framework. Our method targets general sparse systems and is instantiated as a drop-in preconditioner for standard Krylov solvers. On a benchmark of over 800 sparse matrices, we compare against classical AMG, single-level ILUT, and state-of-the-art GNN preconditioners, and characterize the regimes where multilevel graph neural preconditioning improves convergence or, conversely, introduces overhead relative to strong single-level baselines. These results highlight both the promise and the limitations of enforcing AMG-style multilevel structure in learned preconditioners for large-scale scientific simulations.
Zechen Zhang, Rui Peng Li, Yousef Saad
University of Minnesota Minneapolis, MN, USA · CASA, Lawrence Livermore National Laboratory Livermore, CA, USA