paper-with-me

Papers

Transformers learn to implement preconditioned gradient descent for in-context learning

2023-09-21 · NeurIPS 2023 11

Motivated by the striking ability of transformers for in-context learning, several works demonstrate that transformers can implement algorithms like gradient descent. By a careful construction of weights, these works show that multiple layers of transformers are expressive enough to simulate gradient descent iterations. Going beyond the question of expressivity, we ask: \emph{Can transformers can learn to implement such algorithms by training over random problem instances?} To our knowledge, we make the first theoretical progress toward this question via analysis of the loss landscape for linear transformers trained over random instances of linear regression. For a single attention layer, we prove the global minimum of the training objective implements a single iteration of preconditioned gradient descent. Notably, the preconditioning matrix not only adapts to the input distribution but also to the variance induced by data inadequacy. For a transformer with $k$ attention layers, we prove certain critical points of the training objective implement $k$ iterations of preconditioned gradient descent. Our results call for future theoretical studies on learning algorithms by training transformers.

📄 PDF Abstract BibTeX

Code (1)

chengxiang/lineartransformer 공식 구현 pytorch

Similar Papers 제목 키워드 기반

Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?

2024-10-10 · Khashayar Gatmiry, Nikunj Saunshi, Sashank J. Reddi, Stefanie Jegelka 외

The remarkable capability of Transformers to do reasoning and few-shot learning, without any fine-tuning, is widely conjectured to stem from their ability to implicitly simulate a multi-step algorithms -- such as gradien…

Few-Shot LearningIn-Context LearningInductive Bias

Simple Linear Neuron Boosting

2025-02-03 · Daniel Munoz

Given a differentiable network architecture and loss function, we revisit optimizing the network's neurons in function space using Boosted Backpropagation (Grubb & Bagnell, 2010), in contrast to optimizing in parameter s…

Linear Transformers are Versatile In-Context Learners

2024-02-21 · Max Vladymyrov, Johannes von Oswald, Mark Sandler, Rong Ge

Recent research has demonstrated that transformers, particularly linear attention models, implicitly execute gradient-descent-like algorithms on data provided in-context during their forward inference step. However, thei…

Recurrent neural network training with preconditioned stochastic gradient descent

2016-06-14 · Xi-Lin Li

This paper studies the performance of a recently proposed preconditioned stochastic gradient descent (PSGD) algorithm on recurrent neural network (RNN) training. PSGD adaptively estimates a preconditioner to accelerate g…

Handwritten Digit Recognition

Meta-Learning with a Geometry-Adaptive Preconditioner

2023-04-04 · CVPR 2023 1 · Suhyun Kang, Duhun Hwang, Moonjung Eo, Taesup Kim 외

Model-agnostic meta-learning (MAML) is one of the most successful meta-learning algorithms. It has a bi-level optimization structure where the outer-loop process learns a shared initialization and the inner-loop process …

Few-Shot Image ClassificationFew-Shot LearningMeta-Learning