Complex KDA Unlocks Rotational Memory in Linear AI Without Extra Cost
A two-parameter tweak to Kimi Delta Attention unlocks 2D rotations in one layer, matching DeltaProduct's expressivity without extra cost.
Takeaways
- Complex KDA extends Kimi Delta Attention gate range to [-1,1] and β to [0,2] to unlock 2D rotations.
- A single CKDA layer can track any finite group inside SO(3), including S₃, S₄, and A₅.
- Matches DeltaProduct₂ expressivity while keeping cheaper single diagonal-plus-rank-one transitions.
- Strongest length extrapolation among KDA variants on S₃, S₄, and periodic audio continuation tasks.
- Beats Transformers and other linear RNNs in language modeling with promising scaling behavior.
- Open source at GitHub with models on Hugging Face.
Kimi Linear and Qwen3-Next use delta-rule variants as primary token mixers, reducing sequence-mixing work to linear in sequence length and decoding with a fixed-size recurrent state. Those efficient updates also impose a single-layer expressivity limit: existing parameterizations cannot represent some simple operations, including rotation of a two-dimensional vector. The Complex KDA paper expands two coefficient ranges in Kimi Delta Attention, enabling rotations without adding recurrent state, increasing matrix rank, or introducing complex-valued arithmetic.
Why the original spectrum misses rotations
Softmax attention decoders retain a key-value cache that grows with the context. Linear-attention models compress prior tokens into a fixed-size recurrent state, trading a larger cache for a structured state update at each token.
DeltaNet updates that state with the delta rule, which uses prediction error to overwrite the association addressed by the current key. Gated DeltaNet adds a learned scalar decay that controls global forgetting. Kimi Delta Attention, or KDA, assigns a separate gate to each channel, allowing individual feature dimensions to decay at different rates.
Each token applies a diagonal-plus-rank-one transition, meaning a diagonal channel update receives one outer-product correction. This structure is inexpensive to evaluate. Under the original gate and delta-coefficient ranges, however, the relevant eigenvalues remain real. A single layer therefore cannot produce the complex-conjugate eigenvalues associated with rotation in a two-dimensional subspace.
Two wider ranges create the missing spectrum
CKDA changes the allowed ranges of the per-channel gate α and delta-rule coefficient β. The state layout, transition rank, and recurrent update shape remain unchanged.
| Coefficient | Original range | CKDA range | What the extension enables |
|---|---|---|---|
α, the channel gate |
[0, 1] |
[-1, 1] |
Signed channel scaling and coordinate reflections |
β, the delta strength |
[0, 1] |
[0, 2] |
A full key-directed reflection at the upper endpoint |
At the orthogonal endpoints, the signed diagonal gate can supply a coordinate reflection, while the delta update can supply a Householder reflection along the key direction. Reflections with different axes do not commute, and their composition produces a rotation. Gated DeltaNet uses a scalar gate that commutes with the key-directed reflection, leaving its eigenvalues on the real line. KDA’s channel-wise gate removes that restriction when channels take different signs.
Complex eigenvalues here describe the spectrum of a real transition matrix. CKDA continues to use real-valued parameters, states, and kernels. Because real matrices produce complex eigenvalues in conjugate pairs, the model can represent rotational dynamics without storing complex numbers.
The expanded ranges also preserve the paper’s non-expansive transition bound. For a normalized key, the delta update scales the key direction by 1 - β, which remains within [-1, 1] when β lies in [0, 2]. Every channel gate has magnitude at most one. Their product therefore avoids increasing the state norm under the paper’s assumptions.
One transition can track richer state
The paper proves that every orthogonal diagonal-plus-rank-one matrix can be represented exactly as a CKDA transition. That result expands the finite-state computations available to one layer. Group state tracking requires a model to update an internal state according to each input operation and recover the cumulative result after an arbitrary sequence.
A single CKDA layer can track finite groups represented inside SO(3), including S₃, S₄, and A₅. It reaches the state-tracking expressivity of DeltaProduct2 with one recurrent transition per token; DeltaProduct2 composes two delta-rule transitions.
Benchmarks favor structured tasks
The experiments separate a clear expressivity gain on structured sequences from a smaller change in general language modeling:
- State tracking: Combining signed
αwithβvalues up to two produced the strongest length extrapolation among the tested KDA parameterizations onS₃andS₄tasks. - Audio continuation: CKDA improved continuation of periodic audio, a task that depends on maintaining phase and modular position over long spans.
- Language modeling: At matched scale, CKDA outperformed the tested Transformers and other linear-RNN variants. Its results remained close to the original KDA baseline, so the experiments do not establish a large quality gain over KDA for general language modeling.
- Spectral analysis: Early layers in the trained language model used transitions with complex eigenvalues. The paper does not yet identify which linguistic computations those rotations implement.
S₃ task, the learned coefficients enter the extended ranges and produce the complex spectrum required for rotational state updates.Where CKDA stops
- Group coverage: The paper’s
SO(3)construction does not extend toS₅, which requires a representation beyond the demonstrated three-dimensional rotation framework. - Language-model gains: CKDA broadens the available dynamics, but its language-model results remain close to standard KDA.
- Measured throughput: One transition reduces the formal update count relative to DeltaProduct2. Kernel benchmarks still show competitive throughput for Gated DeltaProduct2, so the structural difference does not establish an inherent wall-clock advantage.
- Training cost: Existing checkpoints have not learned to use the expanded coefficient ranges. Adopting CKDA requires retraining or further training, followed by task-specific validation.
A small code change still requires retraining
Implementations based on the Kimi Linear repository can retain the same recurrent state, diagonal-plus-rank-one update, and decoding kernel. The required changes are concentrated in coefficient parameterization:
- Make the gate signed: Map
αinto[-1, 1]. - Expand delta strength: Map
βinto[0, 2]. - Audit fused operations: Update any CUDA or Triton path that embeds the original activation or clamp ranges.
- Retrain the model: Changing ranges during inference does not add rotational behavior to weights trained under the original constraints.
The CKDA repository provides the implementation, and the model collection contains trained checkpoints.