[논문 리뷰] Progress measures for grokking via mechanistic interpretability
본 논문은 작은 트랜스포머를 역설계하여 모듈러 덧셈을 해결하고 푸리에 기반 알고리즘을 밝히며, 진행 척도(제한된 손실과 배제된 손실)를 정의하여 grokking이 점진적인 회로 형성 뒤에 가중치 감소로 기억화를 제거한다는 것을 보여준다.
Neural networks often exhibit emergent behavior, where qualitatively new capabilities arise from scaling up the amount of parameters, training data, or training steps. One approach to understanding emergence is to find continuous extit{progress measures} that underlie the seemingly discontinuous qualitative changes. We argue that progress measures can be found via mechanistic interpretability: reverse-engineering learned behaviors into their individual components. As a case study, we investigate the recently-discovered phenomenon of ``grokking'' exhibited by small transformers trained on modular addition tasks. We fully reverse engineer the algorithm learned by these networks, which uses discrete Fourier transforms and trigonometric identities to convert addition to rotation about a circle. We confirm the algorithm by analyzing the activations and weights and by performing ablations in Fourier space. Based on this understanding, we define progress measures that allow us to study the dynamics of training and split training into three continuous phases: memorization, circuit formation, and cleanup. Our results show that grokking, rather than being a sudden shift, arises from the gradual amplification of structured mechanisms encoded in the weights, followed by the later removal of memorizing components.
연구 동기 및 목표
- 신경망에서 출현하는 행동의 기저에 있는 매끄럽고 인과적으로 연결된 진행 척도들의 탐색에 동기를 부여한다.
- grokking이 학습된 회로의 기계적 역설계를 통해 설명될 수 있음을 보여준다.
- 모듈러 덧셈 Transformer를 역설계하여 Fourier-곱셈 알고리즘을 밝혀낸다.
- grokking 단계 전이를 예시하는 연속적 진행 척도를 정의하고 검증한다.
- 학습 역학을 기억화, 회로 형성, 및 정리의 세 단계로 특징지운다.
제안 방법
- P=113인 addition mod P에 대해 작은 Transformer 모델을 학습시킨다.
- 가중치와 활성화를 역설계하여 Fourier 기반 덧셈 알고리즘을 식별한다.
- 임베딩, 어텐션 및 MLP 활성화가 핵심 주파수 집합에서 주기적 구조를 보인다는 것을 보여준다.
- 언엡핑과 MLP 계층이 삼각 항등식을 이용해 a+b mod P를 계산한다는 것을 시연한다.
- 제한된 손실과 배제된 손실을 진행 척도로 정의하고 경험적으로 검증한다.
실험 결과
연구 질문
- RQ1모듈러 덧셈에 대해 훈련된 작은 트랜스포머에서 grokking의 기계적 구조는 무엇인가?
- RQ2grokking 전이를 앞서는 연속적이고 해석 가능한 진행 척도를 식별할 수 있는가?
- RQ3학습된 알고리즘은 주파수 구성요소와 삼각 항등식 측면에서 어떻게 작동하는가?
- RQ4기억화에서 일반화로의 여정을 특징짓는 학습 역학(단계)은 무엇인가?
- RQ5가중치 감소는 grokking과 단계 전이에 어떤 역할을 하는가?
주요 결과
- 모델은 입력을 원에 매핑하고 푸리에 구성요소를 사용해 삼각 항등식을 통해 덧셈을 수행한다.
- 로그잇 매핑 W_L은 다섯 개의 핵심 주파수의 합으로 잘 근사되며, 이를 통해 Fourier-곱셈 읽어내기가 가능하다.
- 대부분의 뉴런은 하나의 주파수에 대해 차수 2 다항식으로 잘 근사되며, 주파수 지역화된 읽어내기가 로짓으로 작동한다.
- 아블레이션 결과 핵심 주파수가 필요하며, 비핵심 주파수를 제거하면 성능이 향상될 수 있다.
- Grokking은 기억화, 회로 형성, 정리의 세 가지 단계로 구성되며, 가중치 감소가 일반화 회로로의 전환을 안내한다.
- 제안된 진행 척도(제한된 손실 및 배제된 손실)는 grokking 이전에 지속적으로 증가하며 학습 역학에 대한 렌즈를 제공한다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.