Organizations: University of Galway · Research Ireland – D-REAL · Université Laval (IID) · Canada–CIFAR AI Chair · Mila – Québec AI Institute · PASA Lab – University of California, Merced
We show that the Transformer's recurrent successors --- such as selective state-space models (SSMs), Receptance Weighted Key Value (RWKV), and Retentive Network (RetNet) --- can be characterized as infinite-impulse-response (IIR) systems. The zero--pole geometries of these IIR systems characterize the temporal modes they can represent. However, to trade parallelism, the algebraic structures of the parameterizations of these recurrent systems often give rise to poles constrained to the real axis, thereby inducing an architectural bias in their recurrent dynamics. To unify these recurrent architectures and eliminate their pole geometry bias, inspired by the lattice--ladder realization of general IIR systems, we present Mira (Modal IIR Recurrent Architecture), a unified family of linear-time recurrent architectures for building large language models (LLMs) with a highly parallel algebraic structure. Each Mira block realizes a higher-order IIR system that represents temporal modes from token streams through a lattice--ladder structure, followed by a feed-forward network (FFN). This realization enables the model to represent the temporal modes associated with both real and complex-conjugate poles. We pretrain Mira-S, a 12-layer small-scale LLM with 0.14B parameters composed entirely of Mira blocks. Throughout the pretraining, Mira-S achieves lower perplexity than strong recurrent baselines, exhibits stronger context-window generalization beyond the training length, and attains higher throughput with a dedicated CUDA kernel.
Figures & tables
Method
A(z)
B(z)
Zeroes
Poles
SDPA ( Vaswani et al., 2017 )
τ=0∑T−1αt,τz−τ
1
Complex
–
Selective SSM (Mamba-1, S6) ( Gu and Dao, 2024 )
Cadj(I−Az−1)B+Ddet(I−Az−1)
det(I−Az−1)
Complex
Real (0,1)
RWKV (v4–v6) ( Peng et al., 2023 )
1
I−Wz−1
–
Real (0,1)
RetNet (v1) ( Sun et al., 2023 )
1
1−γz−1
–
Real [0.968,1)
HGRN2 (v2) ( Qin et al., 2024 )
Bt
I−Gtz−1
–
Real (0.125,1)
Hyena (v1) ( Poli et al., 2023 )
τ=0∑T−1hτz−τ
1
Complex
–
Table 1: Transfer-Function Characterization. A(z) and B(z) denote the numerator (FIR) and denominator (IIR) polynomials of the transfer function H(z)=A(z)/B(z) . The transfer functions are input-dependent. The roots of A(z)=0 are the zeros and the roots of B(z)=0 are the poles . We also verify the derived transfer functions numerically, comparing the sequence each predicts against the measured output of its recurrence, with a maximum discrepancy of 3.6×10−12 ; the pole ranges are verified formally, in Lean 4 ( Moura and Ullrich, 2021 ) and Z3 ( De Moura and Bjørner, 2008 ) .
Figure 1: Provable Failure of Causal Mode Retrieval. We synthesize 4 -dimensional continuous input tokens x1:200 and target tokens y1:200 of a length 200 . The ground-truth transfer function contains poles that are not on the real axis. We use parameter-matched single-layer models trained to predict next-token yt+1 from input sequence x1:t by using MSE (mean squared error) loss. Each model is optimized for 1000 steps using AdamW ( Loshchilov and Hutter, 2019 ) with a learning rate of 10−2 . Left: synthetic temporal signals of length 200. Middle: pole geometries of Mira , Mamba-S6, RWKV-7, and SDPA. Right: next-token prediction error with logarithmic scale. The results show that Mira admits complex poles and more accurately retrieves the temporal modes associated with complex poles. The provable failure signal synthesis is provided in Appendix A.6 .
Figure 2: Mira Block & Reference LLM. The diagram illustrates lattice circuit at stage k (top left), an order- K lattice module (bottom left), a Mira block (top right), and a reference implementation of the Mira LLM composed entirely of Mira blocks (bottom right). In the order- K lattice module, a rank-one signal mixer forms the input representations through channel-wise signal mixing, the dynamical-modulation signal modulates the lattice–ladder dynamics, the lattice module implements the order- K lattice dynamics, and the ladder readout produces the output representations.
Figure 3: Algebraic Structure of the Lattice Realization. Each node (k,t) represents the recursive state transition (Ut(k),Vt−1(k−1))↦(Ut(k−1),Vt(k)) at lattice stage k∈{K,…,1} and token position t∈{1,…,T} , with edges encoding dependencies on (k+1,t) and (k−1,t−1) .
Figure 4: Effects of Lattice Order K , State-Write Bottleneck Size dr , and Memory Size dm . Using Mira-XS (65M), we independently vary the lattice order K∈{1,2,4,8} , state-write bottleneck size dr∈{d/64,d/32,d/16,d/8} , and memory size dm∈{8,16,32,64} . We match model sizes by varying only the model width d and pretrain each model for 10,000 steps on FineWeb-Edu using AdamW . The results show that models admitting complex-conjugate poles ( K>1 ) achieve lower perplexity than the model with real poles ( K=1 ). Among the evaluated state-write bottleneck sizes, dr=d/8 yields the lowest perplexity. Perplexity generally decreases as dm increases, reaching its lowest value at dm=64 .
Figure 5: Performance of Dedicated CUDA Kernel. We compare Mira module with parameter-matched baseline modules on an NVIDIA RTX A6000 GPU. Execution time: at a context length of 32K , Mira completes a forward pass in 11.37 ms, yielding speedups of 4.13× , 1.32× , 2.15× , and 2.85× over MHA (Multi-Head Attention) with FlashAttention, Mamba (S6), RWKV-6, and RWKV-7, respectively (left). Throughput: At the same context length, Mira reaches 8.36 million tokens per second, exceeding the throughput of the respective baselines by factors of 6.41× , 2.20× , 1.02× , and 1.28× (right).
Model
Size (M)
State (‰)
FineWeb-Edu
WikiText-103
HellaSwag
512
32K
512
32K
512
32K
Loss
PPL
Acc (%)
Loss
PPL
Acc (%)
Loss
PPL
Acc (%)
Loss
PPL
Acc (%)
Loss
PPL
Acc (%)
Loss
PPL
Acc (%)
Transformer (MHA)
142.52
0.000
3.400
29.96
35.31
7.317
1.51×103
4.58
3.468
32.08
36.01
7.136
1.26×103
6.25
3.434
31.00
38.39
7.134
1.25×103
1.43
RWKV-6
144.64
4.418
3.465
31.97
34.52
3.752
42.59
20.18
3.525
33.94
35.10
3.764
43.12
21.77
3.523
33.88
35.47
3.814
45.34
19.21
RWKV-7
142.66
3.634
3.485
32.63
34.26
3.423
30.65
34.47
3.587
36.12
34.58
3.519
33.75
34.16
3.644
38.23
35.11
3.544
34.59
34.94
Mamba-1
148.73
2.107
3.582
35.93
33.70
50.092
5.68×1021
1.31
3.566
35.36
34.62
52.096
4.22×1022
1.02
3.680
39.63
34.05
46.162
1.12×1020
1.02
Table 2: Benchmark Performance. Validation loss, perplexity (PPL) and next-token accuracy at context lengths of 512 and 32,768 tokens. The training context window is 512 tokens. FineWeb-Edu is scored on the held-out last 5% of the corpus; WikiText-103 and HellaSwag on their test splits. State denotes the ratio of the total recurrent state size across all layers to the model parameter count, expressed in parts per thousand.
Figure 6: Context-Window Generalization. We evaluate the context-window generalization for the pretrained Mira on a holdout set of FineWeb-Edu , WikiText-103 , and HellaSwag , respectively. The dotted vertical line marks the training context length. Mira attains the lowest perplexity among the recurrent baselines and matches or improves on the MHA reference.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7: Dynamics of Pretraining Benchmark. We implement a small-scale reference LLM composed entirely of Mira blocks, denoted as Mira-S . Pretraining results show that Mira-S achieves the lowest perplexity among strong recurrent language model baselines and Transformer-based MHA, while attaining higher token-prediction accuracy than the recurrent baselines and comparable token-prediction accuracy to MHA.
Figure 8: Final-Stage Dynamics of the Pretraining Benchmark. Training loss over the final stage of pretraining for Mira-S and the baseline models.
Figure 9: Zero-Shot & Few-Shot Prompting.
Figure 10: ARC Reasoning with Zero-Shot & Few-Shot Prompting.
Width 816; FFN width 2891; inner width 1632; state dimension 128; 12 heads; head dimension 136; convolution width 4; one group
148,413,972
2,506,752
0.016890
Appendix
Table 3: Benchmark configurations. All models use 12 layers, a vocabulary of 50,259 tokens, tied input and output embeddings, and a training context window of 512 tokens. Parameter size counts all trainable parameters. State size counts recurrent-state elements per sequence across all layers, excluding convolution buffers; for the Transformer, it counts key–value cache elements at 512 tokens. The state-to-parameter ratio is the state size divided by the parameter size.
Figure 22: Chunk summarization (i), boundary composition (ii) and chunk replay (iii) for one stream, read from the bottom up: T tokens in chunks of L=2 tokens, and P≤32 threads of two chunks each (threads 4 to P−1 not drawn). A box holds the pair (Φs→t,Ss→t) of equation ( 5 ); two adjacent pairs compose by equation ( 4 ). In the successive scan steps, a thread composes its pair with that of the thread 1,2,…,P/2 positions to its left (dashed). For P>32 , the steps run within each warp of 32 threads, and each thread also composes the pair of every earlier warp.