betaFeedback

WorksComputer Science

Symmetry in Time: A Representation Theory of Linear Recurrent Memory

Abstract

State space models (SSMs) are an emerging alternative to Transformers. SSMs offer linear-time inference and parallel training, but most implementations make the parallel scan efficient by making the recurrence diagonal: each channel of the hidden state is multiplied by an input-dependent real or complex number. These numbers commute, so the state records which inputs occurred but not their order. We formalize this with representation theory, which explains and fixes the state-tracking failures previously reported for SSMs. The state update defines a linear representation of the monoid of input sequences, and we show that an SSM tracks a group at every sequence length exactly when that group is a quotient of the group generated by its transition matrices. Two consequences follow. Diagonal real- and complex-valued SSMs can track only commutative groups, while the transition matrices of any SSM that can track a group must split into independent blocks over the real, complex, and quaternion numbers. We then introduce HyperSSM, which adds quaternion channels while keeping linear-time inference and parallel training. Trained only on final answers, HyperSSM solves the group tasks of recent state-tracking benchmarks exactly with at most five state numbers. This includes S5S_5 with 32 generators, where previous SSMs are at chance, and HyperSSM generalizes to sequences 25 times longer than those seen in training. Because the theory says what the transitions must encode, the learned weights of the linear recurrence can be interpreted directly. We demonstrate this by recovering the calibration of a real gyroscope, the rotations of imperfect qubit gates and the geometry of protein backbones.

Introduction

Transformers are a central machine learning architecture for language and sequence processing tasks [1]. They compare every token in a sequence with every other token, so their memory and computation grow quadratically with the length of the sequence. State space models (SSMs) have emerged as an alternative that scales linearly [2, 3, 4, 5, 6]. In an SSM, information about past inputs is contained in the activity state of the recurrent layer, which is updated at each step by a linear recurrence that can be computed in parallel during training and step by step during inference. SSMs now match transformers on many sequence modelling benchmarks, and they serve as the backbone, alone or combined with attention, of deployed language models [7, 8, 9]. As these systems are asked to follow longer instructions, execute programs and act as agents, a basic question becomes pressing: can their memory keep track of events in the order in which they occurred?

In early SSMs, the linear recurrence does not depend on the input, so shifting the input in time shifts the hidden state by the same amount: before any nonlinear readout, the recurrence acts as a convolution. Just as the discrete-time Fourier transform diagonalizes any discrete convolution, such a recurrence is diagonalized by discrete exponentials λk\lambda^k, where the λ\lambda are the eigenvalues of its transition matrix. Because the recurrence multiplies by the same matrix at every step, and powers of one matrix commute, each of these modes evolves independently and needs only a single number λ\lambda. In general this number is complex: a real eigenvalue can only make its mode decay or flip sign, whereas a complex one also rotates it, storing a phase that lets the mode respond to periodic structure and count modulo nn. The hidden state is therefore a collection of independent real or complex numbers, each decaying, and possibly rotating, at its own rate. Viewed on a ring of nodes, these modes are travelling waves, and the full forward pass of such a model, nonlinear readout included, admits an exact operator description [10]. Diagonal SSMs parametrize these numbers directly, and later selective models keep the same diagonal structure [2, 3, 4, 6, 11]: their hidden state is a set of independent numbers, complex in S4, S4D, LRU and Mamba-3, and real in S4D-Real, Mamba-1 and Mamba-2.

Modern selective SSMs make the transition matrix depend on the input, so that the hidden state is multiplied by a product Aˉ(uT)⋯Aˉ(u1)\bar{A}(u_T)\cdots\bar{A}(u_1) of different matrices, and whether it retains the order of the inputs depends on whether these matrices commute. When the inputs describe operations, they generally do not: turning a die forward and then left leaves it in a different position than turning it left and then forward. Yet selective SSMs keep one number per channel, and at each step multiply it by a number the input chooses. Since real and complex multiplication commute, reordering the steps leaves the state unchanged, and no readout can recover the order. The limitation lies in the number system, not in the recurrence or the training.

Tasks of this nature, where the input consists of a sequence of operations and the output is their composition, are referred to as state tracking. Examples include determining which face of a die appears on top, how a sequence of swaps rearranges a set of objects, and the values that variables assume as a program executes. State tracking serves as a stringent test of whether a model has learned an underlying rule rather than relying on shortcuts, since a rule remains valid for sequences that are much longer than those encountered during training. Both transformers with fixed depth and state space models (SSMs) fail on challenging cases [12, 13, 14], and stacking additional layers recovers some, but not all, of the lost order [15, 16]. Recent work replaces commuting numbers with more expressive transitions, such as dense unitary matrices [17], products of Householder reflections [13, 18], and permutation matrices [19]. Theoretical analyses accompanying these advances each focus on a specific family of transitions, such as complex diagonal layers [15], abelian stacks analyzed using Lie algebras [16], and, in concurrent work, rotations in SU(2)SU(2), SO(3)SO(3) and SO(N)SO(N), for which a single-layer criterion, group laws that exclude S5S_5, and two-layer cascades that achieve it are derived [20]. What remains unestablished is which type of memory a given task requires before a family is selected. The question matters more as SSMs spread, both as the backbone of language models [4, 5, 7, 8, 9, 21] and in scientific machine learning [22, 23], where many systems evolve by composing operations that do not commute.

We now present a theoretical framework that answers this question for any linear recurrent memory. We first observe that the hidden states of such a network form a representation, in the algebraic sense, of the sequences it processes (which form a monoid under concatenation): each input symbol transforms the hidden state, and a sequence applies these transformations in order. Using this correspondence, we characterize the groups of operations a single channel can track on any associative number system (Theorem 1). The readout plays an active role in this characterization, because it determines which part of the state is meaningful, and the part it may ignore is what allows small memories to work; for heads in SO(3)SO(3) and SU(2)SU(2) it agrees with the criterion reached independently in concurrent work [20]. We then show that every such memory separates into independent blocks (Proposition 1). The idea is familiar from diagonal SSMs. When all transitions commute, they can be diagonalized together, and the memory splits into independent one-dimensional channels, each multiplied by a real or complex number; this is the Fourier decomposition that underlies diagonal SSMs. When transitions do not commute, they cannot be diagonalized, but they can still be block-diagonalized, and we show that each block is a small matrix over one of only three number systems: the real numbers, the complex numbers or the quaternions. This has two consequences. First, the transition families studied so far, such as unitary matrices, Householder products, permutations and rotations, are not separate designs but blocks of these three kinds, so the choice of memory reduces to choosing a number system and a block size for each channel. Second, order has a minimum cost: a channel whose transitions span fewer than four real dimensions commutes, and so tracks only operations whose order does not matter (Corollary 1). The cheapest channels that keep order are the 2×22 \times2 real matrices and the quaternions, each with four real dimensions.

This correspondence also allows us to infer the symmetry of the trained transition matrices of the model, enabling a form of symmetry discovery in data. Methods for discovering symmetry usually learn transformations that leave the data invariant [24, 25]. Here, the group is instead the set of operations that the inputs encode, and because the transition matrices must contain it, it can be read directly from a trained model.

Guided by this framework, we introduce HyperSSM, in which each channel has its own number system, enabling it to state track, without incurring additional computational cost for linear-time inference or parallel training (Sec. III). On formal-language and group benchmarks from recent work [19, 26], HyperSSM achieves exactness with one to five states, including the case of permutations of five objects, S5S_5, with 32 generators, a setting in which the best previous linear recurrent models perform at chance level. The model is trained solely on the final answer; no information about a task’s group is provided, and it maintains exactness on sequences 25 times longer than those used in training. We finally apply the same memory to three physical systems in which the state is represented as an ordered product of rotations: a moving body measured by a real gyroscope, a qubit driven by a sequence of gates, and a protein backbone, in which each residue is rotated relative to the last by its torsion angles (Sec. IV). In all three cases, a single quaternion channel matches or surpasses the physical model over sequences 16 to 60 times longer than those encountered during training, whereas commutative and recurrent baselines fail. Furthermore, the learned weights recover the calibration of the sensor, the actual rotations of the gates, and the geometry of the backbone. This framework therefore provides a precise account of what linear recurrent memory can and cannot retain regarding order, while also suggesting principled approaches for designing the memory of future sequence models.

Theory

Groups and Representations

A group is a set of operations that can be composed and undone. The 24 rotations that map a cube onto itself form a group: composing any two of these rotations yields another rotation in the group, and each rotation can be inverted. A group is abelian if the order of composition is always commutative, as in the case of adding hours on a clock, and non-abelian otherwise, as for the rotations of a die. The permutations of five objects form the group S5S_5, which is a standard challenging case for state tracking, as its word problem is complete for the circuit class NC1{}^{1} [12, 27]. In contrast, input sequences do not form a group: they can be concatenated, with one sequence followed by another, but cannot be inverted. Therefore, they form a monoid, with the empty sequence serving as the identity element.

Throughout this paper, representation is used in the algebraic sense. A representation assigns to each element of a group or monoid an invertible element from a number system, such as a matrix, ensuring that composition corresponds to multiplication. For example, rotations of a clock hand are represented by unit complex numbers eiθe^{i\theta}, while rotations in three-dimensional space are represented by 3×33 \times3 rotation matrices. Two groups can be related by a quotient, which identifies elements that are considered equivalent: for example, interpreting a 24-hour clock as a 12-hour clock identifies 3:00 and 15:00. The larger group then serves as a cover of the smaller one, retaining one additional bit of information that the quotient omits. Finally, a group is compact if its elements remain bounded, as is the case for rotations; compact transitions neither diverge nor vanish over long sequences.

Memory as a representation

A diagonal SSM channel updates its hidden state as xk=akxk−1+bkx_k = a_kx_{k-1} + b_k, with input term bk=Bˉkukb_k = \bar{B}_ku_k, and steps combine by

(a2,b2)∘(a1,b1)=(a2a1,a2b1+b2),(1)(a_2,b_2) \circ(a_1,b_1) = (a_2a_1, a_2b_1+b_2), \tag*{(1)}

which is what makes a parallel scan possible [28, 29]. The scan needs multiplication to be associative, not commutative. So a channel may live in an associative number system AA (a real algebra), with invertible elements A×A^\times:

xk=a(uk)xk−1+Bˉ(uk)uk,a(uk)∈A×,(2)x_k = a(u_k)x_{k-1} + \bar{B}(u_k)u_k,\qquad a(u_k) \in A^\times, \tag*{(2)}

A=CA = \mathbb{C} recovers S4D, LR11 and Mamba-3; positive reals recover Mamba-1 and Mamba-2 (SM S2); Bˉ(uk)\bar{B}(u_k) maps the input into AA. In the tracking regime (Bˉ=0\bar{B}=0, no decay, x0=1x_0=1; justified in SM S3), a word w=s1⋯sTw = s_1 \cdots s_T leaves the state

Q(w)=a(sT)⋯a(s2)a(s1).(3)Q(w) = a(s_T) \cdots a(s_2)a(s_1). \tag*{(3)}

Concatenating words multiplies states: the memory is a representation of its input. If AA commutes, Q(w)Q(w) only counts symbols; if not, it remembers their order [Fig. 1(b–d)].

Which groups can a layer track?

Each input symbol ss stands for an operation g(s)g(s) in a group GG. The target of a sequence w=s1⋯sTw = s_1 \cdots s_T is the composed operation

π(w)=g(sT)⋯g(s1),\pi(w) = g(s_T) \cdots g(s_1),

with π\pi of the empty sequence equal to the identity ee. The model must output π(w)\pi(w), so it only needs the elements of GG that occur as targets. Let KK be the closure of the set of targets; it is the group the model must track. If GG is finite, KK is the subgroup generated by the g(s)g(s). For example, if a die is only ever turned about one axis, KK is the cyclic group of four quarter turns, not the full rotation group of the die. If the inputs are continuous, as for a gyroscope, KK is infinite. We assume throughout that KK is compact, which holds for every finite group and for groups of rotations.

Definition 1. A channel tracks KK if there are a continuous readout ρ:A→Rd\rho:A \to\mathbb{R}^{d} and a continuous injective map ι:K→Rd\iota:K \to\mathbb{R}^{d} such that ρ(Q(w))=ι(π(w))\rho(Q(w)) = \iota(\pi(w)) for all words ww of every length. A stack of layers tracks KK if the same holds with ρ\rho a continuous readout of the states of all its layers.

“Every length” separates learning the rule from fitting the training set; continuity of the readout rules out memorization (SM S4).

Theorem 1. Consider channels whose reachable states lie in a compact subset of A×A^{\times}. (i) If a channel tracks KK, the closure CC of its reachable states is a compact subgroup of A×A^{\times}, and K≅C/NK \cong C/N for a closed normal subgroup NN. (ii) Conversely, if K≅C/NK \cong C/N for a compact subgroup C⊂A×C \subset A^{\times} and closed normal N⊴CN \trianglelefteq C, there is a channel over AA with transitions in CC that tracks KK. (iii) If NN consists of scalar multiples of 11, as N={±1}N = \{\pm1\} does, then CC is a central extension of KK, a cover when NN is finite, and KK is represented projectively.

In words: a layer tracks a group exactly when its states hold a copy of that group, except for a component NN that the readout disregards. More precisely, the states constitute a group CC. The mapping from a state to its encoded target is a homomorphism from CC onto KK, where NN denotes its kernel, representing the states that the readout cannot distinguish from the identity element. If NN is trivial, then CC is an exact copy of KK within A×A^{\times}. Allowing a nontrivial NN is significant because CC may then be embedded in a smaller algebra than any exact copy of KK would permit.

