atlas

Research map / Optimization / Implicit bias and generalization

Towards Learning High-Precision Least Squares Algorithms with Sequence Models

ICLR 2025 · Optimization › Implicit bias and generalization · approach: Implicit regularization of SGD

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Studies whether sequence models can learn numerically precise least-squares/gradient-descent iterates; shows softmax Transformers struggle with high-precision multiplication and proposes polynomial architectures (BaseConv, linear attention) trained with an adaptive-LR, EMA high-precision recipe to reach near float32 machine precision.

Problem

Standard Transformers trained in-context on least squares do not reach machine precision and do not generalize numerically out-of-distribution, so they do not learn numerical algorithms such as gradient descent.

Approach

Argues softmax attention cannot exactly express element-wise multiplication, so uses polynomial sequence mixers (BaseConv gated convolutions, non-causal linear attention) that can express GD exactly, and introduces a high-precision training recipe (cosine-similarity-driven adaptive LR plus EMA over Adam updates) that reduces minibatch gradient noise to reach near machine precision.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use a high-precision training recipe with AdaptiveLR and EMABaseConv on explicit gradient updates · Least squares, explicit gradient taskMSE: $10^{-13}$ average MSEHelped
Use BaseConv instead of an end-to-end Transformer and apply predicted gradients iterativelyLeast squares solver · Least squares, iteratively applied to convergenceMSE: $100,000\times$ better MSEHelped
Use iteratively applied BaseConv instead of the TransformerLeast squares solver · Out-of-distribution regression targetsgeneralization gap: $10,000\times$ smallerHelped
Use iterative BaseConv rather than a 12-layer TransformerIn-context ODE solving · In-context ODE solvingMSE: up to $1,000,000 \times$ in MSEHelped
Train the BaseConv k-th iterate task for larger kBaseConv · Least squares, k-th GD iterate taskMSE: $5.0 \times 10^{-13}$; $2.5 \times 10^{-11}$; $2.5 \times 10^{-11}$; $3.1 \times 10^{-10}$Mixed
Replace softmax attention with BaseConv and train end-to-end (ablation)Standard Transformer architecture on least squares · Least squares, end-to-endMSE: $100\times$ worseHurt
Add EMA over Adam update vectors (ablation)BaseConv on the explicit gradient task · Explicit gradient taskMSE: up to $100,000\times$Helped
Add MLPs and LayerNorms (ablation)BaseConv on the explicit gradient task · Explicit gradient taskMSE: up to $1,000,000\times$ MSEHurt
Add LayerNorm (ablation)BaseConv on small-k GD iterate tasks · Least squares, k-th GD iterate taskMSE: over $1,000\times$Hurt
Use linear attention instead of BaseConv (ablation)Iterative least squares solver · Out-of-distribution regression targetsgeneralization gapHurt
Increase the initial learning rate from $10^{-3}$ to $10^{-2}$ with an aggressively decaying schedule (ablation)Training on the Multiply primitive · Multiply primitiveMSE: $1000\times$Helped
Use longer training duration (ablation)1-layer Transformer and BaseConv on Multiply · Multiply primitiveMSE: 2-3 order of magnitude improvementHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic in-context least squares problems synthetic Read/Linear/Multiply primitives synthetic in-context ODE problems

Benchmarks: in-context least squares (20x5) out-of-distribution regression targets in-context ODE solving

Metrics: MSE cosine similarity of minibatch gradients

Baselines: softmax Transformer (GPT-2 style) gradient descent Newton's method standard Adam with StepLR

Builds on: BaseConv GPT-2 Adam

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy