paper-with-me

홈 › Papers

Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learning

2023-05-23 · Lean Wang, Lei LI, Damai Dai, Deli Chen, Hao Zhou, Fandong Meng, Jie zhou, Xu sun

In-context learning (ICL) emerges as a promising capability of large language models (LLMs) by providing them with demonstration examples to perform diverse tasks. However, the underlying mechanism of how LLMs learn from the provided context remains under-explored. In this paper, we investigate the working mechanism of ICL through an information flow lens. Our findings reveal that label words in the demonstration examples function as anchors: (1) semantic information aggregates into label word representations during the shallow computation layers' processing; (2) the consolidated information in label words serves as a reference for LLMs' final predictions. Based on these insights, we introduce an anchor re-weighting method to improve ICL performance, a demonstration compression technique to expedite inference, and an analysis framework for diagnosing ICL errors in GPT2-XL. The promising applications of our findings again validate the uncovered ICL working mechanism and pave the way for future studies.

📄 PDF Abstract BibTeX arXiv:2305.14160

Code (3)

lancopku/label-words-are-anchors 공식 구현 pytorch
alibaba/thinking_bias pytorch
eit-nlp/2d-coordinate-system-for-icl pytorch

Tasks

In-Context Learning

Similar Papers 제목 키워드 기반

Labeled Anchors and a Scalable, Transparent, and Interactive Classifier

2018-10-01 · EMNLP 2018 10 · Jeffrey Lund, Stephen Cowley, Wilson Fearn, Emily Hales 외

We propose Labeled Anchors, an interactive and supervised topic model based on the anchor words algorithm (Arora et al., 2013). Labeled Anchors is similar to Supervised Anchors (Nguyen et al., 2014) in that it extends th…

Document ClassificationGeneral ClassificationText ClassificationTopic Models

GNNavi: Navigating the Information Flow in Large Language Models by Graph Neural Network

2024-02-18 · Shuzhou Yuan, Ercong Nie, Michael Färber, Helmut Schmid 외

Large Language Models (LLMs) exhibit strong In-Context Learning (ICL) capabilities when prompts with demonstrations are used. However, fine-tuning still remains crucial to further enhance their adaptability. Prompt-based…

Graph Neural NetworkIn-Context Learningparameter-efficient fine-tuningtext-classification+1

Context Tokens are Anchors: Understanding the Repetition Curse in dMLLMs from an Information Flow Perspective

2026-01-28 · Qiyan Zhao, Xiaofeng Zhang, Shuochen Chang, Qianyu Chen 외 arxiv

Recent diffusion-based Multimodal Large Language Models (dMLLMs) suffer from high inference latency and therefore rely on caching techniques to accelerate decoding. However, the application of cache mechanisms often intr…

Text Generation

A Sea of Words: An In-Depth Analysis of Anchors for Text Data

2022-05-27 · Gianluigi Lopardo, Frederic Precioso, Damien Garreau

Anchors (Ribeiro et al., 2018) is a post-hoc, rule-based interpretability method. For text data, it proposes to explain a decision by highlighting a small set of words (an anchor) such that the model to explain has simil…

text-classificationText Classification

Towards Better Context-aware Lexical Semantics:Adjusting Contextualized Representations through Static Anchors

2020-11-01 · EMNLP 2020 11 · Qianchu Liu, Diana McCarthy, Anna Korhonen

One of the most powerful features of contextualized models is their dynamic embeddings for words in context, leading to state-of-the-art representations for context-aware lexical semantics. In this paper, we present a po…