Certified detection · AI agents

Doom loops: when the model gets stuck — and why only a complete search catches all three

Reasoning models sometimes fall into a spiral, repeating "Wait… But… Alternatively…" until they exhaust the context window. Fixing that at training time is one thing; detecting it at runtime, with a guarantee of missing none, is another — and that's where certified completeness wins.

Analysis · measured result Liquid AI tackled doom loops at training time, with FTPO (a surgical retrain of the token that starts the spiral). We looked at the other side — a runtime detector, as a guardrail — and measured three approaches over reasoning traces with real, labelled loops: the n-gram heuristic (what inference servers already use), the compression signal (surprise), and SIEVE's certified search. The finding: every cheap option has a blind spot — and only the completeness search, with zero false negatives, catches all three loop types without a false alarm. It isn't a cure; it's certified observability for an agent governance plane.

1The loop, and where the toolkit fits

A doom loop happens when, under uncertainty, the model reflexively emits transition words ("Wait", "But", "Alternatively") instead of advancing — and spins until it blows the window. Liquid AI showed you can cut this dramatically at training time, with FTPO. That changes the weights; it isn't our game, and we don't compete there.

The toolkit's fit is at runtime: a cheap, certified detector that says "this is looping" so an orchestrator can step in. And there's an elegant observation behind it — a loop is the reasoning state revisiting an earlier state. Detecting that is a completeness search: "is the current step within ε of any earlier step?", with a guarantee of missing none. That is SIEVE's strength.

2Three loop types, three detectors — measured

We built 26 traces (8 coherent + 6 of each loop type), with real embeddings (bge-m3, 1024 dimensions) per reasoning step, the ε threshold calibrated on the coherent traces only (conformal-style) and the loop onset known, to measure detection latency. The three types:

Loop typen-gramSurprise (deadband)SIEVE certified
Literal6/6 · lat 8.06/6 · lat 3.06/6 · lat 2.2
Cyclic (A·B·A·B)6/6 · lat 6.00/6 — blind6/6 · lat 3.0
Paraphrastic (reworded)0/6 — blind6/6 · lat 2.26/6 · lat 2.0
Coherent (false positives)0/8 ✓2/8 ✗0/8 ✓

Hits/total inside the loop region; latency in steps after onset. "blind" = never fires. The embeddings, the codec and the detectors are all real.

3Why every shortcut has a blind spot — and completeness doesn't

The result tells a clean story:

The deadband's blind spot (only the last state) and the n-gram's (only literal text) both vanish once you search the whole history with a guarantee. It's the same differentiator as our RAG and data-audit cases.

4Surprise, confirmed in the codec — and the honesty

Running the paraphrastic trace (1024 embedding channels × 20 steps) through the real TUBE codec, it compresses 15.5× vs. raw, with a 67.3% deadband and the maximum error within the bound: the loop region compresses to almost nothing. Same idea, from the other angle — loop = low surprise = high compressibility.

What this is, and what it isn't

It's a runtime guardrail, not a cure — it complements FTPO (training), it doesn't replace it. The traces were constructed to model the documented phenomenon (small models running on CPU didn't spiral dramatically); the embeddings, the codec and the detectors are real; N = 26. And in memory, over a short trace, an exact brute-force is trivial — SIEVE's value shows up in the completeness guarantee + scale/out-of-core: long contexts, many concurrent agents, and a governance plane that must prove it missed no loop.

This is where the toolkit meets the AI-agents frontier: not as the one who trains the model, but as the certified evidence substrate that observes, measures and proves — including when the reasoning starts spinning in place.