CyFA: Linear Sequence Modeling with Relative-Time-Partitioned Memory

Yixiao Chen, Shuojin Yang, Shi-Min HuarXiv 2026

TL;DR

CyFA (Cyclic Flow Attention) is a new Linear RNN architecture that organizes its fixed-size recurrent memory into "relative-time slots" using a learned, input-dependent clock. By cyclically transporting stored associations as they age, CyFA significantly improves information retrieval and recall performance while being roughly twice as fast as state-of-the-art alternatives like Kimi Delta Attention (KDA).

What Problem Does This Paper Address?

Linear RNNs and State Space Models (SSMs) like Mamba offer a compelling alternative to Transformers because they process sequences in linear time and have a constant memory footprint during decoding. However, they face a fundamental "fixed-state constraint": they must compress an entire sequence prefix into a single, fixed-size recurrent state.

As more information is written into this state, new data often interferes with or overwrites older data. While modern techniques like forget gates and the Delta Rule help by selectively erasing information, it remains difficult for these models to retrieve specific past associations when many need to be kept in memory simultaneously. The authors of CyFA argue that the problem isn't just what to erase, but how the memory is organized.

Methods

CyFA introduces Relative-Time-Partitioned Memory. Instead of treating the recurrent state as a single "bucket," CyFA organizes it along a temporal axis.

  1. Cyclic Transport: Before every new write, the model applies a cyclic shift to its key and value states. This moves existing associations into "older" slots, while the newest key-value pair is written into the "age-zero" slot.
  2. Learned Clock: The amount of transport (the "shift") at each step is controlled by a learned clock increment ($\delta_t$). This allows the model to adaptively space out associations—giving more "room" to information-dense tokens and compressing less important ones.
  3. Absolute-Clock Coordinates: Directly applying a dense cyclic shift at every step would be computationally expensive ($O(m^2)$ where $m$ is the number of slots). The authors derive a mathematical transformation using a Fourier basis to represent the system in "absolute-clock coordinates." This reduces the complex transport into two simple scalar-decay passes, making it compatible with hardware-efficient chunk-wise training algorithms.
Visualizing how stored associations advance with model age through cyclic transport.

Datasets

The authors evaluated CyFA across models ranging from 400M to 1.4B parameters using the following:

  • Pretraining: SlimPajama-627B (using the Mistral tokenizer).
  • Commonsense Reasoning: Standard benchmarks including ARC-Easy/Challenge, HellaSwag, LAMBADA, PIQA, and WinoGrande.
  • Recall-Intensive Tasks: A suite of tasks designed to test memory retrieval, such as FDA (Field-Data Association) and SWDE.
  • Long-Context: LongBench (for multi-task understanding) and RULER (for "Needle-In-A-Haystack" style retrieval).

Key Insights and Ideas

  • Memory as a Conveyor Belt: By shifting data through slots, CyFA prevents the "collision" of associations that typically happens in additive linear attention.
  • Temporal Resolution: The learned clock is a powerful tool. Analysis showed that different heads in the model specialize: some act like a standard fixed-rate clock, while others are highly sensitive to input context, "slowing down" the flow for specific types of words.
  • Mathematical Equivalence: The derivation of absolute-clock coordinates is the "aha moment" that makes this practical. It proves that a complex, shifting memory can be implemented as efficiently as a standard gated Linear RNN.
  • Gradient Stabilization: The authors found that backpropagating through a cumulative clock is unstable. They introduced a simple stop-gradient on the clock increment branch (Equation 28), which was crucial for stable training.
The impact of the stop-gradient intervention on training loss and gradient stability.

Key Results

  • Superior Recall: At the 400M scale, CyFA achieved a score of 42.60 on the FDA benchmark, dwarfing KDA’s 26.07.
  • Efficiency Gains: CyFA is significantly faster than KDA. Its forward and backward core-operator passes take only 46.7% and 48.3% of KDA's time, respectively.
  • Training Throughput: In end-to-end training at an 8K context length, CyFA is 1.37x faster than KDA.
  • Long-Context Robustness: On the RULER benchmark (specifically the multi-key task MK-NIAH-1), CyFA maintained high accuracy much longer than GDN or KDA as sequence length increased, supporting the idea that its memory organization reduces interference.
Comparison of core operator execution times, showing CyFA's efficiency relative to other models.

Limitations and Future Work

  • Stop-Gradient Dependency: The reliance on a stop-gradient suggests that the "true" long-range temporal dependencies are difficult for current optimizers to navigate, which might limit the model's ability to learn extremely complex timing.
  • Fixed Slot Budget: While the clock is flexible, the total number of slots ($m=127$ in their experiments) is still a fixed hyperparameter.
  • Scaling Limits: While tested up to 1.4B parameters, it remains to be seen how these architectural choices hold up at the 7B+ parameter scale common in frontier models.

Summary updated

BibTeX
@misc{chen2026cyfa,
  author = {Yixiao Chen and Shuojin Yang and Shi-Min Hu},
  title = {{CyFA: Linear Sequence Modeling with Relative-Time-Partitioned Memory}},
  year = {2026},
  eprint = {2609.36259},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.36259},
}
Figure