Beyond Memory Gating:
Phase as a Missing Axis in Linear-Attention State Transitions
Tiantian Zhang ·
Department of Computer Science, Columbia University
Exploring phase-augmented recurrent memory systems and the role of
state-transition algebra in next-generation linear attention.
Three years of linear-attention research have largely concentrated on the memory-write problem: what to store, how strongly, and how fast to forget. The gating literature, including RetNet, RWKV, Mamba, DeltaNet, Gated DeltaNet, and KDA, is correspondingly mature.
We argue that a second axis has been left relatively underexplored: the spectrum of the state-transition operator itself. Semidirect Fourier Delta Attention, or SFDA, lifts real diagonal decay to complex or block-rotational phase decay while preserving the chunkwise factorization path that makes KDA-style systems efficient.
Connection to State Tracking in Transformers
A recent DeepMind paper The Topological Trouble With Transformers , argues that purely feedforward Transformer architectures face a structural difficulty with dynamic state tracking. The core issue is not simply context length: the model may retrieve past text, but maintaining an evolving latent state across many updates is a different computational problem.
This perspective is closely aligned with the motivation for SFDA. Current linear-attention and delta-memory systems already introduce recurrence:
However, in KDA-style systems the transition operator is still largely contractive:
This gives the model a mechanism for writing, erasing, and forgetting, but it does not naturally provide oscillatory or reversible state evolution. SFDA asks whether the next bottleneck is not recurrence itself, but the algebra of the recurrent transition.
Under this view, SFDA is one possible response to the state-tracking problem: keep the efficiency of KDA-style recurrent memory, but enrich the internal transition dynamics so the state can rotate, cycle, and represent structured automata rather than only decay.
1. The axis the field has not optimized
A linear-attention memory layer maintains a recurrent matrix state:
\[ S_t = A_t S_{t-1} + B_t . \]In KDA-style systems, the update can be written as
\[ S_t = (I-\beta_t k_t k_t^\top)D_tS_{t-1} + \beta_t k_t v_t^\top . \]Here \(k_t\) is the write location, \(v_t\) is the content, \(\beta_t\) is the write strength, and \(D_t\) is the retention or forgetting schedule. Much of the recent field has focused on improving the gate:
\[ \beta_t . \]2. What real-spectrum memory cannot do
A real scalar decay \(\alpha \in [0,1]\) has no period. Products of such gates can shrink, retain, or erase information, but they cannot naturally implement rotation. This matters for modular counters, reversible dynamics, phase tracking, and semidirect-product automata.
These tasks require memory to move through state space, not merely accumulate or decay. If a hybrid Transformer asks linear memory to replace many global-attention layers, then the expressive ceiling of the linear transition becomes the system's ceiling.
3. SFDA: enrich the transition, keep the kernel
SFDA replaces the real diagonal decay \(D_t\) with a complex or block-rotational diagonal:
\[ A_t = (I-\beta_t k_t k_t^\top)\Lambda_t, \qquad \Lambda_t = \operatorname{diag}\!\left(\alpha_{t,i}e^{i\theta_{t,i}}\right). \]Equivalently, in real coordinates:
\[ \Lambda_t = \bigoplus_i \alpha_{t,i} R(\theta_{t,i}), \qquad R(\theta) = \begin{bmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{bmatrix}. \]When \(\theta_t=0\), SFDA recovers the corresponding pair-tied KDA parameterization. Thus SFDA is a structured extension of KDA, not a separate architecture.
4. Architecture visualization
The intended Transformer block is hybrid: SFDA acts as a recurrent memory branch inside the token-mixing path, while full attention can still be used periodically for precise retrieval and global context integration.
KDA-style memory
Learns what to write, where to write, and how much to forget.
\[ A_t=(I-\beta_t k_t k_t^\top)D_t \]SFDA memory
Adds a phase axis, allowing memory to rotate, cycle, and track structured state.
\[ A_t=(I-\beta_t k_t k_t^\top)\Lambda_t \]5. What we have actually shown
We separate verified algebra, demonstrated behavior, and open empirical claims.
Verified algebra
- Constructive chunk-WY product factorization.
- Associative closure under structured composition.
- Affine chunk-transfer law.
- KDA reduction when \(\theta=0\).
- Exact cyclic counter realization in the phase model.
- Contractivity bound under standard assumptions.
Minimal synthetic separation
On modular state tracking, the zero-phase KDA reduction cannot represent the cyclic transition, while SFDA can.
| Task | Model | \(T=32\) | \(T=64\) | \(T=128\) | \(T=256\) |
|---|---|---|---|---|---|
| Cyclic counter \(C_3\) | SFDA | 1.00 | 0.99 | 0.49 | 0.34 |
| Cyclic counter \(C_3\) | KDA | 0.34 | 0.33 | 0.34 | 0.34 |
| Reset counter \(C_3\) | SFDA | 1.00 | 1.00 | 1.00 | 1.00 |
| Reset counter \(C_3\) | KDA | 0.69 | 0.68 | 0.68 | 0.68 |
6. The falsifiable questions
- Does richer transition algebra improve language-model quality at equal compute?
- Does it improve long-context retrieval where periodic or positional structure matters?
- Can it support higher linear-to-global ratios, such as \(7{:}1\) or \(15{:}1\)?
- Can it preserve KDA-level kernel efficiency?
7. Why this framing matters
The claim is not that gating was a mistake. Gating has produced most practical gains in linear attention so far. The claim is that the gating axis may now be reaching diminishing returns, while the spectrum of the state-transition operator has remained mostly fixed at the real, contractive case.
From Automata Representations to Associative Memory
SFDA did not begin as a linear-attention modification. The original research question was how Transformers can learn structured sequential computations such as finite automata. The earlier Automata--Transformer project studied whether a long sequence of state transitions must be represented by explicit state enumeration, or whether algebraic structure can provide a compressed representation.
A finite-state transition sequence can be viewed as a product in a transition monoid:
\[ m_Tm_{T-1}\cdots m_1 . \]If this composition admits a low-dimensional representation \(\rho(m_2m_1)=\rho(m_2)\rho(m_1)\), then the computation can be carried by a compact representation rather than a growing history. Fourier representations of cyclic groups provide the simplest example:
\[ q_t=q_{t-1}+a_t \pmod m \quad\Longrightarrow\quad z_t=e^{2\pi i a_t/m}z_{t-1}. \]This raised the next question: once a compact representation exists, how should a neural model maintain and update it online? SFDA is a continuation of this question: the state is no longer only a hidden representation, but an associative memory that predicts and corrects.
SFDA as Transported Associative Memory
The current formulation is more precisely understood as a transported associative memory rather than simply "KDA with phase". KDA already introduced a matrix-valued memory whose read operation is \[ \widehat v_t=S_t^\top k_t . \] The delta update performs online correction of the prediction error.
SFDA inserts one additional operation before this correction:
\[ \widetilde S_t=\Lambda_tS_{t-1}, \qquad S_t=\widetilde S_t+ \beta_tk_t(v_t-\widetilde S_t^\top k_t)^\top . \]Therefore phase does not replace associative memory. It changes the coordinate system in which the memory is queried and corrected. The ordering matters:
\[ \text{transport} \rightarrow \text{predict} \rightarrow \text{correct}. \]This is different from adding a KDA branch and a complex state-space branch independently, because the phase transform changes the prediction residual that drives the erase-write update.
Relation to Kimi Delta Attention, Gated DeltaNet, and Mamba-3
SFDA should be viewed as a neighboring evolution of recent efficient sequence models rather than a replacement for them.
| Model | Core idea | Memory evolution |
|---|---|---|
| KDA / Kimi Linear | Delta-rule associative memory | Learn what to write, erase, and forget through gated retention |
| Gated DeltaNet | More expressive erase/write controls | Improves memory editing dynamics |
| Mamba-3 | Complex state-space dynamics and improved SSM realization | Enhances hidden-state transition dynamics |
| SFDA | Phase-controlled delta memory | Transports associative memory before correction |
The distinction is that Mamba-style models enrich the evolution of an SSM hidden state, while SFDA evolves a key-value associative predictor. KDA learns the retention geometry; SFDA asks whether the memory coordinate system itself should evolve through structured phase dynamics.
Implementation: From Algebra to GPU Kernels
The theoretical contribution is only one part of SFDA. A practical implementation must preserve the structured recurrence while respecting GPU execution constraints.
The implementation follows the same principle as recent efficient attention systems: mathematical expressivity and hardware efficiency must be designed together. The current implementation includes:
- relative-decay WY/UT factorization without forming unstable \(1/\alpha\) terms;
- chunk-parallel forward computation with Triton kernels;
- custom backward kernels with mixed-precision support;
- recompute-aware memory management for long-context training;
- packed-sequence boundary handling through explicit state resets.
The remaining systems challenge is not the recurrence itself, but matching mature KDA implementations in kernel efficiency: reducing activation materialization, improving Tensor Core utilization, and designing hardware-native phase-memory kernels.
Project Information
Project: Representation Theorem for Linear Attention Memory Systems
Project Timeline:
Started: May 2025
Current Status: Active Research Project (2025–Present)
Research Overview:
SFDA Research Blog
Repository:
https://github.com/Paleuna/Fourier-Linear-Attention
Origin:
This project was initiated from ideas inspired by my final course project
arxiv link
of the Columbia Course
COMS 6998: Theoretical Foundations of LLMs
at Columbia University.
and finalized as
arxiv link
Project Lead:
Tiantian Zhang
Department of Computer Science
Columbia University
Email:
t.zhang8@columbia.edu
LinkedIn:
crystal-zhangg
Contributors (alphabetical order):
- Aidan Haya — Mathematics & Computer Science, Columbia University
- Michael Chen (Tech lead current) — Computer Science, Columbia University
- Zhimin Hu — Ph.D. student at Georgia Tech
For research discussions, collaboration inquiries, or feedback, please contact the project lead.