paper-with-me

Papers

What and How does In-Context Learning Learn? Bayesian Model Averaging, Parameterization, and Generalization

2023-05-30 · Yufeng Zhang, Fengzhuo Zhang, Zhuoran Yang, Zhaoran Wang

In this paper, we conduct a comprehensive study of In-Context Learning (ICL) by addressing several open questions: (a) What type of ICL estimator is learned by large language models? (b) What is a proper performance metric for ICL and what is the error rate? (c) How does the transformer architecture enable ICL? To answer these questions, we adopt a Bayesian view and formulate ICL as a problem of predicting the response corresponding to the current covariate, given a number of examples drawn from a latent variable model. To answer (a), we show that, without updating the neural network parameters, ICL implicitly implements the Bayesian model averaging algorithm, which is proven to be approximately parameterized by the attention mechanism. For (b), we analyze the ICL performance from an online learning perspective and establish a $\mathcal{O}(1/T)$ regret bound for perfectly pretrained ICL, where $T$ is the number of examples in the prompt. To answer (c), we show that, in addition to encoding Bayesian model averaging via attention, the transformer architecture also enables a fine-grained statistical analysis of pretraining under realistic assumptions. In particular, we prove that the error of pretrained model is bounded by a sum of an approximation error and a generalization error, where the former decays to zero exponentially as the depth grows, and the latter decays to zero sublinearly with the number of tokens in the pretraining dataset. Our results provide a unified understanding of the transformer and its ICL ability with bounds on ICL regret, approximation, and generalization, which deepens our knowledge of these essential aspects of modern language models.

📄 PDF Abstract BibTeX arXiv:2305.19420

Code (0)

등록된 구현이 없습니다.

Tasks

In-Context Learning

Similar Papers 제목 키워드 기반

Graphical posterior predictive classifier: Bayesian model averaging with particle Gibbs

2017-07-21 · Tatjana Pavlenko, Felix Leopoldo Rios

In this study, we present a multi-class graphical Bayesian predictive classifier that incorporates the uncertainty in the model selection into the standard Bayesian formalism. For each class, the dependence structure und…

Model Selection

Flat Posterior Does Matter For Bayesian Model Averaging

2024-06-21 · Sungjun Lim, Jeyoon Yeom, Sooyon Kim, Hoyoon Byun 외

Bayesian neural network (BNN) approximates the posterior distribution of model parameters and utilizes the posterior for prediction via Bayesian Model Averaging (BMA). The quality of the posterior approximation is critic…

modelTransfer LearningUncertainty Quantification

Learning under Model Misspecification: Applications to Variational and Ensemble methods

2019-12-18 · NeurIPS 2020 12 · Andres R. Masegosa

Virtually any model we use in machine learning to make predictions does not perfectly represent reality. So, most of the learning happens under model misspecification. In this work, we present a novel analysis of the gen…

Federated Averaging Langevin Dynamics: Toward a unified theory and new algorithms

2022-10-31 · Vincent Plassier, Alain Durmus, Eric Moulines

This paper focuses on Bayesian inference in a federated learning context (FL). While several distributed MCMC algorithms have been proposed, few consider the specific limitations of FL such as communication bottlenecks a…

Bayesian InferenceFederated Learning

Statistical aspects of nuclear mass models

2020-02-11 · Vojtech Kejzlar, Léo Neufcourt, Witold Nazarewicz, Paul-Gerhard Reinhard

We study the information content of nuclear masses from the perspective of global models of nuclear binding energies. To this end, we employ a number of statistical methods and diagnostic tools, including Bayesian calibr…

DiagnosticUncertainty Quantification