Head Dimension Matters in Language Models for Long-Context Retrieval

Seiya Tokui, Shoichiro Yamaguchi, Sosuke Kobayashi
10/23/2026
cs.LGcs.AIcs.CL
transformer-attention

No confident code implementation found for this paper.

Abstract

Multi-head attention retrieves and combines context representations through query--key interactions and value aggregation, with head dimension constraining the per-head representation space. In long-context processing, it remains unclear whether allocating a fixed parameter budget to fewer, wider heads improves information retrieval.

Show full abstract

In this paper, we investigate how head dimension affects the performance of long-context retrieval tasks. Our empirical studies reveal that pretraining loss and short-context non-retrieval task performance are not affected much by head dimension, while long-context retrieval performance improves with wider heads at fixed model sizes. We find that models with wider heads have a higher proportion of retrieval heads, associating more parameters with retrieval. Our ablation studies also show that the retrieval performance improves with wider heads even when the projection weights in attention modules are frozen during long-context continual pretraining, suggesting that wider heads not only benefit updates in attention modules but lead to more effective adaptation of components such as embeddings and MLPs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{tokui2026head,
  title  = {Head Dimension Matters in Language Models for Long-Context Retrieval},
  author = {Seiya Tokui and Shoichiro Yamaguchi and Sosuke Kobayashi},
  year   = {2026},
  eprint = {2610.32213},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.32213v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.32213.svg)](https://codeofpaper.com/paper/2610.32213)

Discussion