PyTorchKR Papers

최신 논문

총 5편
태그·기간 등 상세 필터

카테고리 탐색

로그인 후 이 태그 구독

arXiv:2602.22600v3cs.LG

트랜스포머는 불변 알고리즘 핵심으로 수렴한다

Transformers converge to invariant algorithmic cores

Training selects for behavior, not circuitry: many weight configurations can implement the same function. Studying any single trained neural network thus risks describing accidents of one training run rather than the computation itself. This work shifts focus from what transformers happen to do to what they must do by extracting algorithmic cores, compact subspaces that are necessary and sufficient for a task and that recur across independently trained models. Here, Algorithmic Core Extraction (ACE) is introduced to isolate these subspaces, causally validate them, and recover the algorithms they implement, from synthetic tasks to large pretrained models. Markov-chain transformers embed 3D cores in nearly orthogonal subspaces yet recover identical transition spectra. Modular-addition transformers form compact cyclic cores at grokking that later inflate under continued regularization, redundantly distributing the same computation across many functionally equivalent modes. This functional redundancy accelerates the transition from memorization to generalization, yielding an inverse scaling law for grokking time. In six language models spanning two orders of magnitude in scale (GPT-2 Small/Medium/Large, LLaMA-3.1, Gemma-2, and Qwen2.5), subject-verb agreement is governed by a single, steerable axis that aligns across architectures. Flipping this axis inverts grammatical number throughout open-ended generation. For indirect object identification, a multi-step task, the same six models route computation through compact multi-dimensional cores at two sites, linked by a linear operator that transfers across model families. Together these results suggest that beneath the apparent complexity of trained transformers lies a simpler, shared computational structure, and that targeting invariants rather than parameterizations may offer a more tractable path to mechanistic understanding and control.

arXiv:2607.01940v3cs.LG

조건부 공동 소거(Conditional Co-Ablation): 트랜스포머 회로에서 자기 수리 백업 복원

Conditional Co-Ablation: Recovering Self-Repair Backups in Transformer Circuits

메커니즘적 해석가능성(mechanistic interpretability)은 행동을 인과적으로 뒷받침하는 내부 구성요소 집합인 회로(circuit)를 통해 트랜스포머 행동을 설명하려 한다. 그러나 자기 수리(self-repair)는 맹점을 만든다. 주요 구성요소를 소거(ablation)하면 휴면 상태의 백업이 활성화될 수 있어, 무손상 모델에서는 행동을 설명하던 회로가 이를 검증하기 위해 쓰인 개입 하에서는 불완전해질 수 있다. 우리는 이 공백을 조건부 회로 완성(conditional circuit completion)으로 형식화한다. 주요 집합이 주어졌을 때, 그 제거 이후 인과적으로 중요해지는 구성요소를 식별하는 것이다. 우리는 주요 집합 제거 후 소거 효과의 증가로 후보를 순위 매기는 조건부 공동 소거(CoAx)를 제안한다. 완전히 휴면인 백업은 단위별 무손상 상태(intact-state) 점수만으로는 무관한 구성요소와 구별되지 않을 수 있지만, 그 조건부 효과 변화는 제거된 집합과 연결하는 모든 상호작용 차수를 정확히 집계한다. GPT-2-small의 간접 목적어 식별(Indirect Object Identification, IOI) 회로에서 CoAx는 문서화된 백업 헤드를 ROC-AUC 0.941로 복원하며, 가장 강한 무손상 상태 속성(attribution) 기준선 0.815, 짝을 맞춘 조건부 에너지(conditional-energy) 통제 0.758보다 낫다. 행동 효과, 출력 변위, 깊이에서 짝을 맞춘 대안 구성요소 집합에서는 복원이 AUC 0.40 ± 0.13으로 떨어져, 복원이 제거된 회로에 특이함을 보인다. 복원을 넘어, CoAx로 선택된 헤드는 인과적으로 부하를 지는(load-bearing) 구성요소이다. 주요 구성요소 제거 후 이들을 동결(freezing)하면 IOI 마진이 급격히 줄고, 불완전 회로에 추가하면 불완전도가 0.75에서 0.21로 감소한다. 더 넓게, 조건부 증가는 4개 메커니즘 클러스터에 걸친 12개 보류(hold-out) 사례 중 11개에서 개입으로 도출한 수리(repair)와 정렬하며, CoAx 완성은 6개 아키텍처 계열에 걸친 GPT-2가 아닌 8개 모델 모두에서 짝을 맞춘 무작위 완성보다 우수하다. 종합하면, 자기 수리하는 트랜스포머에 대한 인과적 설명은 주요 구성요소가 실패할 때 백업 회로를 반드시 고려해야 한다.

