Manuscript Offprint
arXiv:2610.18104The Effect of Layer Ordering in Hybrid Architectures
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Hybrid attention is rapidly becoming the dominant architectural choice for frontier models. Despite their successes, such architectures complicate model design by introducing additional choices, including the types and locations of layers. This combinatorially large design space has been studied empirically, but given the vast expense of training and evaluating models with different configurations, a principled understanding of the effects of layer selection and ordering is needed. We provide the first such analysis, showing that the dominant hybrid architecture is highly task-specific. Concretely, for any layer configuration, we prove that there exists a task where we can construct a model with this configuration that provably outperforms any other model of any different configuration under fixed resource constraints. Empirically, we observe that for standard training, learned hybrid architectures exhibit separations between layer orderings that match our theoretical findings. For instance, under the same memory budget, the optimal architecture predicted by our theory for a segmented retrieval task consistently achieves perfect accuracy, whereas the next strongest plateaus below 0.5. These results extend to deeper models, where “containing” the dominant architecture for a task indicates whether the model attains high performance. In addition, we investigate the mechanisms learned by hybrids, observing that Transformer layers contribute the largest share of performance on associative recall across architectures. This work establishes insights into task-dependent hybrid architecture design relevant to the training and scaling of frontier-scale hybrids.
1 Introduction
Hybrid architectures have become the design of choice for frontier models [20, 25, 12]. This is due to their superior scalability: the quadratic complexity of full self-attention limits the vanilla Transformer architecture on long-context tasks [11, 24]. Hybrid models replace many self-attention layers with efficient subquadratic alternatives that require smaller memory and offer faster inference. Popular choices include state-space layers like linear attention, Mamba, Gated DeltaNet, etc. [8, 32]. The use of these layers produces scalable and highly-performant models.
However, as each layer can be selected from among many variations, layer selection and ordering is a critical design challenge [32, 8, 10]. Indeed, each layer type brings different constraints when processing
Equal contribution. Authors listed in alphabetical order.
Code is available at https://github.com/SprocketLab/layer-importance.

Figure 1: Structure of tasks that exhibit performance differences among different hybrid architectures. Large gaps need SSM layers to communicate each segment's query, while the dense computation per segment is done by the Transformers.
sequences: full-attention is memory-bound by retrieval distance while recurrent alternatives are bound by their state size. The most popular layer ordering among frontier models uses a block design that involves one softmax-attention layer followed by many subquadratic layers. This is supported empirically [29]. While some work has investigated the selection ratio between softmax-attention and linear attention [30, 7] and others have shown a theoretical separation with hybrids utilizing less memory [6], the benefits and drawbacks of various layer orderings are still unclear. Given the combinatorially large space of different layer orderings, a complete empirical sweep across architectures is intractable.
A theoretical characterization of hybrid architectures would cut down on this combinatorial space. However, identifying differences between hybrid layer orderings is highly challenging. Tasks can be solved by a variety of algorithms, each best suited for a different hybrid architecture. For instance, the greatest difficulty stems from processing order: some architectures focus on reordering the sequence in early layers to allow for a few later layers to solve the task. These shortcuts can reduce model size and depth compared to more direct algorithms with sequential processing.
In this work, we obtain a new theory-driven approach to hybrid architecture design. Inspired by [6], we study the expressivity of different hybrid architectures under computational resource constraints. We identify tasks and associated architecture designs where no other design (i.e., layer ordering) is able to solve the task under identical constraints. We begin by abstracting full-attention (TF) and sub-quadratic attention variants as generalized windowed functions and generalized state-space models (SSMs), respectively. This allows us to focus on the critical elements constraining layer types: the window width, state size, and embedding precision. For a given layer ordering of generalized SSMs and generalized causal windowed models, we show there exists a task and hybrid architecture such that any architecture deviating from the provided one must use more resources at some layer. This indicates that large-scale hybrid architecture design is situation-specific; in other words, structural properties of a desired task determines the optimal hybrid architecture.
In addition, we zoom in on 2- and 3-layer hybrid architectures to characterize and expand the set of such separating tasks. These tasks are natural, mirroring behaviors found in real-world natural language scenarios. Specifically, we establish tasks where the TF → SSM (TS) and TF → SSM → TF (TST) architectures are resource optimal. The task for TST supplies a natural task that requires layer alternation in a hybrid design. For these tasks, we show a separation in learnability between different layer orderings. By modifying the context window for the Transformers and varying the state in Mamba, we constrain the memory of these hybrid under some fixed budget. We empirically show that the learned hybrids exhibit identical separations as predicted theoretically. For segmented retrieval (designed for the TS architectures) and the TST task, we observe a phenomenon crucial for large-scale design: on hybrids of depth 4 and depth 5, containing TS or TST as a sub-architecture determines performance. This suggests that such “containment” is important in deep hybrids.
We empirically study such deeper hybrids as well. We find that a TS architecture achieves higher performance than all ST architectures for this task. Mechanistically, through linear probing, we observe that the top-performing model, TTSSSSSS, shows a slow increase in decodability in its SSM layers which are not seen in TTTSSSSS. This supports that hybrid design is nuanced, as slightly different architectures fail to use their SSM layers to improve performance.
The paper is structured as follows. In Section 2, we begin with proving that there are tasks and resource constraints for any hybrid architecture that any other architecture must violate. For shallow hybrids, we establish a natural task family capturing important operations in natural language. In Section 3, we experiment on these natural tasks, identifying that these separations appear for learned hybrids. Lastly, in Section 4, we experiment on 8-layer hybrids on associative recall, observing that mildly different architectures have drastically different performances.
Preliminaries and Notation. We consider sequence-to-sequence token prediction problems. Let be some vocabulary of tokens, , and be an input sequence. A language model is a sequence-to-sequence map of the form , where is function composition and each is a sequence-to-sequence map called a layer. Through the paper, we will consider the input and output of at each position to be in , for some , where we call the precision of the model. We will consider two types of layers as abstractions of state space models (SSM) and causal windowed attention (TF). The embedded input sequence uses precision, i.e. is such that .
Transformer Layer. We say a layer is a T-layer (TF) with window size if there exists a map such that for , . In other words, a T-layer can be an arbitrary -precision causal nonlinear function, whose output depends on the past positions of the input. Standard transformer implementations with the windowed attention mechanism falls into this category (See Appendix A for formal definitions).
State-Space Model Layer. We say a layer is an S-layer (SSM) with bit complexity if there exists a finite set of size at most , an update rule and an output function such that and hold.
These definitions capture the core difference between these layers: Transformers perfectly recall their recent context, while SSMs store a compressed version of the context [18].
We define . An architecture profile is a finite word , whose depth is . For two architecture profiles , we write if is a subsequence of : there exist indices such that . Notice that every nonempty architecture profile can be written as , with and . Here, and for . The architecture is comprised of layers of type without a gap. We define as the compression of . Let , and denote for the class of hybrid models with profile , such that every S-layer has a state space with size at most , every T-layer has a window size at most , and each intermediate tokens between layers belong to a token space with size at most .
The empty architecture represents the identity sequence map. Note that since both an S-layer and a
T-layer contain the identity map, when , a model can be simulated by a model . In particular, if , then forces .
2.1 Expressivity and Efficiency Tradeoff under Budget Constraints
Our method to evaluate the choice of different layer orderings is to understand, under a given budget , , on the state size, precision, and the window length, whether for a given task there exists a hybrid model that can solve the task with good accuracy. If there exists a model that solves some given task perfectly, while a model with the same depth but with a different profile must require some computational budgets far beyond , , , then is called the dominant choice of ordering for this task. Our main theoretical result reveals task-dependence in the choice of hybrid layer ordering, formalized in Theorem 1.
Theorem 1. Let and be an arbitrary architecture profile with depth . Let and be an arbitrary fixed constant. There exist constants , , a family of task , where and , , and a family of distributions over a sequence of tokens with length parameterized by , such that for all sufficiently large, the follows hold.
-
(Completeness) There exists a hybrid model such that and , , .
-
(Soundness for wrong ordering) Let be an architecture profile with . Then for every hybrid model that satisfies , must satisfy or .
-
(Soundness for insufficient profile) Let be an architecture profile with but . Then, for every hybrid model that satisfies , must satisfy or or , where is a constant that is strictly larger than 1.
We give an interpretation of Theorem 1. Given any target profile , we would like to evaluate models over a family of tasks , where the size of the input of grows at an order of , for every fixed . In particular, with a resource budget , and , a hybrid model in can perfectly solve . On the other hand, we design a distribution of inputs such that every model with the same depth and must require more resources to achieve a reasonable accuracy.
To quantify the resource separation, we partition the into 2 categories: (i) architectures satisfying , where is still not more expressive than with all neighboring layers merged, and (ii) architectures satisfying . We say that has the wrong order when , which, by Theorem 1, requires qualitatively more resources to solve the task. In particular, a model that can solve the task either requires exponentially larger state spaces/precisions or needs a polynomially larger window size, but with an arbitrarily large rate of growth. When but , a qualitative separation is no longer possible. This is due to our result in Appendix E showing that consecutive layers of the same type can be merged. However, we show that the resources required by such a profile are still a constant factor larger than that of .
We next provide an overview of why Theorem 1 is expected, and the technique we use to prove it. We defer the full technical details of Theorem 1 to Appendix E.
Warm Up: Examples for Shallow Hybrid Models. To start with, we consider a simple associative recall [1] variant, where we show a TS profile is the dominant architecture. Consider an input sequence I of the form with length , where and is drawn from some finite vocabulary of size . The task input is , and the output has at the last position. The T-layer can perform local computations within a window of , so it can output at position . Following, when the S-layer receives at position , it only needs to memorize it until the end of the sequence. This immediately gives a model that solves the task.
In contrast, the ST architecture requires at least one constraint to be significantly larger. Assuming , standard communication complexity [27] implies that using a T-layer as the last layer requires bits from early in the context. Thus, the S-layer must store bits to compress sufficient information to perform the task. This establishes a simple example where TS is the dominant architecture. We provide an additional broad family of natural tasks in Section 2.2 where TS is the dominant architecture, solvable using standard implementations of attention with Mamba-formed SSMs.
The most natural, yet flawed, task for a deeper target architecture is a task that iteratively solves the recall problem, separated by long 0 vectors. For the architecture, such a task does separate architectures: this simple tensor look-up task makes the dominant choice and is studied empirically in Section 3. Specifically, we are given input , where each , , is a matrix, , we are asked to output . The intuition is clean: a T-layer extracts and sends it through the S-layer to the second T-layer to complete the lookup task.
However, for , a similar idea no longer works. For intuition, we modify the tensor lookup task with the input and ask a model to output at the end. Although a small model with an STS profile can solve the task, we find that a small model with a TS profile can also solve the task. The architecture uses a window of a T-layer that entirely contains , identical to what is used for STS. This layer can copy and place it after [9]. This implies that the S-layer receives , changing the required processing order. This requires an S-layer with bits to solve the full task, the same as for STS but with one fewer layer. A core takeaway is that each layer is not only solving some specific task but also compressing and rearranging information for future layers to function more efficiently. A simple task like tensor lookup is too simple to prevent this type of information aggregation from being useful, especially when comparing T-layers, which are any possible causal-window nonlinear function. Thus, to establish Theorem 1, more complicated tasks must be considered.
The task we construct is in Definition 1.
Definition 1 (Sequential Function Composition). Let be a finite space of keys and be a finite space of vocabularies. Let . A level-k recursive chain is defined by a sequence of functions . Specifically, for , , where . Given a sequence of input of length , , where each is a sequence of 0 vectors with different lengths.
The task is divided into stages. In each stage, we take a previous answer and fresh independent context to produce the next answer, . If we use a layer ordering that subsumes , then the role of is similar to the lookup table in the tensor lookup task, where a T-layer computes and the following S-layer sends it to the next stage after the long zero vectors. Thus, a model with profile can use a small resource budget to solve the task. However, when we analyze a profile with , motivated by the failure of the tensor lookup task discussed earlier, we construct a discrete function that defeats any other information embedding.
For some intuition, consider starting with S as an example. We group into , where is the -th S(resp. T) layer. At stage , with the new input block , the prevents from directly accessing information from the previous block. Let denote the past states of the first SSM layers before and let denote the state of right before reading . Fixing to its current value value , the future output of is a deterministic function completely determined by and and not previous blocks, i.e. . We refer to Lemma 4 and Lemma 5 for the detailed analysis.
Importantly, since models need not compute directly to succeed at the task, given the current state record , we will recursively construct a list of possible such that only when can the model succeed with a good probability (Lemma 8). The list contains all possible such that for some state , has a large probability to fall into the next list . Lemma 6 and Lemma 7 use a probabilistic method to show that there exists an such that each of the cannot have a large size, which means has a small probability of falling into the list; thus, there exists an used for the separating task. Using , the competitive model with a wrong ordering will not succeed with a good probability unless it breaks some resource budget.
A Size-2 Cover Method for Deeper Hybrid Model with Insufficient Layers. We next give a brief overview of the case where . We defer to Appendix E.2 for full technical details. As discussed earlier, in this case, a qualitative separation is not possible. Instead, we construct tasks and carefully analyze the bit complexity of solving them. In our construction, we use variants of computing the inner product over a binary field. The main obstacle is that unlike the case with wrong orderings, there may be too many different competitive profiles to analyze. Our analysis uses a novel size-2 cover approach to narrow the structures needed to analyze.
Definition 2. Let . Let and . For , we use to denote the number of T-layers in that is strictly after the -th S-layer and for , we use to denote the number of S-layers in that is strictly after the -th T-layer. We call the following set of architecture profiles the size-2 cover of .
Roughly speaking, the size-2 cover of contains maximal profiles, whose compressed version has length at most 2, subsumed by . As we show in Lemma 9 that if and , then there must be some profile in not subsumed by . Thus, we only need to design hard tasks for profiles of the form in a size-2 cover; a mixture of these creates a single task that is hard for . However, although for each profile in there exists a model with profile that can solve it exactly, it is not immediate whether there is a model with profile that can solve the mixture of these tasks exactly. Since S-layers and T-layers contain more general SSMs and causal windowed functions, we show in Lemma 10 that there exists a “meta” model with profile that can combine these submodels in a black-box way to solve the mixture of tasks.
2.2 Natural Tasks for 2-layer Hybrid Models
Although the tasks we constructed for Theorem 1 can be solved by a hybrid model with the target profile using small resource budgets, the tasks themselves are explicitly designed to broaden the family of models for the hardness result. These tasks may not be efficiently solvable using commonly used layer types such as Mamba, DeltaNet, or standard attention. Theorem 1 establishes resource separations across architecture profiles. We next illustrate the role of layer ordering through two more natural tasks that admit a separation favoring TS. We establish lower bounds for ST and give TS constructions in the generalized layer model in Appendix F.2, with full technical details in Appendix F. Appendix F.3 accounts for accumulated convolutional lookback in these recurrent-state lower bounds, extending their applicability to SSMs with convolutional front-ends, such as Mamba.
The core requirement for tasks with a dominant TS architecture is captured in Assumption 1. This assumption states that, for each task, there is some position in the context such that changes before some position require bits of information from before , similar to the TS task from Section 2. Under this assumption, we can show that any model with SSM layers first and TF layers second requires a large state or window to perform.
Theorem 2 (SSM → TF Cut). Let be a length- sequence task with output in . Suppose there exist a cut position , a nonempty family of length- prefixes, and a nonempty family of length- suffixes, such that every concatenation is a legal input and such that . Let be a deterministic model of architecture ST with recurrent state space and attention window . If computes correctly on all legal inputs and that , then .
This result stems from how information can be processed in a sequence. Without a large window, only the SSM in ST communicates with the early part of the sequence, forcing a large state. For a TS architecture, the Transformer performs computations that are then carried by the SSM, reducing state size and window length. We now define the two natural tasks for the TS architecture.
Exact Copy. Given a sequence x, the task of exact copy is to output 1 if there exists some repeated subsequence of length l, and output 0 otherwise.
Definition 3 (Exact Copy). Given a vocabulary and an input sequence , we say that contains an exact copy of repetition and string length if there exists s.t.
The task of Exact Copy is to output , where .
This task satisfies Assumption 1 by setting to be the end of the exact copy. Thus, Theorem 2 applies, ensuring architectures require large memory. This task represents situations where a complex operation occurs early in a sequence, but the result needs to be carried much later in the context. For instance, reasoning-style tasks where a model identifies a useful lemma using TF layers early in the sequence can be efficiently propagated to the end of the sequence by SSM layers.
Segmented Retrieval. To define segmented retrieval, we place separator tokens in the sequence to act as a partition. The simplest per-segment operation is a fixed lookup in the past. Concretely, this means that for some fixed , the value at the separator token at position is . The task of segmented retrieval is to output the last of these in some subset of the vocabulary.
Definition 4 (Segmented Retrieval). Given a vocabulary , we specify a non-empty subset . Given an input sequence , where indicates whether position is an internal segment boundary and is revealed only when position is processed. We define and refer an element from as a boundary and define and we set that . Select , and define the largest index of the nonempty set as . The Segmented Retrieval task is to output the token .
Similar to exact copy, this task satisfies Assumption 1. Again, Theorem 2 applies, ensuring architectures require large memory. However, the source of the cut is different. Here, the cut occurs at the partitions, where the model must recall the past tokens. The TS architecture uses its TF layer to perform the -back recall, and the SSM carries the relevant tokens through the sequence. This is a simplified multi-document task, where information from each document (segment) may need to be carried to the end of the context; this latter component is best suited for SSM layers.

