LGAIJun 1, 2023

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

arXiv:2306.00297v2296 citationsh-index: 64
Originality Highly original
AI Analysis

This provides theoretical insights into how transformers learn algorithms in-context, addressing a foundational question in machine learning about model expressivity and training dynamics.

The paper investigates whether transformers can learn to implement algorithms like preconditioned gradient descent through training on random linear regression instances, proving that a single-layer transformer globally minimizes the objective to perform one iteration of this method, with the preconditioning matrix adapting to input distribution and data inadequacy variance.

Several recent 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 iterations of gradient descent. Going beyond the question of expressivity, we ask: Can transformers learn to implement such algorithms by training over random problem instances? To our knowledge, we make the first theoretical progress on this question via an 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 $L$ attention layers, we prove certain critical points of the training objective implement $L$ iterations of preconditioned gradient descent. Our results call for future theoretical studies on learning algorithms by training transformers.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes