Skip to main content
QUICK REVIEW

[논문 리뷰] Not All Language Model Features Are One-Dimensionally Linear

Joshua Engels, Eric J. Michaud|arXiv (Cornell University)|2024. 05. 23.
Natural Language Processing TechniquesComputer Science인용 수 3
한 줄 요약

이 논문은 언어 모델에서 선형 표현 가설을 도전하며, 특히 주간 및 월간과 같은 순환 개념을 위한 원형 표현이 본질적으로 다차원적이고 분해할 수 없다는 것을 보여준다. 희소 오토에인코더를 사용하여 GPT-2와 Mistral 7B에서 이러한 특징을 발견하고 검증하며, Llama 3 8B와 Mistral 7B에서 모듈러 산술 작업을 해결하는 데 있어 이것이 핵심적인 역할을 한다는 것을 간섭 실험을 통해 입증한다.

ABSTRACT

Recent work has proposed that language models perform computation by manipulating one-dimensional representations of concepts ("features") in activation space. In contrast, we explore whether some language model representations may be inherently multi-dimensional. We begin by developing a rigorous definition of irreducible multi-dimensional features based on whether they can be decomposed into either independent or non-co-occurring lower-dimensional features. Motivated by these definitions, we design a scalable method that uses sparse autoencoders to automatically find multi-dimensional features in GPT-2 and Mistral 7B. These auto-discovered features include strikingly interpretable examples, e.g. circular features representing days of the week and months of the year. We identify tasks where these exact circles are used to solve computational problems involving modular arithmetic in days of the week and months of the year. Next, we provide evidence that these circular features are indeed the fundamental unit of computation in these tasks with intervention experiments on Mistral 7B and Llama 3 8B, and we examine the continuity of the days of the week feature in Mistral 7B. Overall, our work argues that understanding multi-dimensional features is necessary to mechanistically decompose some model behaviors.

연구 동기 및 목표

  • 모든 언어 모델 특징이 일차원적이라는 가정을 내세운 선형 표현 가설에 도전하기 위해.
  • 특히 원형 매니폴드를 포함한 분해할 수 없는 다차원 특징을 정의하고 대규모 언어 모델에서 식별하기 위해.
  • 이러한 특징이 단순한 잡음이 아니라 모듈러 산술 작업에 핵심적인 계산 단위임을 입증하기 위해.
  • 희소 오토에인코더를 활용한 확장 가능한 방법을 개발하고 적용하여 다차원 특징을 탐지하기 위해.
  • 간섭 실험을 통해 주 및 월에 대한 원형 특징이 모듈러 덧셈 작업을 해결하는 데 필수적임을 검증하기 위해.

제안 방법

  • 독립적 또는 동시 발생하지 않는 저차원 특징으로 분해될 수 없는 특징에 대한 공식적 정의를 제안하여 분해 불가능한 다차원 특징을 정의한다.
  • GPT-2와 Mistral 7B의 활성화 공간에서 다차원 특징을 자동으로 탐지하기 위해 확장 가능한 방법을 희소 오토에인코더(SAE)를 활용해 설계한다.
  • SAE 사전 요소에 클러스터링을 적용하여 주간 및 월간과 같은 순환 개념을 나타내는 원형 매니폴드를 식별한다.
  • 모델의 행동을 탐구하고 특징 사용 여부를 테스트하기 위해 주간 및 월간에 대한 모듈러 덧셈 작업 두 가지를 구성한다.
  • 활성화 패치 및 EVR(설명된 분산 비율)를 사용하여 Mistral 7B와 Llama 3 8B에서 간섭 실험을 수행하여 특징 기여도를 평가한다.
  • 반복적 분해를 통해 은닉 상태를 분해하여 모델 내부 계산에서 해석 가능한 원형 표현을 드러낸다.
Figure 1: Circular representations of days of the week, months of the year, and years of the 20th century in layer 7 of GPT-2-small. These representations were discovered via clustering SAE dictionary elements, described in Section 4 . Points are colored according to the token which created the repr
Figure 1: Circular representations of days of the week, months of the year, and years of the 20th century in layer 7 of GPT-2-small. These representations were discovered via clustering SAE dictionary elements, described in Section 4 . Points are colored according to the token which created the repr

실험 결과

연구 질문

  • RQ1언어 모델은 주간 및 월간과 같은 순환 개념을 표현하기 위해 분해 불가능한 다차원 특징, 예를 들어 원형 매니폴드를 사용할 수 있는가?
  • RQ2이러한 원형 특징은 모듈러 산술 작업을 해결하는 데 필수적인가, 아니면 여분의 표현에 불과한가?
  • RQ3간섭 실험을 통해 원형 특징이 모듈러 덧셈 작업의 주요 계산 단위임이 확인되는가?
  • RQ4희소 오토에인코더는 대규모 언어 모델에서 이러한 다차원 특징을 신뢰성 있게 탐지하고 분리할 수 있는가?
  • RQ5LLM의 은닉 상태는 주기적 데이터를 위한 원형 표현을 포함하는 해석 가능한 구성 요소로 분해되는가?

주요 결과

  • 저자들은 희소 오토에인코더를 사용하여 GPT-2-small와 Mistral 7B에서 주간 및 월간에 대한 원형 표현을 발견했으며, 원 위의 점들이 특정 토큰에 대응됨을 확인했다.
  • Mistral 7B와 Llama 3 8B에서의 간섭 실험 결과, 원형 특징이 모듈러 덧셈 작업 해결에 필수적이며, 이를 제거하거나 손상시키면 성능이 크게 저하됨을 입증했다.
  • EVR 분석 결과, 설명 변수에 원형 특징 γ를 추가함으로써 설명된 분산이 약 0.7에서 약 0.99로 증가하여 높은 설명력이 있음을 확인했다.
  • 어텐션 헤드는 원형 특징 γ를 계산하거나 전파하지 않으며, 25번 레이어 이전에는 γ를 설명 함수에 추가해도 추가 분산 설명이 없었다.
  • 모델는 20번 레이어에서 25번 레이어 사이의 MLP 블록에서 γ를 계산하며, 이 레이어에서 간섭 효과가 가장 높게 관찰되어 MLP가 주요 계산 소스임을 확인했다.
  • 은닉 상태 분해 결과, 주 및 월에 대한 모델 내부 표현이 일관된 원형 매니폴드를 이룬다는 점이 드러나, 다차원 계산의 존재를 뒷받침했다.
(a) Testing $S({\mathbf{a}})$ and $M_{\epsilon}({\mathbf{a}})$ on a reducible feature ${\mathbf{a}}$ .
(a) Testing $S({\mathbf{a}})$ and $M_{\epsilon}({\mathbf{a}})$ on a reducible feature ${\mathbf{a}}$ .

이 논문 읽기

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

누빈트에서 이 논문 읽기

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