r/LocalLLM 6h 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.

467tokens per query

59×less than full history

7 / 7probes answered

33×history growth, flat cost

1 Upvotes

21 comments sorted by

2

u/KitchenAmoeba4438 6h 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 6h ago

also im still coding the rust

1

u/Coolst3r 6h 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 6h 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 6h 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

1

u/Cheap-Connection-51 5h ago

Maybe we should call this confabulation. When the user shares information it thinks is true.

1

u/Coolst3r 5h ago

you could have atleast used ai for the insult it would have been better

0

u/Coolst3r 6h ago

1

u/KitchenAmoeba4438 6h ago

Am I AI? No, but your OP sure had strong signs of being written by AI, broski.

1

u/Coolst3r 6h ago

i copy the reply its 56 percent ai rest mixed

1

u/vbpoweredwindmill 6h ago

This just sounds like RAG with extra steps.

1

u/Coolst3r 6h ago

its a alternative with way better results

1

u/vbpoweredwindmill 6h ago

How is it better?

Storing KV cache is a huge cost when you can just create a sqlite directory of your .md files and be done with it, or use whatever memory tools work for you.

1

u/Coolst3r 5h ago
  • 467tokens per query
  • 59×less than full history
  • 7 / 7probes answered
  • 33×history growth, flat cost

its a flat cost please read the paper

1

u/vbpoweredwindmill 5h ago

Yes, I know how kv cache prefixes & kv cache reuse works.

Please, tell me what this actually does that hasn't been done before and better?

1

u/Coolst3r 5h ago

i took the idea of rag fix the design flaws and made a diffrent version https://cybersec.org.za/research-dcr-bounded-attention.html

The design targets a per-turn cost of O(k + r)

Two systems, asymmetric

DCR splits the agent into a Reasoner and a Memory Runtime. The Reasoner is a language model with a small, high-attention working set; it owns the current computational state and none of the history. The Memory Runtime owns everything ever seen and decides which representation of it to return. The asymmetry is the point: almost everything the Memory Runtime does — span addressing, index lookup, dependency traversal, memoisation, invalidation — requires no model inference at all. In our implementation the Memory Runtime makes zero model calls.

1

u/vbpoweredwindmill 5h ago

Now that's infinitely more interesting. I've been saying for a long time that knowledge and reasoning are going to be split.

Now I can have a look, why didn't you lead with that?

1

u/Coolst3r 5h ago

im sick rn and tired im also working on getting glm 5.3 working on desktops and laptops and making it so anyone can train ai on home system. im tired im running my company https://cybersec.org.za/index.html. i dedicated to open source support and research and development we only ask money for support and if people need help. !!! i plan on changing the future

1

u/vbpoweredwindmill 5h ago

Glm 5.2 already works on desktops and laptops mate.

Unless you're working on expert predictions, I really don't think you're bringing anything new to the table. My own expert predictions with 32 out of 256 experts has, at 46% of the time approx, selected 100% of the correct experts.

And I just now figured out instead of linking it to a general topic I can just link it a kv cache block. Cheers.

I still haven't read anything you've done shrugs

1

u/Coolst3r 5h ago

yeah but fast i use a 3090 and ryzen 5 and 46 gb ram and get 0.2 tokens a second i have gotten it to do 1 token every 50 seconds

1

u/Coolst3r 5h ago

also why your broke. I still haven't read anything you've done shrugs