Manuscript Offprint

arXiv:2610.25250

Improving the Expressive Power of Hybrid Sequence Models via Multi-Hop Retrieval

Yam Eitan, Gilad Yehudai, Haggai Maron

Abstract

Hybrid architectures offer a promising approach to efficient language modeling by combining a small number of full-attention layers with a larger number of efficient sequence layers, such as sparse attention and recurrent layers. While full-attention layers maintain a KV cache that grows linearly with sequence length, efficient layers typically rely on separate, fixed-size states rather than accessing this richer existing memory. Recent work has begun exploring ways to allow efficient layers access to the KV cache, but the theoretical benefits of such access, and the extent to which existing approaches can realize them remain poorly understood. We investigate these questions by analyzing the expressive power of individual hybrid blocks on function composition, a well-studied task in sequence-model expressivity associated with multi-hop reasoning. We first establish that both conventional hybrid blocks and those with top- κ\kappa KV-cache access require Ω(n)\Omega(\sqrt{n}) capacity to compute even two-function composition over a domain of size nn. To overcome this limitation, we introduce the Multi-hop Retrieval Attention (MURA) hybrid block, a simple architecture that enables multi-hop retrieval from a shared KV cache while preserving asymptotic computational and memory efficiency. We prove that a single fixed size mm-hop MURA block can compute mm-function composition, whereas computing (m+1)(m+1)-function composition with the same retrieval depth requires polynomial model size, establishing a strict expressivity hierarchy in retrieval depth. Synthetic experiments support this hierarchy, showing that increasing retrieval depth enables learning progressively deeper compositions, substantially outperforming existing hybrid architectures. Together, our results identify multi-hop retrieval as a promising mechanism for improving the expressive power of efficient hybrid architectures.

1 Introduction

Transformers have become the dominant architecture for language modeling, but their computational and memory costs pose increasing challenges as models and context lengths grow. Full attention requires quadratic computation in sequence length and, during autoregressive inference, stores previously computed keys and values to avoid recomputation. Specifically, each attention layer maintains a key-value (KV) cache K=[k1,…,kn]\mathbf{K} = [\mathbf{k}_1, \ldots, \mathbf{k}_n] and V=[v1,…,vn]\mathbf{V} = [\mathbf{v}_1, \ldots, \mathbf{v}_n], consisting of a key and value vector for each preceding token. The memory required by this cache grows linearly with the context length, becoming a major bottleneck for long-context inference [50; 23; 44; 15]. These costs have motivated the development of efficient sequence layers, including sparse and local attention mechanisms [7; 2; 49] and, more recently, efficient recurrent layers [19; 18; 46]. Recurrent layers process sequences in linear time and, during autoregressive inference, maintain only a fixed-size hidden state hn\mathbf{h}_n that summarizes the preceding context. Despite these efficiency gains, models relying exclusively on efficient sequence layers often underperform full-attention transformers on long context tasks [42; 35].

Preprint.

Nevertheless, recurrent layers have found considerable success in hybrid architectures. These architectures are typically organized into repeating hybrid blocks, each combining a single full-attention layer with several recurrent layers, reducing the frequency of expensive attention operations. This design has been adopted by prominent models such as Kimi K3 [40], Gemma 3 [16], Nemotron 3 Ultra [3], and OLMo Hybrid [30], demonstrating its effectiveness at scale. However, recurrent layers were originally designed to operate independently of full attention. Consequently, even within a hybrid block, they typically maintain their own fixed-size hidden states hth_t, without direct access to the richer KV cache already maintained by the full-attention layer. This raises a natural question: can recurrent layers benefit from direct access to this existing memory without sacrificing their computational efficiency? Recent work has begun exploring this possibility. Some approaches [5; 34] share KV caches across layers or apply attention to a subset of past recurrent states, reducing memory requirements but retaining quadratic attention computation. In contrast, other methods [13; 43] reuse a full-attention layer's KV cache for sparse top- κ\kappa retrieval based on its attention scores, allowing subsequent layers to access shared memory without increasing the asymptotic time or memory complexity of hybrid blocks. While these methods have shown promising empirical results, their designs remain largely empirically motivated, with limited theoretical understanding of how different memory-access mechanisms affect model capabilities.

