LinearSolveBench

A benchmark for AI-discovered linear solvers.

Measuring the ability of AI models and harnesses to write fast, accurate, and general numerical solvers for large sparse linear systems in C.

Leaderboard

FLASH magnetic diffusion

Linear systems captured from FLASH Crank–Nicolson magnetic-diffusion solves (θ = 0.5). 9,984–113,664 rows across eight distinct sizes; 108,364–1,245,184 nonzeros per matrix.

FLASH magnetic diffusion: Speedup is total reference runtime divided by total candidate runtime across all 96 Crank–Nicolson cases (θ = 0.5), including creation, setup, and solve. All cases must pass. Independent model rows select the best of 16 attempts; harness rows select the best recorded run candidate. Search budgets differ. Higher scores rank first; pending results are unranked.
RankModelRuntime speedup vs. GMRES(50) + BoomerAMG reference solver
1Fable 5.1autodidakt · High reasoning1.850×
2Opus 5.5autodidakt · High reasoning1.714×
3GPT-6 Solautodidakt · High reasoning1.524×
4GPT-5.6 Solautodidakt · High reasoning1.467×
5Opus 5.5Claude Code · High reasoning1.428×
6GPT-6.1 Solautodidakt · High reasoning1.394×
7GPT-5.6 SolCodex · High reasoning1.383×
8GPT-6 Astraautodidakt · High reasoning1.381×
9GPT-6 AstraBest of 16 · High reasoning1.344×
10GPT-6.1 SolBest of 16 · High reasoning1.338×
11Fable 5.1Best of 16 · High reasoning1.337×
12GPT-6 SolCodex · High reasoning1.296×
13Fable 5.1Claude Code · High reasoning1.248×
14GPT-6.1 SolCodex · High reasoning1.243×
15GPT-5.6 SolBest of 16 · High reasoning1.237×
16Opus 5.5Best of 16 · High reasoning1.062×
Tick = 1.00× reference

Large systems of linear equations underpin some of the most important scientific and engineering problems. Progress in solving them translates directly into advances in the fields that depend on them.

LinearSolveBench has two goals: encourage algorithmic advances in solving large sparse linear systems, and measure and improve the ability of AI models and systems to discover algorithms.

Applications span multiple domains, with problem families represented in the SuiteSparse Matrix Collection:

  1. Power grid optimization
    • Optimal Power Flow (OPF).
    • Unit Commitment (UC), including LP/MILP relaxations and decomposition methods.
  2. Fusion power and diffusive processes
    • Heat conduction and magnetic diffusion in magnetic and magneto-inertial confinement fusion devices.
    • Radiation transport and alpha energy diffusion.
  3. Quantitative finance
    • Multi-asset Black–Scholes, Heston, and Heston–Hull–White pricing PDEs, whose implicit discretizations require large sparse linear solves.
    • American-option pricing, where free-boundary methods repeatedly solve sparse linear systems.
  4. Structural mechanics and materials engineering
    • Finite-element models of buildings, bridges, aircraft, plates, shells, and mechanical components.
    • Buckling, fracture, contact, plasticity, and composite or porous-material simulations.
  5. Fluid dynamics, transport, and thermal science
    • Navier–Stokes and Stokes flow, driven-cavity and coating-flow models, and atmospheric or ocean simulations.
    • Heat transfer, combustion, diffusion, and coupled multiphysics discretizations.

These applications do not all produce the same kind of matrices. PDE and finite-element problems may be symmetric positive definite, symmetric indefinite, or unsymmetric. Flow, circuit, nonlinear-Jacobian, and KKT systems are often unsymmetric or saddle-point structured. Least-squares and linear-programming data may be rectangular, while network data may encode a graph rather than an equation system.

Discovering new algorithms for these problems requires both human and computational resources. Large language models open the possibility of pursuing that discovery at scale.