Scaling sparse feature circuit finding for in-context learning

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Kharlapenko, Dmitrii, Shabalin, Stepan, Barez, Fazl, Conmy, Arthur, Nanda, Neel
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866916696292327424
author Kharlapenko, Dmitrii
Shabalin, Stepan
Barez, Fazl
Conmy, Arthur
Nanda, Neel
author_facet Kharlapenko, Dmitrii
Shabalin, Stepan
Barez, Fazl
Conmy, Arthur
Nanda, Neel
contents Sparse autoencoders (SAEs) are a popular tool for interpreting large language model activations, but their utility in addressing open questions in interpretability remains unclear. In this work, we demonstrate their effectiveness by using SAEs to deepen our understanding of the mechanism behind in-context learning (ICL). We identify abstract SAE features that (i) encode the model's knowledge of which task to execute and (ii) whose latent vectors causally induce the task zero-shot. This aligns with prior work showing that ICL is mediated by task vectors. We further demonstrate that these task vectors are well approximated by a sparse sum of SAE latents, including these task-execution features. To explore the ICL mechanism, we adapt the sparse feature circuits methodology of Marks et al. (2024) to work for the much larger Gemma-1 2B model, with 30 times as many parameters, and to the more complex task of ICL. Through circuit finding, we discover task-detecting features with corresponding SAE latents that activate earlier in the prompt, that detect when tasks have been performed. They are causally linked with task-execution features through the attention and MLP sublayers.
format Preprint
id arxiv_https___arxiv_org_abs_2504_13756
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Scaling sparse feature circuit finding for in-context learning
Kharlapenko, Dmitrii
Shabalin, Stepan
Barez, Fazl
Conmy, Arthur
Nanda, Neel
Machine Learning
Artificial Intelligence
Computation and Language
Sparse autoencoders (SAEs) are a popular tool for interpreting large language model activations, but their utility in addressing open questions in interpretability remains unclear. In this work, we demonstrate their effectiveness by using SAEs to deepen our understanding of the mechanism behind in-context learning (ICL). We identify abstract SAE features that (i) encode the model's knowledge of which task to execute and (ii) whose latent vectors causally induce the task zero-shot. This aligns with prior work showing that ICL is mediated by task vectors. We further demonstrate that these task vectors are well approximated by a sparse sum of SAE latents, including these task-execution features. To explore the ICL mechanism, we adapt the sparse feature circuits methodology of Marks et al. (2024) to work for the much larger Gemma-1 2B model, with 30 times as many parameters, and to the more complex task of ICL. Through circuit finding, we discover task-detecting features with corresponding SAE latents that activate earlier in the prompt, that detect when tasks have been performed. They are causally linked with task-execution features through the attention and MLP sublayers.
title Scaling sparse feature circuit finding for in-context learning
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2504.13756