Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Attention Lens: A Tool for Mechanistically Interpreting the Attention Head Information Retrieval Mechanism (2310.16270v1)

Published 25 Oct 2023 in cs.CL, cs.AI, and cs.LG

Abstract: Transformer-based LLMs are the state-of-the-art for natural language tasks. Recent work has attempted to decode, by reverse engineering the role of linear layers, the internal mechanisms by which LLMs arrive at their final predictions for text completion tasks. Yet little is known about the specific role of attention heads in producing the final token prediction. We propose Attention Lens, a tool that enables researchers to translate the outputs of attention heads into vocabulary tokens via learned attention-head-specific transformations called lenses. Preliminary findings from our trained lenses indicate that attention heads play highly specialized roles in LLMs. The code for Attention Lens is available at github.com/msakarvadia/AttentionLens.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (8)
  1. Mansi Sakarvadia (10 papers)
  2. Arham Khan (7 papers)
  3. Aswathy Ajith (8 papers)
  4. Daniel Grzenda (5 papers)
  5. Nathaniel Hudson (16 papers)
  6. André Bauer (11 papers)
  7. Kyle Chard (87 papers)
  8. Ian Foster (138 papers)
Citations (8)