Knocking-Heads Attention: Drop-in Shared Projections for Cross-Head Coordination
Zhanchao ZhouXiaodong ChenHaoxing ChenZhenzhong LanJianguo Li
Zhanchao Zhou
Xiaodong Chen
Haoxing Chen
Zhenzhong Lan
Jianguo Li
+5
Knocking-heads attention (KHA) couples attention heads at the parameter level: a shared, diagonally-initialized projection is applied to query/key/value features before scaled dot-product attention. Rather than mixing signals along the head axis, the projection is optimized jointly by gradients from all heads, implicitly regularizing the head-specific projections; the diagonal initialization recovers standard MHA at step 0 and lets cross-head structure emerge gradually. Two forms are instantiated: KHA-Linear, whose shared projection can be absorbed into the original weights at inference for zero added parameters or FLOPs, and KHA-MLP, which adds a small shared MLP for stronger gains at modest inference cost. Training a 6.1B-parameter MoE model (1.01B activated) on 1T tokens yields substantially fewer loss spikes, more uniform per-head activation norms, and a +1.26 average gain on 19 downstream benchmarks, while remaining compatible with FlashAttention, KV-caching, and existing attention variants.

OpenReview · May 5, 2026