arXiv(opens in a new tab)cs.LGSep 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2609.02986

Modern Transformers Are Implicit Hybrids: From Functional Differentiation to Principled Hybrid Architecture Design

Runlin Shi, Bojian Yin, Guoqi Li

ABSTRACT

Hybrid architectures combining Full Attention (FA) and Linear Attention (LA) are increasingly prominent, yet their allocation remains largely heuristic. We seek an evidence-grounded basis in the head-level functional organization learned by modern RoPE-based Transformers. Behavioral retrieval and local-streaming probes reveal useful tendencies but do not yield a complete taxonomy. We therefore propose two faithful intervention-based metrics: RoPE Frequency Importance Score (RFIS), which measures how each frequency contribution affects a head's complete attention distribution, and RoPE Positional Dependence (RPD), which isolates the effect of rotary positional modulation. Applied to Qwen3-series models and Llama3.1, RFIS suggests and RPD verifies a complete two-type taxonomy comprising retrieval and positional heads in RoPE Transformers, separated by a salient mid-low-frequency band. Controlled Transformers show that this functionally separating band follows the training-length positional scale; we term this mechanism-level boundary the Global Positional Band (GPBand). Its global positional dependence suggests a potential cause of zero-shot length-extrapolation failure and, together with the layer-specific head distribution, yields two design principles: (i) positional modeling should operate only locally, while global access should be implemented through position-independent retrieval; and (ii) retrieval and positional functions should be assigned at head granularity with layer-specific allocation. We instantiate these principles in the Head-wise Hybrid Architecture (HwH), using NoPE FA for global retrieval and LA for local positional modeling. With an overall FA-to-LA ratio less than 1:3, HwH retains strong language modeling and commonsense reasoning while improving retrieval and substantially strengthening zero-shot long-context extrapolation over Transformer, LA, and a 1:3 layer-wise hybrid baseline. Ablations validate both principles and the component roles, highlighting principled hybrid architecture design as a promising route toward future foundation models.

1 INTRODUCTION

Full Attention (FA) provides exact token-to-token access but incurs quadratic sequence complexity (Vaswani et al., 2017) and a KV cache that grows with context during autoregressive decoding (Shazeer, 2019). Fixed-state LA offers recurrent efficiency (Katharopoulos et al., 2020) but can struggle with exact long-range retrieval (Arora et al., 2024a; Jelassi et al., 2024). Their combination is attractive, but neither mechanism determines how a hybrid should be organized. Existing systems rely on fixed allocations or empirically selected architectural choices (Lieber et al., 2024; Wang et al., 2025; Team et al., 2025; Dong et al., 2024; Zuo et al., 2025). This leaves the central design question unresolved: which roles should be assigned to FA or LA, at what granularity, and with what allocation strategy?

The functional differentiation learned by modern RoPE-based Transformers offers a natural design reference (Figure 1). Prior work identifies retrieval heads that support long-range access (Wu et al., 2024; Zhang et al., 2025b); subsequent methods exploit this specialization for post-training KV-

∗^{*}Corresponding author.

Figure

Figure

(f) NIAH-Single-2 length extrapolation - 380M

Figure

(g) Function-specific components

Global retrieval head

NoPE FA - Position-invariant retrieval; uses the full head dimension.

RoPE FA - Breaks length extrapolation; restricts suitable dimensions.

Local positional head

Linear attention

  • Strong performance on short sequences.

  • Implicit global modeling impairs length extrapolation.

Figure 1: Overview: from Transformer functional differentiation to principled hybrid design. (a) Retrieval tendency of Qwen3-4B measured by QRscore. (b) Layer-specific retrieval distribution after within-layer head sorting. (c) RFIS/RPD reveal GPBand-separated retrieval and positional functions. (d) HwH instantiated two principles: (i) positional modeling should operate only locally, while global access should be implemented through position-independent retrieval; and (ii) retrieval and positional functions should be assigned at head granularity with layer-specific allocation. (e) Comparison on real-world retrieval benchmarks. (f) Zero-shot length extrapolation on NIAH-Single-2. (g) NoPE FA serves global retrieval; LA serves local positional modeling.

cache optimization or checkpoint conversion (Xiao et al., 2024; Tan et al., 2026). However, these methods begin with pretrained Transformers and do not independently characterize the complementary function; they therefore cannot by themselves ground architecture design from scratch.

To establish a complete mechanism-level taxonomy, we begin with behavioral probes of head-level functional differentiation. We use QRscore (Zhang et al., 2025b) to measure retrieval tendency and introduce LDscore to measure local-streaming tendency. The two probes do not yield a complete taxonomy, so behavioral evidence alone cannot classify all heads mechanistically. We consequently turn to the underlying RoPE-frequency dependence and propose two faithful intervention-based metrics. RoPE Frequency Importance Score (RFIS) measures how removing one frequency contribution changes a head's complete attention distribution, whereas RoPE Positional Dependence (RPD) isolates whether that effect arises from rotary positional modulation. RFIS motivates, and RPD directly verifies, a complete two-type taxonomy comprising retrieval and positional heads in RoPE Transformers: the former emphasize frequencies below a salient mid-low-frequency band, whereas the latter emphasize the band and the frequencies above it. Together, these results establish retrieval and positional modeling as complementary mechanism-level functions.

Controlled Transformers further show that this functional boundary follows the training-length positional scale. We therefore term it the Global Positional Band (GPBand). The associated global positional fitting suggests a potential failure mode beyond the training length. Together with the depth-varying head distribution in Figure 1b, this yields two principles: (i) positional modeling should operate only locally, while global access should be implemented through position-independent retrieval; and (ii) retrieval and positional functions should be assigned at head granularity with layer-specific allocation.

We instantiate these principles in the Head-wise Hybrid Architecture (HwH), which assigns NoPE FA to global retrieval and LA to local positional modeling with a layer-specific FA-to-LA ratio no greater than 1:3. From-scratch pretraining shows that HwH retains strong language modeling and commonsense reasoning, improves retrieval, and substantially strengthens zero-shot extrapolation over Transformer, pure-LA, and layer-wise hybrid baselines. Component and allocation ablations further validate both principles and the roles assigned to FA and LA (Figure 1d–g).

Our contributions are summarized as follows:

  • We propose RFIS and RPD, faithful and bounded intervention-based metrics for RoPE-frequency analysis, and use them to establish a complete head-level taxonomy of retrieval and positional modeling in RoPE Transformers.

  • We characterize the training-length-related salient mid-low-frequency band in RoPE Transformers as the functional boundary of this taxonomy, term it GPBand, and identify global positional fitting as a potential cause of extrapolation failure.

  • We derive two hybrid-design principles and validate them through from-scratch HwH experiments, which also confirm LA's role in local positional modeling and NoPE FA's role in position-independent global retrieval.

  • We reveal RoPE Transformers as implicit functional hybrids and motivate principled hybridization with better function-specific components as a promising route toward future foundation models.

References (73)