# Head Dimension Matters in Language Models for Long-Context Retrieval

DevFeed: [Head Dimension Matters in Language Models for Long-Context Retrieval](<https://devfeed.tech/articles/head-dimension-matters-in-language-models-for-long-context-retrieval-99583.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.32213>)

Author: Seiya Tokui, Shoichiro Yamaguchi, Sosuke Kobayashi

Published: 2026-10-26T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [information retrieval](<https://devfeed.tech/topics/information-retrieval.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [long-context](<https://devfeed.tech/topics/long-context.md>), [Model Development](<https://devfeed.tech/topics/model-development.md>)

Tags: [ablation](<https://devfeed.tech/tags/ablation.md>), [attention](<https://devfeed.tech/tags/attention.md>), [budget](<https://devfeed.tech/tags/budget.md>), [context](<https://devfeed.tech/tags/context.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [dimension](<https://devfeed.tech/tags/dimension.md>), [embeddings](<https://devfeed.tech/tags/embeddings.md>), [information-retrieval](<https://devfeed.tech/tags/information-retrieval.md>), [language](<https://devfeed.tech/tags/language.md>), [language-models](<https://devfeed.tech/tags/language-models.md>), [long-context](<https://devfeed.tech/tags/long-context.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [models](<https://devfeed.tech/tags/models.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pretraining](<https://devfeed.tech/tags/pretraining.md>), [processing](<https://devfeed.tech/tags/processing.md>), [projection](<https://devfeed.tech/tags/projection.md>), [query](<https://devfeed.tech/tags/query.md>), [retrieval](<https://devfeed.tech/tags/retrieval.md>), [tasks](<https://devfeed.tech/tags/tasks.md>)

## AI overview

At fixed model sizes, wider attention heads improve long-context retrieval, while pretraining loss and short-context non-retrieval performance change little. The study reports that wider-head models have a higher proportion of retrieval heads. Retrieval also improves during long-context continual pretraining when attention projection weights are frozen, suggesting that wider heads may help embeddings and MLPs adapt as well as attention modules. These findings are reported for the empirical studies described in the abstract.

## Source excerpt

arXiv:2610.32213v1 Announce Type: new 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. 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.