Transformer 内部计算揭示新型迭代预条件算法 RAPID
A Transformer-Derived Iterative Preconditioner
一项研究显示,经线性系统求解训练的 softmax 注意力 Transformer 内部计算可揭示出新的数值算法,追踪 XX^T 得到一个迭代预条件原语,并由此发展出无需学习组件的独立算法 RAPID。RAPID 是面向对称正定(SPD)矩阵的 anytime 预条件器,通过随机混合与稀疏局部修正改善条件数。合成与真实问题实验均改善条件数并减少共轭梯度达到目标精度所需迭代次数。
arXiv:2611.22941v1 Announce Type: new 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.
来源:arXiv (AI + Vision + Imaging) · arxiv.org