(a) The Segmented Retrieval task.
Results for Exact Copy (Equal Memory)

(b) The Exact Copy task.
Figure 2: Results for the TS tasks where an inference memory proxy is held constant. The annotations represent the relationship between window storage and state size for Transformer-Mamba hybrids. The only architecture with high performance on the task is the TS architecture. Due to fixed memory, models with larger token dimension have smaller window and state size, making the tasks difficult. Conversely, small token dimension limits expressivity.
3 Empirical Results of Natural Tasks
We have established that for certain tasks, there is a theoretical separation in expressivity. However, these theoretical results focus on layerwise resource constraints that may not tie to common constraints in practice. We empirically test small hybrids on these tasks with a total fixed inference memory, showing that hybrids of this specific architecture learn them with the best performance.
3.1 Two Layers - Segmented Retrieval and Exact Copy
We begin the experiments with a sweep over the possible 2-layer hybrids on tasks where we expect a TS to be dominant. For two tasks, segmented retrieval and exact copy, we observe that there is a similar separation between architectures as predicted theoretically. These results are conducted under a fixed proxy of inference memory (details in Appendix C.3).
Setup. On both tasks, we use a small vocabulary of around 20 tokens and sequence lengths of around 150. We select Transformers with RoPE embeddings for T-layers and Mamba for S layers [8]. These match the model types used in [9] to compare pure SSMs to pure Transformers. For the TT and SS architectures, a fixed memory constraint induces a trade-off between token embedding dimension and window length or state size. For the ST and TS, there are two degrees of freedom to satisfy the memory budget proxy. We select some window-to-state-size ratios; for each, we execute a sweep over token dimension to blanket the space of possible architectures. The memory calculation is described in Appendix C.3. All experiments are averaged across 5 seeds.
Results. Results for both tasks are found in Figure 2. These results show the performance of each hybrid, plotted against the token embedding dimension. For the TS and ST hybrids, the ratio of window to state
| Model | Accuracy | Model | Accuracy |
|---|---|---|---|
| TTTT | 0.871 | TSSS | 1.000 |
| STTT | 0.706 | STSS | 1.000 |
| SSTT | 0.516 | SSTS | 1.000 |
| SSST | 0.345 | TTSS | 1.000 |
| SSSS | 0.125 | TSTS | 1.000 |
| TSST | 1.000 | ||
| STTS | 1.000 | ||
| STST | 1.000 | ||
| TSTT | 1.000 | ||
| TTST | 1.000 | ||
| TTTS | 1.000 |
Table 1: Training 4-layer hybrids on segmented retrieval. Left columns are models without TS; the right columns are models with TS as a component. There is a clear dichotomy between hybrids with and without this motif.
Results for TST, Depth 5 (Equal Memory)

Figure 3: Performance of all possible 5-layer Transformer-Mamba hybrids on the task where TST is expected to dominate. Models with TST as a sub-architecture perform above those without.
dimension is annotated at the end of each associated curve. Each curve ends once the desired ratio is no longer attainable, i.e. the token dimension is so large that the sum of the window and state expansion factors is less than the sum of the ratio components. Moving to the right increases the token embedding size, which requires the window and state expansion factor to decrease. This allows the model to have richer token representations but reduces the available context. Moving to the left increases the window width and state expansion factor but requires a reduction in token precision. While much, if not all, of the context is available, the token embeddings are so small that the model cannot compute with each token sufficiently. The highest average performance of a model other than TS is shown by a dashed horizontal line.
Crucially, the only model that achieves high accuracy, and perfect accuracy in one setting, is the TS architecture. This result also confirms that the layer ordering is vital to performance. The ST architectures never achieve high performance, as their ability to capture complex operations early in the sequence is hindered by this layer ordering.
3.2 Containing Subarchitectures Predicts Performance
The two-layer experiments in Section 3.1 and the three-layer experiments in Appendix D.4 identify TS and TST, respectively, as the best-performing profiles under the tested settings. Motivated by our theoretical separations, we next examine whether containing these profiles as subsequences predicts performance at greater depth. We evaluate all four-layer profiles on segmented retrieval (Table 1) and all five-layer profiles on tensor lookup (Figure 3).
Setup. For each experiment, we follow the setup for the two- and three-layer architectures. We increase the total allotted memory to account for the models having more layers. For both settings, we test all layer orderings of Transformers and SSM layers. We repeat across 3 seeds for each.
Results. The results for training 4-layer hybrids on segmented retrieval are found in Table 1. This table separates architectures that contain TS as an architecture and those that do not. Accuracy is taken as the highest across seeds for models without TS and the lowest across seeds for models with TS. Even so,
Architecture sweep of MKAR configs

Figure 4: Token accuracy of TS and ST architectures on (2, 1)-AR. Small differences in architectures affect performance dramatically.
MKAR Layer-wise Probing (5 seeds)

