Lune

ICML2025Top-tier venue

Scaling Sparse Feature Circuits For Studying In-Context Learning

Dmitrii Kharlapenko, Stepan Shabalin, Arthur Conmy, Neel Nanda

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Sparse Autoencoders Find Highly Interpretable Features in Language Models cites Towards Automated Circuit Discovery for Mechanistic Interpretability
  • How Few-Shot Examples Add Up: A Causal Decomposition of Function Vectors in In-Context Learning cites An Explanation of In-context Learning as Implicit Bayesian Inference
  • How Few-Shot Examples Add Up: A Causal Decomposition of Function Vectors in In-Context Learning cites Language Models are Few-Shot Learners
  • How Few-Shot Examples Add Up: A Causal Decomposition of Function Vectors in In-Context Learning cites Transformers Learn In-Context by Gradient Descent
  • An Explanation of In-context Learning as Implicit Bayesian Inference cites Language Models are Few-Shot Learners
  • Feature Extraction and Steering for Enhanced Chain-of-Thought Reasoning in Language Models cites Sparse Autoencoders Find Highly Interpretable Features in Language Models
  • Transformers Learn In-Context by Gradient Descent cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Feature Extraction and Steering for Enhanced Chain-of-Thought Reasoning in Language ModelsZihao Li, Xu Wang, Yuzhe Yang, Ziyu Yao et al.EMNLP 2025 · 14 citations
  2. How Few-Shot Examples Add Up: A Causal Decomposition of Function Vectors in In-Context LearningEntang Wang, Yiwei Wang, Aleksandra Bakalova, Michael HahnICML 2026 · 1 citation
  3. Shared Lexical Task Representations Explain Behavioral Variability In LLMsZhuonan Yang, Jacob Xiaochen Li, Francisco Velez, Eric Todd et al.ICML 2026

Builds on26

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Sparse Autoencoders Find Highly Interpretable Features in Language ModelsRobert Huben, Hoagy Cunningham, Logan Riggs Smith, Aidan Ewart et al.ICLR 2024 · 1,072 citations
  3. An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 citations
  4. Towards Automated Circuit Discovery for Mechanistic InterpretabilityArthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim et al.NeurIPS 2023 · 861 citations
  5. Transformers Learn In-Context by Gradient DescentJohannes von Oswald, Eyvind Niklasson, Ettore Randazzo, João Sacramento et al.ICML 2023 · 729 citations

Related papers

  1. On the Versatility of Sparse Autoencoders for In-Context LearningIkhyun Cho, Gaeul Kwon, Julia HockenmaierEMNLP Findings 2025
  2. Sparse Autoencoder Features for Classifications and TransferabilityJack Gallifant, Shan Chen, Kuleen Sasse, Hugo J. W. L. Aerts et al.EMNLP 2025
  3. Toward Efficient Sparse Autoencoder-Guided Steering for Improved In-Context Learning in Large Language ModelsIkhyun Cho, Julia HockenmaierEMNLP 2025 · 3 citations
  4. Sparse Autoencoders Reveal Temporal Difference Learning in Large Language ModelsCan Demircan, Tankred Saanum, Akshay Kumar Jagadish, Marcel Binz et al.ICLR 2025 · 1 citation
  5. Uncovering Sentiment Analysis Circuit in Large Language ModelShichen Li, Zhouyang Wang, Zhongqing Wang, Peifeng LiACL 2026
Dusk over the sea between two cliffs drawn in fine vertical lines