SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.26560 · 2026

Erase-then-Delta Attention: Decoupling Erase and Write Addresses in Delta-Rule Linear Attention

Wei Hu, Siqi Zhang, Xiao Li, Dayiheng Liu, Jingren Zhou, Xi Lin, Bo Zheng, Hao Luo, Zihan Qiu, Zekun Wang, Huiqiang Jiang, Chengruidong Zhang, and 6 more

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 4 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2606.26560.json · badge: /api/ran/2606.26560.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
QwenLM/FlashQLA canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
generate_rand_seqlens Ran
ran, honoured the contract we drafted
QwenLM/FlashQLA/benchmark/bench_gated_delta_rule.py
code served (permissive licence) · get_code("6be3afdb318823ce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "batch_size": 3,
    "num_tokens": 20,
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
input_guard Ran
ran; our contract draft was wrong, not the code
QwenLM/FlashQLA/flash_qla/utils/contiguous.py
code served (permissive licence) · get_code("1dd2c94ebadfb74b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import functools
from collections.abc import Callable

torch.manual_seed(0)

# Create a simple test function that returns a tensor
def simple_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
    """A simple function that takes two tensors and returns their sum."""
    return x + y

# Create another test function with keyword arguments
def fn_with_kwargs(a: torch.Tensor, b: torch.Tensor, scale: float = 1.0) -> torch.Tensor:
    """A function with keyword arguments."""
    return (a + b) * scale

# Create a non-contiguous tensor to test the contiguous() call
x_non_contiguous = torch.randn(4, 3).t().contiguous().t()  # Create non-contiguous tensor
y_contiguous = torch.randn(4, 3)

# Test with CPU tensors (as per requirements)
test_tensor_1 = torch.randn(2, 4)
test_tensor_2 = torch.randn(2, 4)

ARGS = {
    "fn": simple_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pack Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
QwenLM/FlashQLA/flash_qla/utils/pack.py
code served (permissive licence) · get_code("28c1d6470ca9d60e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (1, 7, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# x should be a 3D tensor with shape (batch_size, max_seq_len, feature_dim)
# cu_seqlens should be a 1D tensor of cumulative sequence lengths
batch_size = 2
max_seq_len = 5
feature_dim = 4

# Create x with shape (2, 5, 4)
x = torch.randn(batch_size, max_seq_len, feature_dim, dtype=torch.float32)

# Create cu_seqlens with cumulative sequence lengths
# For batch_size=2, we need 3 elements: [0, len1, len1+len2]
# Let's say first sequence has length 3, second has length 4
cu_seqlens = torch.tensor([0, 3, 7], dtype=torch.long)

ARGS = {
    "x": x,
    "cu_seqlens": cu_seqlens,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (1, 7, 4) — shape (1, 7, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pad_and_reshape Ran
ran; our contract draft was wrong, not the code
QwenLM/FlashQLA/flash_qla/utils/pack.py
code served (permissive licence) · get_code("6504d2035c704312")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 1, 64, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small tensor with shape (2, 5, 4)
# dim=1 means we're padding/reshaping along the sequence dimension
x = torch.randn(2, 5, 4)

# Parameters
dim = 1
chunk_size = 64

ARGS = {
    "x": x,
    "dim": dim,
    "chunk_size": chunk_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 1, 64, 4) — shape (2, 1, 64, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tensor_cache Ran
ran; our contract draft was wrong, not the code
QwenLM/FlashQLA/flash_qla/utils/index.py
code served (permissive licence) · get_code("94e6a53181d80161")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import functools
from typing import Any
from collections.abc import Callable

torch.manual_seed(0)

def simple_tensor_fn(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
    """A simple function that takes tensor inputs and returns a tensor output."""
    return x + y

ARGS = {
    "fn": simple_tensor_fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unpack Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
QwenLM/FlashQLA/flash_qla/utils/pack.py
code served (permissive licence) · get_code("e1e90a347a0962b9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function unpack takes a tensor x with shape (1, seq_len, *feature_dims)
# and cu_seqlens which contains cumulative sequence lengths.
# It unpacks the sequences into a batch of padded sequences.

# Create a small example:
# - x has shape (1, total_seq_len, feature_dim)
# - cu_seqlens has shape (batch_size + 1,) with cumulative lengths

batch_size = 2
feature_dim = 4
# Two sequences: first has length 3, second has length 2
cu_seqlens = torch.tensor([0, 3, 5], dtype=torch.long)
total_seq_len = 5

# Create x with shape (1, 5, 4)
x = torch.randn(1, total_seq_len, feature_dim)

ARGS = {
    "x": x,
    "cu_seqlens": cu_seqlens,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
l2norm_bwd_compiled Not yet run
unverified (harvested, no recorded run)
QwenLM/FlashQLA/flash_qla/utils/math.py
code served (permissive licence) · get_code("f632515fd39572bf")
How it ran

no invocation recorded.

l2norm_fwd Not yet run
unverified (harvested, no recorded run)
QwenLM/FlashQLA/flash_qla/utils/math.py
code served (permissive licence) · get_code("7b4133146262db02")
How it ran

no invocation recorded.

l2norm_fwd_compiled Not yet run
unverified (harvested, no recorded run)
QwenLM/FlashQLA/flash_qla/utils/math.py
code served (permissive licence) · get_code("d90be38c541e143f")
How it ran

no invocation recorded.

prepare_lens Not yet run
unverified (harvested, no recorded run)
QwenLM/FlashQLA/flash_qla/utils/index.py
code served (permissive licence) · get_code("02015534e010c30f")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Delta-rule linear attention improves recurrent memory updates by correcting what is already stored at the current write address before writing new content. However, the active correction is still anchored to that same write address. As a result, stale information stored at a different address cannot be actively removed before new content is written elsewhere. We propose Erase-then-Delta Attention (EDA), a memory update rule that decouples where to erase from where to write. The key insight is that recurrent memory models should not only correct the current write, but also selectively suppress outdated memory at an independently chosen address. Concretely, our method first applies a targeted erase step along a learned erase direction, and then performs the standard delta-style corrective write along the current write direction. This preserves the corrective behavior of delta-rule updates while expanding their memory-management capacity. Language-model pretraining experiments across dense 2.5B and MoE 25B-A2.8B model families show that EDA performs best in both settings. The gain persists after 80B-token long-context midtraining of the MoE models, where EDA also performs best in long-context evaluations from 4k to 128k contexts. A compact update analysis and memory-state probes suggest why: EDA keeps the delta-rule corrective write intact while allocating an additional cleanup path most strongly when passive decay is weak. These results suggest that recurrent memory models should decide not only what to write, but also what stale information to erase and where.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2606.26560")
get_code_for_paper("2606.26560")
have("2606.26560")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2606.26560.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2606.26560.svg)](https://syntology.ai/paper/2606.26560)

Connect an agent — have() is free.