Figure 5: Probe accuracy from the output stream at each model layer. All models have a significant gain in probe accuracy at their first TF layer, even in the pure TF where all layers are identical. TTTSSSSS and STSTSTST both see little increase at S-layers, while the other models do.
all architectures with TS as a sub-architecture achieve perfect performance, while all architectures without TS do not achieve perfect performance on any of the 3 seeds.
The results for the TST task are shown in Figure 3. The models are positioned based on their number of Transformer layers and are colored based on their containment of TST as a sub-architecture. Aside from the STSTS architecture, models with TST are notably higher in performance than the other architectures.
4 Observations on Associative Recall
We have thus far focused on the accuracy of various hybrid architectures. These architectures were trained on tasks where we have clear theoretical results indicating which architecture is predicted to have the highest performance. Here, we probe other aspects of learned hybrids on a variant of associative recall [1], including a mechanistic study of the learned algorithms by different layer orderings.
Setup. We test (2, 1)-AR (two tokens per key, one token per value) on hybrid architectures with 8 layers. This task represents a very compressed version of a multidocument task, where every triplet of tokens is a document identifier and associated value. The chosen architecture families are size-2 cover architectures TS and ST. We vary the T-layer count between 0 and 8, repeating each setting with 5 seeds. The median, minimum, and maximum performance are reported. Additionally, for each architecture, we take the last token representations at each layer of the model and linearly probe for the next token. This roughly measures how much of the next token is identified by each layer. Additional details can be found in Appendix C.3.
Results. The results on performance are shown in Figure 4. As expected, hybrid models outperform pure architectures. However, each architecture family behaves differently, including a different peak TF-to-SSM ratio. Models with Transformers in the first few layers benefit most from having a very small subset of layers as Transformer layers. We also observe that the TS architecture outperforms the ST architecture. We predict this is due to the multi-document nature of this task.
The linear probe results in Figure 5 further support this. Consistently, the first TF layer improves decodability significantly. This TF layer retrieves the key-value pairs within its context window, but cannot capture the rest. More subtle is the behavior of models with many SSM layers stacked back-to-back. With these long strings of SSM layers, the model's decodability slowly increases as depth increases; we hypothesize the SSM layers are bringing these remaining key-value pairs from outside the context window. We also note that models trained on natural language typically exhibit a similar behavior, with TF layers performing the majority of recall [17].
5 Conclusion
Hybrid architectures are critical to building frontier models. Their performance and flexibility come at the cost of an expanded design space that cannot be easily navigated without an understanding of the effect of layer order and design on task performance. We provided an analysis taking the first step towards such an understanding. We showed that for each design, there exist tasks that provably favor a model with this type of architecture over all other choices. We do so by explicitly constructing such models, additionally finding that trained hybrids exhibit matching behaviors. Our general theory relies on deliberately constructed tasks and expressive abstractions of SSM and attention layers, and the corresponding optimal architectures need not always be realizable by standard practical models. While our natural tasks and experiments begin to bridge this gap, an important direction is to extend the theory to practical layer classes, richer mixtures of tasks, and natural-language settings. Ultimately, we hope to identify task-level properties that predict effective layer orderings before expensive model training.
6 Acknowledgements
John Cooper and Frederic Sala were supported by the National Science Foundation (NSF) (CCF2106707), the Defense Advanced Research Projects Agency (DARPA Young Faculty Award) and the Wisconsin Alumni Research Foundation (WARF). Ilias Diakonikolas was supported by a Guggenheim Fellowship and the ONR (N00014-25-1-2268). Mingchen Ma was supported by NSF Award CCF-2144298 (CAREER) and the ONR (N00014-25-1-2268).
AI use statement
In this work, generative AI models including GPT 5.6 sol and GPT 6 Astra are used interactively as a routine for discussion, helping with proof construction, writing code for some of the tasks as well as checking potential flaws during the preparation of the manuscript. The analysis of Case 4 of Theorem 4 was mainly established and proved by GPT 6 Astra based on a hardness construction provided by the authors that contained a non-trivial mathematical flaw. We include the generated proof at https://github.com/SprocketLab/layer-importance, as supplementary material to support the correctness of the theory. We additionally used generative AI tools to polish some grammar in the text. We did not use generative AI tools for any other required-disclosure task, including the core writing or literature review. We have reviewed all AI-assisted work: AI-generated proofs and code were read, executed, and verified for correctness by at least 2 authors, and all suggested grammatical edits were checked to ensure no claims or technical content were altered. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
References
[1] Simran Arora, Sabri Eyuboglu, Aman Timalsina, Isys Johnson, Michael Poli, James Zou, Atri Rudra, and Christopher Re. Zoology: Measuring and improving recall in efficient language models. In The Twelfth International Conference on Learning Representations, 2024.
[2] Sangmin Bae, Bilge Acun, Chien-Yu Lin, Haroun Habeeb, Seungyeon Kim, Liang Luo, Junjie Wang, and Carole-Jean Wu. Hybrid architectures for language models: Systematic analysis and design insights, 2026.
[3] Satwik Bhattamishra, Michael Hahn, Phil Blunsom, and Varun Kanade. Separations in the representational capabilities of transformers and recurrent architectures. Advances in Neural Information Processing Systems, 37:36002–36045, 2024.
[4] Aviv Bick, Eric P. Xing, and Albert Gu. Retrieval-aware distillation for transformer-SSM hybrids. In Forty-third International Conference on Machine Learning, 2026.
[5] Lijie Chen, Binghui Peng, and Hongxun Wu. Theoretical limitations of multi-layer transformer. In 2025 IEEE 66th Annual Symposium on Foundations of Computer Science (FOCS), pages 2631–2653. IEEE, 2025.
[6] John Cooper, Ilias Diakonikolas, Mingchen Ma, and Frederic Sala. Expressivity-efficiency tradeoffs for hybrid sequence models. In Forty-third International Conference on Machine Learning, 2026.
[7] Yonggan Fu, Xin Dong, Shizhe Diao, Matthijs Van keirsbilck, Hanrong Ye, Wonmin Byeon, Yashaswi Karnati, Lucas Liebenwein, Maksim Khadkevich, Alexander Keller, Jan Kautz, Yingyan Celine Lin, and Pavlo Molchanov. Nemotron-flash: Towards latency-optimal hybrid small language models. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025.
[8] Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. In First Conference on Language Modeling, 2024.
[9] Samy Jelassi, David Brandfonbrener, Sham M. Kakade, and Eran Malach. Repeat after me: Transformers are better than state space models at copying. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 21502–21521. PMLR, 21–27 Jul 2024.
[10] Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. Transformers are RNNs: Fast autoregressive transformers with linear attention. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 5156–5165. PMLR, 13–18 Jul 2020.
[11] Feyza Duman Keles, Pruthuvi Mahesakya Wijewardena, and Chinmay Hegde. On the computational complexity of self-attention. In Proceedings of The 34th International Conference on Algorithmic Learning Theory, volume 201 of Proceedings of Machine Learning Research, pages 597–619. PMLR, 20 Feb–23 Feb 2023.
[12] Kimi Team, Yu Zhang, Zongyu Lin, Xingcheng Yao, Jiaxi Hu, Fanqing Meng, Chengyin Liu, Xin Men, Songlin Yang, Zhiyuan Li, Wentao Li, Enzhe Lu, Weizhou Liu, Yanru Chen, Weixin Xu, Longhui Yu, Yejie Wang, Yu Fan, Longguang Zhong, Enming Yuan, Dehao Zhang, Yizhi Zhang, T. Y. Liu, Haiming Wang, Shengjun Fang, Weiran He, Shaowei Liu, Yiwei Li, Jianlin Su, Jiezhong Qiu, Bo Pang, Junjie Yan, Zhejun Jiang, Weixiao Huang, Bohong Yin, Jiacheng You, Chu Wei, Zhengtao Wang, Chao Hong, Yutian Chen, Guanduo Chen, Yucheng Wang, Huabin Zheng, Feng Wang, Yibo Liu, Mengnan Dong, Zheng Zhang, Siyuan Pan, Wenhao Wu, Yuhao Wu, Longyu Guan, Jiawen Tao, Guohong Fu, Xinran Xu, Yuzhi Wang, Guokun Lai, Yuxin Wu, Xinyu Zhou, Zhilin Yang, and Yulun Du. Kimi linear: An expressive, efficient attention architecture, 2025.
[13] Eyal Kushilevitz. Communication complexity. In Advances in Computers, volume 44, pages 331–360. Elsevier, 1997.
[14] Hyunji Lee, Wenhao Yu, Hongming Zhang, Kaixin Ma, Jiyeon Kim, Dong Yu, and Minjoon Seo. Understanding and enhancing mamba-transformer hybrids for memory recall and language modeling. In Lucas Charpentier, Leshem Choshen, Ryan Cotterell, Mustafa Omer Gul, Michael Y. Hu, Jing Liu, Jaap Jumelet, Tal Linzen, Aaron Mueller, Candace Ross, Raj Sanjay Shah, Alex Warstadt, Ethan Gotlieb, Wilcox, and Adina Williams, editors, Proceedings of the First BabyLM Workshop, pages 380–398, Suzhou, China, November 2025. Association for Computational Linguistics.
[15] Barak Lenz, Opher Lieber, Alan Arazi, Amir Bergman, Avshalom Manevich, Barak Peleg, Ben Aviram, Chen Almagor, Clara Fridman, Dan Padnos, Daniel Gissin, Daniel Jannai, Dor Muhlgay, Dor Zimberg, Edden M. Gerber, Elad Dolev, Eran Krakovsky, Erez Safahi, Erez Schwartz, Gal Cohen, Gal Shachaf, Haim Rozenblum, Hofit Bata, Ido Blass, Inbal Magar, Itay Dalmedigos, Jhonathan Osin, Julie Fadlon, Maria Rozman, Matan Danos, Michael Gokhman, Mor Zusman, Naama Gidron, Nir Ratner, Noam Gat, Noam Rozen, Oded Fried, Ohad Leshno, Omer Antverg, Omri Abend, Or Dagan, Orit Cohavi, Raz Alon, Ro'i Belson, Roi Cohen, Rom Gilad, Roman Glozman, Shahar Lev, Shai Shalev-Shwartz, Shaked Haim Meirom, Tal Delbari, Tal Ness, Tomer Asida, Tom Ben Gal, Tom Braude, Uriya Pumerantz, Josh Cohen, Yonatan Belinkov, Yuval Globerson, Yuval Peleg Levy, and Yoav Shoham. Jamba: Hybrid transformer-mamba language models. In The Thirteenth International Conference on Learning Representations, 2025.
[16] William Merrill, Yanhong Li, Tyler Romero, Anej Svete, Caia Costello, Pradeep Dasigi, Dirk Groeneveld, David Heineman, Bailey Kuehl, Nathan Lambert, Chuan Li, Kyle Lo, Saumya Malik, DJ Matusz, Benjamin Minixhofer, Jacob Morrison, Luca Soldaini, Finbarr Timbers, Pete Walsh, Noah A.
Smith, Hannaneh Hajishirzi, and Ashish Sabharwal. Olmo hybrid: From theory to practice and back, 2026.
[17] Kurt Felix Michalak and Steven Abreu. Some attention is all you need for retrieval. In Mechanistic Interpretability Workshop at NeurIPS 2025, 2025.
[18] Elvis Nunez, Luca Zancato, Benjamin Bowman, Aditya Golatkar, Wei Xia, and Stefano Soatto. Expansion span: Combining fading memory and retrieval in hybrid state space models. In Proceedings of the International Conference on Neuro-symbolic Systems, volume 288 of Proceedings of Machine Learning Research, pages 570–596. PMLR, 28–30 May 2025.
[19] NVIDIA. Nemotron-h: A family of accurate and efficient hybrid mamba-transformer models, 2025.
[20] NVIDIA. Nvidia nemotron 3: Efficient and open intelligence, 2025.
[21] Destiny Okpekpe and Antonio Orvieto. Revisiting associative recall in modern recurrent models, 2025.
[22] Catherine Olsson, Nelson Elhage, Neel Nanda, Nicholas Joseph, Nova DasSarma, Tom Henighan, Ben Mann, Amanda Askell, Yuntao Bai, Anna Chen, Tom Conerly, Dawn Drain, Deep Ganguli, Zac Hatfield-Dodds, Danny Hernandez, Scott Johnston, Andy Jones, Jackson Kernion, Liane Lovitt, Kamal Ndousse, Dario Amodei, Tom Brown, Jack Clark, Jared Kaplan, Sam McCandlish, and Chris Olah. In-context learning and induction heads. Transformer Circuits Thread, 2022.
[23] Binghui Peng, Srini Narayanan, and Christos Papadimitriou. On limitations of the transformer architecture. In First Conference on Language Modeling, 2024.
[24] Reiner Pope, Sholto Douglas, Aakanksha Chowdhery, Jacob Devlin, James Bradbury, Jonathan Heek, Kefan Xiao, Shivani Agrawal, and Jeff Dean. Efficiently scaling transformer inference. In D. Song, M. Carbin, and T. Chen, editors, Proceedings of Machine Learning and Systems, volume 5, pages 606–624. Curan, 2023.
[25] Zihan Qiu, Zekun Wang, Xiao Li, Yanpeng Li, Yang Xu, Yixuan Wang, Huaqing Zhang, Rui Men, Bochao Mao, Chengruidong Zhang, Fan Zhou, Hao Luo, Haofeng Huang, Haoran Lian, Haoyan Huang, Hongqing Chen, Jianwei Zhang, Jing Xu, Junjie Wang, Langshi Chen, Liangyu Wang, Linlang Jiang, Man Yuan, Minmin Sun, Peng Jin, Siqi Zhang, Siyu Wang, Xingzhang Ren, Yakai Wang, Yi Zhang, Yiming Dong, Yizhong Cao, Yubo Ma, Yunfei Mao, Bo Zheng, and Dayiheng Liu. On the design of qwen3.8-next architecture: Evaluation, efficiency, and training stability, 2026.
[26] Qwen Team. Qwen3-next-80b-a3b-instruct. https://huggingface.co/Qwen/Qwen3-Next-80B-A3B-Instruct, 2025. Model card. Accessed 2026-09-08.
[27] Tim Roughgarden. Communication complexity (for algorithm designers). Foundations and Trends in Theoretical Computer Science, 11(3-4):217–404, 2016.
[28] Clayton Sanford, Daniel Hsu, and Matus Telgarsky. Transformers, parallel computation, and logarithmic depth. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 43276–43327. PMLR, 21–27 Jul 2024.
[29] Roger Waleffe, Wonmin Byeon, Duncan Riach, Brandon Norick, Vijay Korthikanti, Tri Dao, Albert Gu, Ali Hatamizadeh, Sudhakar Singh, Deepak Narayanan, Garvit Kulshreshtha, Vartika Singh, Jared Casper, Jan Kautz, Mohammad Shoeybi, and Bryan Catanzaro. An empirical study of mamba-based language models, 2024.
[30] Dustin Wang, Rui-Jie Zhu, Steven Abreu, Yong Shan, Taylor Kergan, Yuqi Pan, Yuhong Chou, Zheng Li, Jibin Wu, Ge Zhang, Wenhao Huang, and Jason Eshraghian. A systematic analysis of hybrid linear attention, 2026.
[31] Xiaojie Xia, Huigang Zhang, Chaoliang Zhong, Jun Sun, and Yusuke Oishi. Distill-then-replace: Efficient task-specific hybrid attention model construction, 2026.
[32] Songlin Yang, Jan Kautz, and Ali Hatamizadeh. Gated delta networks: Improving mamba2 with delta rule. In The Thirteenth International Conference on Learning Representations, 2025.
Table of Contents
A Notation 17
B Related Work 18
B.1 Hybrid Models 18
B.2 Mechanistic Tasks 19
C Experiment Details 19
C.1 Two- and Three- Layer Hybrid Details 19
C.2 Learning Rate Selection 20
C.3 Memory Proxy Calculation 20
D Additional Experiments 21
D.1 Segmented Retrieval 21
D.2 Different Quantities of Available Memory 21
D.3 Testing DeltaNet Hybrids 23
D.4 Three Layers - Tensor Lookup 24
D.5 An ST Task 24
D.6 Associative Recall Variants 26
D.7 Learning Rate Sensitivity 26
E Proving Theorem 1 27
E.1 Wrong use of ordering 28
E.2 Correct ordering but insufficient layers 34
E.3 Proof of Theorem 1 46
F Omitted Details in Section 2.2 47
F.1 Hardness Results 47
F.2 Constructions 50
F.3 SSMs with a Convolutional Front-End 55
| Symbol | Meaning |
| The vocabulary space. | |
| The intermediate space used between architecture layers. | |
| The output space. | |
| An SSM layer. | |
| A TF layer. | |
| Defined to be , the possible letters in an architecture. | |
| Model architectures from \Sigma^. | |
| The target architecture relating to Theorem 1. | |
| Compressing all common layers into a single layer. | |
| The compression of . | |
| The flipped architecture, . | |
| The state space for the SSM layers. | |
| The window for the TF layers. | |
| Number of bits available to an SSM layer. | |
| Number of bits available to the hidden space between layers. | |
| Model family of architecture under the constraints . | |
| The dimension of the hidden state. | |
| The Mamba state expansion factor. | |
| An input sequence from . | |
| A binary vector marking the endpoints of partitions for 2-layer tasks. | |
| The sequence length. | |
| Attention parameter matrices. | |
| Update and emission rules for the SSM. |
Table 2: Notation
A Notation
We provide an overview of the notation used throughout the paper in Table 2.
An attention head Attn is defined by matrices such that , where
An attention layer AT is defined by attention heads and a projection matrix . Denote by the concatenation of the outputs of the attention heads, so the attention layer outputs .
A Transformer layer TF is defined by an attention layer AT and an MLP layer. In particular, an MLP layer is defined as as , where are matrices and is an activation function applied coordinate-wise. Specifically, .
An SSM layer SSM is defined with a state , an update rule , and an emission rule . Let be some initial state. Given some sequence , the state of the model at iteration is denoted by
and the output token is denoted by , where the state and output are defined recursively:
B Related Work
B.1 Hybrid Models
Empirical Analysis on Hybrid Models. Hybrid designs now appear throughout frontier-scale open models, where attention placement is conventionally fixed and only the mixing ratio is tuned. Jamba [15] is one of the first models to combine attention, Mamba, and mixture-of-experts layers. It interleaves one attention layer for every seven Mamba layers and reports no substantial difference relative to a 1:3 ratio. Nemotron-H [19] allocates roughly 8% of layers to attention, spacing them evenly through the stack; Nemotron 3 [20] retains only a handful among interleaved Mamba-2 and mixture-of-experts layers; and Nemotron-Flash [7] selects its layer sequence via search under a latency budget. Kimi Linear [12], Olmo Hybrid [16], Qwen3-Next [26], and Qwen3.8-Next [25] all place one attention layer in every four. Within each period, attention follows the recurrent layers, except in Jamba where it appears among them.
Systematic studies explore hybrid design more broadly but still leave placement largely unexplored. [29] show at the 8B-parameter scale that a hybrid with 7% attention layers outperforms a Transformer on all twelve standard tasks. [30] sweep six linear-attention variants across five ratios, recommending 3:1 to 6:1 ratios of SSM to TF layers, and find that the best standalone linear model is not the best hybrid component. [14] compare sequential and parallel hybrids on memory recall. Only [2] vary where attention blocks are placed: at every ratio, placing attention in the early layers underperforms pure models, whereas placing it in the middle performs best. Some works have also observed that pure Transformers learn many heads that can be simulated closely by an SSM, allowing for distillation to more efficient architectures [31, 4].
Since each configuration requires a full pre-training run, deployed models each commit to a single interleaving, and the one controlled study of placement [2] explores only a narrow slice of the design space. Our synthetic sweeps cover a broad set of orderings within an 8-layer stack and show that the best ordering depends on the task.
Theoretical Understanding for Hybrid Models. Hybrid architectures have been studied less in a theoretical setting than in empirical settings. The work by [6] established a separation in memory resource constraints between hybrid architectures and pure architectures. We build on this work, studying hybrids of greater depth. Additionally, [16] proved hybrid architectures can implement tasks that exist in NC while both SSMs and Transformers are stuck in TC . This work establishes more tasks and distinguishes between layer orderings, which has yet to be studied using tools from communication complexity Communication complexity is a classical tool for converting information-transfer bottlenecks into computational lower bounds [13, 27]. It has recently become useful for understanding the expressivity of sequence models. [28] use communication-complexity arguments to establish representational limitations of attention, while [3] obtain separations between Transformers and recurrent architectures through reductions from communication problems. Closer to large language models, [23] use communication complexity to prove limitations of Transformers on function composition, and [5] introduce an autoregressive communication model to obtain unconditional depth–width lower bounds for multi-layer decoder-only Transformers and a provable advantage for chain-of-thought reasoning.
B.2 Mechanistic Tasks
Associative recall. The most common task to test a model's retrieval abilities is associative recall [22]. It probes a model's capability to maintain an associative memory, keeping track of facts indexed by prior tokens. The original form of associative recall separated pure SSMs from pure TFs as worse at storing large memories.
This task, however, has grown too simple to the point where many similar architectures perform nearly perfectly. A few variants have been proposed, such as MQAR [1]-eliminating issues from only querying a single key-value pair-and phonebook [9]-where each key and value are made of multiple tokens. We focus on the last of these as a probe into the differences between hybrid architectures.
C Experiment Details
We provide some additional experimental details for those conducted in the main body. We begin with a description of the layer architectures used. In Section C.1, we provide the experimental details omitted in the main body. In Section C.2, we detail the learning rate sweeps conducted for each of the experiments. Lastly, in Section C.3, we describe the calculation used to determine the size of memory used by these models.
Transformers. The Transformers come from GPTNeoX and are given RoPE positional embeddings, both in the pure model and in all hybrids. All experiments use Transformer layers with a single head each. We observed that for this scale of experiments, increasing the number of heads by partitioning the square key and query matrices into thin rectangles hindered performance severely.
SSMs. The chosen SSM for all experiments is Mamba. This architecture allows for the state size to be increased independently of token dimension.
C.1 Two- and Three- Layer Hybrid Details
Here, we detail the different experimental parameters relevant to each of the tasks tested.
Segmented Retrieval. We use a vocabulary of 40, with half of the vocabulary within the set N. We use sequences of length 150 and a partition of 10 segments. The segment boundaries are chosen uniformly at random in a sequence. We use a lookup distance of , halfway to the expected segment length of 15. This prevents too many sequences from being so short as to not have any valid lookup, nor is so small that it falls within Mamba's learned convolution. Using a uniform sampling of positions makes the task easier than if all segments were of length or greater. In fact, we observed that when is within this convolution length, the pure SSM architectures perform the task nearly as well as TS. It is possible to modify this task so the lookup distance is not fixed, though, circumventing the convolution altogether. Each model has 512 dimensions of memory. Due to the output space containing 20 tokens from the vocabulary, random performance is 0.05.
Exact Copy. For sequence lengths of 100, we have 20 vocabulary tokens. The copied sequence length is 5, which is repeated 3 times in the relevant sequences. To assist with training, we train the model to output 1s at every position after the exact copy is observed rather than only at the last token. Each model has 512 dimensions of memory. Due to the task being binary, random performance is 0.5.
TST Task. We use a sequence length of 150 and a vocabulary size of 7. The selection of 7 puts the final matrix in the last 1/3 of the context, and the initial lookup lies within the initial 1/3 of the context. This leaves a comfortable 1/3 of the middle of the context as null tokens, requiring an SSM layer to prevent large memory usage. We use a special copy of the vocabulary for the query token q to perform the first lookup. This helped the task be learnable by separating the tokens that are within the tensors and those which act as queries.
C.2 Learning Rate Selection
In all experiments, we conduct a learning rate sweep to identify the best learning rate for each set of hyperparameters. For the segmented retrieval and TST tasks, 9 learning rates are sampled multiplicatively evenly between and . Each learning rate is run for one epoch and for 2 different sets. The learning rate with the smallest loss is selected as the learning rate for the 5 seeds tested.
For the exact copy experiments, 4 learning rates are multiplicatively spaced between and . For each of these, all 5 seeds are run for complete training runs. The best learning rate on average was selected. These experiments are thus more computationally expensive than the other tasks, although this worked in this setting, as we experimented on the other two tasks with deeper hybrids with more settings.
The learning rates for associative recall were selected with 2 epochs of training and a collection of learning rates between and . More details are provided in Appendix D.7.
C.3 Memory Proxy Calculation
We calculate a proxy for the inference memory used, M, by each model in a simplified manner as follows. Let d be the hidden dimension of the model.
For a Transformer with window W, we account for the memory needed for the Transformer to store the tokens in its context. Thus, we calculate the memory needed as
For a Mamba layer (also titled SSM), we use the state expansion factor N. The hidden state of a Mamba layer is a matrix of size . Thus, we calculate the memory needed as
Lastly, for the few experiments containing Gated DeltaNet, we only need the token dimension. The state for these layers is a square matrix of the same size as the input. Thus, we calculate the memory needed as
For a model with Transformer layers, Mamba layers, and GDN layers, the total memory is
Enforcing identical memory. When enforcing that each experiment uses the same allotted memory, we only modify W and N. The desired token dimension d is maintained. Additionally, the ratio W/N is roughly maintained so that a desired weight budget favoring one of these layer types over the other is reflected in the used parameters in the experiment.
When W and N are calibrated, they are always rounded down to stay under the required budget. However, we select memory budgets and token dimensions as powers of 2 so all experiments have precisely equal memory.
D Additional Experiments
We provide some additional experiments covering other design decisions and further observations relevant to deeper hybrids.
We begin with results directly related to those in the main body. Those include experiments on the tasks with dominant two layer architectures with more memory and more experiments between dimensions that are powers of 2. We then include some experiments with DeltaNet hybrids, noting that the available design space is much more limited as the state is tied only to token dimension. Some other tasks are then investigated, including the TST tensor lookup task comparing al 3-layer hybrids as well as a task expected to be optimal for ST. This final task comes from prior work and confirms that the codebase does not only bias towards the TS architecture. Lastly, we investigate the results of 8-layer hybrids on two variants of associative recall. We also report their learning-rate sensitivities, noting that for these tasks, each of these architectures shows a surprisingly large range of usable learning rates.
D.1 Segmented Retrieval
In the main body, we showed the results for a sweep of token dimensions, windows, and state sizes. These experiments use token dimensions that are all powers of 2. We conducted additional experiments with more token dimensions, with results shown in Figure 6. These are no longer powers of two and thus vary slightly in memory. However, the results still mimic those in the main body, where only the TS architecture performs the task.
These additional points also allow us to observe an interesting structure between the TT and TS architectures. The TT architecture attains its greatest average performance at a smaller token dimension and larger window than the TS architectures. These optima show a clear improvement in memory efficiency for TS architectures: the TS architectures use their allotted state to increase the computation per token instead of dedicating much of it to a large window to capture only some small components early in the sequence.
D.2 Different Quantities of Available Memory
We first showed a separation between hybrid architectures on segmented retrieval and exact copy using 512 dimensions of memory. We also test architectures with larger and small quantities of available memory.
The results for double the memory can be seen in Figure 7. We still observe that the TS architecture is the highest-performing architecture. However, for exact copy, unlike the 512 memory experiments, the TT architecture gains significantly in performance at small token dimensions. This is likely due to the increased window compared to the main body, where dimension 8 only leaves a window of 128 now, which is large enough to capture most copied subsequences. For the segmented retrieval experiments, we observe that performance on all architectures increases compared to 512 dimensions of memory.