Spatial rotations illustrate this property. The group SO(3)SO(3) is not a subgroup of the unit quaternions, as the only quaternion of order two is −1-1, whereas SO(3)SO(3) contains a half-turn about every axis. Therefore, an exact representation requires a larger algebra, such as M3(R)M_3(\mathbb{R}), which consists of nine elements. Instead, the unit quaternions C=SU(2)C = SU(2) map onto SO(3)SO(3) by associating qq with the rotation v↦qvqˉv \mapsto qv\bar{q}. The kernel of this mapping is N={±1}N = \{\pm1\}, since qq and −q-q yield the same rotation. A quaternion channel, which utilizes four components, therefore can represent SO(3)SO(3), provided its readout assigns the same value to qq and −q-q, as in ρ(q)=L(qqT)\rho(q) = L(q\mathsf{q}^{\mathsf{T}}), where LL denotes a learned linear map. [Fig. 1(e)]. The same reasoning applies to every finite group of rotations. In particular, the rotation group of the icosahedron, A5A_5, does not have an exact representation in H\mathbb{H}, but its preimage, the binary icosahedral group 2I2I, does. Therefore, a single quaternion channel can represent A5A_5. Theorem 1 specifies when such a readout is necessary and what information it may ignore. The proof is provided in SM S4.

Every memory splits into R\mathbb{R}, C\mathbb{C} and H\mathbb{H} blocks

Proposition 1 (Semisimple reduction). If a channel over AA tracks KK with reachable states in a compact subset of A×A^{\times}, let CC be as in Theorem 1 and B=span⁡RCB = \operatorname{span}_{\mathbb{R}} C. Then BB is a semisimple subalgebra of AA, the same channel regarded as a channel over BB tracks KK, and

B≅∏iMni(Di),Di∈{R,C,H}.(4)B \cong\prod_i M_{n_i}(D_i), \qquad D_i \in\{\mathbb{R}, \mathbb{C}, \mathbb{H}\}. \tag*{(4)}

The factors evolve independently and meet only in the readout; in a suitable basis their transitions are orthogonal, unitary or quaternion-unitary.

This represents the order-preserving analog of the Fourier decomposition: A time-invariant memory decomposes into complex clock hands, while a general memory decomposes into rotating matrix blocks over R\mathbb{R}, C\mathbb{C}, or H\mathbb{H} [30, 31]. These are the only number systems worth considering (proof in SM S5).

Corollary 1. A channel over an algebra of dimension less than four tracks no non-abelian rotation groups. In dimension four, the algebras that track non-abelian groups are the 2×22 \times2 real matrices M2(R)M_2(\mathbb{R}) and the quaternions H\mathbb{H}.

To preserve order, a channel’s transitions need at least four real dimensions. This bound is on the transitions, not on the state. For example, in the recurrence xk=a(uk)xk−1x_k = a(u_k)x_{k-1}, the transition and the state can differ in size. a(uk)a(u_k) is an element of the algebra, whereas the state xkx_k only needs to be a vector upon which it acts. For instance, over M2(R)M_2(\mathbb{R}), each transition is represented by a 2×22 \times2 matrix, consisting of four real numbers, while the state can be a vector in R2\mathbb{R}^2, which consists of two real numbers. This configuration is sufficient to track the symmetries of a polygon (SM S5). In contrast, over H\mathbb{H} there is no such reduction: the state is a quaternion, which consists of four real numbers, the same size as the transition.

The algebra ladder

The algebra ladder

Theorem 1 and Proposition 1 turn “can this layer learn this task?” into a lookup (Figure 2; details in SM S6):

Figure 2. The algebra ladder. Each box represents an algebra with its associated properties. The number of real components is indicated; on the right, bounded transitions and the groups tracked by a single channel are shown (Theorem 1). For fewer than four components, every algebra is commutative (Corollary 1). Increasing the width of a layer results in lateral movement and does not cross the dashed line, above which S5S_5 is tracked. In contrast, increasing depth does: a sign channel beneath a quaternion channel tracks S5S_5 with five numbers (Proposition 2; Table II). Shaded regions indicate channels of standard diagonal SSMs.

  • One real number: parity only [13].

  • Complex numbers, any width: counting modulo nn; only abelian groups.

  • One quaternion (4 numbers): Q8Q_8, A4A_4, the die S4S_4, and the icosahedral rotations A5A_5.

  • 2×22 \times2 quaternion matrix (16 numbers): S5S_5.

  • A sign beneath a quaternion (5 numbers, two layers): S5S_5, by depth (Proposition 2).

Depth helps, but only up to solvable groups

The stacking of commutative layers restores a degree of order. For the six symmetries of a triangle, one layer monitors the parity of reflections, while a subsequent complex layer rotates by ±120∘\pm120^\circ according to that parity.

Proposition 2 (Depth). In the tracking regime, consider a stack of LL layers in which every layer is commutative with transitions in a compact group, the transitions of each layer are functions of the input symbol and of the previous states of the layers below, and every layer below the top has finitely many reachable states. Such a stack tracks a finite group KK if and only if KK is solvable of derived length at most LL.

So complex stacks reach Q8Q_8, A4A_4 and the die, but no such stack of commutative layers reaches A5A_5 or S5S_5. In contrast, a single quaternion channel reaches A5A_5. The finiteness assumption is satisfied whenever the lower layers track finite groups with exact transitions, as demonstrated in the construction and our snapped models. Without this assumption, the closure argument of Theorem 1 does not apply directly (SM S7). For complex diagonal layers, this result corresponds to the theorem of Shakerinava et al. [15], which is proved at finite precision (see also [16], where tracking up to a bounded length is achieved with depth logarithmic in that length). This result serves as the finiteness assumption in our context; the representation perspective provides this property for any commutative channel algebra and situates it alongside Theorem 1. In contrast to circuit-complexity bounds [12, 14], this bound is unconditional within its model (see proof in SM S7).

HyperSSM

The theory says which number system a task needs; HyperSSM lets each channel choose it, and changes nothing else (Figure 3).

Figure 3. A HyperSSM layer. Each channel follows the linear recurrence of a diagonal SSM, with input uku_k, hidden state xk(j)x_k^{(j)}, transition a(j)(uk)a^{(j)}(u_k) and input term Bˉ(j)(uk)uk\bar{B}^{(j)}(u_k)u_k, with multiplication in its own algebra A(j)A^{(j)}. Channels evolve independently, mix only in the readout CC, and are computed by the same parallel scan.

Definition 2. A HyperSSM layer with input uk∈Rdu_k \in\mathbb{R}^d and channels over algebras A(1),…,A(N)A^{(1)}, \ldots, A^{(N)} has hidden state xk=(xk(1),…,xk(N))∈A(1)×⋯×A(N)x_k = (x_k^{(1)}, \ldots, x_k^{(N)}) \in A^{(1)} \times\cdots\times A^{(N)}, updated channel by channel as

xk(j)=a(j)(uk)xk−1(j)+Bˉ(j)(uk)uk,x_k^{(j)} = a^{(j)}(u_k)x_{k-1}^{(j)} + \bar{B}^{(j)}(u_k)u_k,
a(j)(uk)=eΔ(−α(j)+ν(j)(uk)),a^{(j)}(u_k) = e^{\Delta(-\alpha^{(j)}+\nu^{(j)}(u_k))},
yk=C(uk)xk+Duk,(5)y_k = C(u_k)x_k + D u_k, \tag*{(5)}

where the generator ν(j)(uk)∈A(j)\nu^{(j)}(u_k) \in A^{(j)} and the input matrix Bˉ(j)(uk):Rd→A(j)\bar{B}^{(j)}(u_k): \mathbb{R}^d \to A^{(j)} are linear in the input, α(j)≥0\alpha^{(j)} \ge0 is a learned decay rate, Δ>0\Delta> 0 a step size, and the exponential is the power series in A(j)A^{(j)}. The readout C(uk)C(u_k) acts on all channels, on xkx_k or on a sign-invariant function of it such as xk(j)xk(j)x_k^{(j)}x_k^{(j)}, and DD is a skip connection.

This is the selective SSM xk=Aˉ(uk)xk−1+Bˉ(uk)ukx_k=\bar{A}(u_k)x_{k-1}+\bar{B}(u_k)u_k, yk=C(uk)xk+Duky_k=C(u_k)x_k+D u_k of Mamba [4] with Aˉ(uk)\bar{A}(u_k) block-diagonal, one block per channel, multiplying in that channel’s algebra. With complex channels this is a diagonal SSM. With a quaternion channel, the input chooses a rotation axis as well as an angle; that is the whole difference. Real channels use a learned sign, a=±1a = \pm1. All channels share the scan of Eq. (1), so HyperSSM keeps O(T)O(T) work and O(log⁡T)O(\log T) depth (SM S8) (where TT is the sequence length). The input enters both through the transition and, as in any SSM, through Bˉ\bar{B}; all experiments here are in the tracking regime, Bˉ=0\bar{B} = 0, where it acts through the transition alone. Quaternion channels are never snapped.

ModelParityEven pairsCycle navigationModular arithmetic
LSTM100.0 ± 0.0100.0 ± 0.0100.0 ± 0.099.9 ± 0.1
Transformer52.2 ± 0.490.4 ± 10.424.4 ± 0.523.6 ± 0.7
Mamba54.5 ± 1.5100.0 ± 0.050.7 ± 7.838.1 ± 6.0
C\mathbb{C} diagonal61.8 ± 6.882.4 ± 4.890.4 ± 4.359.9 ± 27.0
DeltaNet [−1, 1]97.2 ± 1.7100.0 ± 0.047.3 ± 6.063.9 ± 7.2
Gated DeltaProduct [−1, 1]98.8 ± 1.599.6 ± 0.661.4 ± 12.058.0 ± 20.0
D-DE16-LNCDE81.0 ± 18.181.4 ± 9.977.3 ± 21.394.5 ± 5.2
PD-SSM99.9 ± 0.199.7 ± 0.399.5 ± 0.796.2 ± 3.4
HyperSSM100.0 ± 0.0100.0 ± 0.0100.0 ± 0.099.3 ± 0.4
algebraR±\mathbb{R}_{\pm}C\mathbb{C}, on pairsC\mathbb{C}M16(C)M_{16}(\mathbb{C}), on pairs
discovered nn–n=2n = 2n=5n = 5–

Table 1. TABLE I. Regular languages. Accuracy (%) on lengths 40–256 after training on 3–40, mean ± s.d. over 5 runs. Baselines from [19]. HyperSSM algebras, with numbers of state: R±\mathbb{R}_{\pm} (1), C\mathbb{C} (2), M16(C)M_{16}(\mathbb{C}) (32). Discovered nn: the smallest nn for which snapping each complex transition to an nn-th root of unity is exact on validation, found after training without being told the task. Details in SM S9.

Results

Exact state tracking on benchmarks

We use the formal-language and group benchmarks of [19, 26]: train in lengths 3–40, test on 40–256, and for groups also on 256–1000. For each task, the theory selects the minimal required representation: one real channel for parity, one complex channel for cycle navigation and even pairs, one quaternion for A5A_5, and a sign channel combined with a quaternion for S5S_5. No information about the task’s group is provided to the model. (Protocol details are in SM S9.) Real channels are constrained to exactly ±1\pm1 throughout. Complex channels are trained continuously and then discretized to the nn-th roots of unity, where nn is the smallest value that achieves exact validation performance and is determined from the trained model (as described in Theorem 1). Quaternion

HyperSSM is exact on parity, even pairs and cycle navigation with one or two numbers of state (Table I), and on every A5A_5 and S5S_5 task with four and five numbers of state: one quaternion for A5A_5, and a sign channel beneath a quaternion for S5S_5 (Table II). For S5S_5 with 32 generators, PD-SSM (128 complex numbers) achieves 1.07% accuracy, and Gated DeltaProduct achieves 1.23%, which is near chance level (0.83%), while HyperSSM remains exact. HyperSSM maintains exact performance up to 25 times the training sequence length. For modular arithmetic, a dense M16(C)M_{16}(\mathbb{C}) block achieves 99.3 ± 0.4% accuracy; although an exact memory solution for three numbers exists, it is not discovered through training (SM S9 S9.1).

Applications

The composition rule HyperSSM is built on is not specific to benchmarks. Whenever the state of a physical system is an ordered product of rotations, a quaternion channel is an exact memory for it, and a commutative one cannot be (Corollary 1). We test three such systems with the same architecture and protocol: train on short sequences, test on long ones, and compare with a complex diagonal SSM, an LSTM, and the physical model itself.

ModelA5A_5 · rotations of the icosahedron, n=2n=2A5A_5 · rotations of the icosahedron, n=6n=6A5A_5 · rotations of the icosahedron, n=8n=8A5A_5 · rotations of the icosahedron, n=12n=12S5S_5 · permutations of five cards, n=4n=4S5S_5 · permutations of five cards, n=8n=8S5S_5 · permutations of five cards, n=32n=32
C\mathbb{C} diagonal (2 layers)15.5––––––
Gated DeltaProduct [−1, 1] (1 layer)97.992.591.860.588.757.41.23
Gated DeltaProduct [−1, 1] (2 layers)–––68.484.762.2–
PD-SSM (1 layer)100.0100.0100.0100.0100.0100.01.07
HyperSSM100.0100.0100.0100.0100.0100.0100.0
algebraH\mathbb{H}H\mathbb{H}H\mathbb{H}H\mathbb{H}R±→H\mathbb{R}_{\pm} \to\mathbb{H}R±→H\mathbb{R}_{\pm} \to\mathbb{H}R±→H\mathbb{R}_{\pm} \to\mathbb{H}
lengths 256–1000100.0100.0100.0100.0100.0100.0100.0

