Skip to main content
QUICK REVIEW

[논문 리뷰] Farther the Shift, Sparser the Representation: Analyzing OOD Mechanisms in LLMs

Mingyu Jin, Yutong Yin|arXiv (Cornell University)|2026. 03. 03.
Topic ModelingComputer Science인용 수 0
한 줄 요약

이 논문은 입력 난이도가 증가함에 따라 LLM의 마지막-hidden-state 표현이 더 희소해지며, OOD에서의 추론을 개선하기 위해 희소성 가이드 인-컨텍스트 학습(SG-ICL)을 도입한다.

ABSTRACT

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, extbf{ extit{the 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 extit{Sparsity-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.

연구 동기 및 목표

  • OOD 시프트에서 증가하는 작업 난이도에 따라 LLM의 마지막 계층 표현이 어떻게 변화하는지 식별한다.
  • OOD 도전에서 표현 희소성의 출현을 주도하는 메커니즘을 조사한다.
  • 교과 과정 기반 인-컨텍스트 학습을 통해 희소성을 활용해 추론을 개선할 수 있는지 평가한다.

제안 방법

  • 여러 난이도 축에 걸쳐 L1 노름과 Top-k Energy를 사용하여 마지막 숨겨진 상태의 희소성을 정량화한다.
  • 이유 설정: 추론 복잡성, 오답 요소 확장, 지식 충돌, 그리고 컨텍스트 길이를 포함한 통제된 OOD 설정을 만든다.
  • SG-ICL(희소성 가이드 커리큘럼 인-컨텍스트 학습)을 제안하여 희소성 기반 난이도에 따라 시연을 선택한다.
  • 합성 데이터셋으로 간단한 지식 그래프를 이용한 사전 학습을 수행하여 학습 역학과 희소성 출현을 분석한다.
  • 희소성 역학과 데이터 친숙도 및 학습 단계 간의 이론적 및 실증적 분석을 제공한다.
Figure 1 : Harder Inputs Induce Sparser Representations. Across all four controlled difficulty axes, the last hidden states become progressively sparser as tasks get harder. Results are shown for Qwen2.5-3B using Top-10% Energy; nevertheless, the same trend holds across difficulty settings, sparsity
Figure 1 : Harder Inputs Induce Sparser Representations. Across all four controlled difficulty axes, the last hidden states become progressively sparser as tasks get harder. Results are shown for Qwen2.5-3B using Top-10% Energy; nevertheless, the same trend holds across difficulty settings, sparsity

실험 결과

연구 질문

  • RQ1RQ1: 추론 작업이 점차 더 어려워질 때 마지막 숨겨진 상태의 기하학적 형태가 어떻게 변화하는가?
  • RQ2RQ2: OOD 도전에 직면할 때 희소성의 출현을 주도하는 메커니즘은 무엇인가?
  • RQ3RQ3: 이 희소성 신호를 실질적으로 활용해 모델의 추론 능력을 향상시키려면 어떻게 할 수 있는가?

주요 결과

  • 네 가지 난이도 축에 걸쳐, 더 어려운 입력은 마지막 계층 표현을 더 희소하게 만들며, 이는 L1 노름 감소와 Top-k Energy 증가로 측정된다.
  • 희소성은 정확도 저하와 강하게 상관관계가 있으며, 활성화 압축과 성능 저하 간의 연관성을 시사한다.
  • MMLU-Pro의 오답 요소 수 증가(Normal→Moderate→Large)가 분야 및 지표 전반에서 더 높은 희소성을 초래한다.
  • 지식 충돌 설정은 여러 지표에 걸쳐 희소성의 통계적으로 유의미한 증가를 보여준다.
  • 긴 컨텍스트 추론은 컨텍스트 길이가 늘어남에 따라 희소성이 증가하며, 최종 계층이 가장 많이 영향을 받는다.
  • SG-ICL은 소수 예시 추론 성능을 향상시키며, 예: Qwen2.5-7B로 MATH500에서 76.60% 정확도를 달성하고 Auto-CoT의 75.20%를 상회한다.
  • 합성 데이터로의 사전 학습 실험은 희소성–난이도 패턴이 충분한 용량과 수렴 이후에만 학습된 특성으로 나타난다는 것을 보여준다.
  • 두 단계 학습 역학이 관찰되며: 초기 희소화 후 표현의 응집(밀집화)으로 이어져 유한 기간의 U자 모양 희소성 패턴을 형성한다.
(a) Sparsity Differences under Different Difficulty Levels. Last Hidden State sparsity metrics across five difficulty levels and three different models in MATH-500.
(a) Sparsity Differences under Different Difficulty Levels. Last Hidden State sparsity metrics across five difficulty levels and three different models in MATH-500.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.