Figure 6: Extended results for segmented retrieval.

(a) The Segmented Retrieval task.
Results for Exact Copy (Equal Memory)

(b) The Exact Copy task.
Figure 7: Hybrid performance on exact copy for 1024 dimensions of memory.
D.3 Testing DeltaNet Hybrids
The majority of this work focuses on the Mamba SSM architecture. This architecture includes a state-expansion factor that allows the size of the state to be changed independently of other model parameters. This section describes an experiment conducted on hybrids of Transformer and Gated DeltaNet (GDN) layers.
An important note about Gated DeltaNet is that its state matrix, , exists in . This state size is tied to the token dimension. Thus, unlike the Transformer-Mamba hybrids where the window-to-state-size dimension was free, we can only modify the token dimension and window to achieve the desired memory.
The results are in Figure 10. For the Transformer-Mamba hybrids, we fix the ratio of window to state-expansion to be 15 to 1, matching the highest performance seen across ratios. We observe the same behavior for Gated DeltaNet as with Mamba, with TS mirroring TG closely. However,
Results for TST Task for Different Architectures

Figure 9: Results for training various architectures with different token dimensions on the TST task. All models used the same window size and state size. As expected, only the TST model attains a high accuracy.
due to the larger state size of GDN as compared to Mamba, larger token dimensions violate the memory constraints faster; hence, the TG and GT curves end earlier. This confirms that available inference memory is a core bottleneck across a couple of different SSM architectures.

(a) The Segmented Retrieval task.
Results for Exact Copy (Equal Memory)

