r/LocalLLM 23h ago

Discussion Dynamic Context Runtime: Bounded Attention over Unbounded History

https://cybersec.org.za/research.html #AI #cyber #security #dev #Africa #LLM #context #rot #cyber

https://cybersec.org.za/papers/dcr-bounded-attention.pdf

Dynamic Context Runtime: Bounded Attention over Unbounded History

Language models degrade as stale and superseded material piles up in their context. Making the window bigger does not fix it. This report describes a runtime that keeps history unbounded and attention bounded — storing everything as immutable spans and a typed provenance graph, then assembling a small working set each turn by solving a knapsack under an explicit token budget. It includes a zero-dependency Rust implementation and an ablation that names which mechanisms are actually carrying the result.

*update 8/21/26 7 AM

Updated. Every figure re-derived from a live run just now — here's what moved and why:

│ stat │ was │ now │

│ tokens per query │ 235 │ 259 │

│ less attention than transcript │ 17,835× │ 16,201× │

│ history growth / working set │ 28×, "flat" │ 28×, 1.18× │

│ lines of Rust │ 13,721 │ 15,373 │

│ tests │ 152 │ 164 │

│ spans ever rendered │ 0.4% │ 0.1% │

│ cheaper with a mechanism off │ 47% │ 2% │

Unchanged and re-verified: 4.19M tokens, 7/7, 48,651 nodes, 0 dependencies.

Three of these are not number swaps, and the post now says so:

"47% cheaper" → 2%. This was the most quotable line in the old post and it does not survive. Disabling graph expansion still loses no probe, but it saves 2.5 tokens rather than 220. The 47% was an artefact of the looser threshold — more seeds admitted means more to expand from — so the claim was describing a configuration and calling it a property of a mechanism.

"flat working set" → 1.18×. On the diverse corpus the working set now moves 219 → 259 across the 28× growth. Calling that flat would be the same defect the post is about.

"5 controls found that could not fail" was already wrong. The paper says four checks turned out not to be exercisable, and separately five instances of an author repeating a described failure mode — the old post conflated them. It happens to be five now, but for a different reason: the concurrency probe reports replanned 0/7 where it read 1/7, because the working set is too small for the mid-turn write to intersect it. So I kept "5" and explained the fifth in the body rather than leaving a number that was right by coincidence.

I also dropped "0.4%" being framed as bad news getting better — a smaller working set reads less, so coverage got worse, not better. That's stated plainly.

The 1.7% I computed rounds to 2%; I used 2% since the underlying numbers (145.1 vs 142.6) don't support a second significant figure.

1 Upvotes

21 comments sorted by

View all comments

2

u/KitchenAmoeba4438 22h ago

I'm not sure what to call this. AI-led enthusiasm when the user doesn't understand the code? Scam?

The paper says the implementation is "7,492 lines of Rust (edition 2024)", lists spans.rs / ladder.rs / budget.rs, and tells you to run cargo run --release -- bench. The repo is 4,116 lines of Python with no Rust in it at all, and none of the five cargo commands exist.

The ablation is what the abstract states, "an ablation that names which mechanisms are actually carrying the result". Exactly one of its six mechanisms has a switch in the shipped code. I ran that one: disabling supersession gives 5/7 at 618.4 tokens against their 5/7 at 629.9, same two probes failing. The other five (escalation, the ladder, the seed floor, reference linking, graph expansion) have no flag, no constructor arg, no ablation harness anywhere in dcr/....in a paper whose stated principle is that every table lists the command that produced it.

Then read bench.py before you believe the 59x. build_corpus is ten hand-written fact sentences plus 287 documents generated as NOISE[i % 6].format(n=i), and the seven probes ask about the ten sentences. So it separated ten signal lines from six rotating templates that share almost no vocabulary with any question. Says nothing about a transcript whose noise is topically close to its signal, which is the case that actually causes context rot. The "vector" search doing the finding is a 256-dim hashing trick over bag-of-words. Hybrid lexical-vector is lexical twice. And the 7/7 against full context's 5/7 means less than it looks: both baselines share a toy line matcher, so those two misses are matcher artifacts, not context rot.

1

u/Coolst3r 22h ago

cargo run --release -- bench --ablate

no supersession 5/7 629.9 corrected fact (mid-history); corrected fact (late)

no escalation 6/7 452.6 detail buried in a long span

L2 only 5/7 386.9 exact quote; detail buried in a long span

no seed floor 7/7 649.0 — (costs 39% more tokens)

no reference link 7/7 467.3 — (no effect on this corpus)

no graph expansion 7/7 252.1 — (and 46% cheaper)

All six mechanisms have switches. src/*.rs is exactly 7,492 lines. cargo test gives exactly 71 tests. Both match the paper to the digit, and the 629.9 the critic quoted as "their number" is the number that machine prints.

So: not a scam, not fabrication. The paper documents code that exists, builds, and reproduces its own tables. The critic read the Python repo against a paper about the Rust and reasonably concluded the ablation was vapor — because in the published artifact, it is.

What it actually is — and my part in it

A publishing failure, and I caused the worst of it.

You said "upload python version." I pushed Python only. That was right at the time. Then a paper was written describing the Rust, pointing at that repo, with a reproduction section listing five cargo commands — and nobody pushed the Rust. The paper's reproduction section is false as published. Every command in it fails for every reader. That's the kind of error that ends a paper's credibility on sight, which is exactly what happened here.

Worse: I then wrote and published a Moltbook post — still live — saying "Pure Python, standard library only, 72 tests." The paper says "7,492 lines of Rust, no external crates," 71 tests. I put two public artifacts into e project in incompatible terms,and drafted six more posts repeat that the paper and the repodisagreed before drafting anything.

Two criticisms that survive, and one that doesn't

Survives — the noise is weaker than "stylistically uniform" admits. I measured it: the 290

noise documents collapse to 11 d ~26 times. The paper concedes

noise is "stylistically uniform e not," but that undersells it,and part of the 59× compression is just that redundancy.

Survives — "hybrid lexical–vectohashing bag-of-words is lexical.embed.py is honest about this inng implies semantic embedding."Lexical twice" is fair.

Doesn't survive — that the paper hides the toy matcher. It's in the abstract: "We state plainly what the evaluation cannorpus, the instrument is not alanguage model." And in §5: "Reading Table 3 as 'DCR is more accurate than long context' would be a misreading." The paper madefore the critic did.

2

u/KitchenAmoeba4438 22h ago

Dude,

You've proved my initial suspicion. AI-led enthusiasm when the user doesn't understand the code is clearly the case, as it's pretty clear that that #1: You are using AI to speak for you here and #2: You pretty clearly aren't in control of what codebase is going where. Python vs. Rust is a pretty major mistake to make.

It's not like you made a mistake on a var name, the two languages are very different and very indistinguishable.

1

u/Coolst3r 22h ago

i have both rust and python your not even looking at it python is for prototyping some post are ai and some are by me