← All research

Under review · ICLR 2027

ATSolver: Agentic Tuning of Sparse Linear Solvers with Numerical Feedback

Mingke Tian1, Yiyun Chen1, Ruipeng Li2, Tianshi Xu3, Yuanzhe Xi1

1Emory University · 2Lawrence Livermore National Laboratory · 3University of Kentucky

Problem
Solver and preconditioner configuration for sparse linear systems
Benchmark
35 matrices from 32 families (SuiteSparse, MFEM)
Key idea
A fixed language model proposes; trusted numerical software verifies
Status
Under review
ATSolver overview. The workload contract and a public decision state feed a configuration and execution loop: a frozen language model proposes an action, a schema and legality gate filters it, a numerical worker executes it, an independent verifier checks the residual, and a state manager keeps the history and the best verified configuration.
Figure 1. Verifier-grounded configuration. The workload contract \(\mathcal{W}=(L,R,H,B)\), optional matrix views, and retrieved records form the public decision state. One pretrained language model with fixed parameters proposes and revises configurations; numerical software owns validation, execution, residual verification, budget accounting, the incumbent, and numerical state.

1Problem and significance

A workload consists of \(K\) sparse linear systems that share one operator,

\[A x_k=b_k,\quad k=1,\dots,K,\qquad A\in\mathbb{R}^{n\times n}\ \text{sparse},\qquad B_{\mathrm{rhs}}=[b_1,\dots,b_K]\in\mathbb{R}^{n\times K},\]

with \(K=1\) in the single-system regime \(\mathsf{S}\) and \(K>1\) in the batch regime \(\mathsf{M}\). A third regime \(\mathsf{Q}\) is a sequence of related systems whose operator may change between solves. The workload contract \(\mathcal{W}=(L,R,H,B)\) fixes the regime and system characteristics \(L\), the accuracy and coverage requirements \(R\), the hardware and solver capabilities \(H\), and the resource and search budgets \(B\). A configuration \(a\) chooses a solver, a preconditioner, their numerical parameters, and permitted preprocessing and setup-reuse operations.

Acceptance is decided only by recomputing each residual on the original system:

\[\begin{aligned}\rho_k(a)&=\frac{\lVert A\hat{x}_k(a)-b_k\rVert_2}{\max\{\lVert b_k\rVert_2,\ \epsilon_b\}},\\ \mathrm{acc}(a)&=\mathbf{1}\big\{\rho_k(a)\le\tau_k\ \ \forall k\big\}\cdot\mathbf{1}\{\text{finite, valid, within time and memory limits}\},\end{aligned}\]

where \(\epsilon_b>0\) guards near-zero right-hand sides. The cost of using a configuration on the workload, excluding the search that found it, is

\[C_{\mathrm{deploy}}(a;K)=C_{\mathrm{pre}}(a)+C_{\mathrm{setup}}(a)+\sum_{k=1}^{K}C_{\mathrm{solve},k}(a)+C_{\mathrm{transition}}(a).\]

The configuration problem is therefore feasibility-first and budgeted: within at most \(B_{\mathrm{prop}}\) proposals and \(B_{\mathrm{exec}}\) executions, find an accepted configuration, then prefer the cheapest one,