(b) The Exact Copy task.
Figure 8: Hybrid performance on exact copy for 256 dimensions of memory.
D.4 Three Layers - Tensor Lookup
As established by the theory about deeper hybrids, there is a natural tensor-lookup task that is predicted to have the TST architecture be dominant. We investigate this task empirically as well to test the results in a learned setting.
These experiments mirror closely to those for the two-layer architectures. The architectures used are also Transformers with RoPE and Mamba for the SSM. In these experiments, we also hold memory constant. However, we only test on one window-to-state-size ratio for each architecture: 15 to 1. The results are found in Figure 9. As expected, the TST model performs the best, reaching an accuracy above 90%, unlike all competing architectures.
We report the exact average performances from Figure 3 in Table 3. This table lists all possible 5-layer architectures. All models with the TST motif, with the exception of 1, performed better than the remaining models. All models were held to roughly the same memory of 6000. One additional takeaway from this table comes from the architectures of the form TS and ST. For the TS models, there is a bias towards more T layers, while for ST, there is a bias towards fewer S layers. Differences such as these support the need for a more principled understanding of various hybrid architecture designs.
D.5 An ST Task
In [6], the selective copying task was used to show a separation in hybrid expressivity over pure model expressivity. Empirically, this task was shown to be better suited for ST rather than TS. To confirm that the code used does not artificially bias the TS architecture towards being the dominant architecture, we run the same suite of experiments as used for the 2-layer TS tasks.
The results are found in Figure 11. We observe that the ST architectures do indeed achieve perfect performance on this task, while the other architectures do not. Thus, the codebase trains architectures in a way that can show various architectures as the highest performing.
Beyond this confirmation, we observe some additional effects in their own right. First, the TF and SSM architectures plateau at different locations in the figure. In fact, the SSM Mamba continues to increase in

Figure 10: Performance on segmented retrieval, including Gated DeltaNet (G) hybrids. Only the 15:1 ratio of window to SSM state for TS and ST hybrids is shown.
| Model | Performance | Model | Performance |
|---|---|---|---|
| TTTST | 0.911 | TTTTT | 0.533 |
| TTSTT | 0.934 | TTTTS | 0.840 |
| TTSTS | 0.884 | TTTSS | 0.776 |
| TTSST | 0.890 | TTSSS | 0.787 |
| TSTTT | 0.922 | STTTT | 0.527 |
| TSTTS | 0.923 | STTTS | 0.842 |
| TSTST | 0.926 | TSSSS | 0.659 |
| TSTSS | 0.888 | STTSS | 0.770 |
| TSSTT | 0.967 | STSSS | 0.635 |
| TSSTS | 0.893 | SSTTT | 0.550 |
| TSSST | 0.949 | SSTTS | 0.696 |
| STTST | 0.900 | SSSTT | 0.823 |
| STSTT | 0.948 | SSTSS | 0.650 |
| STSTS | 0.800 | SSSTS | 0.709 |
| STSST | 0.959 | SSSST | 0.831 |
| SSTST | 1.000 | SSSSS | 0.478 |
Table 3: Quantitative results for a deeper hybrids on the TST task. The left architectures contain TST as a sub-architecture, while the other three do not.
performance as the dimension increases and the state expansion factor shrinks.
Because of these different regimes of success for each of the component architectures, the hybrid architectures also have two local maxima in their performance curves. This may indicate that for the hybrids with larger token dimension and smaller window and state-expansion factor, the pure-SSM algorithm is favored. In the other regime with moderate token dimension, the TS architecture likely implements an algorithm not too different to the pure TF one.
D.6 Associative Recall Variants
We have focused on experiments pertaining to (2, 1)-AR as this mirrors a compressed version of multi-document tasks. However, we also want to consider the other variant of associative recall, namely (1, 2)-AR. This task instead has only possible keys instead of , making the key space much easier for an SSM to store.
The results for both are shown in Figure 12. The new variant of associative recall, (1, 2)-AR, shows on average a higher performance, likely due to the decreased size in the key space. However, we also see that the top-performing hybrid layer ordering is different for each task. While both tasks favor low Transformer-to-SSM ratios, (1, 2) recall sees stronger performance with more T-Layers than for (2, 1)-AR.
D.7 Learning Rate Sensitivity
Prior work has established that Mamba has a large learning rate sensitivity on the associative recall task [21]. As a result, we ran learning rate sweeps within our own codebase. The results can be seen in Figure 13. Surprisingly, SSMs showed remarkable resilience to learning rate selection. However, other SSM-heavy architectures did show a very narrow band of learning rates that resulted in the highest performance.
Results for Selective Copying (Equal Memory)