Table 2. TABLE II. Group word problems. Accuracy (%) on lengths 40–256 and, for HyperSSM, 256–1000, after training on 3–40; best of 3 runs. Chance: 1.67% (A5A_5), 0.83% (S5S_5); –: not reported. Baselines from [19] (PD-SSM: 128 complex numbers of state). HyperSSM: H\mathbb{H} (4), R±→H\mathbb{R}_{\pm} \to\mathbb{H} (5). All runs in SM S9.

Rigid bodies: a real gyroscope

A gyroscope measures angular velocity, and orientation is determined as the ordered product of these incremental rotations. Reversing the order of the same sequence of small rotations yields a different orientation and leads to a 41∘41^\circ error after 2 seconds. On the BROAD dataset [32], models process gyroscope windows to predict rotation, with training performed on 1 to 2 second intervals and testing conducted for durations up to 2 minutes (experimental setup described in SM S10). HyperSSM utilizes a single quaternion channel with 12 parameters. A complex diagonal state space model (SSM) with 128 state variables does not outperform a baseline that predicts no rotation, as anticipated by Corollary 1. An LSTM accurately fits the training intervals but fails to generalize to longer durations. HyperSSM matches gyroscope integration performance and exhibits reduced drift over extended time horizons (26.5° compared to 30.9° at 2 minutes), due to its ability to learn the sensor’s calibration [Fig. 4(a)].

Qubits: simulating and characterizing gates

Single-qubit gates correspond to unit quaternions, implying that a quaternion channel represents a qubit. The Born rule is quadratic in the quantum state; therefore, measurement statistics are precisely determined by this relationship. This results in a sign-invariant readout L(qqT)L(qq^{\mathsf{T}}), while the unobservable global phase −1-1 corresponds to the component NN in Theorem 1 that the readout must ignore. The models process a random gate sequence and predict the Bloch vector of the final state. The Born rule is then used to determine the probability of each measurement outcome; the models are trained on circuits containing 1 to 40 gates and evaluated on circuits with up to 1000 gates (setup in SM S11). The Clifford gates {H,S}\{H, S\} operate on the Bloch sphere as the 24 rota tions of a cube, which form a solvable group. Including the TT gate renders the set of gates dense in SU(2)SU(2). HyperSSM achieves exact results in both cases: its Bloch vectors remain within 10−310^{-3} degrees of the true values for all sequence lengths up to 1000 gates, which is 25 times the training length. The learned gates correspond to HH, SS, and TT to three decimal places in both angle and axis [Fig. 4(b)] and SM S11. A three-layer complex diagonal stack, which is sufficiently deep to represent the Clifford group by Proposition 2, does not identify this structure during training and remains near 90∘90^\circ deviation from about 100 gates onward. An LSTM can model the finite Clifford group to within approximately 0.2∘0.2^\circ, but exhibits drift on Clifford+TT, reaching about 6∘6^\circ at 1000 gates. In hardware implementations, gates are imperfect. When each gate under-rotates by 2%2\% about an axis tilted by 2∘2^\circ, a simulator employing ideal gates drifts to nearly 90∘90^\circ at 1000 gates, whereas HyperSSM remains exact. From measurement data alone, HyperSSM recovers the actual gates to three decimal places (HH: 176.400∘176.400^\circ learned and true; SS: 88.200∘88.200^\circ; TT: 44.100∘44.100^\circ; angle between the HH and SS axes: 46.643∘46.643^\circ), representing a learned form of gate set characterization [33].

Proteins: the backbone as a chain of rotations

The orientation of residue jj relative to the frame of residue ii is represented as the ordered product of the rotations between consecutive residues. Each rotation is determined by three torsion angles (ψ\psi, ω\omega, ϕ\phi) and nearly constant bond angles, and the residue frames correspond to those constructed in structure prediction [34]. A sequence of nn residues is represented as 6n+16n+1 tokens, where each token corresponds to a torsion angle with its associated angle or a bond. HyperSSM operates as a single quaternion channel within the tracking regime with generator vt=W(eτ⊗[1,at])v_t = W(e_{\tau} \otimes[1, a_t]), 48 parameters as detailed in SM S12. The evaluation uses 554 high-resolution crystal structures from the Protein Data Bank [35], partitioned by entry. The models are trained on sequences of 1 to 16 residues and evaluated on held-out proteins containing up to 256 residues. Composing the same per-residue rotations in an incorrect order results in 38∘38^\circ of error after two residues. The complex diagonal SSM and the LSTM exceed 100∘100^\circ of error from four residues onward, within the training range. HyperSSM is more accurate than reconstruction using standard bond geometry [36] across all sequence lengths from 2 to 64 residues (12.1∘12.1^\circ versus 14.4∘14.4^\circ at 16, 23.7∘23.7^\circ versus 26.5∘26.5^\circ at 64; Figure 4(c)), as it captures the average geometry of actual protein backbones. The remaining error is attributable to the variation in bond angles between residues, which cannot be addressed by any model based on torsion angles alone.

Figure 4. Applications: Physical systems in which the state is represented as an ordered product of rotations. Median error as a function of sequence length; training lengths are shaded; mean ±\pm standard deviation over three random seeds. (a) Orientation of a moving body measured by a real gyroscope (BROAD; held-out recordings); physical model: integration of the sensor readings. (b) Bloch vector of a qubit following a gate sequence, with imperfect gates (2%2\% under-rotation and 2∘2^\circ axis tilt); physical model: simulation using ideal gates; HyperSSM achieves errors below the lower axis limit (10−310^{-3} degrees) at all sequence lengths; complex diagonal SSM uses three layers. Details on Clifford gates and ideal Clifford+TT gates are provided in SM S11. (c) Orientation of residue jj relative to the frame of residue ii, computed from the torsion angles, on held-out PDB proteins; physical model: reconstruction using standard bond geometry. In all three cases, HyperSSM uses a single quaternion channel (four state variables); the complex diagonal SSM uses 128 state variables.

Reading the group from the transition

Theorem 1 fixes what a trained channel must contain: a copy of the task’s group structure. The group can therefore be read from the learned transitions and compared with the true one.

Proposition 3 (Certificate and horizon). In the tracking regime: (i) If the states of a model take finitely many values, as when its transitions generate a finite group CC, the model tracks KK at every length if and only if its readout is correct on every pair (Q(w),π(w))(Q(w), \pi(w)) reachable in C×KC \times K; these are at most ∣C∣ ∣K∣|C|\,|K| pairs, found by breadth-first search. (ii) If a channel’s transitions have norm at most one and lie within ϵ\epsilon of those of a model certified by (i), and the readout’s decision regions contain the balls of radius rr around that model’s states, the channel is exact on every word of length T<r/ϵT < r/\epsilon.

Part (i) reformulates the condition of being “exact at every length” into a finite verification; Part (ii) determines, based solely on the weights, the extent to which a continuous model is guaranteed to generalize (proof in SM S13). The decoding procedure is explicit. A quaternion transition corresponds to a rotation by 2arccos⁡∣a0∣2\arccos|a_0| about the axis (a1,a2,a3)(a_1, a_2, a_3). Consequently, each A5A_5 generator must rotate by 180∘180^\circ, 120∘120^\circ, 72∘72^\circ, or 144∘144^\circ about a symmetry axis of an icosahedron, and the learned sign of each S5S_5 generator must correspond to the parity of its permutation. The discretized complex channels already demonstrated this mechanism: training identified n=2n = 2 for even pairs and n=5n = 5 for cycle navigation without explicit instruction. In the gyroscope model, the 12 parameters represent the sensor’s scale, axis misalignment, and bias; in the qubit model, the transitions correspond to the gates’ actual rotations; in the protein model, they represent the torsion and bond rotations of the backbone.

Discussion

Convolutional networks taught us that a symmetry of the data should shape the model. Early SSMs had time-shift symmetry, and complex numbers were its natural basis. Selective models broke that symmetry; what governs them is the group of the operations they read, and the right basis is a set of blocks over R\mathbb{R}, C\mathbb{C} and H\mathbb{H}. Real and complex numbers are the abelian case, and stacks of them the solvable one. Because a tracking memory must be a representation, the same theory says where to look inside a trained model and what to expect there.

Scientific machine learning

Many systems in the sciences evolve through the composition of non-commuting operations. For these systems, the algebraic structure of memory constitutes a physical property rather than a modeling assumption. Examples include rigid-body motion, spin and qubit dynamics, polarization optics, parallel transport along paths in gauge theory, and the braiding of anyons. These phenomena can be described as ordered products in SU(2)SU(2), SO(3)SO(3), and related groups (SM S14). For each case, Corollary 1 excludes the possibility of a commutative memory, and a quaternion or matrix channel provides an exact representation by construction. The qubit experiment demonstrates a practical application in quantum hardware: a sequence model in which the transitions correspond to gates learned from measurements, characterizes the gates in a manner analogous to gate set tomography [33], and also predicts the behaviour of circuits longer than those used during training. When decay is present (α>0\alpha> 0), the same channel can account for decoherence.

Protein structure

Structure prediction and design represent a protein as a sequence of rigid residue frames and compose these frames, as implemented in the structure module of AlphaFold [34] and in diffusion models that generate protein backbones directly using rigid motions [37, 38]. The backbone experiment demonstrates the simplest form of this compositional approach, carried out by a linear memory with a parallel scan. This method is exact in its algebraic formulation, linear in sequence length, and interpretable, since each learned rotation corresponds to a torsion angle or a bond. Channels utilizing dual quaternions, an associative algebra that composes rotations and translations together, could encode both positions and orientations. However, the group of rigid motions associated with dual quaternions is not compact, so this approach lies beyond the scope of the present theorems but remains within the same recurrence framework.

Symmetry discovery

Methods for discovering symmetry learn which transformations leave the data invariant [24, 25]. A tracking memory finds a different symmetry: the group generated by the operations it processes. Theorem 1 states that a model capable of tracking must contain this group, enabling direct extraction rather than requiring a search. During training, Z2\mathbb{Z}_2 and Z5\mathbb{Z}_5 were identified in the complex channels, the actual rotations of imperfect gates in the qubit model, and the torsion geometry of the backbone in the protein model. A general procedure, from data to the group and its representation, constitutes a logical next step.

Long context

These differences matter most over long sequences. A memory in the right algebra composes exactly, so its errors do not compound: on the benchmarks it stays exact at 25 times the training length, it matches the physical model at 60 times on the gyroscope and at 16 times along the protein chain, and Proposition 3(ii) bounds how long a continuous model stays exact, T<r/ϵT < r/\epsilon. A memory in the wrong algebra fails beyond the training range at any width. As language models are asked to follow long programs, agent trajectories and documents in which order matters, the number system of their recurrent memory becomes a design variable alongside width and depth. Quaternion and matrix channels add a constant factor to the scan and could sit beside complex channels in the hybrid recurrent and attention models now in use [7, 21]; whether they improve such models at scale is the main open question.

Relation to prior and concurrent work

Earlier analyses each begin by fixing a family of transitions and ask what that family can do: complex diagonal layers [15] and abelian stacks through Lie-algebra extensions [16]. The present work reverses the question and asks which memory a task requires. This gives three results that a family-by-family analysis does not. First, Theorem 1 holds for a channel over any associative algebra, so fixed families become special cases: the depth theorem of [15] is Proposition 2 for complex channels, and for rotation heads the single-layer criterion, the exclusion of S5S_5 and the two-layer cascades given in concurrent work [20] correspond to Theorem 1, Lemma S6 and Proposition 2 for H\mathbb{H}.

{starts_mid=1}clusion of S5S_5 and the two-layer cascades given in concurrent work [20] correspond to Theorem 1, Lemma S6 and Proposition 2 for H\mathbb{H}. Second, Proposition 1 shows that the search over families is finite: every memory is a sum of blocks over R\mathbb{R}, C\mathbb{C} and H\mathbb{H}, and the smallest memory that tracks a task can be read off its group. Third, because the memory must be a representation, a trained model is a checkable object: Proposition 3 certifies exactness at every length from the weights and bounds how long a nearly exact model stays exact. The same starting point changes what the experiments can show. Because the theory fixes the memory before training, HyperSSM can be trained under the strictest protocol and still be exact. On S5S_5 with 32 generators, where the best previous linear recurrent models are at chance [19], it is learned from the final answer alone, with five numbers of state, a linear readout and no information about the group, and it stays exact on sequences 25 times longer than those seen in training. On physical systems, a single quaternion channel regresses orientation from a real gyroscope against motion capture at 60 times the training length, and its weights recover the calibration of the sensor, the actual rotations of imperfect qubit gates, and the geometry of protein backbones.

Open problems

Open are a quantitative theory under decay and noise, the depth bound for stacks whose lower layers take a continuum of values, extensions to resets and all regular languages [39], whether this legibility survives in large models that mix such channels with attention, and how to train the smallest memory when it is not the easiest to find (SM S14).

Code availability

Code to reproduce all experiments, including the HyperSSM implementation, benchmark protocols and trained models, is available at https://github.com/anishfischer/HyperSSM.

Background on groups

This section illustrates each algebraic concept with the die.

A group is a set of operations that can be composed and inverted. The 24 rotations that map a cube onto itself form a group: composing two rotations gives another rotation, and each rotation has an inverse. The group is abelian if composition does not depend on order; the rotations of the cube are not abelian, whereas addition of hours on a clock modulo 12 is. The group of all permutations of five objects is S5S_5; it is the standard hard case in the literature, as its word problem is complete for NC1\mathrm{NC}^1 [12, 27].

A representation of a group assigns to each operation an invertible element of a number system (for example a matrix) so that group composition becomes multiplication. Rotations of 3D space are represented by 3×33 \times3 rotation matrices; rotations of a clock hand by unit complex numbers eiθe^{i\theta}.

A quotient identifies elements that should be considered equivalent: reading a 24-hour clock as a 12-hour clock merges 3:00 and 15:00. A cover retains extra information: the 24-hour clock covers the 12-hour clock by keeping one bit the latter omits. A group is compact if its elements remain bounded, as rotations do; in a memory, compact transitions neither diverge nor vanish over long sequences.

