Farther the Shift, Sparser the Representation: Analyzing OOD Mechanisms in LLMs
Not on the map. Why?
Abstract (arXiv)
In this work, we investigate how Large Language Models (LLMs) adapt their internal representations when encountering inputs of increasing difficulty, quantified as the degree of out-of-distribution (OOD) shift. We reveal a consistent and quantifiable phenomenon: as task difficulty increases, whether through harder reasoning questions, longer contexts, or adding answer choices, the last hidden states of LLMs become substantially sparser. In short, textbftextitthe farther the shift, the sparser the representations. This sparsity--difficulty relation is observable across diverse models and domains, suggesting that language models respond to unfamiliar or complex inputs by concentrating computation into specialized subspaces in the last hidden state. Through a series of controlled analyses with a learning dynamic explanation, we demonstrate that this sparsity is not incidental but an adaptive mechanism for stabilizing reasoning under OOD. Leveraging this insight, we design textitSparsity-Guided Curriculum In-Context Learning (SG-ICL), a strategy that explicitly uses representation sparsity to schedule few-shot demonstrations, leading to considerable performance enhancements. Our study provides new mechanistic insights into how LLMs internalize OOD challenges. The source code is available at the URL: https://github.com/MingyuJ666/sparsityLLM.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 43 of its 71 references that are in the map. First posted on arXiv 3 Mar 2026.
Builds on
43 of 71 references.
References · 43
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2023Let's Verify Step by Stepcited by 3,598
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2018The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networkscited by 2,250
- 2015Learning both Weights and Connections for Efficient Neural Networkscited by 1,998
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,758
- 2020WILDS: A Benchmark of in-the-Wild Distribution Shiftscited by 1,366
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,359
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
- 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,116
31 more
- 2023Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Promptingcited by 1,081
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 700
- 2020Intrinsic Dimensionality Explains the Effectiveness of Language Model Fine-Tuningcited by 658
- 2017The Implicit Bias of Gradient Descent on Separable Datacited by 649
- 2023WizardMath: Empowering Mathematical Reasoning for Large Language Models via Reinforced Evol-Instructcited by 618
- 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 579
- 2021Sparsity in Deep Learning: Pruning and growth for efficient inference and training in neural networkscited by 521
- 2023Orca: Progressive Learning from Complex Explanation Traces of GPT-4cited by 369
- 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
- 2020The Lottery Ticket Hypothesis for Pre-trained BERT Networkscited by 275
- 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 275
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 225
- 2019Competence-based Curriculum Learning for Neural Machine Translationcited by 201
- 2020Compressing BERT: Studying the Effects of Weight Pruning on Transfer Learningcited by 184
- 2022The Lazy Neuron Phenomenon: On Emergence of Activation Sparsity in Transformerscited by 121
- 2020When BERT Plays the Lottery, All Tickets Are Winningcited by 114
- 2023Grokking as the Transition from Lazy to Rich Training Dynamicscited by 102
- 2024Generalization v.s. Memorization: Tracing Language Models' Capabilities Back to Pretraining Datacited by 83
- 2018Stochastic Gradient Descent on Separable Data: Exact Convergence with a Fixed Learning Ratecited by 63
- 2025DUMP: Automated Distribution-Level Curriculum Learning for RL-based LLM Post-trainingcited by 45
- 2025Massive Values in Self-Attention Modules are the Key to Contextual Knowledge Understandingcited by 44
- 2021Sparse Interventions in Language Models with Differentiable Maskingcited by 34
- 2023MathAttack: Attacking Large Language Models Towards Math Solving Abilitycited by 31
- 2025SAE-SSV: Supervised Steering in Sparse Representation Spaces for Reliable Control of Language Modelscited by 28
- 2024Implicit Geometry of Next-token Prediction: From Language Sparsity Patterns to Model Representationscited by 24
- 2024Towards Uncovering How Large Language Model Works: An Explainability Perspectivecited by 22
- 2025How do Transformers Learn Implicit Reasoning?cited by 15
- 2024UNComp: Can Matrix Entropy Uncover Sparsity? -- A Compressor Design from an Uncertainty-Aware Perspectivecited by 14
- 2022Efficient Pre-training of Masked Language Model via Concept-based Curriculum Maskingcited by 12
- 2025SAGE: An Agentic Explainer Framework for Interpreting SAE Features in Language Modelscited by 10
- 2025Are Transformers Able to Reason by Connecting Separated Knowledge in Training Data?cited by 3
Built on by
Citing papers per year: 2026: 3.
3 papers.
- 2026All Circuits Lead to Rome: Rethinking Functional Anisotropy in Circuit and Sheaf Discovery for LLMscited by 8
- 2026Skill-RAG: Failure-State-Aware Retrieval Augmentation via Hidden-State Probing and Skill Routingcited by 3
- 2026Mechanist: AI as a Scientific Instrument for Discovering the Mechanisms of Intelligencecited by 1
- 2026Mechanist: AI as a Scientific Instrument for Discovering the Mechanisms of Intelligence12 Aug 2026
- 2026All Circuits Lead to Rome: Rethinking Functional Anisotropy in Circuit and Sheaf Discovery for LLMs12 May 2026
- 2026Skill-RAG: Failure-State-Aware Retrieval Augmentation via Hidden-State Probing and Skill Routing17 Apr 2026