Figure 11: Performance of architectures trained on selective copy. We observe that the ST architecture is largely dominant, as expected.
However, the order of the different architectures’ optimal performances remains mostly intact when selecting a learning rate in the optimal band between and .
E Proving Theorem 1
This section is dedicated to the needed machinery and proofs to prove Theorem 1. We begin with two lemmas from prior work that allow for neighboring layers of the same type to be combined. We then complete proofs for the two parts of Theorem 1: the first focuses on hybrids of the wrong order (Theorem 3, while the second focuses on hybrids of the correct order but with insufficient layers (Theorem 4).
Model Merge. We borrow two lemmas from prior work. These allow neighboring layers of common type to be combined.
Lemma 1 (Lemma 3.5 in [6]). Consider a k-layer model defined that is a composition of state space layers . There is a model that only consists of a single layer SSM, which behaves the same as . In particular, denote the state space of as , , and denote by the state space of as , then .
Architecture sweep of MKAR configs

(a) Architecture sweep for the -AR task.
Architecture sweep of MQAR configs

(b) Architecture sweep for the -AR task.
Figure 12: Token accuracy of TS and ST architectures on (2, 1) associative recall. Small differences in architectures affect performance dramatically.
Lemma 2. Consider a k-layer model defined that is a composition of causal windowed functions . There is a model that only consists of a single layer causal windowed function , which behaves the same as . In particular, denote the window size of as , , and denote by the window size of as , then .
E.1 Wrong use of ordering
We start with the case where a competitive model A does not contain as a subsequence.
Theorem 3. Let and be an arbitrary architecture profile with depth . Let and be an arbitrary fixed constant. There exist constants , , a family of tasks and a family of distributions over a sequence of tokens of length parameterized by , such that for all sufficiently large, the following hold. Let be an architecture profile with . Then for every hybrid model that satisfies , must satisfy or .
To begin with, we present the following model simplification lemma.
Lemma 3. Let be an arbitrary architecture with depth and . Denote by be the complementary of , where . Let such that , then . Furthermore, for , and , there exist a hybrid model in that can represent .
Proof of Lemma 3. Since and is an alternating architecture profile, we consider two cases. In the first case, begins with . We claim that it must be the case where
MKAR ((2,1)-AR): Final Accuracy vs Learning Rate

(a) Sweep for -AR.
Final Accuracy vs Learning Rate

(b) Sweep for -AR.
Figure 13: Learning rate sweep for select architectures trained on associative recall.
, otherwise, . This implies that must be a substring of , starting from the second layer. . In the second case, start with . In this case, , otherwise . So, .
Since , the second part of Lemma 3 follows directly from Lemma 1 and Lemma 2.
Lemma 3 implies that instead of competing with an arbitrary architecture profile, it is sufficient to compete with hybrid models in . A central part of our analysis is to characterize the format and dependence of information through different layers and at different positions.
Before proceeding, we first introduce some notations that we will use in the rest of the analysis to keep track of different types of layers. Let and . Denote by . We introduce indicator and . That is to say, we can write , where mean the corresponding boundary layers are absent. In particular, we have .
We introduce the family of tasks we are considering as well as the format of input.
Definition 5. Let be a finite space of keys, and be a finite space of vocabularies. Let and . Let be an architecture profile with . A level-k recursive chain is defined by a sequence of functions. Specifically, for , , where . Given a sequence of input of length , , where each is a sequence of 0 vectors.
Let . We define position variables in the input sequence . We consider two cases. If , we set , otherwise, we set , and for , , , . Then, , and the other positions of are 0. For the output position, if , we ask the output to be at ; otherwise, does not exist and we ask the output to be as .
The input distribution for that we are considering samples an input sequence by sample and each uniformly and independently from the domains.
We remark that Definition 5 immediately implies the existence of a model in that can efficiently solve the task exactly. To see this, we consider a model with profile , for every , since the window size of a T layer is , we use bits to feed to T, which is enough for it to compute , precisely. This implies that if has size , then the next S-layer can use to feed to the next T and thus it can solve the task exactly. So, in the rest of the analysis we focus on the hardness part.
Given an input sequence , we denote by the intermediate input of and denote by the internal state of after processing position . By Lemma 3, we without loss of generality assume that . Based on the notation of Definition 1, for , we define position . In particular, and . We define the state record at stage with input as
Our first lemma shows that if is fixed, then for every , is only a deterministic function of the parts of the input after .
Lemma 4. Let and be an arbitrary architecture with and depth . Denote by be the complementary of , where . Let be a hybrid model. Let be two sequences of inputs of the level-k recursive chain and let . Suppose that , for every and , then for every and for every , , and for every .
Proof of Lemma 4. We prove the statement by induction. For , we consider two cases. In the first case, , which implies that begins with . In this case, the states of only depend on the past states and input and thus we have for every . In the second case, begins with . By the choice of , for every , , which implies that . The results for the states automatically translate to the results for .
Now suppose the statement holds for . We prove it for the case of . Since the window size of a transformer layer is at most , we know that the input of only depends on positions after when evaluating after . Since for every , , we know that for . On the other hand, since for every , , we know that for every and thus .
Next, we characterize the evolution of when i increases. i.e how the record of the hidden states of each SSM layer changes according to the position.
Lemma 5. Let and be an arbitrary architecture with and depth . Denote by be the complementary of , where . Let be a hybrid model. Let be an input of a level-k recursive chain, realized by . Denote by the prefix . For every and for every such that , there exists a map , , such that and .
In other words, once we have fixed the prefix of the input as well as the value of , there exists maps , that only depends on the compressed information and a map that only depends on the state such that . To simplify the notation, for any fixed and , we denote by .
Proof of Lemma 5. We start by proving the existence of . By Lemma 4, we know that once we fix , for every and for every , the hidden state is only a function of . This implies that the vector only depends on , given the current state .
We next prove the existence of and . We notice that the state is a function of the state and the input context . In particular, if we denote by the transition function of the state of . Then, it holds that for , we have .
By Lemma 4, we know that for , is a function that only depends on . This implies that given , , for only depends on , while the state can depend on the entire prefix . This implies that there exist maps , such that
Based on Lemma 4 and Lemma 5, we now give the construction for the functions that we are using. Our construction follows the following intuition. By Lemma 4 and Lemma 5, conditioned over and , the behavior of the model is a fixed function of . In particular, the total number of such functions can be bounded. Since each is drawn uniformly at random, assuming for the time that the model succeed with a good probability at the next stage only if the true key falls into a small list of candidates of length , we will next show that by carefully choosing the size of , there must be some Boolean function such that no matter which function in the class is chosen, there are also at most possible that makes fall into the list with a good probability. This implies that if we sequentially choose all the based on this, then the model finally will only have a small probability to succeed.
To start with, we first show that for a single step such a function exists. Using a probabilistic construction, we show the following lemma.
Lemma 6. Let be finite sets. Denote by and . Let be a finite set of maps. For , let . For , if
then there exists a map such that for every and every the set
has cardinality at most l
Proof of Lemma 6. Fix . We choose from all possible maps uniformly at random. Since for each , the list has size at most , we have
By taking a union bound over X, we have
Now we take a union bound over , for every fixed we have
Now we consider the probability that a bad event happens over the randomization of the choice of , which means there exists possible values in . Fix a list of value , since the events only depend on the function and are independent, we know that
We now take the union bound of , and all possible tuples , the assumption of Lemma 6 implies that the probability that we choose an that creates some with size more than is strictly less than 1. This implies the existence of that satisfies the statement of Lemma 6.
We next fit Lemma 6 into our framework using Lemma 4 and Lemma 5.
Lemma 7. For , let , , and let . For all sufficiently large , there exist functions such that for every M \in \mathcal{M}_\bar{\alpha}(DB, P, D(W-1)), an arbitrary hybrid model that satisfies and , a constant, the follows hold. Fix a level and , for every such that for all , the set has size at most .
Proof of Lemma 7. We apply Lemma 6 to prove Lemma 7. Let and . Let be the state space of and Define the collection of map . and . We show that these choices of parameters satisfy the assumption of Lemma 6.
We first bound the size of . By Lemma 5, we know that . We count all possible . Since the total number of output bits of is at most , we know that there are at most possible . Similarly, denote by , then the total number of output bits of is and thus there are at most many . Finally, is determined by the state transition function and has at most many possibilities. So the total number of is at most This gives
Next, we upper bound the total number of list functions. For any fix , the number of subsets of with size at most is . This gives the total number list functions is at most . In particular, by taking the logorim, we have
Finally, we verify the assumption of Lemma 6. By taking the logarithm, the left hand side is.
We notice that the negative term is
which dominates the other terms above. Thus, the assumption of Lemma 6 is satisfied.
Now, in the remainder of the proof, we will translate Lemma 7 to the error analysis of a fixed model.
Lemma 8. For , let , , and let . Let be functions chosen from Lemma 7. Let M \in \mathcal{M}_\bar{\alpha}(DB, P, D(W-1)), an arbitrary hybrid model that satisfies and , a constant. For , denote by the prefix and . For , and , there exists sets with size such that for every , implies that .
Proof of Lemma 8. We prove the lemma using a backward induction on . The base case is . Notice that if is given, then the output of is a deterministic function of . We define the list function to be a set that only contains the output of , given . By applying Lemma 7 to , we know that has a size at most . Now fix any such that . By Lemma 4, we know that there exists some such that , where . The assumption that implies that , which implies that .
Now suppose that we have proven this for , we prove this inductively for . For every . We define . By Lemma 7, we know that . Now, let such that . Since , by Markov's inequality we know that and thus . By induction when , we have , which means
Thus, .
We now give the full proof of Theorem 3.
Proof of Theorem 3. By Lemma 3, it suffices to consider a model . Suppose that has error at most over . Then, we have . Since , by Markov's inequality, we know that . By Lemma 8, we know that . In particular, this implies that . However, by Lemma 6, we will show that the choice of must also have . To see this, recall that the set of such that there exists some internal state such that the probability that is more than has a size at most . Denote by this set of keys to be , then we have
where m is large enough.
E.2 Correct ordering but insufficient layers
Theorem 4. Let and be an arbitrary architecture profile with depth . Let . There exists a constant , , a family of task and a family of distributions over a sequence of tokens with length parameterized by , such that for all sufficiently large, the follows hold. Let be an architecture profile with but . Then for every hybrid model that satisfies , must satisfy or . On the other hand, there exists a model that can solve exactly.
The main proof of Theorem 4 will focus on the hardness part. We introduce the following definitions
Definition 6. Let . Let and . For , we use to denote the number of T-layers in that is strictly after the ith S-layer and for , we use to denote the number of S-layers in that is strictly after the ith T-layer. We call the set of architecture profiles
the size-2 cover of .
We first give the following property of the size-2 cover.
Lemma 9. Let and . Let such that , then there exists some such that .
Proof of Lemma 9. Suppose that instead for every , we have . In particular, we have and . This implies that it must be the case that and , . We notice that once , and is fixed, is completely determined. Since for , , we know that . Notice that the total number of such that and , is exactly
implies that at least one of , which implies that and thus some . However, this implies that .
Given Lemma 9, we next provide a reduction showing that it is enough to construct a hard task for every architecture profile in the size-2 cover.
Lemma 10. Let and be an arbitrary architecture profile with depth . Let be a set of architecture profiles such that for . Furthermore, suppose there exists constant and such that for , there exists a family of task , there exists a model that can solve exactly, while every hybrid model that satisfies , must satisfy or , if . Then, there exists a family of task such that for every hybrid model that satisfies , must satisfy or , if and . On the other hand, there exists a model that can solve exactly.
Proof of Lemma 10. We start with the design of the task . Let be the context space and let , where is the length of the input sequence. Let be the distribution of the input sequence for task . We define the distribution over as follows. First, is drawn uniformly. Given , a sequence is drawn and finally the returned sample has has a form , where . And the task is asked to compute , given .
The hardness part follows immediately. Since and some , which implies that fails to solve over with probability , this implies that condition is sampled, there is at least probability that has to be solved and has a failuare probability .
We now design the model that can be used to solve the task . Since the layers we are considering are generalized linear models and non-linear causal window functions, we will just use a selector between layers to select the correct model to use. Specifically, let , where is the th layer of , which can solve exactly. Importantly, since , we know that there exists a strictly increasing map , such that , for . We define the model as follows for the *th layer of , it contains identical map and all types of layers if as blocks and it will select which block to use when read an input . Specifically, when it reads , it will choose to use if and identical map otherwise. By the property of , the model has 0 error over . Importantly, the structure of is defined independent on and only makes uses one of on a single input sequence and thus is in
Based on Lemma 10, it suffices to construct hard tasks for target profiles . In the rest of the proof, we establish Lemma 11.
Lemma 11. Let and be an arbitrary architecture profile with depth . There exists constant and such that for , there exists a family of task , , such that there exists a model that can solve exactly, where , while every hybrid model that satisfies , for some input distribution must satisfy or , if , .
Before presenting the proof, we first state some technical lemmas that will be used for the analysis.
Lemma 12. Let , be two independent vector sampled from for some . Let be an embedding function such that , for some , then for every function , .
Proof of Lemma 12. Write . Let and denote by . Let . For each , define . Notice that . This implies that given , the Bayesian optimal prediction has an error of .
Taking the average over w, we have
Now we take the average over h and get
Lemma 13. Let . Let be drawn uniform at random and independently from and let be drawn uniformly from . Let be a discrete function over that takes at most values, for some . Suppose that for every , there exists a set with size at most . Then we have
Proof of Lemma 13. Notice that
This implies that
Denote the joint random variable . We show that . Define random variable , we have
This gives
Thus, we have , which gives . Since , we get
Lemma 14 (List Decoding for Hadamard Code). Let be an arbitrary Boolean function and let , . Then, .
Proof of Lemma 11. We will break the proof into 4 cases to consider the cases where has the form of , , , , with . Let .
Case 1: In the first case, we consider the case where . Let and let . We design the input distribution as follows. To draw an input from , we first draw , uniform at random independently from and return , where is sequence of 0 of length at least . The task asks to compute . By Lemma 1, we show that a single layer SSM with states can solve this task. In fact, this can be done since bits are enough to memorize , exactly.
We next show that if , then a model from has a bad accuracy unless are large. Since , we know that contains at most SSM layers. On the other hand, since has length at least , we know that if , then the T-layers have no direct access to . This implies that there exist maps and such that , with . Since , Lemma 12, we know that has a success probability at most , when is large enough.
Case 2: In the second case, we consider the case where . Let . We design the input distribution as follows. To draw an input from , we first draw , uniform at random independently from and return , where is sequence of 0 of length (by the choice of , such exists). The task asks to compute . Since a T-layer can be any causal nonlinear function with window size , by Lemma 2, we can design some such that it first move across from and computes .
We next show that if , then a model from has a bad accuracy unless are large. Since , we know that contains at most T-layers, by the choice of , we know that no after , no T layer can reach directly. Since there are at most SSM-layers, this implies that there exist maps and such that , with . Since , Lemma 12, we know that has a success probability at most , when is large enough.
Case 3: In the third case, we consider the case where , with . Let , , and We design the input distribution as follows. To draw an input from , we first draw and uniform at random independently from and draw some from uniform at random. The sampled sequence combines , and with two 0 vectors with different lengths. Specifically, we put at the first positions. We append with a sequence of 0 vectors with length that satisfies and .
We explain the choice of such before proceeding. Notice that the position of is , and if then at the position , a -layer can read input at most from . implies that starting from position no information from is known by . On the other hand, a is able to copy to position . We would like to require a single layer of with window size to see at position , which implies that . i.e. . Notice that . So, such a choice of exists.
Then, after adding to position , we append another with size and append after this .
The existence of a model that can solve the task exactly follows from the construction of . The first layer can move to so that another layer has an exact access to both and , so can write after position . Then, an -layer SSM with space size can memorize and compute .
It remains to show the lower bound part. Let be a model such that . To simplify the terminology, for an S-layer that appears after T-layers, we call it a later S layer, otherwise, we call it an early S-layer. Denote by the set of early S-layers. Let be the set of states of S layers in evaluated before position i.e. before is read. Similarly, denote by the set of late S-layers and let be the set of states of S layers in evaluated before is read.
By the design of , we know that is a deterministic function of , while conditioned on , starting from position , the states of layers in is a deterministic function of . In particular, we know that can take at most values. Similarly, we know that conditioning on , the states of layers in after reading is a deterministic function of . In particular, can take at most values, otherwise, .
Together, this implies that the final output for some deterministic function . Now for and , we denote by
By Lemma 14, we know that . This implies that if we denote by , then we have . We now apply Lemma 13 to and and get . We conclude of the proof of the case by analyzing the probability of failure of . Let be the random variable of . Assume by contradiction that , then we have
This implies that . But , which gives a contradiction. Thus, must have a failure probability .
Case 4: The proof for the case where is more technical than the other three cases. We refer to Lemma 15 for a detailed proof.
Analysis of Case 4: . The case is more technical than the other three cases. We isolate the required construction in the following lemma. For the common constant in Lemma 11, we take to be the minimum of the constants obtained in the four cases. Due to the length and the techniques involved in the proof, in the rest of the section, we will give a brief and compressed version of the proof. We refer the reader to the supplementary materials for a complete rigorous proof.
Lemma 15. Let . There exist constants and such that for every with , there exists a family of tasks with the following properties. There exists a model , where , that solves exactly. On the other hand, if satisfies , then every with error at most on the input distribution must satisfy or .
We first introduce the notation used in the proof. Fix and let . We choose the finite constants used in the induction below first, and then choose sufficiently large depending only on . Set and . We require , so .
For sufficiently large , define , , and . We further put , , , , and . For fixed , with , let . The chain task uses a source vector and independent query blocks .
The proof of Lemma 16 fixes constants , depending only on , and sets . They are chosen so that , every replay cut below lies strictly inside its corresponding query block, and consecutive replay cuts are separated by at least . In particular, we require for .
Define . By taking sufficiently large, for all sufficiently large ,
We call a consecutive block of one or more S-layers a recurrent run. By Lemma 1, a recurrent run may be viewed as one S-layer whose state space is the product of the state spaces of the layers in the run. We next formalize the residual computation obtained after cutting a competing model inside the guard.
Definition 7 (Physical j-stage replay). Fix lookup tables , a stage number , an incoming first-query length , a finite source set , a source variable , and a fixed old context . Let and be the raw query blocks. Write , where .
The replay has exactly these query positions. It first forms a physical token sequence causally from the raw queries, where . Thus may depend on the lookup tables, the old context, and every raw query symbol that has arrived by position , but not on the particular source value . No additional token positions are introduced.
The continuation consists of recurrent runs , separated by T-layers . Every T-layer has window at most every intermediate token belongs to , and, if denotes the state space of , we require .
The first recurrent run may start from an arbitrary post-table state . For , let . Immediately before processes position , its state may be set to , where . Here is one common auxiliary seed independent of and shared by all cuts.
After this initialization, follows its declared S-layer transition and emission rules. In particular, may depend on the source and on every raw query symbol that has arrived by its cut, but not on any symbol after the cut. We denote the output of the final recurrent run at the last physical position by .
The definition provides no additional advice tape: only the original physical positions, one bounded token at each position, and the original raw-input arrival schedule are available.
The main technical ingredient for Case 4 is the following random-chain lemma.
Lemma 16 (Random-chain lemma). There exist a constant and functions and for such that every , is a permutation of , and the following hold simultaneously for every with .
Let be uniform on , and let be independent and uniform on . Define and for . Then:
(i) for all but an fraction of , every fiber of on has cardinality at most ;
(ii) every physical s-stage replay in Definition 7 with , , and full incoming first query satisfies .
The same table realization works uniformly over all eligible source sets F, fixed old contexts, and post-table physical replay maps.
Proof of Lemma 15. Let and be as in Lemma 16. We take and . Recall that and . We construct as the equal mixture of two tagged tasks.
The chain task. Draw and . Define and for . The input is . We call the first zero block the guard and the second zero block the scratch block. The desired output is .
The reach task. Let . Draw independently and uniformly from , and independently draw . Place at the beginning of the sequence and at position , and ask the model to output . We use fixed left padding so that the two branches have the same length and include the branch tag in every token. Let denote the resulting equal mixture.
Completeness. We first show that solves both branches exactly. On the chain branch, write and number the S-layers from bottom to top. The th S-layer copies its input until it reads , stores this coordinate across the guard, releases it at scratch position , and then resumes copying. At each release position, every higher S-layer has already released its own coordinate and acts as a copying layer. Hence, after the S-layers, the scratch block contains in its original order, while the query blocks remain unchanged.
Since , the first T-layer sees inside one window of size and computes . Each later T-layer similarly sees and computes . Thus the final output is .
On the reach branch, all S-layers act as identities. The first T-layers shift the database to the right by positions per layer, and the final T-layer sees the requested entry together with and outputs . The counters, position/type tags, release modes, and branch tag require only bits, which are absorbed into .
Guard reduction. Consider any prefix of a competing architecture containing S-layers. Place a cut immediately after the source vector . When crossing an S-layer, record its state at the current cut. When crossing an T-layer, move the cut to the right by at most positions. Since the architecture has depth at most and , every such cut remains inside the guard.
Consequently, all recorded S-states depend only on . Their tuple defines a map with . For , let . After fixing , replaying the prefix from the recorded states shows that every prefix-output token on the original scratch and query positions is a common causal function of the raw query symbols that have arrived by that position, independent of the particular .
Fix with and . We distinguish three cases.
Case 1: A contains fewer than s T-layers. We use the reach task. Starting from the final query position and tracing the dependence cone backward, every T-layer moves the cut to the left by at most w, while every S-layer contributes only its state across the cut. Since there are at most s - 1 T-layers,
Hence the backward dependence cone does not reach the database positions.
The final prediction is therefore a function of and a message containing at most bits. By independence and entropy subadditivity, . The standard error-indicator/Fano estimate gives . Thus the reach-task success is .
Case 2: A contains at least T-layers but fewer than S-layers. Apply the guard reduction to the entire model. There are at most source fibers. By the definition of , the total source mass in fibers of size less than is at most . Partition every remaining fiber into chunks satisfying .
Fix one such chunk. Conditional on and on the query blocks, the output of the competing model is independent of the particular choice of . By Lemma 16(i), outside an fraction of first-query blocks, every fiber of on has size at most . Since every later is a permutation, the same bound holds for . Therefore,
Adding the discarded source mass gives chain-task success .
Case 3: A contains at least S-layers and at least T-layers. Cut immediately before its th S-layer. The strict prefix contains exactly S-layers. By the guard reduction, after discarding the same negligible small-fiber mass and fixing a retained source chunk , the prefix outputs on the original scratch and query positions are common causal functions of the arrived raw query symbols and are independent of the particular source .
Write the residual profile as , where and . Since avoids , we have . Moreover, since contains at least T-layers and has depth at most , the number satisfies .
Merge every nonempty recurrent run into one product-state S-layer. Insert identity T-layers until there are exactly T-layers, and insert a copying S-layer into every empty recurrent slot. A copying S-layer uses at most states. Since at most such layers are inserted,
The padded displayed profile need not itself have depth at most D. The original depth bound has already been used in the guard reduction, while Definition 7 only requires the recurrent-state product bound together with the original token and window bounds.
It remains to verify that the padded residual is a physical s-stage replay. Put the actual state of the first residual recurrent run immediately before the first query position into . Its input tokens on the original query positions are the source-independent causal tokens provided by the guard reduction. If , this already gives the one-stage replay.
Suppose . Let and . The parameter choices give . Thus, for every payload-relative position , the local window immediately before the second recurrent run starts at . Hence this window uses only outputs produced on query positions and cannot reach the guard or scratch block. All earlier source-dependent effects are therefore contained in the actual state of the second recurrent run at , which is a legal granted state in Definition 7.
Every later prescribed cut is separated from the previous one by at least w. The same argument therefore iterates. Each relevant local window lies entirely after the preceding cut, and every earlier source-dependent effect is contained in the actual state of the next recurrent run. Each such state depends only on , the common latent old-source information, and the raw query prefix already available at its cut. Thus the padded residual is a physical s-stage replay with full incoming first query .
Lemma 16(ii) gives chain-task success on every retained source chunk.
Conclusion. Every profile avoiding falls into one of the three cases above. In Case 1 its reach-task success is , while in Cases 2–3 its chain-task success is . We make no claim on the other branch and upper bound its success by one. Hence the total success is at most , and the error is at least for sufficiently large . For an input-independently randomized model, fix its random seed, apply the deterministic bound, and average over the seed.
Proof of Lemma 16. We use the probabilistic method. Sample by choosing all of its entries independently and uniformly from . Independently, for every and every , sample uniformly from the permutations of . We show that with positive probability the sampled tables satisfy all required properties simultaneously.
First-table occupancy and balance. Fix an eligible source set with and a first-query column . Independence of the entries of gives
Concentration over the independent columns and a union bound over all eligible source sets show that, simultaneously for every , at most an fraction of first-query columns violate the occupancy bound. This proves part (i).
We also use the following simultaneous balance event. Suppose a cut at position leaves a positive linear suffix of the first query unseen. Let have range at most , and let be a source-independent label with for some fixed . Under the original independent uniform law of and , the average conditional law of given has total variation distance at most from Unif([K]).
For fixed and , the expected total variation distance over is at most . A bounded-differences estimate is strong enough to union bound over all eligible source sets, early-state maps, and source-independent labels used below. The same argument applies when the first table is a random permutation table. For an incoming first-query length , the complete label at level will have rate strictly below , whereas the shortest incoming query has entropy . All balance estimates are taken under the original input law, before conditioning on a successful group or selecting a representative.
The mutual induction. Fix a sufficiently large constant depending only on . For every , we prove simultaneously a program-hardness statement and a prefix-capture statement .
The statement is as follows. The initial live key is uniform on and independent of the raw queries. The computation is a physical -stage replay whose first query has length , followed by fresh -symbol query blocks, and whose target is the corresponding -fold random-permutation composition. Its success probability is at most for some constant . The same bound holds for every incoming first-query length , after shifting all later absolute cuts by .
The companion statement makes the capture property precise. Consider any legal continuation arising in the induction for which the source is uniform on a set of size at least and the current live-key map has occupancy at most . Fix any source-independent old context, but leave the bounded source-dependent ancestor-state row unconditioned under the source law. At the prescribed cut, let be the arrived prefix of the first unresolved raw query and let denote the corresponding source-independent old physical word. Then there exists a source-independent list map such that for every realized , and
Here Succ is the branch-masked success event of the continuation. The source, context, and ancestor-history families that arise in the induction have cardinality at most , so all events above can be required simultaneously.
The constants are chosen in the noncircular order , , , , . At level , the finite training-tree size and error thresholds are first chosen from lower-stage rates. We then choose larger than the total rate of the complete source-independent label needed to prove , and afterward choose larger than the new capture-certificate rate. Since is fixed, is chosen last so that every cut, entropy, occupancy, and moment inequality has positive slack.
Base case. The base case is the single-run random-permutation bound. Fix the initial-state map, transition and emission rules, and output map of one recurrent run. For a fixed query column, every source-independent physical encoding produces one of at most physical words.
Let and . For a fixed physical word, correctness on distinct keys forces prescribed distinct constraints on a uniform random permutation. Hence
Thus one query column is bad for a fixed machine template with probability at most .
The query columns are independent. For a sufficiently large fixed polynomial in m,
Choosing the degree of sufficiently large makes the union bound over all machine templates valid, while . This proves , uniformly over the permitted incoming lengths and fixed-prefix slices. The same independent-column argument after separating heavy and diffuse prefix atoms proves .
The capture step. Assume that all lower statements have been proved. We use the following certificate estimate, which is the only property of the analytical training tree needed below.
After applying the lower capture statements from the leaves upward, normalize every later unresolved raw prefix by its capture-list rank, inverse rank, and the finite branch information needed to identify the corresponding fixed-prefix slice. Suppose the remaining unresolved prefix distribution has every atom of mass at most 1/N. If the current continuation has success mass p, then for some ,
Here , , and are . The quantity counts the normalized certificates consisting of the lower capture-list ranks, inverse-context ranks, branch indices, and the finite training fingerprint.
To see the estimate, sample independent analytical training branches. Outside the bad and collision events, every joint success determines one of the normalized certificates. The representative attached to a certificate is tested only on its own arrived raw prefixes and on legal causal frontier states. In particular, the validity test is performed before representatives are grouped. After a certificate is fixed, a diffuse unresolved prefix contributes mass at most . Summing over the certificates gives the displayed bound. This is also why replacing a representative inside a normalized group never tests it against a foreign raw-prefix assignment.
We now prove . At each source-independent old context, place every arrived-prefix value whose posterior mass exceeds into the capture list. There are fewer than such values. Restrict the remaining source measure to the other values without renormalizing. Every remaining atom then has mass at most for . Choose . The certificate term satisfies
The certificate estimate shows that the successful mass remaining outside the capture list is at most after decreasing if necessary. This proves .
Closing the program bound. We next prove . Fix an incoming first-query length . Write the second query as , where and . Let be the first replay cut and put . The parameter choices give , so a positive linear suffix of remains unseen at the balance cut.
Let . This old physical word may depend on the complete first query and on the arrived second-query prefix , but not on the source or on the remaining raw future.
Apply at this cut, leaving the bounded ancestor-state row unconditioned under the source law. For each , let be its captured-prefix list. Put and . For each , define . Double counting gives . Hence, for every cutoff , .
All label fields other than the inverse-context rank have rates already fixed by lower stages. We choose and then so that the exceptional prefix mass is and the rank of inside , together with the normalized training fingerprint and all previously fixed alignment ranks, gives a complete source-independent label satisfying for some . A sentinel is used on excluded inputs. The branch and training indices are fixed on the current slice and suppressed from the notation.
For each label, choose one full first-query representative from its group. The representative is analytical lookup data indexed by the label; its raw coordinates are not another field of the label. Let be the state of the preceding recurrent run at the balance cut. For a fixed label value , early row , and live key , let be the maximum fresh branch-masked continuation success of the selected representative over all legal causal choices of the current frontier state and all later frontier policies.
The normalization procedure retains a successful training sample only when its own representative has fresh continuation value greater than a fixed . Samples failing this test are included in . Thus every retained successful sample with label , row , and live key satisfies .
For each fixed and every k, choose one deterministic maximizing legal causal policy. Each chosen frontier state depends only on the raw history available at its own cut. Therefore these keywise choices paste into one legal lower-stage physical continuation on the same positions; no choice depends on an unseen raw suffix.
For a fixed analytical training tree, let under the original source and query law, and let be the retained training-success mass. The pointwise own-source test, the simultaneous balance event, and give
Indeed, the first inequality follows pointwise. For the second, apply the balance estimate once to the complete label e and early row . After replacing the conditional live-key law by uniform, the pasted optimizing policy is one admissible lower-stage physical replay, so applies.
Averaging over the analytical training tree and combining this estimate with the certificate bound gives
All expectations over the old source and first query retain their original weights. Excluded inputs are represented by the sentinel or by validity indicators, and the balance estimate is applied before averaging over fixed-prefix slices.
The recursive parameter choice leaves a positive exponent after taking the th root, and hence proves . Notice that the argument uses the optimizing causal frontier policy only as an analytical upper bound; we do not assert that the competing model's actual future frontier states have the same fresh continuation success.
Returning to the iid first stage. Fix an eligible source chunk with . By part (i), outside an fraction of first-query columns, the map on has occupancy at most . Every later permutation preserves this occupancy, and the bad-column mass is charged under the original first-query law.
Repeat the certificate construction with full incoming first-query length . Fix the arrived second-query prefix , the inverse-branch indices, and the analytical training tree. On this slice, the complete source-independent label has the form and depends only on the first query.
Write and let be the remaining fresh raw future. The only change from the permutation-first-stage argument is the first balance step, where we use the simultaneous iid first-table balance event proved above.
Conditional on the first live key , the complete label, and the early row, all old variables have a joint conditional law independent of Y. This conditional law can be represented using the common auxiliary seed allowed in Definition 7. For fixed label and early row, the representative's physical token sequence and replay rules are fixed. Any remaining old-variable dependence can therefore affect only the permitted frontier states, and each such state depends only on the raw prefix available at its own cut. Thus the continuation remains in the physical replay class.
Applying the optimized crossed-certificate argument on every fixed-prefix slice and then averaging under the original prefix distribution gives . For , the iid-column single-run factorial argument applies directly.
All occupancy, balance, capture, and program events above are simultaneous before the source chunk and the post-table continuation are selected. Their intersection therefore has positive probability. Fixing one lookup-table realization in this intersection proves the lemma.
Now we are able to give the proof of Theorem 4. Theorem 4 follows immediately from Lemma 10, Lemma 9 and Lemma 11.
Proof of Theorem 4. Let be size-2 cover of the target profile . By Lemma 11, for every profile , there exists a family of task , such that there exists a model that can solve exactly, where , while every hybrid model that satisfies , for some input distribution must satisfy or , if , . By Lemma 10, by combining the mixture of these tasks, we obtain a single family of tasks such that for every hybrid model that satisfies , must satisfy or , if and , . On the other hand, there exists a model that can solve exactly. Finally, by Lemma 9, if , then there must be some such that , which completes the proof of Theorem 4.
E.3 Proof of Theorem 1
Given Theorem 3 and Theorem 4, the proof of Theorem 1 is almost immediate.
Proof of Theorem 1. Let . Let be the task family constructed in Theorem 3 for the wrong-order case, with input distribution , and let be the task family constructed in Theorem 4 for the insufficient-profile case, with input distribution . That common constant factor can be selected so that Theorem 3 and Theorem 4 still hold.
We combine the two task families into a single task family . Sample uniformly from . Conditioned on , sample an input from and ask the model to compute ; conditioned on , sample an input from and ask the model to compute . We include as an additional tag in every input token and pad the two types of inputs to the same sequence length. Denote the resulting input distribution by .
By the completeness constructions of Theorems 3 and 4, both component tasks can be solved exactly by models with profile . Using the tag to select between the corresponding layer maps, as in the selector construction in Lemma 10, we obtain a single model . that solves exactly. After increasing the constant if necessary, , . Moreover, taking the union of the two vocabularies and padding the inputs preserves , .
It remains to prove soundness. Fix an architecture profile such that , and let satisfy . Let and denote the conditional errors of conditioned on and , respectively. Since is uniform,
Therefore, .
We now distinguish two cases.
Case 1: . Since , Theorem 3 applies to the wrong-order component and gives
Case 2: . Since by assumption, we have and . Thus is in the insufficient-profile case. Since , Theorem 4 applies to the insufficient-profile component and gives
The two cases are exhaustive, since either or . This proves both soundness statements and completes the proof.
F Omitted Details in Section 2.2
We provide proofs to various theorems in the main body. We first prove the core hardness result for tasks with a dominant TS architecture. We then look specifically at the two tasks, segmented retrieval and exact copy, showing that these tasks are indeed in this family of tasks. Lastly, we provide constructions for these two tasks that use less window and state-size than what is provably required for ST architectures.
F.1 Hardness Results
We begin with the core assumption for all tasks with a TS dominant architecture before quickly following with the statement and proof of the SSM TF theorem. After establishing this result, we show the specific bounds for exact copy and segmented retrieval, where the majority of the proofs come from defining the hard data distribution and cut position .
Assumption 1. Let be a sequence map from to . We assume satisfies the following property: there exists an index , a set of prefixes , and a set of suffixes such that the map defined as
is an injection. We call the cut.
Theorem 5 (SSM → TF Cut, Restated). Consider any function that satisfies Assumption 1. Let be a model of architecture ST modeling with state and window . Suppose that the cut position is bounded as . If computes correctly on all the inputs, then .
Proof. Let denote the state at position . Let be prefixes such that . Since the SSM is deterministic, at time , the SSM states remain identical, i.e.
and the SSM layer outputs are the same.
Since the TF layer can only access the tokens from position to , and , we have that the model outputs are also the same, i.e.
Now assume computes correctly on all inputs and the map of a set of prefixes is injective (Assumption 1). If two prefixes outputs the same state at the cut position , then by the theorem we have
which immediately shows that . Since the map is injective, we have , which contradicts the assumption that . Therefore, the map
must be injective, which implies that .
Theorem 6 (Exact Copy Lower Bound). Set , , and define . If a deterministic hybrid model ST performs the Exact Copy task correctly on all inputs, then .
Proof. We use the notation of juxtaposition to mean sequence concatenation. For example, for any two finite sequences
we write
The result follows immediately if . Thus, we will assume .
We first pick two distinct elements , and set . Since , we have , thus we may pick another element . For each , we define the prefix map by
We also define
where the alternating concatenation is truncated after its first entries. We refer to as the failure segment. By construction, every symbol in differs from the symbol positions later whenever both are defined.
For each , we define the suffix map by
We define to be the function
For some fixed , then it is clear that the sequence
contains an exact copy, i.e. .
For any such that , then
For , define
By the definition of Exact Copy,
We now show that , which implies this sequence contains no exact copy.
Define , we now determine . For , we have , , and hence . For , both and are equal to . Moreover, for , the positions and correspond to the same position in two consecutive copies of , and therefore .
On the other hand, for every remaining with , we have . Indeed, if lies in the last copy of , then while ; if lies in the failure segment , then by the construction of .
Therefore,
In particular, .
Since , there exists some such that . Hence . Thus does not contain all integers in . Since , it cannot contain consecutive integers, i.e. . By equation 1, .
Therefore, we have that
Define following the setting of Theorem 2. Notice that the map is injective, since contains ; and is also injective on because is a one-hot vector at the position in the sequence for each input:
where the slot with value 1 corresponds to the position
By Theorem 2, if M computes f correctly on all inputs, then
Therefore,
49
☐
For the corollary, if and , then , Thus and
Theorem 7 (Segmented Retrieval Lower Bound). Set and , and . Then any deterministic hybrid model of architecture ST that performs the Segmented Retrieval task correctly on all inputs must satisfy .
Proof. For the bound is vacuous, so we assume .
Define the prefix map by
Since , can be a candidate for the cut position . Therefore, adversarially, we set . We fix a position that serves as the query position for the segmented retrieval; that is to say, for each , we set the suffix map as
Therefore, the Online Segmented Retrieval task for is to output .
Pick such that , and let be the index such that . Fix . We construct two input sequences and . Assign an arbitrary deterministic hybrid model of architecture ST to the task of Segmented Retrieval. Then
Therefore, we must have . Otherwise, by Theorem 2, we have , which contradicts . Hence, we conclude the map
is injective, and thus implies
For the corollary, if and , then , hence . Thus,
F.2 Constructions
Construction for Exact Copy
We first outline the high-level idea behind the construction. At each position t, we want to examine whether this position can be an ending position of the desired exact copy. This task comes down to finding the number of equalities up to each position t. Let the number of consecutive equalities up to each position t be
Exact Copy

Figure 14: Structure of Exact Copy. At each position , the TF layer retrieves . The first SSM layer counts consecutive matches in , while the second sets once and retains this value thereafter. Here, repeats three times consecutively, giving and despite subsequent mismatches.
denoted by . The SSM layer is set to calculate . In other words, if the current position satisfies , then we add 1 to the counter so ; otherwise, we reset the counter. The Transformer layer first extracts at each position . Lastly, we need another SSM layer to check if , that is, we need SSM to output . Since for any two variables we have that , it follows that
We now present the detailed hybrid model construction.
Theorem 8 (Exact Copy Construction). There exists a model of architecture TSS with window and state that performs Exact Copy (Definition 3).
Proof. We provide the various components of the TS architecture in distinct sections.
Token Embeddings. We define to be the binary encoding of the vocabulary in .
Positional Encoding. We define as the binary encoding of numbers in . Af-ter adding the positional encoding, the input context has the following form:
Transformer Layer. As outlined in the high-level idea above, we need to extract the token at each position . The required sliding window size is . We add a positional bias into the attention:
where . That is, we set and . Therefore, the output of the transformer layer is as follows:
Here we set that , .
SSM Layers. As outlined in the high-level idea of the SSM layer construction, we need two SSM layers to solve the task. Moreover, the first SSM layer is a two-gated SSM layer. The update rule becomes:
where is a scalar depending on but different from .
We denote the number of consecutive equalities up to position as . Rigorously, .
For the first SSM layer, our goal is , whence we assign
Therefore, the output of the first SSM layer is as follows.
The second SSM layer uses the standard update rule, i.e. . As outlined in the high-level idea, the second layer is designed to compute
This final expression is attained with the following weights for the second SSM:
□
Construction for Segmented Retrieval
We first outline the high-level idea behind the construction.
To solve the Segmented Retrieval task, we can first use a Transformer layer to extract the token at each position by adding a positional bias . Then, at each position , we need to check if and are both true. If both conditions are satisfied, then we set the SSM state as ; otherwise, , maintaining the previous state. This can be achieved through a standard SSM layer, as we set
Theorem 9 (Segmented Retrieval Construction). There exists a model of architecture TS with window and state that performs Segmented Retrieval (Definition 4).
Proof. We provide the various components of the TS architecture in distinct sections.
Token Embeddings. We define to be the binary encoding of the vocabulary in .
Segmented Retrieval

Figure 15: Structure of Segmented Retrieval. At each internal boundary , the TF layer retrieves . The SSM layer retains the most recent retrieved token belonging to and outputs it at position . Here, the retrieved tokens are , so the output is .
Positional Encoding. We define as the binary encoding of numbers in . After adding the positional encoding, the input context has the following form:
Transformer Layer. As outlined in the high-level idea above, we need to extract the token at each position , from which the sliding window size is , and we add the positional bias into the attention:
where . That is to say we set and . Therefore, the output of the transformer layer is as follows.
Here we set that , .
SSM Layer. As outlined in the high-level idea of the SSM layer construction, we only need one SSM layer to solve the task. At each position , we denote the largest index of the set as , and define . Then, as stated in the high-level idea, the update rule for is
This is achieved by setting
☐
F.3 SSMs with a Convolutional Front-End
A Mamba block applies a causal depthwise convolution before its selective SSM. Each such layer can therefore read a few recent inputs directly, in addition to its recurrent state. This subsection makes the local access explicit, relates it to the S-layers of Section 2, and quantifies its effect on the lower bounds of Section 2.2.
Definition 8 (S -layer). Let . A layer is an S -layer with recurrent state space if there exist an initial state and maps and such that
where for is a fixed padding symbol whose encoding differs from that of every token. We call the local window and the recurrent-state complexity; the local window is not charged to .
Mamba. With finite-precision arithmetic, a Mamba block (input projection, causal depthwise convolution of width , selective SSM, gating, output projection, and residual connection) is an -layer with , whose recurrent state is the SSM state: both the state update and the output at position depend only on the previous state and on . Lower bounds for -layers therefore apply to Mamba. The converse does not hold. Since and are arbitrary, a construction in the class does not by itself yield parameters of a Mamba block.
Relation to the S-layers of Section 2. An S-layer of Section 2 is an -layer with the same state space (take ), and every -layer is an -layer with the same state space. The converse fails at equal budget, because may read the current input. For instance, with and , an -layer computes the identity with zero recurrent bits, whereas an S-layer of Section 2 needs bits of state to do so. Two facts relate the classes.
(i) Simulation. An -layer with recurrent state space is an S-layer of Section 2 with state space : store , update the window as a shift register, and set . Its bit complexity is at most .
(ii) Configuration at a cut. For every , the pair , of at most bits, determines for all given . This is the case of Lemma 17 below.
By (ii), the proof of Theorem 2 applies to T models with in place of . Thus, Theorems 6 and 7 continue to hold with in place of . By (i) applied layerwise, a hybrid model with profile A whose recurrent layers are -layers with at most B recurrent bits is a model in in the sense of Section 2. Since
the conclusion of part 2 of Theorem 1 continues to hold for such models, with in place of . The constructions need no change, because every S-layer is an -layer. The constant-factor separation in part 3 of Theorem 1 does not follow from this conversion.
For the natural tasks of Section 2.2, charging the window to the state is unnecessary. The following lemma and proposition show that each -layer reduces the lower bounds by at most tokens, and that the resulting threshold on the task distance is tight within the abstraction.
Lemma 17 (Cut through a convolutional stack). Let , where each is an -layer with recurrent state space and states , and T is a T-layer with window ; write for the output at position . Let and for . Let be prefixes of length that agree on positions and satisfy for all . Then for every suffix of length .
Proof. Write and , and compare the inputs and . We show by induction on that and coincide on the two inputs for all . For and , the window starts at position , so it lies in the common part of the prefixes or in the common suffix. Together with , induction on gives the claim. For and , the window starts at position , where the two inputs agree by the induction hypothesis. Together with , the claim follows as before. Finally, , and T reads only positions , all larger than . Hence the outputs coincide.
Theorem 10 (Natural tasks with convolutional recurrent layers). Let , let be as in Theorem 6 (resp. Theorem 7), and set
(a) Under the assumptions of Theorem 6 (resp. Theorem 7), every deterministic model M as in Lemma 17 that performs Exact Copy (resp. Segmented Retrieval) correctly on all inputs satisfies
(resp. the same with in place of ).
(b) Conversely, suppose (resp. ) and . Then there is a model as in Lemma 17, with the identity ( ), in which have a single recurrent state and has (resp. ) recurrent bits, that performs Exact Copy (resp. Segmented Retrieval) correctly on all inputs.
In particular, with (so that , resp. ), the bound in (a) is nonzero exactly when the task distance exceeds , and otherwise (b) gives a solution with small recurrent state.
Proof. (a). If there is nothing to prove, so assume . Then , and we use the cut , which satisfies by the definition of . By Lemma 17, if a family of prefixes of length shares its last positions and any two of its members are mapped to different outputs by some common suffix, then the map is injective on the family. Its image has at most elements, so it suffices to exhibit such a family of size (resp. ).
For Exact Copy, let and be as in the proof of Theorem 6, and write . For , use the prefix and the suffix . For , the resulting input is
which is the input analysed in the proof of Theorem 6 with replaced by . It therefore contains an exact copy if and only if .
For Segmented Retrieval, fix and use, for , the prefix
For , append the suffix from the proof of Theorem 7. Its only internal boundary is at position , the segment-length conditions of Definition 4 hold because and , and the required output is . Two distinct prefixes differ at some , and separates them.
(b). Encode each position by its token (or ♢) and, for Segmented Retrieval, its boundary bit; two such encodings fit in bits. Let and , where (resp. ) is the task distance. For , let have a single recurrent state and output , with ♢ for nonpositive indices. This is possible because reads directly (), and for the window of contains , whose first entry is , and , whose second entry is , since . Because , we have , so the window of contains both and (for , directly from ).
For Exact Copy, keeps and , and outputs . Since differs from every token, can hold only for . By Definition 3, an exact copy exists if and only if for consecutive positions . So is correct, and states suffice. For Segmented Retrieval, stores the last value read at a boundary position , or before the first such value, and outputs it. This uses states, and the value stored at position is .