Linear memory and time-shift symmetry

Discretization. An SSM layer is a discretized linear system x˙=Ax+Bu\dot{x} = Ax + Bu, y=Cxy = Cx. With step size Δ\Delta,

xk=Aˉxk−1+Bˉuk,Aˉ=eΔA,Bˉ=A−1(eΔA−I)B.(6)x_k = \bar{A}x_{k-1} + \bar{B}u_k,\qquad\bar{A} = e^{\Delta A},\qquad\bar{B} = A^{-1}(e^{\Delta A} - I)B. \tag*{(6)}

Deep SSMs stack such layers with nonlinearities in between. In practice AA is diagonal over C\mathbb{C} [3, 11], so the state splits into scalar recurrences

xk=akxk−1+bk,ak=eΔλ,bk=Bˉkuk,(7)x_k = a_kx_{k-1} + b_k,\qquad a_k = e^{\Delta\lambda},\qquad b_k = \bar{B}_ku_k, \tag*{(7)}

one per eigenvalue λ\lambda of AA; each is a channel, a damped oscillator that scales the state by ∣ak∣\lvert a_k\rvert and rotates it by arg⁡ak\arg a_k. Selective SSMs such as Mamba [4, 5] make Δ\Delta, BB and CC input-dependent. Each step is an affine map x↦ax+bx \mapsto ax + b, and the composition rule Eq. (1) is associative, so all prefix states follow from a parallel scan [28, 29] in O(log⁡T)O(\log T) rounds and O(T)O(T) work. Linear attention [40] and DeltaNet [41] have the same structure with matrix-valued states.

Why complex numbers. If transitions do not depend on the input, shifting the input shifts the output, and the layer is a convolution. The functions a convolution leaves invariant up to scale are the exponentials k↦λkk \mapsto\lambda^k, so such a memory is a bank of independent channels evolving as λk\lambda^k; without damping, clock hands eiθke^{i\theta k}. These are the representations of the abelian group of time shifts, each needing a single complex number: a diagonal SSM is the Fourier decomposition of a time-invariant memory. Rotary position embeddings [42] use the same clock hands.

Selective models keep commuting channels. Selective SSMs break time-shift symmetry but keep scalar channels: positive real in Mamba-1 and Mamba-2, complex in Mamba-3. All their transitions commute. A complex channel that turns by θ1\theta_1 then θ2\theta_2 ends where it would in reverse order; its state can depend on symbol counts and, with damping, on timing, but not on the order of non-commuting operations. This explains why Mamba-3, whose complex update is a data-dependent rotary embedding, solves parity and modular arithmetic [6] (built from counters modulo nn), while the die stays out of reach.

Prior use of quaternions. Quaternion arithmetic has been used in neural networks, including recurrent ones [43], to couple the components of multidimensional features. Here quaternions instead serve as the non-commuting transitions of a linear memory that keeps its parallel scan.

Quaternions. A quaternion is q=q0+q1i+q2j+q3kq = q_0 + q_1\mathbf{i} + q_2\mathbf{j} + q_3\mathbf{k} with ij=k\mathbf{i}\mathbf{j} = \mathbf{k} and ji=−k\mathbf{j}\mathbf{i} = -\mathbf{k}. Unit quaternions represent 3D rotations, which is why graphics and robotics use them; multiplying them composes rotations, and order matters, as for the die Figure 1(d).

Order in a linear memory

Figure 1. Order in a linear memory. (a) One step of a selective SSM; shaded, the tracking regime (no decay, x0=1x_0=1, one transition per symbol). (b) After a word ww, a channel holds the ordered product Q(w)Q(w); it tracks the group if a continuous readout recovers π(w)\pi(w) from Q(w)Q(w) at every length. (c) A complex channel stores a phase; turns add, and order is lost. (d) A quaternion channel stores a 3D orientation; 90° turns about xx and zz in either order give different states. (e) qq and −q-q are the same rotation; a sign-invariant readout tracks A5A_5, a sign-aware one tracks Q8Q_8. (f) H\mathbb{H} tracks A5A_5 but not S5S_5; M2(H)M_2(\mathbb{H}) tracks S5S_5.

Reduction to the tracking regime

The main text studies channels with no input term, no decay and x0=1x_0 = 1. This section shows that none of the three restrictions loses tracking power. Throughout, a symbol ss acts on the state of a channel by the affine map Ts(x)=a(s)x+b(s)T_s(x) = a(s)x + b(s), with b(s)=Bˉ(s)u(s)b(s) = \bar{B}(s)u(s) and u(s)u(s) the embedding of ss, and a word acts by Tw=TsT∘⋯∘Ts1T_w = T_{s_T} \circ\cdots\circ T_{s_1}. The norm of an element of AA is the operator norm of left multiplication by it.

Lemma S1 (Compact monoids). A compact submonoid SS of a Hausdorff topological group is a subgroup.

Proof. Let x∈Sx \in S. The powers xmix^{m_i} lie in SS, so a subsequence xnix^{n_i} converges, and we may take mi=ni+1−ni→∞m_i = n_{i+1} - n_i \to\infty. Then xmi=xni+1(xni)−1→1x^{m_i} = x^{n_{i+1}}(x^{n_i})^{-1} \to1, so xmi−1→x−1x^{m_i-1} \to x^{-1}; as mi−1≥0m_i - 1 \ge0 and SS is closed, x−1∈Sx^{-1} \in S. □\square

Lemma S2 (Input term and initial state). Suppose the maps {Tw}\{T_w\} of a channel lie in a compact subset of the affine group of AA and their linear parts in a compact subset of A×A^\times. If the channel, from an initial state x0x_0, tracks KK, then the channel over AA with the same transitions a(s)a(s), no input term and x0=1x_0 = 1 tracks KK with a suitable readout.

Proof. The closure Γ\Gamma of {Tw}\{T_w\} is a compact submonoid of the affine group, hence a compact group by Lemma S1. With Haar measure dγd\gamma, the point x∗=∫Γγ(0) dγx_* = \int_\Gamma\gamma(0)\,d\gamma is fixed by every element of Γ\Gamma, because affine maps commute with averaging and Haar measure is invariant. In the coordinate z=x−x∗z = x - x_* every symbol acts linearly, z↦a(s)zz \mapsto a(s)z, so the state after ww is x∗+Q(w)z0x_* + Q(w)z_0 with z0=x0−x∗z_0 = x_0 - x_* and Q(w)Q(w) as in Eq. (3). If ρ\rho is the readout of the original channel, ρ′(Q)=ρ(x∗+Qz0)\rho'(Q) = \rho(x_* + Qz_0) is continuous on AA and ρ′(Q(w))=ι(π(w))\rho'(Q(w)) = \iota(\pi(w)). □\square

So the input term only moves the point about which the state turns, and the initial state can be folded into the readout.

Lemma S3 (Decay). Let KK be finite. Split a layer’s state as x=(xn,xc)x = (x^{\mathrm n}, x^{\mathrm c}) into channels whose transitions have norm at most one and channels whose transitions have norm at most λ<1\lambda< 1, and suppose all reachable states are bounded. If the layer tracks KK, then the channels xnx^{\mathrm n} alone track KK. In particular, a layer whose channels all decay tracks only the trivial group.

