# Integral DeltaNet: Improved Linear Attention with Adaptive Memory Integration

> Integral DeltaNet pairs a fast delta state with a slow integral state to overcome the memory-retention trade-off that limits single-state linear attention models.

- **Source:** [arXiv](https://arxiv.org/abs/2611.32063)
- **Published:** 2026-11-28
- **Permalink:** https://picx.dev/p/0r6LoT
- **Whiteboard:** https://picx.dev/p/0r6LoT/image

## Summary

## Summary (Overview)

- **Proposes Integral DeltaNet**, a novel linear attention architecture that maintains two complementary recurrent states: a fast-updating delta state for current key-value associations and a slow integral state preserving a weighted history of delta states.
- **Addresses the trade-off between memory collision mitigation and information retention** — while delta-rule updates and gating reduce interference, they can discard information relevant to future predictions; the integral state recovers this lost information.
- **Derives a chunkwise parallel formulation** enabling hardware-efficient training, compatible with FlashLinearAttention kernels.
- **Demonstrates consistent improvements** over strong recurrent baselines (Mamba-2, DeltaNet, GDN, KDA, GDN-2) across language modeling, commonsense reasoning, real-world retrieval, long-context understanding, and length extrapolation at 340M and 1.3B parameter scales.
- **Provides theoretical justification** (Propositions 1–2) showing that single-state models have inherent retrieval limitations that the two-state design overcomes.

---

## Introduction and Theoretical Foundation

### Background
Modern LLMs rely on the Transformer architecture, whose softmax attention scales quadratically with context length and requires a growing key-value cache during inference. **Linear attention** (Katharopoulos et al., 2020) replaces softmax with a kernelized dot product, enabling linear-time computation with a fixed-size recurrent state:

$$o_t = \sum_{i=1}^{t} v_i(k_i^\top q_t) = \left(\sum_{i=1}^{t} v_i k_i^\top\right) q_t \in \mathbb{R}^{d_v}$$

The recurrent form maintains a prefix state:

$$S_0 = 0, \quad S_t = S_{t-1} + v_t k_t^\top \in \mathbb{R}^{d_v \times d_k}, \quad o_t = S_t q_t \in \mathbb{R}^{d_v} \tag{1}$$

### Memory Collision Problem
Compressing all past associations into a fixed-size state causes **memory collision**. With unit-normalized keys, retrieving the value associated with $k_j$ yields:

$$S_t k_j = v_j + \sum_{i=1, i \neq j}^{t} (k_i^\top k_j) v_i$$

The interference term is nonzero when keys are not orthogonal. DeltaNet mitigates this via delta-rule updates:

$$S_t = S_{t-1}\left(I - \beta_t k_t k_t^\top\right) + \beta_t v_t k_t^\top = S_{t-1} + \beta_t(v_t - S_{t-1} k_t) k_t^\top \tag{2}$$

Mamba-2 uses data-dependent decay:

$$S_t = \alpha_t S_{t-1} + v_t k_t^\top \tag{3}$$

Gated DeltaNet combines both:

$$S_t = \alpha_t S_{t-1}\left(I - \beta_t k_t k_t^\top\right) + \beta_t v_t k_t^\top \tag{4}$$

### Theoretical Trade-off (Proposition 1)
The paper proves a fundamental limitation of single-state models through an illustrative example with keys satisfying $k_1 = k_2 + k_3$:

$$R_{\text{LinearAttention}} = \frac{2}{3}, \quad \min_{\{\alpha_t\}} R_{\text{Mamba-2}} = \min_{\{\beta_t\}} R_{\text{DeltaNet}} = \min_{\{\alpha_t,\beta_t\}} R_{\text{GatedDeltaNet}} = \frac{1}{3} \tag{5}$$

Since $S_3 k_1 = S_3 k_2 + S_3 k_3$, any single-state linear readout favoring "Yes" for both later keys also makes the first key read as "Yes" — even optimal gates cannot achieve zero error.

---

## Methodology

### Two-State Architecture
Integral DeltaNet maintains:
- **Delta state** $S_t$: updated via expressive channel-wise rules (KDA or GDN-2)
- **Integral state** $X_t$: accumulates a weighted history of delta states

The integral state update:

$$X_t = S_t \text{Diag}(\lambda_t) + X_{t-1} \text{Diag}(1 - \lambda_t) \tag{6}$$

where $X_0 = 0$ and $\lambda_t \in [0,1]^{d_k}$ specifies the integration rate per key channel.

**Adaptive readout** combines both states:

$$o_t = S_t(\gamma_t \odot q_t) + X_t((1 - \gamma_t) \odot q_t) \tag{7}$$

where $\gamma_t \in [0,1]^{d_k}$ is a channel-wise readout gate.

### Gate Parametrization
Gates are computed from the normalized hidden state $h_t$ with low-rank projections:

$$\gamma_t = \exp\left(-\text{softplus}\left(W_\gamma^\uparrow W_\gamma^\downarrow h_t + b_\gamma\right)\right), \quad \lambda_t = 1 - \exp\left[-\text{softplus}\left(W_\lambda^\uparrow W_\lambda^\downarrow h_t + b_\lambda\right)\right]$$

Initialization ensures $1 - \gamma_t$ and $\lambda_t$ are small, placing nearly all readout weight on the delta state initially.

### Theoretical Guarantee (Proposition 2)
Integral DeltaNet achieves zero retrieval risk on the illustrative example:

$$\min_{\{\alpha_t,\beta_t,\lambda_t\}, \gamma_3(\cdot)} R_{\text{Integral}} = 0$$

One construction uses $\beta_t = 1$, $(\alpha_1, \alpha_2, \alpha_3) = (1, 1/4, 1)$, and $\lambda_t = 1/8$ for $t = 1, 2, 3$.

### Chunkwise Parallel Training
The chunkwise formulation partitions the sequence into $N$ chunks of size $C$. Within-chunk retention weights:

$$\omega_{0 \to r}^{[t]} := \prod_{s=1}^{r} \left(1 - \lambda_s^{[t]}\right), \quad \omega_{i \to r}^{[t]} := \lambda_i^{[t]} \odot \prod_{s=i+1}^{r} \left(1 - \lambda_s^{[t]}\right)$$

The integral state within a chunk combines retention-weighted prefix operators with the retained incoming state:

$$X_{[t]}^{r} = S_{[t]} \bar{P}_{[t]}^{r} + X_{[t]} \text{Diag}\left(\omega_{0 \to r}^{[t]}\right) + \bar{H}_{[t]}^{r}$$

Chunk outputs separate into contributions from incoming states and within-chunk writes:

$$O_{[t]} = \tilde{Q}_{S,[t]} S_{[t]}^\top + \tilde{Q}_{X,[t]} X_{[t]}^\top + Z_{[t]}$$

---

## Empirical Validation / Results

### Training Setup
- **Models**: 340M/1.3B parameters trained from scratch on 15B/100B FineWeb-Edu tokens
- **Optimizer**: AdamW ($\beta_1 = 0.9$, $\beta_2 = 0.95$, $\epsilon = 10^{-8}$), cosine LR decay from $4 \times 10^{-4}$ to $4 \times 10^{-5}$
- **Context**: 4K sequences with Llama-2 tokenization

### Language Modeling and Reasoning (Table 1)
**Key results at 1.3B scale:**
- **Integral KDA** achieves the best overall average accuracy (56.1%) among all models, surpassing Transformer++ (54.7%) and KDA (54.6%)
- Integral KDA improves WikiText-2 perplexity from 15.33 (KDA) to 15.00
- Both Integral variants outperform their baselines on average across 9 commonsense reasoning tasks

### Real-World Retrieval (Table 2)
- **Integral KDA** achieves the best average retrieval accuracy at both scales (23.3% at 340M, 37.3% at 1.3B)
- Substantial gains on SWDE: 18.1 vs 10.2 (KDA) at 340M; 40.4 vs 32.7 at 1.3B
- Integral GDN-2 also improves over GDN-2 at both scales

### Needle-in-a-Haystack (Table 3)
- **Integral KDA** shows substantial gains on MK-NIAH-1: 54.0 vs 47.2 (1K), 50.4 vs 37.0 (2K), 35.6 vs 20.8 (4K)
- **Integral GDN-2** achieves dramatic improvements on MK-NIAH-1: 76.4 vs 45.2 (1K), 67.2 vs 32.8 (2K), 39.8 vs 23.8 (4K)
- Integral KDA reaches 100% on S-NIAH-2 at 1K/2K where KDA scores 100%/79.8%

### LongBench (Table 4)
- **Integral KDA** achieves the best average score (15.0) among all models
- Particularly strong on TRC (52.5 vs 29.5 for KDA) and TQA (27.3 vs 20.5)

### Length Extrapolation (Figure 3)
Both Integral variants outperform their baselines on all six datasets at every length beyond 4K training context. Integral KDA leads on GovReport, QMSum, Qasper, and CodeParrot; Integral GDN-2 leads on NarrativeQA and PG19.

### Efficiency Results
**Training (Figure 4):**
- Throughput-first Integral KDA: 81.7 Kt/s vs KDA's 73.9 Kt/s
- Memory-first variants substantially reduce activation memory (47.3 GiB for Integral GDN-2-M vs 165.5 GiB for GDN-2)

**Decoding (Table 5):**
- Memory stays constant (~2.99 GiB) across context lengths for both Integral variants
- Per-token latency remains constant (4.63 ms for Integral KDA, 4.79 ms for Integral GDN-2) vs Transformer++ growing from 5.18 to 42.59 ms

---

## Theoretical and Practical Implications

### Theoretical Significance
- **Formalizes the memory-retention trade-off**: Proposition 1 proves that single-state models face an inherent limitation — reducing memory collisions through decay/overwriting necessarily causes forgetting of earlier associations
- **Demonstrates the necessity of multi-state designs**: Proposition 2 shows that maintaining two complementary states overcomes this limitation, providing theoretical justification for the architecture

### Practical Implications
- **Long-context understanding**: The integral state enables models to retain information that would otherwise be lost, improving performance on tasks requiring retrieval of distant information
- **Hardware efficiency**: The chunkwise formulation maintains competitive training throughput while the memory-first variant significantly reduces activation memory
- **Constant decoding cost**: Unlike Transformers, Integral DeltaNet maintains constant memory and latency regardless of context length, making it suitable for deployment at scale

---

## Conclusion

Integral DeltaNet addresses the fundamental trade-off between mitigating memory collisions and preserving useful information in linear attention models. By pairing a fast delta state with a slow integral state and using adaptive readout, the model can access information across multiple timescales. The chunkwise parallel formulation enables hardware-efficient training.

**Key findings:**
- Consistent gains over strong recurrent baselines across language modeling, reasoning, retrieval, and long-context tasks
- Theoretical proof that two-state designs can achieve zero retrieval error where single-state models cannot
- Practical efficiency: constant decoding memory/latency with competitive training throughput

**Future directions:**
- Using the integral state to guide delta-state updates, similar to how schedule-free optimization methods use averaged iterates
- Exploring more expressive integration mechanisms beyond exponential moving averages

---

_Markdown view of https://picx.dev/p/0r6LoT, served by PicX — AI-generated visual whiteboard summaries of research papers._
