When is Fine-Tuning Scalable? Certified Recovery from Noisy Data and Linear-Cost Fine-Tuning on Structured Task Shifts
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 , representing the source and shifted tasks, using a single-query, single-head transformer with -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 to arbitrary accuracy in every fixed norm, , from noisy observations. For Lipschitz targets, its rate is minimax-optimal up to logarithmic factors without assuming oracle access to an asymptotic ERM. If and is Pfaffian than the values matrix factors into with scaling at-most linearly in the reciprocal approximation error . Importantly, our training procedure encodes all our identified (potentially) shared geometric structure from only into the values matrix factor and the keys matrix allowing for rapid access, and all -specific structure only into . Our main result concerns the OOD phase; where we identify geometric structures, which if shared by the source and OOD task; then only only the values matrix factor needs to be fine-tuned to guarantee an -recovery of . Critically, fine-tuning only is a convex problem which involving an at-most linear number of parameters ; dramatically cutting down on the worst-case scaling of unavoidable in the source-training phase.
Figures & tables
Fine-Tuning
Fine-tuning adapts pretrained models to new tasks, domains, and behaviors by updating some or all of their parameters.
See all 250 papers