stat.MLAug 31, 2025

When is Fine-Tuning Scalable? Certified Recovery from Noisy Data and Linear-Cost Fine-Tuning on Structured Task Shifts

Authors: Anastasis Kratsios, Tin Sum Cheng, Bum Jun Kim, Daniel Roy

Organizations: Department of Mathematics, McMaster University, Canada · Department of Mathematics and Computer Science, University of Basel, Switzerland · Department of Statistical Sciences, University of Toronto, Canada · Vector Institute, Canada

Abstract

Transformers often transfer across related tasks with little fine-tuning; we study this question in noisy nonparametric regression for continuous maps f,g:[0,1]d→RDf,g:[0,1]^d\to\mathbb{R}^D, representing the source and shifted tasks, using a single-query, single-head transformer T(⋅)=VSoftmax⁡(−α(⋅,K))\mathcal{T}(\cdot)=V\operatorname{Softmax}(-α(\cdot,K)) with ℓ∞\ell^{\infty}-based alignment scores αα. Rather than assume that gradient-based training reaches an empirical risk minimizer, we give a model-specific two-stage procedure certifying source-task recovery and out-of-distribution (OOD) adaptation. With high probability, the resulting attention head recovers ff to arbitrary accuracy ε>0\varepsilon>0 in every fixed Lp([0,1]d)L^p([0,1]^d) norm, 1≤p<∞1\le p<\infty, from noisy observations. For Lipschitz targets, its rate is minimax-optimal up to logarithmic factors without assuming oracle access to an asymptotic ERM. If D=1D=1 and ff is Pfaffian than the values matrix factors into ACAC with AA scaling at-most linearly O(ε−1)\mathcal{O}(\varepsilon^{-1}) in the reciprocal approximation error ε>0\varepsilon>0. Importantly, our training procedure encodes all our identified (potentially) shared geometric structure from ff only into the values matrix factor CC and the keys matrix KK allowing for rapid access, and all ff-specific structure only into AA. Our main result concerns the OOD phase; where we identify geometric structures, which if shared by the source ff and OOD gg task; then only only the values matrix factor AA needs to be fine-tuned to guarantee an LpL^p-recovery of gg. Critically, fine-tuning only AA is a convex problem which involving an at-most linear number of parameters O(ε−1)\mathcal{O}(\varepsilon^{-1}); dramatically cutting down on the worst-case scaling of O(ε−d)\mathcal{O}(\varepsilon^{-\mathbf{d}}) unavoidable in the source-training phase.

Figures & tables

Explore similar work

CardsList
  1. Theory on Attention Dynamics for Out-of-Distribution In-Context Learning

    Sep 29, 2026Junze Deng, Daouda Sow, Sen Lin +1In-Context LearningOOD Generalization

  2. First-Order Predictable but Pairwise Fragile: Local Task Adaptation in Trained Transformers

    Jul 18, 2026Irina Piontkovskaia, Sergey NikolenkoFine-TuningNeural Network Optimization

  3. Retrieval-Guided Fine-Tuning as Noisy Estimation: Risk bounds and Architectural Analysis

    Sep 13, 2026Bhargav Lad, Yifan HaoFine-TuningRAG Robustness