# A Transformer-Derived Iterative Preconditioner

> Source: <https://arxiv.org/abs/2611.22941>
> Published: 2026-11-18 06:20:23+00:00

**Key takeaway:** A transformer trained on in-context linear-system prediction yielded RAPID, an anytime SPD preconditioner whose Haar-mixing idealization provably reaches any fixed target condition number with only logarithmic dependence on initial conditioning and cut conjugate gradient iterations in proof-of-conce

# Computer Science > Machine Learning

  [Submitted on 17 Nov 2026]

# Title:A Transformer-Derived Iterative Preconditioner

[View PDF](https://arxiv.org/pdf/2611.22941)

[HTML (experimental)](https://arxiv.org/html/2611.22941v1)

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.

### Additional Features

### References & Citations

Loading...

# Bibliographic and Citation Tools

Bibliographic Explorer 

*(*[What is the Explorer?](https://info.arxiv.org/labs/showcase.html#arxiv-bibliographic-explorer))
Connected Papers 

*(*[What is Connected Papers?](https://www.connectedpapers.com/about))
Litmaps 

*(*[What is Litmaps?](https://www.litmaps.co/))
scite Smart Citations 

*(*[What are Smart Citations?](https://www.scite.ai/))
# Code, Data and Media Associated with this Article

alphaXiv 

*(*[What is alphaXiv?](https://alphaxiv.org/))
CatalyzeX Code Finder for Papers 

*(*[What is CatalyzeX?](https://www.catalyzex.com))
DagsHub 

*(*[What is DagsHub?](https://dagshub.com/))
Gotit.pub 

*(*[What is GotitPub?](http://gotit.pub/faq))
Hugging Face 

*(*[What is Huggingface?](https://huggingface.co/huggingface))
ScienceCast 

*(*[What is ScienceCast?](https://sciencecast.org/welcome))
# Demos

# Recommenders and Search Tools

Influence Flower 

*(*[What are Influence Flowers?](https://influencemap.cmlab.dev/))
CORE Recommender 

*(*[What is CORE?](https://core.ac.uk/services/recommender))
IArxiv Recommender

*(*[What is IArxiv?](https://iarxiv.org/about))
# arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? [**Learn more about arXivLabs**](https://info.arxiv.org/labs/index.html).
