paper-with-me

Papers

In-Context Learning with Representations: Contextual Generalization of Trained Transformers

2024-08-19 · Tong Yang, Yu Huang, Yingbin Liang, Yuejie Chi

In-context learning (ICL) refers to a remarkable capability of pretrained large language models, which can learn a new task given a few examples during inference. However, theoretical understanding of ICL is largely under-explored, particularly whether transformers can be trained to generalize to unseen examples in a prompt, which will require the model to acquire contextual knowledge of the prompt for generalization. This paper investigates the training dynamics of transformers by gradient descent through the lens of non-linear regression tasks. The contextual generalization here can be attained via learning the template function for each task in-context, where all template functions lie in a linear space with $m$ basis functions. We analyze the training dynamics of one-layer multi-head transformers to in-contextly predict unlabeled inputs given partially labeled prompts, where the labels contain Gaussian noise and the number of examples in each prompt are not sufficient to determine the template. Under mild assumptions, we show that the training loss for a one-layer multi-head transformer converges linearly to a global minimum. Moreover, the transformer effectively learns to perform ridge regression over the basis functions. To our knowledge, this study is the first provable demonstration that transformers can learn contextual (i.e., template) information to generalize to both unseen examples and tasks when prompts contain only a small number of query-answer pairs.

📄 PDF Abstract BibTeX arXiv:2408.10147

Code (0)

등록된 구현이 없습니다.

Tasks

In-Context Learning

Similar Papers 제목 키워드 기반

Topic-aware Contextualized Transformers

2021-01-01 · Ruiying Lu, Bo Chen, Dan dan Guo, Dongsheng Wang 외

Training on disjoint fixed-length segments, Transformers successfully transform static word embeddings into contextualized word representations. However, they often restrict the context of a token to the segment it resid…

Word Embeddings

Linguistic Knowledge and Transferability of Contextual Representations

2019-03-21 · NAACL 2019 6 · Nelson F. Liu, Matt Gardner, Yonatan Belinkov, Matthew E. Peters 외

Contextual word representations derived from large-scale neural language models are successful across a diverse set of NLP tasks, suggesting that they encode useful and transferable features of language. To shed light on…

Language ModelingLanguage Modelling

Contextual Vision Transformers for Robust Representation Learning

2023-05-30 · Yujia Bao, Theofanis Karaletsos

We introduce Contextual Vision Transformers (ContextViT), a method designed to generate robust image representations for datasets experiencing shifts in latent factors across various groups. Derived from the concept of i…

In-Context LearningOut-of-Distribution GeneralizationRepresentation Learning

Contextualized Embeddings in Named-Entity Recognition: An Empirical Study on Generalization

2020-01-22 · Bruno Taillé, Vincent Guigue, Patrick Gallinari

Contextualized embeddings use unsupervised language model pretraining to compute word representations depending on their context. This is intuitively useful for generalization, especially in Named-Entity Recognition wher…

Language ModelingLanguage Modellingnamed-entity-recognitionNamed Entity Recognition+1

Augmenting Transformers with Recursively Composed Multi-grained Representations

2023-09-28 · Xiang Hu, Qingyang Zhu, Kewei Tu, Wei Wu

We present ReCAT, a recursive composition augmented Transformer that is able to explicitly model hierarchical syntactic structures of raw texts without relying on gold trees during both learning and inference. Existing r…

Constituency Grammar InductionNatural Language InferenceSemantic Role LabelingSentence