Gated DeltaNet-2: Desacople de Borrado y Escritura en Atención Lineal
Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention
May 21, 2026
Autores: Ali Hatamizadeh, Yejin Choi, Jan Kautz
cs.AI
Resumen
La atención lineal reemplaza la caché ilimitada de la atención softmax con un estado recurrente de tamaño fijo, reduciendo la mezcla de secuencias a tiempo lineal y la decodificación a memoria constante. La parte difícil no es solo qué olvidar, sino cómo editar esta memoria comprimida sin desordenar las asociaciones existentes. Los modelos basados en regla delta restan la lectura actual antes de escribir un nuevo valor, y Kimi Delta Attention (KDA) afina el olvido con decaimiento por canal. Pero la edición activa aún utiliza una única puerta escalar para controlar dos cosas diferentes: cuánto contenido antiguo borrar en el lado de la clave y cuánto contenido nuevo comprometer en el lado del valor. Presentamos Gated DeltaNet-2, que generaliza tanto Gated DeltaNet como KDA al heredar el olvido adaptativo y el decaimiento por canal, mientras aborda su limitación compartida: el vínculo escalar entre borrado y escritura. Gated Delta Rule-2 separa estos roles con una puerta de borrado por canal b_t y una puerta de escritura por canal w_t, reduciéndose a KDA cuando ambas puertas colapsan al mismo escalar y a Gated DeltaNet cuando el decaimiento también colapsa. Derivamos una vista de actualización de pesos rápidos, un algoritmo WY por fragmentos con decaimiento por canal absorbido en factores de borrado asimétricos, y un pase hacia atrás consciente de puertas que preserva el entrenamiento paralelo eficiente. Con 1.300 millones de parámetros entrenados en 100.000 millones de tokens de FineWeb-Edu, Gated DeltaNet-2 logra los resultados generales más sólidos entre las variantes de Mamba-2, Gated DeltaNet, KDA y Mamba-3 en modelado de lenguaje, razonamiento de sentido común y recuperación. Su ventaja es más pronunciada en los benchmarks de aguja en un pajar RULER de contexto largo, donde mejora la configuración evaluada de recuperación multiclave y se mantiene fuerte tanto en entornos recurrentes como híbridos. El código está disponible en https://github.com/NVlabs/GatedDeltaNet-2.
English
Linear attention replaces the unbounded cache of softmax attention with a fixed-size recurrent state, reducing sequence mixing to linear time and decoding to constant memory. The hard part is not just what to forget, but how to edit this compressed memory without scrambling existing associations. Delta-rule models subtract the current read before writing a new value, and Kimi Delta Attention (KDA) sharpens forgetting with channel-wise decay. But the active edit still uses a single scalar gate to control two different things: how much old content to erase on the key side and how much new content to commit on the value side. We introduce Gated DeltaNet-2, which generalizes both Gated DeltaNet and KDA by inheriting adaptive forgetting and channel-wise decay while addressing their shared limitation, the scalar tie between erasing and writing. Gated Delta Rule-2 separates these roles with a channel-wise erase gate b_t and a channel-wise write gate w_t, reducing to KDA when both gates collapse to the same scalar and to Gated DeltaNet when the decay also collapses. We derive a fast-weight update view, a chunkwise WY algorithm with channel-wise decay absorbed into asymmetric erase factors, and a gate-aware backward pass that preserves efficient parallel training. At 1.3B parameters trained on 100B FineWeb-Edu tokens, Gated DeltaNet-2 achieves the strongest overall results among Mamba-2, Gated DeltaNet, KDA, and Mamba-3 variants across language modeling, commonsense reasoning, and retrieval. Its advantage is most pronounced on long-context RULER needle-in-a-haystack benchmarks, where it improves the evaluated multi-key retrieval setting and remains strong in both recurrent and hybrid settings. Code is available at https://github.com/NVlabs/GatedDeltaNet-2.