mlsanityData to 7 Oct 2026

Decoding In-Context Learning: Neuroscience-inspired Analysis of Representations in Large Language Models

arXiv 2310.00313 ↗First posted 30 Sep 2023cs.CLcited by 7

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) exhibit remarkable performance improvement through in-context learning (ICL) by leveraging task-specific examples in the input. However, the mechanisms behind this improvement remain elusive. In this work, we investigate how LLM embeddings and attention representations change following in-context-learning, and how these changes mediate improvement in behavior. We employ neuroscience-inspired techniques such as representational similarity analysis (RSA) and propose novel methods for parameterized probing and measuring ratio of attention to relevant vs. irrelevant information in Llama-2 70B and Vicuna 13B. We designed two tasks with a priori relationships among their conditions: linear regression and reading comprehension. We formed hypotheses about expected similarities in task representations and measured hypothesis alignment of LLM representations before and after ICL as well as changes in attention. Our analyses revealed a meaningful correlation between improvements in behavior after ICL and changes in both embeddings and attention weights across LLM layers. This empirical framework empowers a nuanced understanding of how latent representations shape LLM behavior, offering valuable tools and insights for future research and practical applications.

Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 22 of its 26 references that are in the map. First posted on arXiv 30 Sep 2023.

Builds on

22 of 26 references.

References · 22

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  5. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  6. 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
  7. 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
  8. 2022Transformers learn in-context by gradient descentcited by 714
  9. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
  10. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  11. 2021All Bark and No Bite: Rogue Dimensions in Transformer Language Models Obscure Representational Qualitycited by 150
  12. 2023The Learnability of In-Context Learningcited by 126
10 more
  1. 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
  2. 2023In-Context Learning through the Bayesian Prismcited by 78
  3. 2023Evaluating Cognitive Maps and Planning in Large Language Models with CogEvalcited by 77
  4. 2023Meta-in-context learning in large language modelscited by 59
  5. 2019Correlating neural and symbolic representations of languagecited by 32
  6. 2020Picking BERT's Brain: Probing for Linguistic Dependencies in Contextualized Embeddings Using Representational Similarity Analysiscited by 18
  7. 2023ALLURE: Auditing and Improving LLM-based Evaluation of Text using Iterative In-Context-Learningcited by 15
  8. 2020Unequal Representations: Analyzing Intersectional Biases in Word Embeddings Using Representational Similarity Analysiscited by 12
  9. 2019Higher-order Comparisons of Sentence Encoder Representationscited by 10
  10. 2022Probing Semantic Grounding in Language Models of Code with Representational Similarity Analysiscited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 5; 2026: 2.

7 papers.