\[a^\star\in\arg\min_{a\,:\,\mathrm{acc}(a)=1}\ C_{\mathrm{deploy}}(a;K)\qquad\text{subject to}\quad \#\text{proposals}\le B_{\mathrm{prop}},\ \ \#\text{executions}\le B_{\mathrm{exec}}.\]
  • The objective depends on the workload. The \(C_{\mathrm{setup}}\) term in Eq. (3) is paid once while the solve term grows with \(K\), so an expensive setup that is wasteful for one solve can be optimal for a batch.
  • The quantities that matter are observed only after execution. Convergence, the achieved residual, phase timings, and memory are revealed by running a candidate. Configuration is a sequential decision in which each trial is evidence for the next.
  • Correctness cannot be delegated. A learned proposer may be wrong or may claim success. Acceptance in Eq. (2) must stay with trusted numerical software, and every proposal, including invalid, repeated, or failed ones, must be charged to the budget.

2Research questions

The three properties above define what a controller must do: use execution evidence to revise proposals within a fixed budget, retain useful information across trials and searches, and adapt the setup–solve trade-off to the workload. A fourth question concerns the input representation of the matrix.

Table 1. Research questions, the component that addresses each, and the evidence reported below.
RQQuestionAddressed byEvidence
RQ1Under matched proposal and execution limits, does closed-loop revision find accepted configurations more often, and cheaper ones, than independent sampling?Search loop, verifier, incumbent (§3.1–3.4)Tables 4–6
RQ2Does memory improve search: trial history within a search, and retrieved experience across searches?History projections, experience retrieval (§3.5)Tables 7–9
RQ3Do setup choices change with the number of right-hand sides, and does joint control help on operator sequences?Workload-aware cost, setup reuse (§3.6)Tables 10–13
RQ4Do matrix images add information beyond numerical summaries?Optional multimodal views (§3.1)Table 14

3Method

ATSolver separates proposal from authority. A pretrained language model \(\pi_\theta\) with fixed parameters chooses what to try; numerical software decides whether a proposal is legal, executes it, verifies the result, charges its cost, and keeps the best verified configuration. Algorithm 1 gives one search.

Algorithm 1  ATSolver search for one workload

Input: contract \(\mathcal{W}\); limits \(B_{\mathrm{prop}},B_{\mathrm{exec}}\); policy \(\pi_\theta\) (fixed).  Output: verified incumbent \(a^\star\) or a reasoned failure.

  1. build the workload card \(c\) from \(A\), \(B_{\mathrm{rhs}}\), \(\mathcal{W}\); charge \(C_{\mathrm{card}}\)  ▷ names and paths withheld
  2. \(a^\star\leftarrow\varnothing\);  \(m\leftarrow\varnothing\);  \(C_{\mathrm{ctrl}}\leftarrow C_{\mathrm{card}}\)
  3. for \(j=1,\dots,B_{\mathrm{prop}}\):
  4. \(d_j\leftarrow(c,\ \mathrm{proj}(m),\ \mathcal{A}_j,\ \beta_j)\);  \(a_j\sim\pi_\theta(\cdot\mid d_j)\)  ▷ Eq. (5)
  5. if \(a_j=\textsf{STOP}\) and the stop rule admits it: break
  6. \(\eta_j\leftarrow\mathrm{gate}(a_j,\mathcal{A}_j)\); if rejected: \(m\leftarrow m\cup\{(a_j,\eta_j,\delta_j)\}\); continue  ▷ still charged to \(B_{\mathrm{prop}}\)
  7. execute \(a_j\) from the prescribed numerical state; observe \(e_j\); \(C_{\mathrm{ctrl}}\leftarrow C_{\mathrm{ctrl}}+C^{\mathrm{num}}_j\)  ▷ Eq. (6)
  8. verify every residual (Eq. 2); if failed: \(\delta_j\leftarrow\mathrm{diagnose}(e_j)\)
  9. update \(a^\star\) by the replacement rule (Eq. 7); \(m\leftarrow m\cup\{(a_j,e_j,\delta_j)\}\); stop if \(B_{\mathrm{exec}}\) is exhausted
  10. return \(a^\star\), the full ledger \(m\), and \(C_{\mathrm{ctrl}}\)

3.1Decision state and policy

Before proposal \(j\), the model sees the workload information \(c_j\), the trial history \(m^{\mathrm{arm}}_j\) permitted by the experimental condition, the legal action set \(\mathcal{A}_j\), and the remaining budgets \(\beta_j\):

\[d_j=\big(c_j,\ m^{\mathrm{arm}}_j,\ \mathcal{A}_j,\ \beta_j\big),\qquad a_j\sim\pi_\theta(\cdot\mid d_j).\]

The card \(c_j\) contains the dimension \(n\), \(\mathrm{nnz}\), structural and scaling properties, trusted symmetry and SPD evidence, the accuracy and resource requirements, and the available solvers. Where enabled, it is extended by matrix views (sparsity in natural and reverse Cuthill–McKee order, positive and negative magnitudes) and by retrieved records. Matrix names, file paths, private numerical objects, and verifier state are withheld. The same \(\theta\) is used for the first proposal and for every revision; adaptation happens through \(d_j\), not through parameter updates.

3.2Typed action space

An action is a complete typed configuration over a fixed portfolio. The model does not write solver code; each proposal must contain exactly the required fields of its branch, and trusted checks restrict which branches are legal for a given matrix.

Table 2. Native action space (HYPRE 3.1 and serial SuperLU 7).
ComponentChoicesRequired parameters and legality
Krylov solverPCG, GMRES, FGMRES, BiCGSTABIteration limit; Krylov dimension \(\in[1,1000]\) for GMRES and FGMRES only. PCG requires trusted SPD evidence; non-SPD workloads allow only GMRES, FGMRES, BiCGSTAB.
AMGHYPRE AMGCoarsening, interpolation, and restriction types; strong threshold \(\in[0,1]\); truncation \(\in[0,1]\); \(p_{\max}\); aggregation levels; relaxation types; sweeps \(\in[1,10]\); levels \(\in[1,100]\). With PCG: transpose restriction and a symmetric relaxation pair.
ILUHYPRE ILUType; fill level \(\in[0,20]\); row nonzeros; drop threshold; reordering; triangular solve; Jacobi and Schur iterations. Not allowed with PCG.
FSAIHYPRE FSAIAlgorithm type, steps, step size, row nonzeros, levels, threshold, Kaporin tolerance, eigenvalue iterations. Requires SPD evidence.
IdentitynoneNo preconditioner parameters.
DirectSuperLUColumn ordering \(\in\{\)natural, MMD\((A^\top A)\), MMD\((A^\top+A)\), COLAMD\(\}\); equilibration; symmetric mode; pivot threshold \(\in[0,1]\); dense RHS blocks up to \(K\).
Lifecycleall branchesInitial guess, preprocessing, and setup build or reuse, within what the workload permits.

3.3Gate, execution, and search cost

Every submission counts toward \(B_{\mathrm{prop}}\), including invalid, duplicate, unaffordable, and premature \(\textsf{STOP}\) proposals. Only proposals that pass the schema and legality gate are executed and count toward \(B_{\mathrm{exec}}\). With \(g_j=1\) if proposal \(j\) is executed, total numerical search work is

\[C_{\mathrm{ctrl}}=C_{\mathrm{card}}+\sum_{j:\,g_j=1}C^{\mathrm{num}}_j ,\]

where \(C^{\mathrm{num}}_j\) covers preprocessing, setup, solves, verification, and permitted state transfer, for successful and failed trials alike. Work to first acceptance, \(C_{\mathrm{first}}\), sums the same terms up to the first accepted trial and is infinite if none is accepted. Model and orchestration latency are reported separately as full search time.

3.4Verification and the incumbent

An executed trial returns its acceptance status, residuals, phase timings, and memory; a rejected proposal returns its rejection reason. After a failure, a deterministic diagnostic summarizes the failure type and the aspects that may need revision; it does not choose the next solver. Software keeps the best accepted configuration under a fixed study objective \(J\):

\[a^\star_j=\begin{cases}a_j & \mathrm{acc}(a_j)=1\ \text{and}\ J(a_j)<(1-\kappa)\,J(a^\star_{j-1}),\\ a^\star_{j-1} & \text{otherwise,}\end{cases}\]

with \(J=C_{\mathrm{deploy}}\) and \(\kappa=0\) (strict improvement) in the three-proposal and batch studies, and \(J=\) solve time with \(\kappa=0.05\) in the six-proposal, image, and retrieval studies. Later failures cannot remove an incumbent. Each candidate starts from the same prescribed numerical state: trial history is shared, but setup objects and iterates are not.

3.5Memory: history projections and retrieved experience (RQ2)

The experimental condition fixes the projection \(\mathrm{proj}(m)\) of the ledger that enters \(d_j\). Four within-search projections form a ladder:

\[\mathcal{H}_0:\ \varnothing\ \ \subset\ \ \mathcal{H}_1:\ \{a_i\}_{i<j}\ \ \subset\ \ \mathcal{H}_2:\ \{(a_i,\ \text{scalar outcome}_i)\}_{i<j}\ \ \subset\ \ \mathcal{H}_3:\ \{(a_i,\ e_i,\ \delta_i)\}_{i<j},\]

that is, no action history, tried configurations, configurations with scalar outcomes, and configurations with the structured verifier record. All four keep the shared diagnostic handoff after a failure. Across searches, the card can be extended by solver knowledge \(\mathsf{K}\) alone or by knowledge plus retrieved trial records from earlier workloads, \(\mathsf{K}{+}\mathsf{E}\); retrieved choices must still pass the current verifier.

3.6Batches and operator sequences (RQ3)

In \(\mathsf{M}\), a candidate must solve the entire batch, and solves from different candidates cannot be combined. Within one candidate a setup is built once and reused, so the per-right-hand-side cost is

\[\frac{C_{\mathrm{deploy}}(a;K)}{K}=\frac{C_{\mathrm{pre}}(a)+C_{\mathrm{setup}}(a)+C_{\mathrm{transition}}(a)}{K}+\frac{1}{K}\sum_{k=1}^{K}C_{\mathrm{solve},k}(a),\]

and the optimum of Eq. (4) shifts toward configurations with larger setup and smaller per-solve cost as \(K\) grows, for example from a Krylov method with a light preconditioner to a sparse direct factorization. The batch size is part of \(c_j\), so the controller can act on this trade-off. In \(\mathsf{Q}\), a sequence of four systems with operator shifts is solved under one 7/7 budget, and only the selected accepted candidate may pass validated numerical state (setup, iterate) to the next system, subject to checks when the matrix changes.

4Experimental protocol

The benchmark has 35 sparse matrices from 32 families: 29 from SuiteSparse and 6 assembled with MFEM. Three model repetitions per workload give 105 runs per condition. The proposal model is gpt-5.6-terra; the numerical stack is HYPRE 3.1 and serial SuperLU 7. Unless stated otherwise, \(\tau=10^{-8}\) with full coverage, a 30 s per-action timeout, a 60 s worker deadline, and a 1 GiB memory cap.

Table 3. Studies, limits, and comparison methods.
StudyWorkloadsLimits \(B_{\mathrm{prop}}/B_{\mathrm{exec}}\)Compared againstPrimary metrics
RQ1 core\(\mathsf{S}\), 35 matrices × 33/3 (one-shot: 1/1)Fixed GMRES+AMG; Direct and Expert-guided one-shot and Best-of-3Accepted runs; 1st-accept work (restricted mean, 180 s horizon); paired deployment
RQ1 iterative\(\mathsf{S}\), iterative portfolio only6/6Independent Best-of-6 with the same images and knowledgeAccepted runs; median of 5 replays (solve, deploy)
RQ2 history\(\mathsf{S}\)3/3; fixed-parent: 1/1Projections \(\mathcal{H}_0\)–\(\mathcal{H}_3\); matched placeboAccepted within \(q\) proposals; duplicate rate
RQ2 experience14 held-out parameter points (Helmholtz, SUPG), 42 searches6/6\(\mathsf{K}\) versus \(\mathsf{K}{+}\mathsf{E}\)Target attainment (accepted and \(\le1.05\times\) best stable fixed recipe)
RQ3 batches\(\mathsf{M}\), \(K\in\{2,8,32\}\)3/3Expert amortization rule, supervised ranker, model-based search (5 preset configurations each)Accepted batches; paired deployment; selected setups
RQ3 sequences\(\mathsf{Q}\), 4 positions, 2 shift schedules7/7Carryover with prescribed rebuild; static and reuse controlsAccepted sequences
RQ4 images8 matrices × 3, iterative only6/6No images; 2 structural views; 4 structural and signed-value viewsAccepted runs; replayed solve time

5Results

5.1Configuration quality and search cost (RQ1)

Table 4. Matched-proposal configuration quality on 105 single-system runs. Accepted ↑; work to first acceptance ↓ (restricted mean, s); full search time (median, s).
MethodAccepted (/105)↑1st-accept work (s)↓Full search (s)
Single-configuration references (1/1)
Fixed GMRES+AMG5193.111.92
Direct one-shot7061.378.14
Expert-guided one-shot6569.858.04
Matched three-proposal searches (3/3)
Direct Best-of-37455.2821.64
Expert-guided Best-of-37554.0619.90
ATSolver7848.7626.28
Table 5. Paired deployment-time reduction of ATSolver on jointly accepted runs (in-search timings; within-matrix medians, geometric aggregation).
ReferencePaired runsMatricesDeployment reduction↑
Direct Best-of-3742617.2%
Expert-guided Best-of-3752522.0%

Finding. At the same three-proposal limit, revising from trial evidence accepts 78/105 runs against 74 and 75 for independent sampling, needs the least numerical work to first acceptance (48.76 s against 54.06 s), and selects workflows that are 17.2% and 22.0% cheaper to deploy. The cost is a longer full search, 26.28 s against 19.90–21.64 s. ATSolver recovers 18 of 45 initially unsuccessful searches at the second proposal.

Table 6. Six-proposal iterative study. Ratios are ATSolver / Best-of-6 on 60 paired runs over 20 matrices accepted by both in all repetitions (median of five replays); full search is the median over all 35 matrices.
MethodAccepted (/105)↑Solve ratio↓Deploy ratio↓Full search (s)
Independent Best-of-6641.0001.00053.37
ATSolver750.6990.95575.23

Finding. With six slots, ATSolver accepts 11 more runs (75 against 64) and its selected configurations have 30.1% lower replayed solve time and 4.5% lower deployment time, at a 41% longer full search.

5.2Memory within and across searches (RQ2)

Table 7. History projections in a three-proposal study: runs accepted within \(q\) proposals (/105) ↑ and duplicate proposals ↓.
History projectionLimits\(q=1\)\(q=2\)\(q=3\)Duplicates↓
One-shot, no history1/168––0.0%
\(\mathcal{H}_0\): no action history3/366717729.8%
\(\mathcal{H}_1\): tried actions3/36576780.0%
\(\mathcal{H}_2\): scalar outcomes3/37277780.0%
\(\mathcal{H}_3\): structured verifier record3/36978780.0%
Table 8. Fixed-parent intervention: one next action from a shared failed state (unpreconditioned GMRES, two-iteration limit), 105 parents per condition.
Feedback shownChild accepted↑Rate↑Valid
No outcome63/10560.0%105/105
Scalar68/10564.8%105/105
Structured62/10559.0%104/105
Matched placebo67/10563.8%105/105

Finding. Exposing tried configurations removes duplicate proposals entirely (94/315, 29.8%, without history), so no slot is spent on a repeated trial. Final acceptance changes little, 77 against 78, and richer feedback is not uniformly better: at a fixed failed parent, structured diagnostics lead to fewer accepted next actions than scalar outcomes (62 against 68; difference \(-5.71\) pp, 95% CI \([-12.12,-0.95]\)). The gain is attributable to acting on trial history, not to diagnostic detail.

Table 9. Retrieved experience: performance-target attainment within \(q\) proposals (%) ↑ and final replay attainment (%) ↑, 42 six-proposal searches on 14 held-out parameter points.
Evidence\(q=1\)\(q=2\)\(q=3\)\(q=4\)\(q=5\)\(q=6\)Final replay
\(\mathsf{K}\) (knowledge)31.040.542.947.647.654.845.2
\(\mathsf{K}{+}\mathsf{E}\) (+ experience)88.195.2100.0100.0100.0100.090.5
\(\Delta\) (pp)+57.1+54.8+57.1+52.4+52.4+45.2+45.2

Finding. Both conditions satisfy all 42 numerical contracts; experience changes solve performance, not acceptance. With retrieved records, 88.1% of searches reach the target at the first proposal and 100% within three, and the selected configurations meet it in independent replay in 38/42 cases against 19/42. Paired replayed solve time falls by 11.0%, deployment by 3.8%, and numerical search work by 44.5%, at 36.2% more tokens.

5.3Setup investment and sequences (RQ3)

Table 10. Right-hand-side batches (3/3 limits): accepted batches ↑ and ATSolver's paired deployment reduction relative to each control (%) ↑.
Method\(K=2\)\(K=8\)\(K=32\)
Acc.↑Deploy red.Acc.↑Deploy red.Acc.↑Deploy red.
Expert amortization rule69/1057.166/10511.250/10548.5
Supervised ranker69/1056.166/1053.257/1052.0
Model-based search75/1055.569/105−1.772/1052.2
ATSolver78/105–75/105–72/105–
Table 11. Configurations selected by ATSolver on the same 72 matrix–repetition pairs (24 matrices) accepted at every \(K\).
Quantity\(K=2\)\(K=8\)\(K=32\)
Direct factorization selected22/7241/7255/72
Median setup time (s)0.03380.09450.2152
Median solve time per RHS (s)0.035950.011980.00772
Table 12. Full search time, median over all 105 searches (s).
Method\(K=2\)\(K=8\)\(K=32\)
Expert amortization rule9.5321.6862.55
ATSolver32.6842.2465.46

Finding. On a fixed set of cases, the share of direct factorizations rises from 22/72 to 55/72 as \(K\) grows from 2 to 32; median setup time increases 6.4-fold while the per-RHS solve time falls 4.7-fold, the trade-off predicted by Eq. (9). The largest gain is against the expert rule at \(K=32\): 72 against 50 accepted batches and 48.5% lower deployment on 50 jointly accepted runs. Against model-based search the deployment difference is small (2.2% at \(K=32\)). ATSolver's full search is longer at every \(K\), and these deployment savings exclude it.

Table 13. Four-position operator sequences: complete sequences accepted (/105) ↑. Shifts \((0,10^{-5},10^{-4},10^{-3})\) for “all changed” and \((0,0,10^{-3},10^{-3})\) for “mixed”.
PolicyLimitsAll changed↑Mixed↑
Cold static4/45151
Warm start4/45151
Policy carryover4/43737
Cross-matrix setup reuse4/442–
Setup reuse + Krylov recycling4/442–
Carryover + prescribed rebuild7/76369
ATSolver (joint structured)7/77272

Finding. Under a matched 7/7 budget, joint control completes 9 more sequences than prescribed rebuilding when the operator changes at every step (+8.57 pp, 95% CI [1.71, 18.10]) and 3 more under the mixed schedule (+2.86 pp, CI [−2.02, 9.26]), with a higher deployment cost of 1.594 s and 2.042 s on jointly accepted sequences.

5.4Matrix views (RQ4)

Table 14. Image ablation: 8 matrices, 6 proposals, 3 repetitions. Solve-time reduction is relative to no images on the six jointly successful matrices.
InputAccepted (/24)Replayed solve-time reduction↑
No images18–
Two structural views (natural, RCM)1814.8%
Four structural and signed-value views189.6%

Finding. Images do not change acceptance. Structural views lower replayed solve time by 14.8%; adding signed-value views gives a smaller 9.6% reduction. Both image conditions increase online search time.

6Ongoing extension: closed-loop agent reinforcement learning

6.1Why reinforcement learning

ATSolver adapts only through its context. Three limitations follow from the results above.

  • No learning across workloads. \(\theta\) is fixed, so experience helps only when it is retrieved into the prompt (Table 9); the policy itself never improves from the outcomes it observes.
  • Reasoning cost grows with every decision. Each piece of feedback triggers another model call. Full search is already longer than every baseline (Tables 4, 6, 12), and in \(\mathsf{M}\) and \(\mathsf{Q}\) the number of decisions grows with the workload.
  • A single configuration cannot express a contingency. A step-wise proposal cannot say keep this setup while the iteration count stays low, rebuild when it rises, and ask for re-analysis when the structure changes. In operator sequences, that missing rule is what separates reuse from wasted executions (Table 13).

The extension trains the agents themselves so that they generate such rules. Reasoning is then spent only where the observed state leaves a program's conditions, and the rules improve from verified outcomes. The goal is more workloads solved per unit of total cost, model calls included, with acceptance still decided only by Eq. (2).

6.2Learning object: feedback programs instead of configurations

Instead of one configuration per call, \(c_t\sim\pi_\theta(c\mid H_t,\mathcal{W})\), a team of role policies \(\Gamma_\Theta\) (analysis, recommendation, diagnosis, fixing, reflection) generates a bounded control program from the history, the contract, and the knowledge state:

\[\omega_j\sim\Gamma_\Theta\big(\cdot\mid H_j,\mathcal{W},\mathcal{K}_j\big),\qquad \omega=\big(\mathcal{I}_\omega,\ G_\omega,\ \beta_\omega,\ \mathcal{P}_\omega\big).\]

Here \(\mathcal{I}_\omega\) are entry conditions, \(G_\omega\) is a typed graph over six operations (TEST a public scalar, OBSERVE a diagnostic, CALL a complete configuration, ADVANCE to the next system in \(\mathsf{Q}\), RETURN to a named role, FINISH), \(\beta_\omega\) are its continue/return conditions, and \(\mathcal{P}_\omega\) are explicit parameter bindings. A deterministic interpreter runs \(\omega\) until it returns. Every CALL passes the same gate and verifier as before, and a direct single configuration stays available, so the original action space of Table 2 is preserved.

6.3Learned reuse boundary

The central quantity is \(\beta_\omega\): when an executing program should continue, when it should return control, and to which role. A program launched at decision \(j\) runs for \(\Delta_j\) tool events, which makes the problem semi-Markov:

\[Q\big(H_j,\omega_j\big)=\mathbb{E}\Big[\sum_{t=t_j}^{t_j+\Delta_j-1}r_t+V\big(H_{j+1}\big)\Big].\]

A program that is too short pays for frequent reasoning. One that is too permissive keeps executing after conditions change, and one that is too conservative returns at every change and gains nothing from reuse. The threshold, comparison, and target role in a condition such as iterations > 80 → RETURN(Diagnosis) are generated tokens, so the boundary is learned from the realized return of Eq. (11), not hand-set.

6.4Reward and credit assignment

The task reward is paid once at first verified delivery; every event pays its normalized numerical and model cost:

\[r_t=\mathbf{1}\{\text{task } i\text{ first delivered at } t\}\,Y_i-\lambda_n\frac{\Delta C_{n,t}}{B_{n,i}}-\lambda_m\frac{\Delta C_{m,t}}{B_{m,i}}.\]

Generating a program, reusing one, or calling the model less earns nothing by itself. Each language output \(k\) of role \(r_k\) receives the return of everything that happens until the next language output, including all tool steps of the program it launched:

\[G_k=\sum_{j\ge k}\bar{r}_j,\qquad \nabla_{\theta_r}J=\mathbb{E}\Big[\sum_{k:\,r_k=r}\nabla_{\theta_r}\log\pi_{\theta_r}\big(y_k\mid h^{(r)}_k\big)\big(G_k-V_\phi(\chi_k)\big)\Big],\]

optimized with token-level PPO over the tokens each role actually generated. A program is generated once and may execute many branches, so its log-probability is counted once; deterministic branch decisions, tool receipts, and programs retrieved from memory receive no gradient.

6.5Transfer across workloads

Training uses task groups \(\mathcal{G}=(\mathcal{W}_1,\dots,\mathcal{W}_N)\) that mix a stationary related task, a related task with changed conditions, and an unrelated one. Tasks communicate only through a bounded program library \(\mathcal{K}\) that stores templates, applicability conditions, and evidence, never numerical state:

\[\max_\Theta\ \mathbb{E}\Big[\sum_{i=1}^{N}Y_i\Big]\quad\text{s.t.}\quad \mathbb{E}[C]\le B,\qquad \mathrm{len}(\mathcal{K})\le B_K.\]

A stored program pays off only through success and cost on later tasks, so the team learns what to keep, when to reuse it, and when a changed workload makes it unsafe to reuse.

6.6Position and evaluation

Table 15. What is learned, compared with ATSolver and with existing agent-RL designs.
ApproachUnit of decisionWhat improvesWhen reasoning resumes
ATSolverOne configurationContext only (history, retrieval)After every observation
Step-wise agent RLOne actionPolicy weightsAfter every observation
Skill libraries (SAGE, Skill-Pro)Stored skill or functionSkills kept after source-task successFixed or hand-set termination
This extensionFeedback program \(\omega\)Role weights and program library, from cross-task returnLearned conditions \(\beta_\omega\)

Three hypotheses are tested on \(\mathsf{S}\), \(\mathsf{M}\), \(\mathsf{Q}\), and structured systems.

  • C1: learned programs reach a better success–cost frontier than step-wise PPO with the same roles, model, and tools.
  • C2: learned return conditions cut repeated reasoning on stationary sequences without persisting after a change, compared with hand-written conditional programs.
  • C3: program knowledge gives positive net transfer once its construction and use are fully charged.

Further baselines are the fixed-model pipeline, generated programs without RL, and adapted skill-learning methods. The method and interfaces are specified; training has not yet been run, so no results are reported.

Citation

@misc{tian2026atsolver,
  title  = {{ATSolver}: Agentic Tuning of Sparse Linear Solvers with Numerical Feedback},
  author = {Tian, Mingke and Chen, Yiyun and Li, Ruipeng and Xu, Tianshi and Xi, Yuanzhe},
  year   = {2026},
  note   = {Preprint, under review}
}

Key references

  1. R. D. Falgout and U. M. Yang. hypre: A Library of High Performance Preconditioners. International Conference on Computational Science (ICCS), 2002.
  2. X. S. Li. An Overview of SuperLU: Algorithms, Implementation, and User Interface. ACM Transactions on Mathematical Software 31(3), 2005.
  3. T. A. Davis and Y. Hu. The University of Florida Sparse Matrix Collection. ACM Transactions on Mathematical Software 38(1), 2011.
  4. J. Demmel, J. Dongarra, V. Eijkhout, et al. Self-Adapting Linear Algebra Algorithms and Software. Proceedings of the IEEE 93(2), 2005.
  5. M. Arioli, J. W. Demmel, and I. S. Duff. Solving Sparse Linear Systems with Sparse Backward Error. SIAM Journal on Matrix Analysis and Applications 10(2), 1989.
  6. C. Yang, X. Wang, Y. Lu, et al. Large Language Models as Optimizers. ICLR, 2024.
  7. J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal Policy Optimization Algorithms. arXiv:1707.06347, 2017.
  8. Wang et al. Reinforcement Learning for Self-Improving Agent with Skill Library (SAGE). arXiv:2512.17102.
  9. Mi et al. Skill-Pro: Learning Reusable Skills from Experience via Non-Parametric PPO for LLM Agents. arXiv:2602.01869.