math.NAOct 31, 2026

Online Autotuning of Algebraic Multigrid via Contextual Bandits and Reinforcement Learning

Authors: Xudong He, Ruiyu Wang, Yilang Ding, Rui Peng Li, Yuanzhe Xi

Organizations: Department of Mathematics, Emory University · Center for Applied Scientific Computing, Lawrence Livermore National Laboratory, P.O. Box 808, L-561, Livermore, CA 94551

Abstract

Algebraic multigrid (AMG) methods are widely used for solving large sparse linear systems, but their efficiency depends strongly on interacting setup and solve parameters. Effective parameter choices typically depend on the problem. We develop a phase-aware online autotuning method for hypre's BoomerAMG to reduce cumulative time-to-solution over sequences of related linear systems. A LinUCB-based contextual bandit selects mixed-type parameters for AMG hierarchy construction using a shared cost model over PDE descriptors and configuration encodings. A recursive LSTDQ controller uses residual and timing observations to estimate the AMG solve time within each attempt and adapt relaxation weights between multigrid cycles. Both learners update from ongoing solves without offline pretraining. Across grids of sizes 40340^3, 60360^3, and 80380^3, the joint autotuning method reduces total runtime, including recurring learner computation, by 36.1-43.3% for diffusion problems and 19.8-31.0% for diffusion-advection problems over sequences of 5000 linear systems, relative to the reference BoomerAMG default configuration. On a variable-flow diffusion-advection benchmark comprising 30,000 systems on a 60360^3 grid, 2 systems fail to converge with joint autotuning, compared with 1677 for the reference configuration, under their respective attempt budgets.

Figures & tables

Explore similar work

CardsList
  1. Automated Grammar-based Algebraic Multigrid Design With Evolutionary Algorithms

    Mar 18, 2026Dinesh Parthasarathy, Wayne Mitchell, Arjun Gambhir +2Automated Algorithm Discovery

  2. RAPNet: Accelerating Algebraic Multigrid with Learned Sparse Corrections

    May 26, 2026Yali Fink, Ido Ben-Yair, Lars Ruthotto +1Graph Neural NetworksPartial Differential Equations

  3. Precision autotuning for linear solvers via contextual bandit-based RL

    Jan 2, 2026Erin Carson, Xinye Chen