State Propagation Also Satisfies: A Complex-Valued State-Space Model for Deterministic State Tracking
Proposes CSP, a complex-valued state-space model relying solely on state propagation, achieving 100% accuracy on deterministic tasks.
Key Findings
Methodology
The Complex State Propagator (CSP) employs complex vectors as hidden states, updated via input-dependent phase rotations. It eliminates intermediate output projections, using block-level skip connections, complex normalization, and SiLU activations to stabilize deep propagation. The core mechanism involves element-wise rotation, complex recurrence, and normalization, encoding information primarily in phase. Experiments on parity, mod-3 counting, and parenthesis matching tasks show CSP achieves perfect accuracy, demonstrating its capacity for exact memorization and compositional reasoning.
Key Results
- CSP attains 100% accuracy and F1 scores across all three tasks, with training epochs around 50 for parity, 150 for parenthesis matching. Ablation studies confirm the importance of rotation, skip connections, and complex normalization. Using Focal Loss, the model effectively handles class imbalance, ensuring successful learning.
- The model, with 3 layers and 64 hidden units, trained over 300 epochs with Adam optimizer, outperforms traditional transformers and linear state-space models in accuracy and parameter efficiency, especially on tasks requiring precise discrete memory.
- Ablation results show removing rotation or normalization causes performance collapse, validating their critical roles. Skip connections facilitate gradient flow in deep stacks. The model exhibits a 'grokking' phenomenon—long plateau followed by abrupt perfect generalization—linked to phase boundary crossing in the complex domain.
Significance
This work challenges the reliance on attention mechanisms for sequence modeling, introducing a parameter-efficient, stable, and highly accurate approach for deterministic tasks. By leveraging complex phase rotations, CSP offers a new paradigm for exact discrete memory, especially suited for tasks demanding precise cyclical state transitions. Its theoretical and empirical strengths suggest broad applicability in logic, symbolic reasoning, and resource-constrained environments, paving the way for hardware-friendly AI systems.
Technical Contribution
CSP innovatively employs complex vectors with element-wise learned rotations, combined with block-level skip connections and complex normalization, to enable deep, stable state propagation. It provides a rigorous mathematical framework for exact phase-based state transitions, validated by perfect task performance. The model reduces parameter count compared to dense architectures and introduces a novel inductive bias aligned with discrete, cyclic patterns, offering new insights into sequence modeling.
Novelty
This is the first model relying solely on state propagation with complex-valued states and phase rotations for deterministic sequence tasks. Unlike prior models that depend on attention or dense recurrence, CSP leverages the properties of complex rotations to achieve exact periodicity and memorization. Its architecture simplifies deep networks while maintaining expressive power, representing a significant departure from traditional RNNs and linear SSMs.
Limitations
- The model's effectiveness is primarily demonstrated on discrete, cyclic tasks; its performance on continuous or noisy data remains untested. The reliance on complex rotations makes it sensitive to phase boundary issues, requiring careful handling. Scalability to very long sequences or multi-modal data is yet to be validated. Additionally, the current decoding mechanism, involving phase extraction, introduces parameter overhead, which future work aims to optimize.
Future Work
Future directions include developing fully complex decoders to reduce parameter overhead, integrating low-rank layer coupling for deeper architectures, and extending CSP to continuous or noisy data domains. Exploring hardware-efficient implementations and applying CSP to broader tasks like natural language understanding or multi-modal reasoning are promising avenues. Further theoretical analysis of phase boundary dynamics and robustness will enhance model reliability and applicability.
AI Executive Summary
Sequence modeling remains a fundamental challenge in AI, with Transformer architectures leading due to their attention mechanisms. However, attention-based models suffer from quadratic complexity and inefficiencies in tasks requiring exact memorization. To address this, we introduce the Complex State Propagator (CSP), a novel model that relies solely on state propagation within a complex-valued domain.
CSP encodes hidden states as complex vectors, updated through learned phase rotations that naturally capture cyclic and periodic patterns. Its architecture eschews intermediate output projections, instead passing states directly across layers, stabilized by block-level skip connections, complex normalization, and nonlinearities at sequence boundaries. This design ensures deep propagation stability and efficient parameter use.
Experiments on parity, mod-3 counting, and parenthesis matching tasks demonstrate CSP's ability to reach 100% accuracy rapidly, outperforming traditional models in both efficiency and precision. The model exhibits a characteristic 'grokking' phenomenon—initial plateau followed by abrupt perfect generalization—linked to phase boundary crossing in the complex domain. These results highlight the power of phase-based representations for discrete, deterministic functions.
The significance of this work lies in its challenge to attention-centric paradigms, proposing a parameter-efficient, theoretically grounded alternative for exact state tracking. Its innovations open new pathways for resource-constrained AI systems, symbolic reasoning, and hardware-friendly implementations. Future work will focus on optimizing decoding, extending to continuous data, and integrating low-rank layer coupling, aiming to broaden CSP's applicability and robustness across diverse sequence tasks.
Deep Analysis
Background
Sequence modeling has evolved from RNNs to Transformer architectures, which leverage attention for capturing long-range dependencies. While attention mechanisms excel in many tasks, their quadratic complexity and parameter overhead limit scalability, especially for long sequences. Linear state-space models like S4 and Mamba have been proposed to reduce complexity, but they primarily excel in continuous or memory-based tasks, not in discrete, exact memorization. Recent advances suggest complex-valued representations can enhance expressiveness, especially for cyclic or periodic patterns. This background motivates exploring models that combine complex domain properties with minimalistic recurrence for precise discrete state tracking.
Core Problem
Existing sequence models struggle with tasks requiring exact memorization of discrete states, such as parity or parenthesis matching. Attention mechanisms, though powerful, are computationally intensive and over-parameterized for simple deterministic functions. Linear models often cannot represent exact cycles due to eigenvalue restrictions. Deep RNNs face gradient issues, and current linear SSMs lack the capacity for precise discrete state transitions. The core challenge is designing a lightweight, stable model capable of exact cyclic state representation, scalable to deep architectures, and trainable without gradient vanishing or explosion.
Innovation
This work introduces CSP, a complex-valued state-space model that relies solely on state propagation. Key innovations include: 1) element-wise learned phase rotations enabling exact cyclic state transitions; 2) elimination of intermediate output projections, simplifying the architecture; 3) block-level skip connections and complex normalization for deep stability; 4) phase-focused decoding that encodes information in the angular domain. These innovations collectively enable the model to perform precise discrete memory tasks efficiently, outperforming traditional RNNs and linear models in accuracy and parameter efficiency.
Methodology
- �� Input sequences are linearly transformed into complex vectors at each timestep. • For each input, a rotation angle θt is computed via a learnable projection, controlling phase rotation. • The input vector is rotated element-wise by eiθt, updating the phase. • The rotated input combines with the previous state through a complex recurrence, modulated by learned decay αt and scale γt. • Block-level skip connections add the original input after nonlinear activation, preserving information. • Complex normalization projects the state onto the unit circle, emphasizing phase encoding. • Multiple layers stack these operations, with training stabilized via Adam optimizer, learning rate decay, and gradient clipping.
Experiments
The model was tested on three tasks: parity check, mod-3 counting, and parenthesis matching, each with sequence length 16. Using 3 layers, 64 hidden units, and training over 300 epochs, CSP achieved perfect accuracy and F1 scores. Ablation studies confirmed the importance of rotation, skip connections, and complex normalization. The Focal Loss was employed in imbalanced scenarios, notably for parenthesis matching, ensuring effective learning. The training dynamics exhibited grokking, with long plateau phases followed by sudden convergence, indicating phase boundary crossing. Comparisons with Transformer and linear models demonstrated superior efficiency and exactness in discrete tasks.
Results
CSP achieved 100% accuracy and F1 scores across all tasks, with convergence in fewer than 150 epochs. Ablation experiments showed that removing rotation or normalization caused performance collapse, confirming their critical roles. The use of Focal Loss was essential in imbalanced class scenarios. The training process revealed a grokking phenomenon, where models remained near chance for many epochs before rapidly achieving perfect generalization, driven by phase boundary crossing in the complex domain. These results validate CSP’s capacity for exact discrete state tracking with high efficiency.
Applications
CSP is suitable for symbolic reasoning, logic verification, and tasks requiring exact memorization, such as code analysis or formal language processing. Its parameter efficiency makes it ideal for resource-constrained environments like edge devices. The approach can be extended to natural language tasks involving cyclic or repetitive patterns, and integrated into hardware-efficient AI systems for embedded applications, enabling fast, accurate, and low-cost sequence processing.
Limitations & Outlook
The current model is primarily validated on synthetic, discrete tasks; its performance on noisy, real-world data remains untested. Sensitivity to phase boundary handling may affect robustness. Scalability to very long sequences or multi-modal data is uncertain. The decoding mechanism involving phase extraction adds parameter overhead, which future work aims to optimize. Further research is needed to adapt CSP to continuous, noisy, or high-dimensional data scenarios.
Plain Language Accessible to non-experts
想象你有一个旋转的风车,每次风吹过,它会旋转不同的角度。这个模型就像用风的力量来告诉风车该转多快、多远。每次输入一个信息,就像风吹动风车,风车会根据风的强弱和方向旋转不同的角度。风车的转动代表了你对过去信息的记忆,随着时间推移,它不断旋转,形成一个节奏。这个节奏帮助你记住一些周期性的事情,比如判断一串符号是否平衡,或者统计某个数字出现的次数。它不用复杂的记忆结构,只靠风的力量和风车的旋转,就能完成很多复杂的任务。就像用风的节奏来记忆和处理信息,简单又有效。
ELI14 Explained like you're 14
想象你在玩一个旋转的陀螺,每次你用手推它,它会转到不同的角度。这个模型就像用陀螺的旋转来记住一串数字。每次输入一个数字,就像推陀螺一样,陀螺会转到一个特定的角度。随着输入的变化,陀螺不断旋转,形成一个节奏。这个节奏能帮你记住数字的奇偶性或者是否匹配括号。它不用复杂的记忆方法,只用旋转的角度来代表信息。就像你用手转动陀螺来告诉自己“我记住了这个数字”,然后用旋转的角度判断下一步。它特别擅长处理那些需要记住周期性规律的任务,比如判断一串符号是不是平衡,或者统计某个数字出现的次数。用简单的旋转和记忆,就能解决复杂的问题,就像个旋转的魔法师一样聪明!
Abstract
Transformer-based architectures have dominated sequence modeling, largely due to the expressive power of attention mechanisms. However, for a class of deterministic state tracking tasks---such as parity checking, modular counting, and parenthesis matching---attention may be overkill. In this paper, we show that \textbf{state propagation alone is sufficient}. We propose the \textbf{Complex State Propagator (CSP)}, a minimalistic recurrent architecture that \textbf{only propagates hidden states} across layers without output projections at intermediate steps. The state is represented as a complex-valued vector, updated via input-dependent rotations in the complex domain. To enable deep propagation without gradient vanishing or degradation, we introduce a \textbf{block-level skip connection} alongside element-wise complex normalization and SiLU activation at sequence boundaries. Applied with Focal Loss, CSP achieves \textbf{100\% accuracy} with perfect F1 scores across canonical tasks.