# A Capacity-Based Rationale for Multi-Head Attention

용량 기반 관점에서 본 멀티 헤드 어텐션의 근거

Micah Adler · arXiv · 2025년 9월 26일

- **연구 문제** self-attention의 key–query 채널이 고정된 총 키 차원 아래 얼마나 많은 토큰 간 관계를 복원할 수 있는지가 핵심 질문입니다.
- **연구 방법** Relational Graph Recognition 과제를 정의하고, 헤드별 점수를 max로 집계하는 모델과 정점 블록 분할 기반의 구성으로 복원 예산을 분석합니다.
- **주요 결과** 순열 그래프에서 D\_K가 m log m / d\_model 규모로 상·하한이 맞으며, 실험에서도 여러 헤드로 나눈 구성이 같은 예산의 단일 헤드보다 높은 정확도를 보였습니다.

## 연구 질문: 키–질의 채널은 얼마나 많은 관계를 담는가

이 논문은 self-attention의 key–query 채널이 한 층에서 고정된 예산 아래 얼마나 많은 토큰 간 관계를 신뢰성 있게 인코딩할 수 있는지 묻습니다. 저자들은 이 예산을 총 키 차원 D\_K = h d\_k로 정의합니다. 여기서 h는 헤드 수이고 d\_k는 헤드별 키 차원입니다. 기존 해석 연구는 학습된 대형 모델에서 활성 관계를 직접 셀 수 없다는 한계를 가지므로, 저자들은 관계 그래프 복원 과제인 Relational Graph Recognition(RGR)을 도입해 용량을 통제된 조건에서 분석합니다. 이 과제에서는 각 문맥 정점에 대해 문맥 안의 이웃을 복원해야 합니다.

## 다중 헤드 분할과 max-over-heads 구성

분석 모델은 각 헤드가 공유 투영 W\_Q, W\_K로 문맥 정점의 점수를 계산하고, 헤드들의 점수 중 최댓값 S^max를 취해 임계값 τ와 비교하는 max-over-heads 변형입니다. 이 집계는 헤드들이 덧셈으로 간섭하지 않도록 하는 최소한의 비선형성으로 제시됩니다. 임베딩이 d\_model보다 많은 정점을 중첩하면 한 헤드가 많은 관계를 담을 때 잡음이 커집니다. 그래서 Algorithm 1은 정점을 d\_model 크기 블록으로 나누고 각 헤드가 한 블록의 출력 간선만 담당하도록 설계합니다. 임베딩 행렬의 전치로 근사 디임베딩을 수행하며, 그 누출 크기는 헤드가 담당하는 블록 크기 B에 의해 좌우됩니다.

## 상한 구성과 정보이론적 하한

Gaussian unit-norm 임베딩에서 d\_model이 log m 이상이고 h=m/d\_model, d\_k=C log m인 경우 Theorem 4.1은 순열 그래프의 간선을 높은 확률로 복원함을 보입니다. 이때 총 키 예산은 D\_K=Θ(m log m / d\_model)입니다. 반대쪽에서 Theorem 9.2는 일정한 마진 γ로 m′개 간선을 복원하려면 d\_model D\_K ≥ c(γ) log(m(m−1)/m′) − O(1)가 필요하다고 제시합니다. 이 하한은 헤드 구성과 무관하게 파라미터의 설명 길이 논증으로 얻어집니다. 저자들은 순열 그래프에서 상한과 하한이 상수 배 안에서 맞는다고 설명합니다.

![Figure 12: Capacity scales withm ′.Minimal passingD K versusx= (r m/d model) log2 m collapses across degreesr. The dashed lineD K ≈0.46xis a one-parameter fit,…](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-b898a9daad93347e58fe91ad9065840a.png?thumb=512)

**Figure 12** :Capacity scales withm ′.Minimal passingD K versusx= (r m/d model) log2 m collapses across degreesr. The dashed lineD K ≈0.46xis a one-parameter fit, highlighting that the number ofedgesm ′ predicts the threshold more accurately than the vocabulary sizem. Error bars are calculated using the same methodology as described in Appendix A.2.

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 41쪽에서 그림 영역을 추출했습니다.

## 소프트맥스 변형에서의 조건

소프트맥스 변형은 헤드별로 문맥 위에 소프트맥스를 적용한 뒤 헤드 확률을 합산 A\_ij = Σ\_k p\_ij^(k)를 임계값 1/2와 비교합니다. Theorem 8.1은 h=m/d\_model, d\_k≥C(log m)^2, 문맥 길이 조건 아래 고정 임계값 1/2가 목표 간선을 복원함을 제시합니다. 이때 증명은 소프트맥스 보정 보조정리(Lemma 8.2)로 목표 헤드의 질량을 1에 가깝게 만들고, 비목표 헤드의 배경 질량이 평균 (h−1)/ℓ 근처에 집중한다는 논증을 사용합니다. 결과적으로 D\_K=Θ((m/d\_model)(log m)^2)가 되며, 저자들은 이 log 인자의 필요성이 불명확하다고 밝힙니다.

![Figure 5: Example F1–DK curves with softmax incorporated. Each panel fixes (m, dmodel) and sweeps heads h and DK = h dk; markers show mean test micro–F1 and e…](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-a1e2e546542056976796f5ef39851daa.png?thumb=512)

**Figure 5** : Example F1–DK curves with softmax incorporated. Each panel fixes (m, dmodel) and sweeps heads h and DK = h dk; markers show mean test micro–F1 and error bars are 95% CIs over 3 runs. We see a distinct multi-head advantage when in the compressed embedding regime - i.e., all cases except m = 64, dmodel = 32.

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

## 순열 그래프 실험과 용량 법칙

실험은 이론 모델과 같은 설정에서 정점 수 m과 d\_model을 바꾸고 헤드 수 h를 달리해 최소 D\_K를 측정합니다. 학습은 고정된 임베딩 위의 Q, K 투영과 단일 임계값 τ를 AdamW와 가중 로지스틱 손실로 최적화하며, 평가는 고정 테스트 문맥의 micro-F1이 0.99 이상인 최소 D\_K로 정의됩니다. 결과에서 F1은 좁은 D\_K 구간에서 급격히 전이되고, 같은 예산에서 여러 헤드로 나눈 구성이 단일 헤드보다 높은 F1을 보입니다. 저자들은 D⋆\_K가 m log m / d\_model과 선형 관계(R²=0.944)에 있다고 보고합니다. 이 결과는 순열 그래프, 단일 층, 고정 임베딩 설정에서의 관찰입니다.

![Figure 1: Example F1–D K curves.Lines are a fixed number of heads form= 256, d model = 32. A single head fails to separate the signal from superposition noise,…](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-7bfe96a0c68f895e7799427f14fe29fe.png?thumb=512)

**Figure 1** :Example F1–D K curves.Lines are a fixed number of heads form= 256, d model = 32. A single head fails to separate the signal from superposition noise, and performs much worse than multiple heads. Error bars are 95% CIs over 10 runs.

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

![Figure 2: h ∗ minimizing DK. More heads are needed as m grows or dmodel shrinks. See App. A.2 for error bar description](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-ac150e68b1429dcad5c03b695d4b3cb1.png?thumb=512)

**Figure 2** : h ∗ minimizing DK. More heads are needed as m grows or dmodel shrinks. See App. A.2 for error bar description.

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 11쪽에서 그림 영역을 추출했습니다.

![Figure 9: Example F1–D K curves.Each panel fixes (m, d model) and sweeps headshandD K = h dk; markers show mean test micro–F1 and error bars are 95% CIs over 1…](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-4aa1f2e26114cbb51c23979cf881a6ec.png?thumb=512)

**Figure 9** :Example F1–D K curves.Each panel fixes (m, d model) and sweeps headshandD K = h dk; markers show mean test micro–F1 and error bars are 95% CIs over 10 runs. The transition from failure to success occurs at a configuration-specificD K threshold which is dependent onh.

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 38쪽에서 그림 영역을 추출했습니다.

![Figure 10: The number of heads needed grows approximately linearly with compression; the dashed line shows a least-squares fit. See text for a description of t…](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-eb76d54e733aac3444e941a4dbdd1a65.png?thumb=512)

**Figure 10** : The number of heads needed grows approximately linearly with compression; the dashed line shows a least-squares fit. See text for a description of the error bars. We do not tie the line to the origin, since heads are clipped ath≥1.

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 39쪽에서 그림 영역을 추출했습니다.

## 값 채널과 GPT-2 임베딩 실험

값 채널 실험은 같은 키–질의 경로를 유지하고 고정된 무작위 값 맵 W\_V로 메시지를 검색하는 MSE 과제로 바꿉니다. m=64에서 d\_model=16일 때 단일 헤드는 MSE를 줄이지 못하지만 h≥4 구성은 줄어들며, d\_model=32에서는 간격이 좁아집니다. 또 동결된 GPT-2-small 토큰 임베딩과 pre-LN 단일 Transformer 블록을 사용해 m=6144, ℓ=16, d\_model=768에서 h≥2 구성이 단일 헤드보다 높은 테스트 정확도를 보입니다. 단일 헤드는 D\_K≥256 부근에서 일부 시드가 null 기준선으로 붕괴하는 양봉 현상을 보입니다. 이 결과들은 각 설정의 시드 수와 조건 안에서 읽어야 합니다.

![Figure 6: V alue retrieval MSE mirrors capacity transitions.Mean test MSE vs. total key dimensionD K for a value-retrieval task with frozen random value mappin…](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-4492ee8680de76d77d143713da2ce20c.png?thumb=512)

**Figure 6** :V alue retrieval MSE mirrors capacity transitions.Mean test MSE vs. total key dimensionD K for a value-retrieval task with frozen random value mappings (m=64).T op (dmodel=16):In the compressed regime, single-head attention (blue) fails to retrieve the correct message, while multi-head attention succeeds.Bottom (d model=32):With less compression pres- sure, the gap narrows, though multi-head models still attain the lowest final MSE. Error bars are 95% CIs over 3 runs

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 15쪽에서 그림 영역을 추출했습니다.

![Figure 7: F rozen GPT-2 embeddings; full pre-LN block.Mean test accuracy vs. total key dimensionD K for different head partitions (h, dk) at fixedD K (withd k…](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5/figures/figure-3dd248f3f9edd77398b89daacc6e8d25.png?thumb=512)

**Figure 7** :F rozen GPT-2 embeddings; full pre-LN block.Mean test accuracy vs. total key dimensionD K for different head partitions (h, dk) at fixedD K (withd k =D K/h), form= 6144, dmodel = 768,ℓ= 16. Error bars show 95% confidence intervals. For the single-head setting at largerD K we observe (and depict) a clear bimodality: some runs collapse to thenullbaseline (lower dotted, near 0), while the remaining runs converge to a partial solution (upper dotted).

[원문](https://arxiv.org/abs/2509.22840v3) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Micah Adler · A Capacity-Based Rationale for Multi-Head Attention · 원문 그림 인용 · 원본 PDF 17쪽에서 그림 영역을 추출했습니다.

## 범위와 한계

저자들은 D\_K 상한이 극도로 조밀한 그래프와 차수 불균형이 큰 그래프에서 하한과 완전히 일치하지 않는다고 밝힙니다. 또한 소프트맥스 변형의 log 인자는 필요성이 명확하지 않다고 설명합니다. 분석은 제어된 임베딩 기하를 가정하며, 실제 임베딩에서는 간섭이 더 커질 수 있다고 봅니다. 실험은 단일 층과 대부분 합성 과제에 한정되며, 다층 반복 라우팅과 종단간 학습 동역학은 모델링하지 않습니다. 따라서 이 결과는 key–query 용량에 대한 조건부 해석으로 읽어야 합니다.

## 논문 정보

- **저자**: Micah Adler
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2025년 9월 26일
- **등록일**: 2026년 10월 30일
- **수정일**: 2026년 2월 2일
- **버전**: v3
- **arXiv**: 2509.22840
- **분류**: cs.LG
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2509.22840v3) · [원문 PDF ↗](https://arxiv.org/pdf/2509.22840v3)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

We study the capacity of the self-attention key-query channel: for a fixed budget, how many distinct token-token relations can a single layer reliably encode? We introduce Relational Graph Recognition, where the key-query channel encodes a directed graph and, given a context (a subset of the vertices), must recover the neighbors of each vertex in the context. We measure resources by the total key dimension $D\_K = h\\,d\_k$. In a tractable multi-head model, we prove matching information-theoretic lower bounds and upper bounds via explicit constructions showing that recovering a graph with $m'$ relations in $d\_{\\text{model}}$-dimensional embeddings requires $D\_K$ to grow essentially as $m'/d\_{\\text{model}}$ up to logarithmic factors, and we obtain corresponding guarantees for scaled-softmax attention. This analysis yields a new, capacity-based rationale for multi-head attention: even in permutation graphs, where all queries attend to a single target, splitting a fixed $D\_K$ budget into multiple heads increases capacity by reducing interference from embedding superposition. Controlled experiments mirror the theory, revealing sharp phase transitions at the predicted capacity, and the multi-head advantage persists when adding softmax normalization, value routing, and a full Transformer block trained with frozen GPT-2 embeddings.

## 원문 인용

Micah Adler (2025). A Capacity-Based Rationale for Multi-Head Attention. arXiv:2509.22840v3. https://arxiv.org/abs/2509.22840v3

**BibTeX**

```
@misc{adler2025capacity,
  title = {{A Capacity-Based Rationale for Multi-Head Attention}},
  author = {Micah Adler},
  year = {2025},
  eprint = {2509.22840},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.22840v3}
}
```

## 이 논문의 용어

- [Algorithm 2](https://refivu.com/terms/04b0827776b6-algorithm-2)
- [Micro-F1](https://refivu.com/terms/984be90cfb2a-micro-f1)
- [Superposition](https://refivu.com/terms/c7f588f8ab26-superposition)
- [block size](https://refivu.com/terms/849f54a3b697-block-size)

## 다른 논문 해설

- [StretchTime: Adaptive Time Series Forecasting via Symplectic Attention](https://refivu.com/papers/16e1a6db-a193-4b7d-a396-ab25a5aea7bb-stretchtime-adaptive-time-series-forecasting-via-symplectic.md)
- [UltraLIF: Fully Differentiable Spiking Neural Networks via Ultradiscretization and Max-Plus Algebra](https://refivu.com/papers/3f44b701-a63e-45dd-b9c3-f73c579adbbf-ultralif-fully-differentiable-spiking-neural-networks-via.md)
- [Step-resolved data attribution for looped transformers](https://refivu.com/papers/3d8e3954-865c-4b6b-8f8b-ce43142203b8-step-resolved-data-attribution-for-looped-transformers.md)
- [Retrieval-Aware Distillation for Transformer-SSM Hybrids](https://refivu.com/papers/654f85c3-d053-4da1-a0ac-aa209971f78c-retrieval-aware-distillation-for-transformer-ssm-hybrids.md)
- [LUCID: Attention with Preconditioned Representations](https://refivu.com/papers/fe9ac658-037b-43f4-892b-78040757947b-lucid-attention-with-preconditioned-representations.md)
- [Multi-Head Attention as a Source of Catastrophic Forgetting in MoE Transformers](https://refivu.com/papers/e5634418-a71d-4bb6-886f-2b3eec8e73fd-multi-head-attention-as-a-source-of-catastrophic.md)
- [SpecMD: A Comprehensive Study On Speculative Expert Prefetching](https://refivu.com/papers/1dcf0376-0084-4ef7-8936-9b24d5bd5d01-specmd-a-comprehensive-study-on-speculative-expert.md)
- [Riemannian Neural Optimal Transport](https://refivu.com/papers/a80b38c1-881b-4c78-94db-2cdc98f4032a-riemannian-neural-optimal-transport.md)
- [Reparameterization Flow Policy Optimization](https://refivu.com/papers/2031aa77-afa4-426e-bac9-fe3e30e81b04-reparameterization-flow-policy-optimization.md)
- [Spectral Evolution Search: Efficient Inference-Time Scaling for Reward-Aligned Image Generation](https://refivu.com/papers/314e1bdf-e212-4f09-8c61-2f65d520a72f-spectral-evolution-search-efficient-inference-time-scaling.md)
- [Reuse your FLOPs: Scaling RL on Hard Problems by Conditioning on Very Off-Policy Prefixes](https://refivu.com/papers/d4a1b78f-9bc4-44e1-9097-37e1d659b65f-reuse-your-flops-scaling-rl-on-hard-problems.md)
- [Simple Denoising Diffusion Language Models](https://refivu.com/papers/ca85b42a-5226-4776-b344-b5eea9944e5b-simple-denoising-diffusion-language-models.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/a7171d81-c80f-4a1d-8fa7-ec68051bd4f5-a-capacity-based-rationale-for-multi-head-attention)