Proof. Let RR be the bounded set of reachable states. On its compact closure the readout ρ\rho is uniformly continuous; let δ>0\delta> 0 be half the smallest distance between the finitely many points of ι(K)\iota(K), and let η>0\eta> 0 be such that states within η\eta have readouts within δ\delta. Choose a word uu so long that λ∣u∣diam⁡R<η/2\lambda^{|u|}\operatorname{diam} R < \eta/2. For words w,w′w,w', the decaying parts after uu satisfy ∥xc(wu)−xc(w′u)∥<η/2\lVert x^{\mathrm c}(wu)-x^{\mathrm c}(w'u)\rVert< \eta/2, while the norm-one parts satisfy ∥xn(wu)−xn(w′u)∥≤∥xn(w)−xn(w′)∥\lVert x^{\mathrm n}(wu)-x^{\mathrm n}(w'u)\rVert\le\lVert x^{\mathrm n}(w)-x^{\mathrm n}(w')\rVert. Hence, if ∥xn(w)−xn(w′)∥<η/2\lVert x^{\mathrm n}(w)-x^{\mathrm n}(w')\rVert< \eta/2, the readouts of wuwu and w′uw'u are within δ\delta, so π(u)π(w)=π(u)π(w′)\pi(u)\pi(w) = \pi(u)\pi(w') and π(w)=π(w′)\pi(w) = \pi(w'). The answer is therefore a uniformly locally constant function of xnx^{\mathrm n} on the reachable set; it extends continuously to the closure, and composing with ι\iota and extending to all of the algebra of xnx^{\mathrm n} (Tietze) gives a readout of xnx^{\mathrm n} alone. With no norm-one channels, the answer is constant, so KK is trivial. □\square

Decay therefore lets a channel weigh recent inputs, but every bit of order kept at every length is kept by the channels that do not decay. Together, Lemmas S2 and S3 reduce the analysis to the tracking regime: no input term, no decay, x0=1x_0 = 1, and one transition a(s)a(s) per input symbol ss. After a word ww the state is Eq. (3), and Q(ww′)=Q(w′)Q(w)Q(ww') = Q(w')Q(w). Channels whose norm varies from symbol to symbol, some at one and some below, are not covered; this is part of the quantitative theory under decay listed as open.

Tracking: definition and proof of Theorem 1

On the definition. KK is finite for the die (24 elements) and for S5S_5 (120), and a continuous rotation group if the symbols are generic rotations. Because KK is compact, a continuous injective ι\iota is a homeomorphism onto its image, so the encoding loses nothing. “Every length” separates learning the rule from fitting the training lengths. Continuity of the readout separates learning from memorization: two generic unit quaternions already generate infinitely many distinct states, and a readout allowed to jump could label each state with its answer, for any group. A continuous readout cannot, since it would send arbitrarily close states to different answers. Continuity is the minimal assumption that rules out memorization, and every neural readout satisfies it.

Proof of Theorem 1. (i) Let R={Q(w)}R = \{Q(w)\} be the reachable states, including Q(∅)=1Q(\varnothing) = 1. Since Q(ww′)=Q(w′)Q(w)Q(ww') = Q(w')Q(w), RR is a monoid, and its closure CC is a closed submonoid of A×A^\times, compact by assumption, hence a compact group by Lemma S1. If Q(w)=Q(w′)Q(w) = Q(w') then π(w)=ρ(Q(w))=ρ(Q(w′))=ι(π(w′))\pi(w) = \rho(Q(w)) = \rho(Q(w')) = \iota(\pi(w')), so π(w)=π(w′)\pi(w) = \pi(w'): the state determines the answer. Because KK is compact, ι\iota is a homeomorphism onto the closed set ι(K)\iota(K), and ρ(C)⊂ρ(R)‾⊂ι(K)\rho(C) \subset\overline{\rho(R)} \subset\iota(K). Hence φ=ι−1∘ρ\varphi= \iota^{-1} \circ\rho is a continuous map C→KC \to K with φ(Q(w))=π(w)\varphi(Q(w)) = \pi(w). On RR, φ(Q(w′)Q(w))=π(ww′)=π(w′)π(w)\varphi(Q(w')Q(w)) = \pi(ww') = \pi(w')\pi(w); both sides of φ(yx)=φ(y)φ(x)\varphi(yx) = \varphi(y)\varphi(x) are continuous on C×CC \times C and agree on the dense set R×RR \times R, so φ\varphi is a homomorphism. Its image is compact and contains every answer, so it is KK. With N=ker⁡φN = \ker\varphi, a closed normal subgroup, the induced map C/N→KC/N \to K is a continuous bijection from a compact space to a Hausdorff one, hence an isomorphism of topological groups.

(ii) Let p ⁣:C→Kp\colon C \to K be the quotient map followed by the isomorphism C/N≅KC/N \cong K, and choose transitions a(s)∈p−1(g(s))a(s) \in p^{-1}(g(s)). Since pp is a homomorphism, p(Q(w))=π(w)p(Q(w)) = \pi(w) for every word. As a closed subgroup of the Lie group A×A^\times, CC is a compact Lie group, so K≅C/NK \cong C/N is one too and has a faithful finite-dimensional representation, which gives a continuous injective ι ⁣:K→Rd\iota\colon K \to\mathbb{R}^d. The map ι∘p\iota\circ p is continuous on the compact, hence closed, set C⊂AC \subset A; by the Tietze extension theorem, applied to each coordinate, it extends to a continuous ρ ⁣:A→Rd\rho\colon A \to\mathbb{R}^d, and ρ(Q(w))=ι(π(w))\rho(Q(w)) = \iota(\pi(w)). (iii) If every element of NN is a scalar multiple of 11 (real, or complex when AA is a complex algebra), its elements commute with CC, so CC is a central extension of KK; a finite central kernel makes it a cover. Left multiplication by CC is a linear representation on AA in which NN acts by scalars, so it induces a homomorphism from K≅C/NK \cong C/N to the projective group of AA, a projective representation of KK. □

Margin version. Exact equality is a convenience. For finite KK, say a channel tracks KK with margin if there are pairwise disjoint closed sets Dk⊂RdD_k \subset\mathbb{R}^d, one per k∈Kk \in K, and a continuous readout ρ(Q(w))∈Dπ(w)\rho(Q(w)) \in D_{\pi(w)}, as an argmax classifier with a positive margin provides. Theorem 1 holds unchanged. Indeed, ρ(C)⊂⋃kDk\rho(C) \subset\bigcup_k D_k since the union is closed; the sets ρ−1(Dk)∩C\rho^{-1}(D_k) \cap C are finitely many, closed and disjoint, so each is also open in CC, and φ(x)=k\varphi(x) = k for ρ(x)∈Dk\rho(x) \in D_k is locally constant, hence continuous; it agrees with π\pi on RR because the DkD_k are disjoint; and the homomorphism property follows by density as before. The converse is immediate from (ii).

The readout chooses what is meaningful. NN is the part of the state the readout ignores. The 24-hour clock read as a 12-hour clock is the model case. For quaternions, qq and −q-q are the same rotation, so a quaternion memory of rotations carries a sign a good readout ignores. The simplest such readout is quadratic, ρ(q)=L(qqT)\rho(q) = L(qq^{\mathsf{T}}), since (−q)(−q)T=qqT(-q)(-q)^{\mathsf{T}} = qq^{\mathsf{T}}; for matrix states, products QijQklQ_{ij}Q_{kl} play the same role. Covers make small memories possible: a group whose faithful representations need more dimensions may still fit in fewer through a cover, provided the readout is invariant to the extra bit, as features in an equivariant network are invariant to a nuisance transformation.

Proofs of Proposition 1 and Corollary 1

Intuition. A symmetric matrix can be rotated into a diagonal one, splitting into one-dimensional pieces. A memory can likewise be rotated into independent blocks, but because its transitions need not commute, the blocks cannot all be one-dimensional.

Proof of Proposition 1. Since CC is closed under products and contains 11, its span BB is a subalgebra, and C⊂B×C \subset B^{\times} because CC contains the inverses of its elements. The states lie in C⊂BC \subset B, and the readout restricts to BB, so the channel regarded as a channel over BB still tracks KK. Averaging an inner product on AA over the compact group CC makes left multiplication by elements of CC orthogonal, so every subspace of AA preserved by CC, and hence by BB, has a preserved orthogonal complement: AA is a completely reducible BB-module. It is faithful, since b⋅1=bb \cdot1 = b. The Jacobson radical of BB annihilates every simple module, hence every completely reducible one, hence AA, so it is zero and BB is semisimple. Equation (4) is the Wedderburn–Artin theorem combined with Frobenius’s theorem that R\mathbb{R}, C\mathbb{C} and H\mathbb{H} are the only real division algebras [31]. Multiplication in a product of algebras is componentwise, so the factors evolve independently. The projection of CC to a factor Mni(Di)M_{n_i}(D_i) is a compact subgroup of GLni(Di)GL_{n_i}(D_i); averaging a DiD_i-Hermitian form on DiniD_i^{n_i} over it gives a basis in which it lies in O(ni)O(n_i), U(ni)U(n_i) or Sp(ni)Sp(n_i). This parallels the splitting of a representation of a compact group into irreducible blocks [30]. □

Proof of Corollary 1. By Proposition 1, dim⁡B≤dim⁡A\dim B \le\dim A. Since dim⁡Mn(D)=n2dim⁡D\dim M_n(D) = n^2 \dim D, the semisimple algebras of dimension at most three are products of copies of R\mathbb{R} and C\mathbb{C}, which are commutative; then CC is abelian and so is its quotient KK. In dimension four the semisimple algebras are R4\mathbb{R}^4, R2×C\mathbb{R}^2 \times\mathbb{C}, C2\mathbb{C}^2, M2(R)M_2(\mathbb{R}) and H\mathbb{H}, of which only the last two are non-commutative, and both track non-abelian groups (SM S6). □

What “numbers” counts. Corollary 1 counts the dimension of the algebra, which is what the parallel scan multiplies. A matrix channel can store less: left multiplication acts on each column separately, so it may keep a single column vk=Q(w)v0v_k = Q(w)v_0.

Lemma S4 (Column states). Let C⊂GLn(D)C \subset GL_n(D) be compact and v0∈Dnv_0 \in D^n have trivial stabilizer in CC. Then the channel storing v=Qv0v = Qv_0 tracks exactly the groups that the full channel storing QQ tracks. For finite CC, a generic v0v_0 has trivial stabilizer.

Proof. The orbit map C→Cv0C \to Cv_0, Q↦Qv0Q \mapsto Qv_0, is a continuous bijection from a compact space to a Hausdorff one, hence a homeomorphism, and it maps the reachable states Q(w)Q(w) to the stored columns Q(w)v0Q(w)v_0. A continuous readout of QQ on CC is thus a continuous readout of Qv0Qv_0 on the compact orbit, and conversely; both extend to the whole space by Tietze. For finite CC, each c≠1c \ne1 fixes only the proper subspace ker⁡(c−1)\ker(c - 1), and finitely many proper subspaces do not cover DnD^n. □

So a two-number state with 2×22 \times2 real transitions tracks the dihedral groups; what it cannot avoid is composing 2×22 \times2 transitions in the scan. A quaternion channel cannot be shrunk this way, since H\mathbb{H} has no smaller faithful module, so for H\mathbb{H} state and transitions both take four numbers.

The algebra ladder in detail

By Theorem 1, a channel over AA tracks KK exactly when KK is a quotient C/NC/N of a compact subgroup CC of A×A^\times by a closed normal subgroup. The ladder lists these quotients for the small algebras.

One real number. The compact subgroups of R×\mathbb{R}^{\times} are {1}\{1\} and {±1}\{\pm1\}, so a real channel tracks the trivial group or C2C_2, parity. Positive real channels (Mamba-1, Mamba-2) have only {1}\{1\} and track nothing; allowing −1-1 adds one bit [13].

Complex numbers. The compact subgroups of C×\mathbb{C}^{\times} are the groups μn\mu_n of nn-th roots of unity and the circle U(1)U(1); their quotients are cyclic groups and the circle. A complex channel therefore tracks exactly counting modulo nn and continuous phases. A layer of NN complex channels is one channel over CN\mathbb{C}^N, still commutative: it tracks every finite abelian group with enough channels, as a product of cyclic groups, and no other finite group, at any width.

2×22 \times2 real matrices. Averaging an inner product conjugates every compact subgroup of GL2(R)GL_2(\mathbb{R}) into O(2)O(2), whose closed subgroups are the cyclic groups CnC_n, the dihedral groups DnD_n (the 2n2n symmetries of a regular nn-gon), SO(2)SO(2) and O(2)O(2). A channel over M2(R)M_2(\mathbb{R}) therefore tracks the dihedral groups and their quotients, the first non-abelian groups on the ladder.

Quaternions. The norm is multiplicative and the only compact subgroup of R>0\mathbb{R}_{>0} is {1}\{1\}, so every compact subgroup of H×\mathbb{H}^{\times} lies in the unit quaternions SU(2)SU(2). The closed subgroups of SU(2)SU(2) are, up to conjugacy, the cyclic groups, the binary dihedral groups 2Dn2D_n (with Q8=2D2Q_8 = 2D_2), the binary tetrahedral, octahedral and icosahedral groups 2T2T, 2O2O, 2I2I of orders 24, 48 and 120, the circle U(1)U(1), its normalizer U(1)∪jU(1)U(1) \cup jU(1), and SU(2)SU(2) itself [30, 44]. Each finite one contains −1-1 except the cyclic groups of odd order, and modulo ±1\pm1 they give the rotation groups of 3D space: CnC_n, DnD_n, and the rotations of the Platonic solids, A4A_4 (tetrahedron), S4S_4 (cube, die) and A5A_5 (icosahedron). A quaternion channel therefore tracks Q8Q_8 and the binary groups with a readout that reads the sign, and DnD_n, A4A_4, S4S_4, A5A_5 and SO(3)SO(3) with one that ignores it. A5A_5 is not itself a subgroup of SU(2)SU(2), which contains a single element of order two, so it can only be tracked through its cover 2I2I.

S5S_5 needs more. We show that no layer of complex and quaternion channels side by side tracks S5S_5, however wide. Say that a finite group FF is a section of a compact group GG if F≅H/MF \cong H/M for a closed subgroup H≤GH \leq G and a closed normal subgroup M⊴HM \trianglelefteq H. By Theorem 1, a channel over AA tracks FF only if FF is a section of the compact group A×A^\times; for A=Cm×HnA = \mathbb{C}^m \times\mathbb{H}^n the compact subgroups lie in U(1)m×SU(2)nU(1)^m \times SU(2)^n.

Lemma S5. If S5S_5 is a section of a product G1×G2G_1 \times G_2 of compact groups, it is a section of G1G_1 or of G2G_2.

Proof. Let S5≅H/MS_5 \cong H/M, and let H1=H∩(G1×1)H_1 = H \cap(G_1 \times1), a closed normal subgroup of HH, which we identify with a subgroup of G1G_1. Its image in H/MH/M is a normal subgroup of S5S_5, hence 11, A5A_5 or S5S_5. If it is S5S_5, then S5≅H1/(H1∩M)S_5 \cong H_1/(H_1 \cap M) is a section of G1G_1. If it is 11, then H1⊅MH_1 \not\supset M and S5S_5 is a quotient of H/MH/M which is isomorphic to the projection p2(H)p_2(H), a closed subgroup of G2G_2. If it is A5A_5, let L=H1∩ML = H_1 \cap M, so that H1/L≅A5H_1/L \cong A_5. Conjugation by h=(h1,h2)∈Hh = (h_1,h_2) \in H acts on H1⊂G1×1H_1 \subset G_1 \times1 through h1h_1 alone, and it preserves H1H_1 and LL; so the compact group P=p1(H)≤G1P = p_1(H) \leq G_1 normalizes H1H_1 and LL and acts on H1/L≅A5H_1/L \cong A_5 by automorphisms. This action agrees with the conjugation action of H/M≅S5H/M \cong S_5 on its normal subgroup A5A_5, which realizes every automorphism of A5A_5, since Aut⁡(A5)≅S5\operatorname{Aut}(A_5) \cong S_5. The kernel ZZ of P→Aut⁡(A5)P \to\operatorname{Aut}(A_5) is closed (it is cut out by finitely many conditions, one per element of H1/LH_1/L), so S5≅P/ZS_5 \cong P/Z is a section of G1G_1. □

Lemma S6. S5S_5 is not a section of U(1)U(1) or of SU(2)SU(2).

Proof. Sections of U(1)U(1) are abelian. A finite quotient H/MH/M of a closed subgroup H≤SU(2)H \leq SU(2) has MM open in HH, so MM contains the identity component of HH. For H=SU(2)H = SU(2) or U(1)U(1) the quotient is then trivial, and for the normalizer of U(1)U(1) it has order at most two. For finite HH, ∣H/M∣=120|H/M| = 120 requires ∣H∣≥120|H| \geq120; the cyclic and binary dihedral groups are solvable, and the only other candidate is 2I2I, of order 120, whose quotients are 2I2I, A5A_5 and 11, none of them S5S_5 (2I2I has a single element of order two, S5S_5 has many). □

By induction on the number of factors, Lemmas S5 and S6 show that S5S_5 is not a section of U(1)m×SU(2)nU(1)^m \times SU(2)^n: no width of complex and quaternion channels tracks it Figure 1(f). Concurrent work [20] reaches a related exclusion through group laws satisfied by products of SO(3)SO(3) and SU(2)SU(2) heads; the argument here uses only the outer automorphism of A5A_5. S5S_5 does fit in M2(H)M_2(\mathbb{H}), sixteen real numbers: it embeds in SO(5)SO(5) as the permutation action on the four-dimensional space orthogonal to (1,…,1)(1,\ldots,1) together with the sign on a fifth axis, which has determinant one; its preimage in Spin(5)≅Sp(2)Spin(5) \cong Sp(2), the compact group of unitary 2×22 \times2 quaternion matrices, is a double cover read with a sign-invariant readout. It also fits, without a cover, in 4×44 \times4 real matrices, which permute the five corners of a regular 4-simplex. With depth, five numbers suffice (Proposition 2): a sign channel beneath a quaternion channel.

Covers keep transitions small: through its cover 2I2I, A5A_5 is tracked by one quaternion, four numbers per transition and of state, while the smallest faithful real representation of A5A_5 needs 3×33 \times3 matrices (9 numbers per transition, 3 of state) and the permutation representation 5×55 \times5 ones (25 per transition, 5 of state) [19].

Proof of Proposition 2

Example. For the six symmetries of a triangle, a first layer tracks whether an odd number of reflections has occurred (a single sign). A second, complex layer tracks the rotation, turning by +120∘+120^\circ or −120∘-120^\circ according to that sign, since after a reflection every later rotation is seen in a mirror. Each layer commutes; the stack does not. The same works for any group that can be taken apart one commutative piece at a time: the solvable groups, whose derived length counts the pieces.

Setup. Layer ℓ\ell has state xℓx^\ell in a commutative algebra AℓA_\ell and transitions in a compact abelian group Cℓ⊂Aℓ×C_\ell\subset A_\ell^\times; reading sks_k multiplies xℓx^\ell by aℓ(sk,x<ℓ)a_\ell(s_k,x^{<\ell}), where x<ℓx^{<\ell} collects the states of the layers below. Let K=K(0)⊵K(1)⊵⋯K = K^{(0)} \trianglerighteq K^{(1)} \trianglerighteq\cdots be the derived series, K(i)=[K(i−1),K(i−1)]K^{(i)} = [K^{(i-1)}, K^{(i-1)}].

Proof of “if”. Let K(L)=1K^{(L)} = 1. For i=1,…,Li = 1,\ldots,L fix a set TiT_i of representatives of K(i−1)/K(i)K^{(i-1)}/K^{(i)} in K(i−1)K^{(i-1)}, containing ee. Every g∈Kg \in K is uniquely g=t1t2⋯tLg = t_1t_2\cdots t_L with ti∈Tit_i \in T_i. Reading ss sends gg to sgsg: write st1=t1′n1st_1 = t'_1n_1 with t1′∈T1t'_1 \in T_1, n1∈K(1)n_1 \in K^{(1)}, then n1t2=t2′n2n_1t_2 = t'_2n_2, and so on, so that sg=t1′⋯tL′sg = t'_1\cdots t'_L. In the abelian group K(i−1)/K(i)K^{(i-1)}/K^{(i)}, the class of ti′t'_i is the class of tit_i multiplied by the class of ni−1n_{i-1} (with n0=sn_0 = s), and ni−1n_{i-1} depends only on ss and t1,…,ti−1t_1,\ldots,t_{i-1}. Layer ii stores the class of tit_i in the finite abelian group K(i−1)/K(i)K^{(i-1)}/K^{(i)}, represented faithfully by roots of unity in a few complex channels, and multiplies it by the image of ni−1n_{i-1}, a function of the symbol and of the previous states of the layers below. All layers have finitely many reachable states, and the readout maps the joint state to ι(t1⋯tL)\iota(t_1\cdots t_L), a function on a finite set, extended continuously. Hence the stack tracks KK.

Proof of “only if”. Let YℓY_\ell be the finite set of reachable joint states of layers 1,…,ℓ1,\ldots,\ell for ℓ<L\ell< L. Each symbol acts on YℓY_\ell by an injective map, since every layer multiplies by an invertible element given the layers below, so by a permutation of the finite set YℓY_\ell. Let GℓG_\ell be the group of permutations of YℓY_\ell generated by the symbols, and GLG_L the closure of the monoid generated by the symbols acting on YL−1×ALY_{L-1} \times A_L, inside the compact group of maps (y,z)↦(σy,f(y)z)(y,z) \mapsto(\sigma y, f(y)z) with σ∈GL−1\sigma\in G_{L-1} and f:YL−1→CLf:Y_{L-1} \to C_L. By Lemma S1, GLG_L is a compact group. Forgetting the top layer is a homomorphism Gℓ→Gℓ−1G_\ell\to G_{\ell-1} whose kernel consists of maps (y,z)↦(y,f(y)z)(y,z) \mapsto(y,f(y)z), which multiply pointwise in the abelian group CℓC_\ell and so form an abelian group. By induction, GℓG_\ell is solvable of derived length at most ℓ\ell; for ℓ=1\ell= 1, G1G_1 is a quotient of a subgroup of C1C_1, abelian. The state after a word is the image of the initial state under the corresponding element of GLG_L, a continuous function of that element, so the argument of Theorem 1(i) applies with GLG_L in place of GG: the answer defines a continuous homomorphism from GLG_L onto KK. A quotient of a group of derived length at most LL has derived length at most LL. □\square

Why the finiteness assumption. The argument needs a compact group of joint transformations before taking the quotient. If the layers below take a continuum of values, the maps ff of the upper layers range over functions of a continuous state, and the closure of those generated need not be compact; a group onto which a mere submonoid maps need not be solvable (free monoids embed in metabelian groups). Whether the bound holds without the assumption is open. It holds in every model in this paper, where the lower layers are sign or snapped complex channels.

Consequences. Q8Q_8 and A4A_4 have derived length two and S4S_4 three. A5A_5 and S5S_5 are not solvable. The bound agrees with circuit-complexity results [12, 14]: the word problems for A5A_5 and S5S_5 are NC1\mathrm{NC}^1-complete [27], while those of solvable groups are not believed to be. The two-layer S5S_5 model is the same construction with a non-commutative top layer: the sign channel tracks S5/A5S_5/A_5, and the quaternion layer multiplies by a lift of n1=t1′−1st1∈A5n_1 = t_1'^{-1}st_1 \in A_5 into 2I2I, read with a sign-invariant readout. Two-layer semidirect cascades of this kind for S5S_5 also appear in concurrent work [20]; ours uses one real and one quaternion channel, five numbers in all.

HyperSSM: parametrization, cost and stacking

The exponential. Writing a=eΔ(−α+v)a = e^{\Delta(-\alpha+v)} splits a step into fading (−Δα-\Delta\alpha) and turning (Δv\Delta v), as SSMs write a=eΔλa = e^{\Delta\lambda}. α=0\alpha= 0 gives pure turning, the tracking regime; raising α\alpha lets a channel forget. For complex channels, v=iωv = i\omega gives a=e−ΔαeiΔωa = e^{-\Delta\alpha}e^{i\Delta\omega}, exactly a diagonal SSM channel. For quaternion channels, v=v1i+v2j+v3kv = v_1i+v_2j+v_3k squares to −∣v∣2-|v|^2, and

a=e−Δα[cos⁡(Δ∣v∣)+sin⁡(Δ∣v∣) v/∣v∣].(8)a = e^{-\Delta\alpha}\left[\cos(\Delta|v|)+\sin(\Delta|v|)\,v/|v|\right]. \tag*{(8)}

Without decay this is a 3D rotation by angle 2Δ∣v∣2\Delta|v| about v/∣v∣v/|v|. If vv is confined to one axis, all transitions commute and the channel is complex again. With skew-Hermitian vv the same recipe reaches every bounded transition of the complex and quaternion blocks of Proposition 1, whose unitary groups are connected.

Real channels. The exponential of a skew-symmetric matrix is a rotation, never a reflection, so the transition −1-1 of a real channel, and every odd permutation in Mn(R)M_n(\mathbb{R}), are out of its reach. HyperSSM gives real channels a learned sign. A smooth relaxation such as a=tanh⁡(g)a = \tanh(g) does not work: the bounded real transitions {±1}\{\pm1\} are two points, so changing a sign means passing through ∣a∣≈0|a| \approx0, where the state is erased, and any ∣a∣<1|a|<1 decays over long sequences. A real channel is therefore exactly a=sign⁡(g)a = \operatorname{sign}(g) in the forward pass, in training and at test, with the gradient of tanh⁡(g)\tanh(g) in the backward pass (a straight-through estimator). This uses nothing about the task, since ±1\pm1 are the only bounded real transitions; it plays the role of the hardmax of PD-SSM [19]. Complex and quaternion transitions need no such step: their bounded transitions form connected groups, which a continuous parametrization covers with no decay.

Cost and readout. Steps combine by Eq. (1), so all prefix states follow from the same scan; a quaternion product costs 16 real multiplications against 4 for a complex one. HyperSSM offers a raw readout of xx and a sign-invariant readout of the ten entries of xxTxx^{\mathsf{T}} for a quaternion channel. Cheap complex channels serve counting, position and periodicity; quaternion or matrix channels serve non-commuting operations. A real sign channel beneath a quaternion layer tracking A5A_5 tracks S5S_5 with 5 numbers of state rather than 16, by the construction of Proposition 2.

Stacking, inputs and dense blocks. (i) In a stack, the generator of a layer is bilinear in the input and in the characters of the layer below at the previous step, vk=W(uk⊗[1,χ(xk−1below)])v_k = W(u_k \otimes[1,\chi(x_{k-1}^{\mathrm{below}})]), where χ\chi is the readout’s feature map: (Re⁡xm,Im⁡xm)(\operatorname{Re} x^m,\operatorname{Im} x^m) for complex channels and xxTxx^{\mathsf{T}} for sign-invariant quaternion ones. This is the transition of Proposition 2; since characters span the functions on a finite group, it is fully expressive while staying linear. (ii) Transitions may depend on the previous token as well as the current one, as through Mamba’s short convolution. (iii) A channel over Mn(C)M_n(\mathbb{C}) holds a vector of Cn\mathbb{C}^n and multiplies it by a general complex matrix, which may be singular; it is the costliest rung, used only where a smaller one does not train. With channels over R\mathbb{R}, C\mathbb{C} and H\mathbb{H}, a HyperSSM layer keeps the O(T)O(T) work, O(log⁡T)O(\log T) depth and constant memory per token of a diagonal SSM; a dense Mn(C)M_n(\mathbb{C}) block adds a factor n3n^3 to the scan.

Benchmark protocol, training and full results

Protocol. Following [19, 26]: training sequences of length 3 to 40, loss on the final token only, validation on lengths 40 to 256, best checkpoint. Tasks: the four regular languages of [45] (parity; even pairs; navigation on a cycle of five positions; arithmetic modulo 5 with multiplication before addition and subtraction) and the word problems of A5A_5 and S5S_5 with nn generators: two standard ones and n−2n - 2 random group elements, which raise the connectivity of the automaton [19]. On the group word problems we also test on lengths 256 to 1000, 25 times the training length, on fresh sequences not used for checkpoint selection. Baseline numbers are those reported in [19]; its extra generators are random and unpublished, so our A5A_5 and S5S_5 tasks match in size but not exactly.

Model choice. One real channel with a sign for parity (Z2\mathbb{Z}_2, whose irreducible representation is real); one complex channel for cycle navigation (Z5\mathbb{Z}_5); one complex channel on pairs of consecutive tokens for even pairs, since the first and last symbols agree exactly when the number of changes between neighbours is even; one quaternion channel with the sign-invariant readout for A5A_5; a real sign channel beneath a quaternion channel for S5S_5. Readouts are linear in the characters of the top layer.

Nothing about the task’s group is supplied. Real channels are ±1\pm1 in the forward pass in training and at test. Complex channels are trained continuously. Training on lengths up to 40 pins a phase only to within about the gap between answers divided by 40, so a continuous phase that is right on the training lengths drifts beyond them. By Theorem 1 a tracking channel’s transitions form a finite group, and the finite groups of unit complex numbers are the nn-th roots of unity. Each complex channel is therefore snapped to the smallest nn (searched up to 64) whose roots of unity give the best accuracy on the validation lengths, the set already used for checkpoint selection; nn is read off the trained model, never given. The same snapped score selects checkpoints during training, and after the snap the readout is fine-tuned on the snapped states, so the model evaluated is the model last trained. Quaternion channels and the dense M16(C)M_{16}(\mathbb{C}) block are continuous throughout, and no transition is rounded at evaluation.

What training needs. First, a minimal channel with a linear readout. KK phase channels read linearly give 2K2K Fourier features of the sequence, which can fit any labelling of the lengths up to TT once 2K+1>T2K + 1 > T: a wide or nonlinear readout can memorize the training lengths instead of learning the group. With sixteen complex channels and a small MLP, parity fit its training data and stayed at chance beyond it; one real channel with a linear readout learned it exactly. This is Definition 1 at work. Second, a short-length curriculum within the protocol: lengths 3 to 5 for the first 30% of training, then a ramp to 40. Third, restarts: a run either finds the group or stays near chance, so an attempt still far from exact halfway through training is restarted, up to 8 times for A5A_5 and S5S_5 and 20 times for the one-channel tasks. No layer is pretrained or given extra supervision; for S5S_5, the sign channel finds the abelianization S5→{±1}S_5 \to\{\pm1\} of Proposition 2 from the final answers alone, trained together with the quaternion layer above it. This works because the sign is exactly ±1\pm1 in the forward pass; with a=tan⁡h(g)a = \tan h(g), the signs stay where they started.

Additional results. The snap found n=2n = 2 for even pairs and n=5n = 5 for cycle navigation in every run, without being told either. Before the snap, the same trained models score near chance beyond the training lengths, at 49% and 17% on lengths 40–256: they had learned the group, and the continuous phases hid it. On the group tasks, the quaternion channel is continuous and the sign and quaternion layers of S5S_5 are trained together. PD-SSM is exact up to 8 generators of S5S_5. The best run of every group task stays exact on lengths 256–1000. Continuous channels drift slowly in some other runs (mean over runs on 256–1000: 94.8–99.9% for A5A_5, 92.3% for S5S_5 with 32 generators); not every run of S5S_5 with 8 generators finds the group.

Modular arithmetic: representation versus optimization

The automaton of modular arithmetic is not a group, but its pieces are simple: the nonzero residues under multiplication form Z4\mathbb{Z}_4, generated by 2; sums form Z5\mathbb{Z}_5; and multiplying by zero or starting a new term is a reset [39]. Two commutative layers suffice: a complex channel tracking the current product, reset at each new term and sent to zero by a factor 0, beneath a complex channel tracking the sum and turning, at each +, − or =, by an angle read linearly from the characters of the first. This is three real numbers of state, and, set by hand, it is exact on every length up to 1000. To learn it, training must discover the discrete logarithm mapping each residue to its rotation, the two layers must agree on it, and the absorbing zero dominates the training signal. Here earlier models need large dense blocks: in [26], block-diagonal transitions improve as blocks grow, from 37.7% with blocks of two to 76.6% with blocks of sixteen, and the best structured model adds a dense 16×1616 \times16 block. One dense M16(C)M_{16}(\mathbb{C}) channel on pairs of consecutive tokens reaches 99.3±0.4%99.3 \pm0.4\% on lengths 40–256 over 5 runs, above PD-SSM (96.2 ±\pm 3.4%) and second only to the LSTM (99.9 ±\pm 0.1%). Unlike the smaller channels, its transitions are general complex matrices, with no finite group to snap to. A small exact memory exists; finding it by gradient descent is open.

Gyroscope experiment: setup

A gyroscope reports the angular velocity ωk\omega_k of a body in its own frame, and the rotation between two times is Δq=eω1Δt/2⋯eωTΔt/2\Delta q = e^{\omega_1 \Delta t/2} \cdots e^{\omega_T \Delta t/2} in quaternions. Composing the same measured rotations in reverse order gives a median error of 41° after 2 s, against 1° in the right order.

Data. BROAD [32]: 39 recordings of one inertial sensor at 286 Hz with orientation from optical motion capture, averaged to 57 Hz, split into training (28), validation (3) and test (8); the test recordings are those that rotate. A model reads only the gyroscope readings in a window and predicts the rotation over it, with loss 1−⟨q^,q⟩21 - \langle\hat{q}, q \rangle^2 on the final step, which ignores the sign of a quaternion. Training windows are 1–2 s; test windows 1 s to 2 min.

Models. HyperSSM is one quaternion channel with generator vk=Wωk+bv_k = W\omega_k + b, 12 parameters in total. Baselines see the same inputs and are trained the same way: a selective complex diagonal SSM with 64 channels and an MLP readout (the memory of Mamba-3), and an LSTM with 128 units. Two untrained references: integrating the raw readings, and predicting no rotation.

Detailed results. Complex diagonal SSM vs no rotation: 32.5° vs 43.6° at 1 s, and no better at every longer length. LSTM: 3.2° at 1 s, 32° at 10 s, worse than no rotation from 30 s on. HyperSSM vs integration: 7.5° vs 8.6° at 30 s, 26.5° vs 30.9° at 2 min, spread at most 2.5° over seeds. WW and bb are the sensor’s scale, axis misalignment and bias, and can be read off directly. Nothing in the architecture is specific to inertial sensing: the general HyperSSM layer with the algebra the theory prescribes is the physical integrator.

Qubit experiment: setup

Task. A qubit starts in ∣0⟩\lvert0\rangle; a random sequence of gates from {H,S}\{H,S\} (Clifford) or {H,S,T}\{H,S,T\} (Clifford+TT) is applied, and the label is the Bloch vector r=(⟨X⟩,⟨Y⟩,⟨Z⟩)\boldsymbol{r} = (\langle X\rangle,\langle Y\rangle,\langle Z\rangle) of the final state, from which the Born rule gives every outcome probability, P(±)=(1±ri)/2P(\pm) = (1 \pm r_i)/2. As Bloch-sphere rotations, HH turns by π\pi about (x^+z^)/2(\hat{x}+\hat{z})/\sqrt{2}, SS by π/2\pi/2 about z^\hat{z} and TT by π/4\pi/4 about z^\hat{z}; global phases are irrelevant. Labels were checked against an explicit simulation with 2×22 \times2 unitaries (agreement to 2×10−82 \times10^{-8}). Training circuits have 1–40 gates, with 1–5 gates for the first 30% of training; test circuits have 1 to 1000 gates.

Imperfect gates. Each gate is replaced, once and for all, by a rotation whose angle is 2% short and whose axis is tilted by 2° in a random direction. Labels use these gates; the models see only the gate names; the reference simulator uses the ideal gates.

Models. HyperSSM is one quaternion channel in the tracking regime, xk=evgxk−1x_k = e^{v_g}x_{k-1} with one learned vg∈Im⁡Hv_g \in\operatorname{Im}\mathbb{H} per gate, and a readout linear in the ten entries of xxTxx^{\mathsf{T}}, which gives the Bloch vector exactly since its components are quadratic in xx. The baselines are a three-layer selective complex diagonal stack (32 channels per layer, MLP blocks between layers), the depth Proposition 2 requires for the Clifford group, and an LSTM with 128 units. All models use the loss ∥r^−r∥2\lVert\hat{r} - r\rVert^2 and the best of 8 short starts by training loss. The error is the angle between r^\hat{r} and rr.

Decoding the gates. The readout fixes the Bloch sphere only up to a common rotation, so the learned gates are compared with the true ones through frame-independent quantities: each gate’s rotation angle and the angles between gate axes. In all three settings these agree with the true gates to three decimal places, including the imperfect gates (HH: 176.400°, SS: 88.200°, TT: 44.100°; axes HH–SS 46.643°, HH–TT 44.580°, SS–TT 2.071°).

Figure S1. Qubit, all three settings. Median angle between predicted and true Bloch vectors against circuit length; training circuits 1–40 gates (shaded). HyperSSM is below the bottom of the axis (10−310^{-3} degrees) at every length in every setting. With ideal gates the simulator is exact and is not shown.

Protein backbone experiment: setup

Data. X-ray structures from the Protein Data Bank [35] with resolution at most 1.8 Å, one protein entity and 150–800 residues; 600 entries were sampled, of which 554 were parsed. Backbone atoms N, Cα^{\alpha}, C are taken from the first model (alternate location blank or A), and chains are cut into segments wherever the peptide bond C–N is missing or longer than 1.7 Å. Entries are split into training (442 entries, 147,661 residues), validation (55; 18,168) and test (56; 18,071).

Frames and target. Residue ii has frame Ri=[e1 e2 e3]R_i = [e_1\ e_2\ e_3] with e1e_1 along Cα^\alpha →C, e2e_2 in the N–Cα^\alpha–C plane, and e3=e1×e2e_3 = e_1 \times e_2. The target is Ri→j=RiTRj=FiFi+1⋯Fj−1R_{i\to j} = R_i^T R_j = F_i F_{i+1} \cdots F_{j-1}, with Fk=RkTRk+1F_k = R_k^T R_{k+1}. For rigid bond geometry,

Fk=K0eψkuψ/2K1eωkuω/2K2eϕk+1uϕ/2K3,(9)F_k = K_0 e^{\psi_k u_\psi/2} K_1 e^{\omega_k u_\omega/2} K_2 e^{\phi_{k+1}u_\phi/2} K_3, \tag*{(9)}

with constant rotations KmK_m and fixed unit axes uu, and torsions ψk=∠(Nk,Ckα,Ck,Nk+1)\psi_k = \angle(N_k, C_k^\alpha, C_k, N_{k+1}), ωk=∠(Ckα,Ck,Nk+1,Ck+1α)\omega_k = \angle(C_k^\alpha, C_k, N_{k+1}, C_{k+1}^\alpha), ϕk+1=∠(Ck,Nk+1,Ck+1α,Ck+1)\phi_{k+1} = \angle(C_k, N_{k+1}, C_{k+1}^\alpha, C_{k+1}).

Tokens and model. A stretch of nn steps becomes 6n+16n + 1 tokens (τt,αt)(\tau_t, \alpha_t): for each step, a bond token, ψ\psi, a bond token, ω\omega, a bond token, ϕ\phi; then a final bond token; eight types in all, with αt=0\alpha_t = 0 for bond tokens. HyperSSM is the tracking-regime channel

xt=evtxt−1,x0=1,vt=W(eτt⊗[1,αt])=Wτt,0+αtWτt,1,q^=xˉT,(10)x_t = e^{v_t}x_{t-1}, \quad x_0 = 1, \quad v_t = W(e_{\tau_t} \otimes[1,\alpha_t]) = W_{\tau_t,0} + \alpha_t W_{\tau_t,1}, \quad\hat{q} = \bar{x}_T, \tag*{(10)}

where the conjugate readout turns the left products of the recurrence into the chain order of Eq. (9) (the sign of WW is learned). Setting Wtorsion,0=0W_{\mathrm{torsion},0} = 0, Wtorsion,1=u/2W_{\mathrm{torsion},1} = u/2 and eWbond,0=Ke^{W_{\mathrm{bond},0}} = K reproduces ideal geometry exactly, so the model is exact for rigid geometry. The input term is zero: each token acts only through its transition. The baselines see the same tokens with features (one-hot type, α\alpha, cos⁡α\cos\alpha, sin⁡α\sin\alpha): a selective complex diagonal SSM with 64 channels and an MLP readout, and an LSTM with 128 units.

Training. Loss 1 — ⟨q^,qi→j⟩2\langle\hat{q},q_{i\to j}\rangle^2, error 2 arccos⁡∣⟨q^,qi→j⟩∣\arccos|\langle\hat{q},q_{i\to j}\rangle|, both blind to the sign of qq. Stretches of 1–16 residues, with 1–2 for the first 30% of training; 3000 steps; best checkpoint by the median error on validation stretches of 64 residues. Products of rotations have local minima: fitted to exact ideal-geometry targets, HyperSSM reaches 0.0° to 0.3° from 3 of 8 random starts and about 32° from the others. Every model therefore tries 8 initializations for 300 steps on 1–2 residues and keeps the one with the lowest training loss.

References. Ideal geometry rebuilds the backbone from the torsions with the bond lengths and angles of Engh and Huber [36] (N–Cα^\alpha 1.458 Å, Cα^\alpha–C 1.525 Å, C–N 1.329 Å; N–Cα^\alpha–C 111.2°, Cα^\alpha–C–N 116.2°, C–N–Cα^\alpha 121.7°) and reads off the relative frame; the wrong-order reference multiplies its per-residue rotations in reverse.

Results are in Table S1; the s.d. over seeds is at most 0.3° for HyperSSM up to 64 residues.

residues1248163264128256
no rotation106.2133.5107.5128.4140.0132.0129.6136.1129.5
ideal geometry2.74.06.39.214.420.426.546.063.7
ideal, wrong order2.738.358.286.795.699.7108.5119.6131.5
HyperSSM2.6±0.03.7±0.05.9±0.08.3±0.112.1±0.217.8±0.223.7±0.336.2±1.049.3±0.3
C diagonal8.5±2.225.9±8.2104.6±27.9122.0±12.6126.5±5.1135.9±0.5135.0±1.6131.0±2.9130.4±3.0
LSTM7.7±0.814.8±1.5106.2±28.3126.5±8.7132.0±5.3136.9±1.1132.8±2.7131.3±2.2132.9±1.9

Table S1. Protein backbone. Median orientation error (degrees) of residue jj in the frame of residue ii against the number of residues between them, on held-out proteins; mean over 3 seeds.

Reading trained models: proof of Proposition 3 and procedures

Why the weights are legible. A probe trained on hidden states can find information the model does not use, and can miss information stored nonlinearly [46]. In a tracking channel neither problem arises. Theorem 1 fixes what the state is (an element of CC), Proposition 1 fixes its coordinates up to a change of basis within each block, and the readout’s invariance fixes what is ignored (NN). Interpreting the model reduces to identifying a homomorphism C→KC \to K, a finite problem when KK is finite. This is the recurrent counterpart of the universality observed in networks trained on group operations, which were found to compose elements through the group’s representations [47], and in networks trained on modular addition, which were found to rotate a clock [48]. There it was an empirical finding about what training happened to produce; for a linear recurrent memory that tracks, Theorem 1 says it cannot be otherwise, and a complex channel is that clock by construction.

Proof of Proposition 3. (i) The pair (Q(w),π(w))(Q(w),\pi(w)) evolves deterministically: reading ss sends (Q,g)(Q,g) to (a(s,Q)Q,g(s)g)(a(s,Q)Q,g(s)g), where a(s,Q)a(s,Q) is the transition chosen by ss and, in a stack, by the states of the lower layers held in QQ. If states take values in a finite set SS, this is a finite automaton on S×KS \times K, and the pairs reached by nonempty words are found by breadth-first search from (1,e)(1,e) in at most ∣S∣∣K∣|S||K| steps. The model tracks KK at every length if and only if the readout gives the correct answer on each of these pairs, since every word of every length ends in one of them. For a single channel whose transitions generate a finite group CC, the reachable states lie in CC, because a submonoid of a finite group generated by its elements is the subgroup they generate. (ii) Let aka_k be the trained transitions along a word and ak∗a_k^* those of the certified model, with ∥ak−ak∗∥≤ϵ\lVert a_k-a_k^*\rVert\le\epsilon and all norms at most one, so that decay (α>0\alpha> 0) is allowed. Telescoping,

Q(w)−Q∗(w)=∑k=1TaT⋯ak+1(ak−ak∗)ak−1∗⋯a1∗,(11)Q(w)-Q^*(w)=\sum_{k=1}^{T}a_T\cdots a_{k+1}(a_k-a_k^*)a_{k-1}^*\cdots a_1^*, \tag*{(11)}

so ∥Q(w)−Q∗(w)∥≤Tϵ\lVert Q(w)-Q^*(w)\rVert\le T\epsilon. For Tϵ<rT\epsilon< r the state lies in the ball of radius rr around Q∗(w)Q^*(w), inside the decision region of the correct answer by (i). For a stack, the same bound applies to the top channel when the layers below are exact, as the sign channel is. □

Guarantee versus observation. The horizon r/ϵr/\epsilon is a guarantee, not a prediction of failure. Errors that are systematic, such as one generator turning slightly too fast, add linearly; errors that differ across symbols partly cancel, so a run may stay exact well beyond r/ϵr/\epsilon. Comparing the two over runs tests whether the slow drift of the continuous runs (SM S9) is explained by the distance of their transitions from an exact group.

Decoding a quaternion transition. A unit quaternion a=cos⁡θ2+sin⁡θ2n^a=\cos\frac{\theta}{2}+\sin\frac{\theta}{2}\hat n is a rotation by θ=2arccos⁡∣a0∣\theta=2\arccos|a_0| about n^\hat n; the absolute value makes the reading independent of the decoder that ignores signs. In A5A_5, elements of order 2, 3, and 5 act on an icosahedron as rotations by 180°, 120°, and 72° or 144°, and the axes of any two elements meet at an angle between symmetry axes of one icosahedron.

Distance to an exact model. For analysis only, the permutation g(s)g(s) of each symbol is used; it is never given in training. Fix an exact lift a∗(s)a^*(s) of g(s)g(s) into the 120 unit quaternions of the binary icosahedral group, for each of the two inequivalent embeddings of A5A_5 in the rotation group (they are exchanged by 5↦−5\sqrt{5}\mapsto-\sqrt{5}, which swaps 72° and 144°). Then

ϵ=min⁡U, embedding, signsmax⁡s∥a(s)∓Ua∗(s)U−1∥,(12)\epsilon=\min_{U,\ \mathrm{embedding},\ \mathrm{signs}}\max_s\left\lVert a(s)\mp Ua^*(s)U^{-1}\right\rVert, \tag*{(12)}

minimized over unit quaternions UU (three parameters, from several random starts). For S5S_5, the sign channel is compared with the parity of each generator; the top channel has one transition per symbol and sign below, and the exact model also depends on the coset representative τ\tau of Proposition 2, one of 60 odd permutations, searched exhaustively. The radius rr follows from the readout: for an argmax over logits linear in qqTqq^{\mathsf{T}}, with margin μ\mu on the exact states, r≥μ/Λr \ge\mu/\Lambda, where Λ\Lambda bounds the Lipschitz constant of the logit differences on the unit ball.

Gyroscope. The exact integrator is v=ωΔt/(2Δ)v = \omega\Delta t/(2\Delta), that is W=Δt2ΔIW = \frac{\Delta t}{2\Delta} I and b=0b = 0 in vk=Wωk+bv_k = W\omega_k + b (Eq. (8)). The learned WW departs from it by a symmetric part (axis scale factors and cross-axis coupling) and an antisymmetric part (a small rotation between sensor and body frames), and bb is the gyroscope bias up to the same scale. These can be compared with a calibration obtained independently of the model, for example the mean reading during rest segments of the recordings.

Scope and extensions

The theory covers linear recurrences, bounded transitions and exact readouts. Most sequences also overwrite memory, and by the Krohn–Rhodes theorem [39] every finite automaton is built from groups and resets, suggesting that stacks of such channels with resets can recognize all regular languages; modular arithmetic (SM S9 S9.1) is an example. Many physical processes, such as rigid-body rotations, as with the gyroscope, qubit gates, holonomies and braids of anyons, are ordered products in the same groups. So are the frames of a protein backbone, and with translations added, rigid motions in general, which dual quaternions compose in a single associative algebra. The certificate of Proposition 3 extends to any model whose states, after projection, take finitely many values; whether channels inside large hybrid models stay close enough to an exact group to be read this way is open.

References

  1. [1]A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, L. Kaiser, and I. Polosukhin, Attention is all you need, in Advances in Neural Information Processing Systems (2017).arxiv.org/abs/1706.03762
  2. [2]A. Gu, K. Goel, and C. Ré, Efficiently modeling long sequences with structured state spaces, in International Conference on Learning Representations (2022).arxiv.org/abs/2111.00396
  3. [3]A. Orvieto, S. L. Smith, A. Gu, A. Fernando, C. Gulcehre, R. Pascanu, and S. De, Resurrecting recurrent neural networks for long sequences, in Proceedings of the 40th International Conference on Machine Learning (2023).arxiv.org/abs/2303.06349
  4. [4]A. Gu and T. Dao, Mamba: Linear-time sequence modeling with selective state spaces, in Conference on Language Modeling (2024).arxiv.org/abs/2312.00752
  5. [5]T. Dao and A. Gu, Transformers are SSMs: Generalized models and efficient algorithms through structured state space duality, in Proceedings of the 41st International Conference on Machine Learning (2024).arxiv.org/abs/2405.21060
  6. [6]A. Lahoti, K. Y. Li, B. Chen, C. Wang, A. Bick, J. Z. Kolter, T. Dao, and A. Gu, Mamba-3: Improved sequence modeling using state space principles, in International Conference on Learning Representations (2026) arXiv:2603.15569.
  7. [7]O. Lieber, B. Lenz, H. Bata, G. Cohen, J. Osin, I. Dalmiedos, E. Safahi, S. Meirom, Y. Belinkov, S. Shalev-Shwartz, O. Abend, R. Alon, T. Asida, A. Bergman, R. Glozman, M. Gokhman, A. Manevich, N. Ratner, N. Rozen, E. Shwartz, M. Zusman, and Y. Shoham, Jamba: A hybrid transformer-mamba language model, arXiv preprint arXiv:2403.19887 (2024).arxiv.org/abs/2403.19887
  8. [8]NVIDIA, Nemotron-H: A family of accurate and efficient hybrid Mamba-transformer models, arXiv preprint arXiv:2504.03624 (2025).
  9. [9]Falcon-LLM Team, Falcon-H1: A family of hybrid-head language models redefining efficiency and performance, arXiv preprint arXiv:2507.22448 (2025).
  10. [10]A. N. Shikder, R. Dey, S. Auddy, T. Liboni, A. N. Busch, A. Powanwe, J. Minač, R. C. Budzinski, and L. E. Muller, An explicit operator explains end-to-end computation in the modern neural networks used for sequence and language modeling, arXiv preprint arXiv:2604.20595 (2026), arXiv:2604.20595 [cs.NE].arxiv.org/abs/2604.20595
  11. [11]A. Gu, A. Gupta, K. Goel, and C. Ré, On the parameterization and initialization of diagonal state space models, in Advances in Neural Information Processing Systems (2022).arxiv.org/abs/2206.11893
  12. [12]W. Merrill, J. Petty, and A. Sabharwal, The illusion of state in state-space models, in Proceedings of the 41st International Conference on Machine Learning (2024).arxiv.org/abs/2404.08819
  13. [13]R. Grazzi, J. Siems, A. Zela, J. K. H. Franke, F. Hutter, and M. Pontil, Unlocking state-tracking in linear RNNs through negative eigenvalues, in International Conference on Learning Representations (2025).arxiv.org/abs/2411.12537
  14. [14]Y. Sarrof, Y. Veitsman, and M. Hahn, The expressive capacity of state space models: A formal language perspective, in Advances in Neural Information Processing Systems (2024).DOI
  15. [15]M. Shakerinava, B. Khavari, S. Ravanbakhsh, and S. Chandar, The expressive limits of diagonal SSMs for state-tracking, in International Conference on Learning Representations (2026).arxiv.org/abs/2603.01959
  16. [16]G. Heo, T. Nogtiaoacо, K. Irie, S. J. Gershman, and B. L. Sabatini, Why depth matters in parallelizable sequence models: A Lie algebraic view, arXiv preprint arXiv:2603.05573 (2026).arxiv.org/abs/2603.05573
  17. [17]M. Arjovsky, A. Shah, and Y. Bengio, Unitary evolution recurrent neural networks, in Proceedings of the 33rd International Conference on Machine Learning (2016).arxiv.org/abs/1511.06464
  18. [18]J. Siems, T. Carstensen, A. Zela, F. Hutter, M. Pontil, and R. Grazzi, DeltaProduct: Improving state-tracking in linear RNNs via Householder products, in Advances in Neural Information Processing Systems (2025).arxiv.org/abs/2502.10297
  19. [19]A. Terzić, N. Menet, M. Hersche, T. Hofmann, and A. Rahimi, Structured sparse transition matrices to enable state tracking in state-space models, in Advances in Neural Information Processing Systems (2025).
  20. [20]Z. Jia, Non-commutative Lie-algebraic state-space models: Finite-division variety laws, semidirect cascades, and gradient saddle escape, arXiv preprint arXiv:2610.00329 (2026), v5, 30 Oct 2026; v1 (29 Sep 2026) titled “Beyond Diagonal State Space Models: Exact Non-Abelian Group Tracking, Solvability Barriers, and Geometric Physical Manifolds”.arxiv.org/abs/2610.00329
  21. [21]S. De, S. L. Smith, A. Fernando, A. Botev, G. Cristian-Muraru, A. Gu, R. Haroun, L. Berrada, Y. Chen, S. Srinivasan, G. Desjardins, A. Doucet, D. Budden, Y. W. Teh, R. Pascanu, N. De Freitas, and C. Gulcehre, Griffin: Mixing gated linear recurrences with local attention for efficient language models, arXiv preprint arXiv:2402.19427 (2024).arxiv.org/abs/2402.19427
  22. [22]Z. Hu, N. Ahmadi Daryakenari, Q. Shen, K. Kawaguchi, and G. E. Karniadakis, State-space models are accurate and efficient neural operators for dynamical systems, arXiv preprint arXiv:2409.02321 (2024).
  23. [23]J. Zheng, W. Li, N. Xu, J. Zhu, X. Lin, and X. Zhang, Alias-free Mamba neural operator, in Advances in Neural Information Processing Systems (2024).DOI
  24. [24]G. Benton, M. Finzi, P. Izmailov, and A. G. Wilson, Learning invariances in neural networks from training data, in Advances in Neural Information Processing Systems, Vol. 33 (2020).
  25. [25]J. Yang, R. Walters, N. Dehmamy, and R. Yu, Generative adversarial symmetry discovery, in Proceedings of the 40th International Conference on Machine Learning, in Proceedings of Machine Learning Research, Vol. 202 (2023).arxiv.org/abs/2302.00236
  26. [26]B. Walker, L. Yang, N. Muça Cirone, C. Salvi, and T. Lyons, Structured linear controlled differential equations: Maximally expressive and parallel-in-time sequence models, in Advances in Neural Information Processing Systems (2025).
  27. [27]D. A. M. Barrington, Bounded-width polynomial-size branching programs recognize exactly those languages in NC¹, Journal of Computer and System Sciences 38, 150 (1989).DOI
  28. [28]G. E. Blelloch, Prefix Sums and Their Applications, Tech. Rep. CMU-CS-90-190 (Carnegie Mellon University, 1990).
  29. [29]E. Martin and C. Cundy, Parallelizing linear recurrent neural nets over sequence length, in International Conference on Learning Representations (2018).arxiv.org/abs/1709.04057
  30. [30]T. Bröcker and T. tom Dieck, Representations of Compact Lie Groups, Graduate Texts in Mathematics, Vol. 98 (Springer, 1985).DOI
  31. [31]T.-Y. Lam, A First Course in Noncommutative Rings, 2nd ed., Graduate Texts in Mathematics, Vol. 131 (Springer, 2001).
  32. [32]D. Laidig, M. Caruso, A. Cereatti, and T. Seel, BROAD—a benchmark for robust inertial orientation estimation, Data 6, 72 (2021).DOI
  33. [33]E. Nielsen, J. K. Gamble, K. Rudinger, T. Scholten, K. Young, and R. Blume-Kohout, Gate set tomography, Quantum 5, 557 (2021).DOI
  34. [34]J. Jumper, R. Evans, A. Pritzel, T. Green, M. Figurnov, O. Ronneberger, K. Tunyasuvunakool, R. Bates, A. Žídek, A. Potapenko, et al., Highly accurate protein structure prediction with AlphaFold, Nature 596, 583 (2021).DOI
  35. [35]H. M. Berman, J. Westbrook, Z. Feng, G. Gilliland, T. N. Bhat, H. Weissig, I. N. Shindyalov, and P. E. Bourne, The Protein Data Bank, Nucleic Acids Research 28, 235 (2000).
  36. [36]R. A. Engh and R. Huber, Accurate bond and angle parameters for X-ray protein structure refinement, Acta Crystallographica Section A 47, 392 (1991).DOI
  37. [37]J. Yim, B. L. Trippe, V. De Bortoli, E. Mathieu, A. Doucet, R. Barzilay, and T. Jaakkola, SE(3) diffusion model with application to protein backbone generation, in Proceedings of the 40th International Conference on Machine Learning (2023).arxiv.org/abs/2302.02277
  38. [38]J. L. Watson, D. Juergens, N. R. Bennett, B. L. Trippe, J. Yim, H. E. Eisenach, W. Ahern, A. J. Borst, R. J. Ragotte, L. F. Milles, et al., De novo design of protein structure and function with RFdiffusion, Nature 620, 1089 (2023).DOI
  39. [39]K. Krohn and J. Rhodes, Algebraic theory of machines. I. Prime decomposition theorem for finite semigroups and machines, Transactions of the American Mathematical Society 116, 450 (1965).DOI
  40. [40]A. Katharopoulos, A. Vyas, N. Pappas, and F. Fleuret, Transformers are RNNs: Fast autoregressive transformers with linear attention, in Proceedings of the 37th International Conference on Machine Learning (2020).arxiv.org/abs/2006.16236
  41. [41]S. Yang, B. Wang, Y. Zhang, Y. Shen, and Y. Kim, Parallelizing linear transformers with the delta rule over sequence length, in Advances in Neural Information Processing Systems (2024).arxiv.org/abs/2406.06484
  42. [42]J. Su, M. Ahmed, Y. Lu, S. Pan, W. Bo, and Y. Liu, RoFormer: Enhanced transformer with rotary position embedding, Neurocomputing 568, 127063 (2024).arxiv.org/abs/2104.09864
  43. [43]T. Parcollet, M. Ravanelli, M. Morchid, G. Linares, C. Trabelsi, R. De Mori, and Y. Bengio, Quaternion recurrent neural networks, in International Conference on Learning Representations (2019).arxiv.org/abs/1806.04418
  44. [44]J. H. Conway and D. A. Smith, On Quaternions and Octonions: Their Geometry, Arithmetic, and Symmetry (A K Peters, 2003).
  45. [45]G. Delétang, A. Ruoss, J. Grau-Moya, T. Genewein, L. K. Wenliang, E. Catt, C. Cundy, M. Hutter, S. Legg, J. Veness, and P. A. Ortega, Neural networks and the Chomsky hierarchy, in International Conference on Learning Representations (2023).arxiv.org/abs/2207.02098
  46. [46]K. Li, A. K. Hopkins, D. Bau, F. Viégas, H. Pfister, and M. Wattenberg, Emergent world representations: Exploring a sequence model trained on a synthetic task, in International Conference on Learning Representations (2023).arxiv.org/abs/2210.13382
  47. [47]B. Chughtai, L. Chan, and N. Nanda, A toy model of universality: Reverse engineering how networks learn group operations, in Proceedings of the 40th International Conference on Machine Learning (2023).arxiv.org/abs/2302.03025
  48. [48]N. Nanda, L. Chan, T. Lieberum, J. Smith, and J. Steinhardt, Progress measures for grokking via mechanistic interpretability, in International Conference on Learning Representations (2023).arxiv.org/abs/2301.05217

Paper details

vlnc:W_wvu9hfr5
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents