A Transformer-Derived Iterative Preconditioner
Patrick Lutz, Themistoklis Haris, Aditya Gangrade, Venkatesh Saligrama
Key points
From the paper's conclusion- Together, these results show how a transformer can discover a broadly applicable numerical algorithm.
Abstract
Transformers trained on in-context prediction problems can learn known numerical algorithms, e.g., gradient descent. We go further, showing that their internal computations can reveal new algorithms with provable guarantees. A softmax-attention transformer trained to solve linear systems $Xw=y$ implicitly improves matrix conditioning. Tracing $XX^\top$ reveals an iterative preconditioning primitive, which we develop into RAPID, a standalone algorithm requiring no learned components. RAPID is an anytime preconditioner for symmetric positive definite (SPD) matrices, using randomized mixing and sparse local corrections to improve conditioning. Proof-of-concept experiments on synthetic and real-world problems consistently improve conditioning and reduce conjugate gradient iterations needed to reach a target accuracy. For a Haar-mixing idealization, we prove convergence to any fixed target condition number regardless of spectral distribution, with only logarithmic dependence on initial conditioning. Together, these results show how a transformer can discover a broadly applicable numerical algorithm.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- NOWS: Neural Operator Warm Starts for accelerating iterative solversComputer Methods in Applied Mechanics and Engineering · 2026
- Learning from Linear Algebra: A Graph Neural Network Approach to Preconditioner Design for Conjugate Gradient SolversComputational Methods in Applied Mathematics · 2026
- RAPID: Increasing Efficiency of Internal Distillation via Randomized MethodsarXiv · 2026
- Change the Product, Keep the Parameters: Associative Algebra Layers for TransformersarXiv · 2026
- Executing Causal Structure Learning with Linear-Attention TransformersarXiv · 2026
- Linear Algebra Foundations of Efficient Attention: A Phase Reversal in Rank Collapse Under SVD CompressionarXiv · 2026