arXiv:2606.24026v2cs.AI

Can Language Model Agents be Helpful Circuit Explainers in Mechanistic Interpretability?

Mechanistic interpretability has made substantial progress in automatically localizing circuits, but explaining what localized components do remains labor-intensive and difficult to standardize. In this work, we study whether language model (LM) agents can assist with this explanation problem once a circuit has already been identified. We introduce AgenticInterpBench, a benchmark for circuit explanation built from 84 semi-synthetic transformer circuits with 163 component-level annotations. We propose HyVE (Hypothesize, Validate, Explain), an agentic explainer that analyzes each component through an iterative loop of observation, hypothesis generation, and causal validation, eventually producing a component-level explanation and a circuit-level task description. Across four LM backbones, HyVE recovers useful component- and task-level explanations, but no backbone is uniformly best. Our analysis shows that strong backbones usually form observation-grounded hypotheses, while failures more often arise later in the validation loop, through incomplete validation plans, code execution errors, or unresolved hypotheses. A case study on an arithmetic circuit in Llama-3-8B shows that the same formulation can extend beyond semi-synthetic benchmarks to naturally trained models. Overall, LM agents are promising circuit explainers, but reliable validation remains the key obstacle.

arXiv:2410.24050v3cs.LG

트랜스포머 학습 동역학에 대한 메커니즘 연구

A Mechanistic Study of Transformers Training Dynamics

희소 모듈식 덧셈(sparse modular addition) 태스크를 통제된 환경에서 분석하여, 트랜스포머가 경사하강법으로 학습 시 데이터의 불변성을 포착하는 클러스터링 헤드(clustering heads)라는 특화된 어텐션 회로를 자연스럽게 형성함을 이론적·실험적으로 규명하였다. 시각적 샌드박스를 통해 토큰 진화를 추적한 결과, 두 단계 학습 과정과 정규화 레이어의 높은 곡률(curvature)로 인한 손실 스파이크(loss spike) 발생 메커니즘을 밝히며, 이를 대규모 언어 모델(LLM) 사전학습의 불안정성 현상과 연결하였다.

arXiv:2510.25013v2cs.CL

어텐션 전용 트랜스포머에서 간접 목적어 식별을 위한 최소 회로의 출현

Emergence of Minimal Circuits for Indirect Object Identification in Attention-Only Transformers

기계적 해석 가능성(mechanistic interpretability)은 대규모 언어 모델(LLM)을 인간이 이해할 수 있는 계산 회로로 역공학하는 것을 목표로 한다. 그러나 사전학습된 모델의 복잡성은 특정 추론 과제에 필요한 최소 메커니즘을 종종 불분명하게 만든다. 본 연구에서는 트랜스포머에서의 상호참조(coreference) 유사 추론 연구를 위한 벤치마크인 간접 목적어 식별(IOI) 과제의 기호적 버전을 처음부터 학습하여 소규모 어텐션 전용 트랜스포머를 훈련한다. 놀랍게도, 단 두 개의 어텐션 헤드만을 가진 단일 층 모델이 MLP와 정규화 층 없이도 완벽한 IOI 정확도를 달성한다. 잔차 스트림 분해(residual stream decomposition), 스펙트럼 분석, 임베딩 개입을 통해, 두 헤드가 각각 덧셈적(additive) 및 대조적(contrastive) 서브회로로 특화되어 함께 IOI 해소를 구현함을 발견한다. 나아가, 두 층 단일 헤드 모델은 주로 쿼리-키(query-key) 상호작용을 통해 이전 층의 정보를 합성함을 보인다. 이러한 결과는 과제 특화 학습이 고도로 해석 가능한 최소 회로를 유도하며, 트랜스포머 추론의 계산적 토대를 탐구하기 위한 통제된 실험 환경을 제공함을 보여준다.