paper-with-me

홈 › Papers

Unifying Attention Heads and Task Vectors via Hidden State Geometry in In-Context Learning

2025-05-24 · Haolin Yang, Hakaze Cho, Yiqiao Zhong, Naoya Inoue

The unusual properties of in-context learning (ICL) have prompted investigations into the internal mechanisms of large language models. Prior work typically focuses on either special attention heads or task vectors at specific layers, but lacks a unified framework linking these components to the evolution of hidden states across layers that ultimately produce the model's output. In this paper, we propose such a framework for ICL in classification tasks by analyzing two geometric factors that govern performance: the separability and alignment of query hidden states. A fine-grained analysis of layer-wise dynamics reveals a striking two-stage mechanism: separability emerges in early layers, while alignment develops in later layers. Ablation studies further show that Previous Token Heads drive separability, while Induction Heads and task vectors enhance alignment. Our findings thus bridge the gap between attention heads and task vectors, offering a unified account of ICL's underlying mechanisms.

📄 PDF Abstract BibTeX arXiv:2505.18752

Code (0)

등록된 구현이 없습니다.

Tasks

In-Context Learning

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysis

2025-09-29 · Haolin Yang, Hakaze Cho, Naoya Inoue arxiv

We investigate the mechanistic underpinnings of in-context learning (ICL) in large language models by reconciling two dominant perspectives: the component-level analysis of attention heads and the holistic decomposition …

LoFiT: Localized Fine-tuning on LLM Representations

2024-06-03 · Fangcong Yin, Xi Ye, Greg Durrett

Recent work in interpretability shows that large language models (LLMs) can be adapted for new tasks in a learning-free way: it is possible to intervene on LLM representations to elicit desired behaviors for alignment. F…

parameter-efficient fine-tuning

Sparse Attention Decomposition Applied to Circuit Tracing

2024-10-01 · Gabriel Franco, Mark Crovella

Many papers have shown that attention heads work in conjunction with each other to perform complex tasks. It's frequently assumed that communication between attention heads is via the addition of specific features to tok…

Why Attention Patterns Exist: A Unifying Temporal Perspective Analysis

2026-01-29 · Qingyue Yang, Jie Wang, Xing Li, Yinqi Bai 외 arxiv

Attention patterns play a crucial role in both training and inference of large language models (LLMs). Prior works have identified individual patterns such as retrieval heads, sink heads, and diagonal traces, yet these o…

Understanding and Steering the Cognitive Behaviors of Reasoning Models at Test-Time

2025-12-31 · Zhenyu Zhang, Xiaoxia Wu, Zhongzhu Zhou, Qingyang Wu 외 arxiv

Large Language Models (LLMs) often rely on long chain-of-thought (CoT) reasoning to solve complex tasks. While effective, these trajectories are frequently inefficient, leading to high latency from excessive token genera…