[논문 리뷰] Pretraining task diversity and the emergence of non-Bayesian in-context learning for regression
이 논문은 선형 회귀에 대한 비-베이지안 in-context 학습를 트리거하는 프리트레이닝의 태스크 다양성 임계값을 보여주며, 다양성이 증가함에 따라 트랜스포머가 dMMSE 유사한 동작에서 Ridge 유사 동작으로 이동한다.
Pretrained transformers exhibit the remarkable ability of in-context learning (ICL): they can learn tasks from just a few examples provided in the prompt without updating any weights. This raises a foundational question: can ICL solve fundamentally $ extit{new}$ tasks that are very different from those seen during pretraining? To probe this question, we examine ICL's performance on linear regression while varying the diversity of tasks in the pretraining dataset. We empirically demonstrate a $ extit{task diversity threshold}$ for the emergence of ICL. Below this threshold, the pretrained transformer cannot solve unseen regression tasks, instead behaving like a Bayesian estimator with the $ extit{non-diverse pretraining task distribution}$ as the prior. Beyond this threshold, the transformer significantly outperforms this estimator; its behavior aligns with that of ridge regression, corresponding to a Gaussian prior over $ extit{all tasks}$, including those not seen during pretraining. Thus, when pretrained on data with task diversity greater than the threshold, transformers $ extit{can}$ optimally solve fundamentally new tasks in-context. Importantly, this capability hinges on it deviating from the Bayes optimal estimator with the pretraining distribution as the prior. This study also explores the effect of regularization, model capacity and task structure and underscores, in a concrete example, the critical role of task diversity, alongside data and model scale, in the emergence of ICL. Code is available at https://github.com/mansheej/icl-task-diversity.
연구 동기 및 목표
- 프리트레이닝 중에 보지 못한 근본적으로 새로운 회귀 태스크를 in-context 학습(ICL)이 해결할 수 있는지 여부를 조사한다.
- 프리트레이닝 태스크 다양성이 ICL의 등장을 어떻게 좌우하고 그 알고리즘적 특성은 무엇인지 살펴본다.
- 트랜스포머의 ICL 동작을 베이지안 추정치(dMMSE)와 다양성 하에서의 Ridge 회귀와 비교한다.
제안 방법
- 잠재 회귀 벡터가 유한한 프리트레이닝 태스크 분포에서 뽑히고 실제 태스크 분포는 가우시안 분포인 선형 회귀에 대한 ICL을 연구한다.
- 두 태스크 분포에 대한 최적 추정치를 정의한다: 프리트레이닝 태스크에 대한 이산 MMSE(dMMSE)와 실제 태스크에 대한 Ridge 회귀.
- 프리트레이닝 태스크 다양성(M)을 바꾸고 프롬컨텍스트 예측들에 대한 평균제곱오차를 통해 dMMSE 및 Ridge와의 정렬성을 측정한다.
- 학습 다이나믹스, 태스크 차원, 정규화 및 모델 용량이 ICL의 등장에 미치는 영향을 분석한다.
- 다음-token MSE 목적어로 시퀀스 (x, y) 쌍의 노이즈를 가진 트랜스포머 모델(GPT2유사)을 사용한다.
실험 결과
연구 질문
- RQ1프리트레이닝 태스크 다양성이 증가하면 트랜스포머가 새로운 태스크를 in-context에서 학습할 수 있는가?
- RQ2태스크 다양성이 변함에 따라 트랜스포머의 in-context 학습 동작은 베이지안 추정치 및 Ridge 회귀에 비해 어떻게 전이되는가?
- RQ3회귀에서 ICL의 등장에 있어 태스크 차원, 정규화 및 모델 용량의 역할은 무엇인가?
주요 결과
- 태스크 다양성 임계값이 존재하여 이 임계값을 넘으면 트랜스포머가 새로운 태스크에 대해 dMMSE와 거의 같은 성능에서 Ridge에 근접한 성능으로 전환한다.
- 임계값을 넘으면 트랜스포머가 본격적으로 새로운 태스크를 인-context에서 학습할 수 있으며 보지 못한 태스크에서 프리트레이닝 베이지 추정자보다 우수한 성능을 보인다.
- 태스크 차원을 증가시키면 다양성 임계값이 대략 선형으로 증가하지만 PT의 차원에 대한 오차 스케일링은 거의 Ridge에 가깝게 유지되어 차원이 커질수록 dMMSE를 능가한다.
- 가중치 감소는 다양성 임계값을 낮추고, 임베딩 크기나 깊이를 증가시키면 이를 올려 정규화와 용량이 ICL의 출현에 영향을 준다.
- 태스크당 시퀀스가 많아지면 전이가 더 날카로워져, 태스크 다양성 수준 간의 학습 다이나믹스에서 알고리즘적 위상전이를 시사한다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.