paper-with-me

Papers

Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression

2023-10-26 · Deqing Fu, Tian-Qi Chen, Robin Jia, Vatsal Sharan

Transformers excel at in-context learning (ICL) -- learning from demonstrations without parameter updates -- but how they do so remains a mystery. Recent work suggests that Transformers may internally run Gradient Descent (GD), a first-order optimization method, to perform ICL. In this paper, we instead demonstrate that Transformers learn to approximate second-order optimization methods for ICL. For in-context linear regression, Transformers share a similar convergence rate as Iterative Newton's Method, both exponentially faster than GD. Empirically, predictions from successive Transformer layers closely match different iterations of Newton's Method linearly, with each middle layer roughly computing 3 iterations; thus, Transformers and Newton's method converge at roughly the same rate. In contrast, Gradient Descent converges exponentially more slowly. We also show that Transformers can learn in-context on ill-conditioned data, a setting where Gradient Descent struggles but Iterative Newton succeeds. Finally, to corroborate our empirical findings, we prove that Transformers can implement $k$ iterations of Newton's method with $k + \mathcal{O}(1)$ layers.

📄 PDF Abstract BibTeX arXiv:2310.17086

Code (1)

deqingfu/transformers-icl-higher-order 공식 구현 pytorch

Tasks

In-Context Learning

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Residual Connection 설명 없음
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Adam 설명 없음
Position-Wise Feed-Forward Layer 설명 없음

Similar Papers 제목 키워드 기반

SLIM-QN: A Stochastic, Light, Momentumized Quasi-Newton Optimizer for Deep Neural Networks

2021-09-29 · Yue Niu, Zalan Fabian, Sunwoo Lee, Mahdi Soltanolkotabi 외

We propose SLIM-QN, a light stochastic quasi-Newton optimizer for training large-scale deep neural networks (DNNs). SLIM-QN addresses two key barriers in existing second-order methods for large-scale DNNs: 1) the high co…

Second-order methods

How Well Can Transformers Emulate In-context Newton's Method?

2024-03-05 · Angeliki Giannou, Liu Yang, Tianhao Wang, Dimitris Papailiopoulos 외

Transformer-based models have demonstrated remarkable in-context learning capabilities, prompting extensive research into its underlying mechanisms. Recent studies have suggested that Transformers can implement first-ord…

In-Context Learningregression

ADAHESSIAN: An Adaptive Second Order Optimizer for Machine Learning

2020-06-01 · Zhewei Yao, Amir Gholami, Sheng Shen, Mustafa Mustafa 외

We introduce ADAHESSIAN, a second order stochastic optimization algorithm which dynamically incorporates the curvature of the loss function via ADAptive estimates of the HESSIAN. Second order algorithms are among the mos…

BIG-bench Machine LearningSecond-order methodsStochastic Optimization

Scalable Second Order Optimization for Deep Learning

2020-02-20 · Rohan Anil, Vineet Gupta, Tomer Koren, Kevin Regan 외

Optimization in machine learning, both theoretical and applied, is presently dominated by first-order gradient methods such as stochastic gradient descent. Second-order optimization methods, that involve second derivativ…

CPUDeep Learningimage-classificationImage Classification+4

Towards Practical Second Order Optimization for Deep Learning

2021-01-01 · Rohan Anil, Vineet Gupta, Tomer Koren, Kevin Regan 외

Optimization in machine learning, both theoretical and applied, is presently dominated by first-order gradient methods such as stochastic gradient descent. Second-order optimization methods, that involve second derivativ…

Click-Through Rate PredictionCPUDeep Learningimage-classification+6