We aim to provide a principled foundation for designing such layers by investigating whether shared-memory access can improve the expressive power of hybrid blocks, and whether existing retrieval mechanisms fully realize this potential. Expressivity is particularly relevant in this setting: computations that can be realized within a single block of one architecture may require several blocks of another, introducing additional expensive full-attention operations and KV caches. More expressive blocks could therefore enable more efficient hybrid architectures.

Our analysis focuses on function composition, a well-studied task in sequence-model expressivity [33; 22; 47] that requires successive dependent retrievals, as often arise in multi-hop reasoning. We establish a fundamental expressive limitation shared by both conventional hybrid blocks with independent recurrent states and those whose recurrent layers access a shared KV cache through top- κ\kappa retrieval. Specifically, we prove that both require size Ω(n)\Omega(\sqrt{n}), measured by the product of width, depth, and precision, to compute even two-function composition over a domain of size nn.

Motivated by this limitation, we introduce Multi-Hop Retrieval Attention (MURA), which extends top- κ\kappa retrieval to provide efficient sequence layers with richer access to the full-attention layer's KV cache. As in top- κ\kappa hybrid blocks, MURA first identifies each token's highest-scoring causal predecessors using the full-attention scores. However, rather than retrieving only the immediate predecessors of a query token, (κ1,…,κm)(\kappa_1, \ldots, \kappa_m)-MURA recursively expands the candidate set: at each hop rr, it retrieves the top- κr\kappa_r predecessors of the tokens reached at the previous hop, allowing access to tokens up to mm hops away. Each subsequent sparse layer computes new queries from the current token representations and attends to these candidates using the original full-attention keys and values. The candidate sets are computed once and remain fixed throughout the block, allowing the sparse layers to refine their queries without recomputing retrieval routes. By enabling retrieved tokens to guide further retrievals, MURA supports complex chains of dependent retrievals while preserving the efficiency of existing hybrid designs: for fixed retrieval parameters, sparse retrieval layers require linear computation in sequence length and maintain constant-size states, introducing no additional KV caches.

Theoretically, we prove that for any fixed m, a single m-hop MURA block can compute compositions of m functions with constant width and depth and only logarithmic precision. To our knowledge, this provides the first architecture with a single full-attention layer that is provably capable of such multi-step function composition. We further establish the importance of retrieval depth, showing that computing compositions of m+1m + 1 functions with at most m retrieval hops requires size Ω(n1/(m+1))\Omega(n^{1/(m+1)}). Together, these results establish a strict hierarchy in expressive power as retrieval depth increases. This separation holds even when the total number of retrieved KV entries is matched, demonstrating that the structure of retrieval, rather than merely the number of retrieved tokens, is critical to expressivity.

Empirically, we evaluate MURA on synthetic function-composition tasks to investigate whether its theoretical advantages can also be realized through training. For m∈{1,2,3,4}m \in \{1, 2, 3, 4\}, we find that models with a single m-hop MURA block achieve near-perfect test accuracy on compositions of up to m functions, while struggling with deeper compositions. In contrast, the existing hybrid architectures we evaluate struggle with compositions involving more than one function. These results demonstrate that the expressive advantages of MURA can be learned in practice on controlled tasks, supporting multi-hop retrieval as a promising design principle for more expressive hybrid architectures.

In summary, our main contributions are:

• Expressivity limitations of existing hybrid architectures. We establish an Ω(n)\Omega(\sqrt{n}) size lower bound for single-block hybrid architectures on function composition tasks, covering both conventional blocks, and those whose layers access a shared KV cache through top- κ\kappa retrieval.

• Multi-Hop Retrieval Attention. We introduce MURA, which enables recurrent layers to perform multi-hop retrieval from a shared KV cache while preserving the computational and memory efficiency of existing hybrid architectures.

• Expressivity improvements. We prove that a single m-hop MURA block can compute compositions of m functions with constant width and depth and logarithmic precision, and establish a strict expressivity hierarchy in retrieval depth, even under matched retrieval budgets.

• Empirical validation. We demonstrate that this hierarchy emerges through training on synthetic function-composition tasks with up to four retrieval hops, substantially outperforming existing hybrid baselines.

References (47)