Zerg AI · Stateful Agents & Information Theory · v2.1·2026-12-03

Agentic Entropic Collapse: Confidence–Correctness Decoupling in Stateful Coding Agents

Why a freshly released coding model feels like a hot knife through butter on day one, yet after weeks of autonomously extending the same repository begins to feel 'nerfed'—growing more confident in its tokens even as systemic correctness erodes.

Zerg AI · Zerg AI Research
Summary

Across 60 GPU runs on a 16-step multi-file Python benchmark (LedgerFlow-Mod), replacing human history with smoke-tested autonomous commits (without rollback) contracts repository cross-entropy (ΔNLL=−0.125\Delta\mathrm{NLL} = -0.125 nats on Qwen-14B) and drops raw pre-processor predictive token entropy by −21.0% pooled (−21.8% on 7B, −19.7% on 14B; −20.6% in Suite 1), yet unlatched task accuracy falls −12.5 pp (8/8 trajectories, p=0.0078p = 0.0078, post-hoc 3-outcome Holm padj=0.0234p_{\text{adj}} = 0.0234) even as Qwen-14B’s isolated single-file accuracy rises (65.6%–68.8% vs. 50.0%). Four controlled Authorship × Correctness regimes disentangle bugs from self-authorship: injecting six subtle human bugs lowers correctness without triggering contraction (modestly raising ΔNLL\Delta\mathrm{NLL} by +0.013–0.014 nats and ticking predictive entropy slightly upward), whereas self-authored commits contract both—hiding compounding defects behind rising local token confidence.

01Raw Predictive Entropy
-21.0%

Pooled raw T=0 drop (-21.8% 7B, -19.7% 14B; -20.6% Suite 1, 8/8 runs, p = 0.0078)

02Local vs. Systemic Split
68.8% vs 42.2%

Qwen-14B isolated single-file pass rises (65.6% v4 / 68.8% v3) while full-repo pass drops

03Human Bugs vs. Self Bugs
Opposite Sign

Human bugs nudge ΔNLL up (+0.013–0.014); self-authored commits contract ΔNLL (-0.125)

01 · The Model-Nerfing Illusion

Why a Model That Cuts Like a Hot Knife on Day One Can Feel 'Nerfed' Three Weeks Later

Spend a month shipping code with autonomous coding agents and you will hear the same complaint across many engineering teams: a newly released model feels like a hot knife through butter on day one inside a clean human codebase—yet two or three weeks later, after the agent has authored a large share of the repo itself, that exact same checkpoint starts feeling ‘nerfed,’ brittle, and stuck in repetitive failure loops. While a controlled 16-task study cannot prove what causes every multi-week frontier production failure, our experiments isolate a concrete weight-frozen mechanism that offers a sharp hypothesis for how this happens.

In traditional training-time model collapse, recursive synthetic data rewrites the model’s weights. In stateful software engineering, model weights θ\theta stay strictly frozen—yet the context window evolves into a self-authored environment. On LedgerFlow-Mod (16 coupled Python ledger modules), replacing human reference files with smoke-tested autonomous commits (without rollback) causes Qwen2.5-Coder-14B to contract repository cross-entropy from 0.5853 to 0.4566 nats/token and drop raw pre-processor predictive token entropy by -19.7% (0.0921 -> 0.0739; -21.0% pooled across 7B and 14B).

The deepest twist is the local-versus-systemic split. Evaluated in isolation (swapping clean human upstream files back beneath the model’s exact late-step patches), Qwen2.5-Coder-14B actually becomes more accurate at late single-file edits (68.8% in Suite 1 / 65.6% in Suite 2 vs. 50.0% on human history). Yet evaluated against the full accumulated repository, unlatched task accuracy drops -12.5 percentage points across 8/8 pooled trajectories (2 models, 1 benchmark; exact two-sided p=0.0078p = 0.0078, primary-family Holm padj=0.0234p_{\text{adj}} = 0.0234). The model grows comfortable inside its own idioms while silently losing grip on cross-file invariants.

Figure 1 · In-Context Self-Conditioning With Frozen Weights

Feedback Loop
Step 1 · ContextCondition
Repository Ct−1C_{t-1}
Starts 100% human-authored (high surprisal relative to θ\theta)
Step 2 · Frozen LLMSmoke Check
Patch Synthesis ptp_t
Raw predictive entropy HprobeH_{\text{probe}} drops as self-authorship rises
Step 3 · Partial CICommit
Smoke Gate GtG_t
Checks happy-path sanity; edge invariants leak without rollback
Step 4 · Sink
Self-Authored CtC_t
82%82\%–83%83\% self-authored by step 16; ΔNLL=−0.125\Delta\text{NLL} = -0.125
Feedback cycle repeats across consecutive steps (Step 4 conditions Step 1 of the next commit)
Unlike training-time model collapse (which updates weights), Agentic Entropic Collapse keeps weights θ\theta strictly frozen. Instead, sequential commits under shallow smoke checks replace high-surprisal human context with low-surprisal self-authored idioms—sharpening next-token confidence while subtle cross-file defects compound.
02 · 16-Step Longitudinal Dynamics

Five Ordered Trajectories Across 16 Sequential Commits

Tracking repository cross-entropy step-by-step on Qwen2.5-Coder-14B (raw pre-processor logits) reveals five cleanly ordered strata. Clean human history stays flat near 0.57–0.59 nats/token across all 16 tasks. Injecting six subtle human bugs (human_defective) nudges cross-entropy upward above clean human code at every step (0.6045 by step 16). By contrast, every AI-authored regime drops sharply over steps 2–5 and stays persistently contracted through step 16—descending from oracle model_correct (0.5275), through cross-family DeepSeek-6.7B history (0.5161), down to smoke-tested self_defective (0.4566).

16-Step Repository Cross-Entropy Trajectory (Qwen2.5-Coder-14B, Raw Logits)

Mean corpus negative log-likelihood H(Q_t, P_θ) across steps 1–16. Human defects raise NLL slightly above clean human code; every AI-authored history drops sharply at steps 2–5.

0.400.460.510.570.63Corpus Cross-Entropy (nats/tok)1357911131516Sequential Task Step (LedgerFlow-Mod 1–16)Human Defective (0% self) (1): 0.5853Human Defective (0% self) (2): 0.5968Human Defective (0% self) (3): 0.5804Human Defective (0% self) (4): 0.5653Human Defective (0% self) (5): 0.5589Human Defective (0% self) (6): 0.5799Human Defective (0% self) (7): 0.5812Human Defective (0% self) (8): 0.5823Human Defective (0% self) (9): 0.5613Human Defective (0% self) (10): 0.5766Human Defective (0% self) (11): 0.5725Human Defective (0% self) (12): 0.5944Human Defective (0% self) (13): 0.5873Human Defective (0% self) (14): 0.5933Human Defective (0% self) (15): 0.6058Human Defective (0% self) (16): 0.6045Human Correct (0% self) (1): 0.5853Human Correct (0% self) (2): 0.5944Human Correct (0% self) (3): 0.5646Human Correct (0% self) (4): 0.5485Human Correct (0% self) (5): 0.5421Human Correct (0% self) (6): 0.5636Human Correct (0% self) (7): 0.5667Human Correct (0% self) (8): 0.5644Human Correct (0% self) (9): 0.5434Human Correct (0% self) (10): 0.5584Human Correct (0% self) (11): 0.5522Human Correct (0% self) (12): 0.5752Human Correct (0% self) (13): 0.5692Human Correct (0% self) (14): 0.5769Human Correct (0% self) (15): 0.5891Human Correct (0% self) (16): 0.5900Model Correct (68% self, oracle) (1): 0.5853Model Correct (68% self, oracle) (2): 0.5752Model Correct (68% self, oracle) (3): 0.4929Model Correct (68% self, oracle) (4): 0.4845Model Correct (68% self, oracle) (5): 0.4822Model Correct (68% self, oracle) (6): 0.5211Model Correct (68% self, oracle) (7): 0.5160Model Correct (68% self, oracle) (8): 0.5119Model Correct (68% self, oracle) (9): 0.5098Model Correct (68% self, oracle) (10): 0.5263Model Correct (68% self, oracle) (11): 0.5058Model Correct (68% self, oracle) (12): 0.5198Model Correct (68% self, oracle) (13): 0.5224Model Correct (68% self, oracle) (14): 0.5264Model Correct (68% self, oracle) (15): 0.5312Model Correct (68% self, oracle) (16): 0.5275Cross-Family on DeepSeek-6.7B (1): 0.5853Cross-Family on DeepSeek-6.7B (2): 0.5881Cross-Family on DeepSeek-6.7B (3): 0.5393Cross-Family on DeepSeek-6.7B (4): 0.5099Cross-Family on DeepSeek-6.7B (5): 0.4987Cross-Family on DeepSeek-6.7B (6): 0.5031Cross-Family on DeepSeek-6.7B (7): 0.4895Cross-Family on DeepSeek-6.7B (8): 0.4862Cross-Family on DeepSeek-6.7B (9): 0.4670Cross-Family on DeepSeek-6.7B (10): 0.4770Cross-Family on DeepSeek-6.7B (11): 0.4666Cross-Family on DeepSeek-6.7B (12): 0.4845Cross-Family on DeepSeek-6.7B (13): 0.4872Cross-Family on DeepSeek-6.7B (14): 0.5017Cross-Family on DeepSeek-6.7B (15): 0.5077Cross-Family on DeepSeek-6.7B (16): 0.5161Self-Defective (83% self, AEC) (1): 0.5853Self-Defective (83% self, AEC) (2): 0.5724Self-Defective (83% self, AEC) (3): 0.4886Self-Defective (83% self, AEC) (4): 0.4694Self-Defective (83% self, AEC) (5): 0.4572Self-Defective (83% self, AEC) (6): 0.4505Self-Defective (83% self, AEC) (7): 0.4480Self-Defective (83% self, AEC) (8): 0.4511Self-Defective (83% self, AEC) (9): 0.4283Self-Defective (83% self, AEC) (10): 0.4343Self-Defective (83% self, AEC) (11): 0.4229Self-Defective (83% self, AEC) (12): 0.4431Self-Defective (83% self, AEC) (13): 0.4450Self-Defective (83% self, AEC) (14): 0.4540Self-Defective (83% self, AEC) (15): 0.4580Self-Defective (83% self, AEC) (16): 0.4566
03 · Separating Bugs From Self-Authorship

Human Bugs Do Not Trigger Contraction; Self-Authored Commits Hide Rot Behind Low Entropy

A natural skepticism toward sequential coding collapse is whether entropy drops simply because prior code is buggy. Our Suite 2 controlled Authorship × Correctness regimes test this directly using raw pre-processor logits (output_logits=True):

  • Human defects do not reproduce self-authored contraction. Injecting six subtle edge-case bugs into human commits (human_defective, each passing smoke tests while failing hidden integration tests) cuts unlatched task pass rate on both 7B (31.2% -> 25.0%) and 14B (56.2% -> 43.8%) and collapses cumulative late pass to 0%—yet nudges repository cross-entropy upward (+0.0140 nats on 7B, +0.0126 nats on 14B above clean human history) with a slight upward tick in raw predictive entropy (+2.6% / +0.9%). Even flawed human edits remain out-of-distribution relative to θ\theta and keep model surprisal elevated.
  • Clean self-authorship contracts cross-entropy on 14B (with honest 7B caveats). When an omniscient hidden-test oracle commits only verified model patches (model_correct), 14B reaches 68% mean self-authorship (75% seed 1, 12%–38% human fallback), contracts ΔNLL\Delta\mathrm{NLL} to -0.0550 (-0.0919 seed 1), and preserves 50.0% late and cumulative correctness. On the weaker 7B model, 50%–56% fallback caps self-authorship at 43% and yields noisier outcomes (H_probe = 0.1417, cum_l = 20.8%), making 14B our cleaner diagnostic.
  • Why cumulative pass latches at 0%. Both 7B and 14B fail Step 1 (s01_allocate) even on clean starter context. In human_history, Step 1 is reset to the clean human reference before Step 2 (31.2% / 56.2% overall pass); in smoke-tested autonomous runs without rollback, Step 1’s broken module persists and latches cumulative pass at 0%. That is why unlatched task_all and iso_late vs. task_all are our primary correctness metrics.

Figure 2 · Four Controlled Authorship × Correctness Regimes (Raw Pre-Processor Logits)

Comparison
No Contraction
Human Defective (6 Subtle Bugs, n=1)
Repository ΔNLL (14B / 7B)
+0.0172 / +0.0078
+0.013–0.014 nats above clean human
Raw Probe Entropy (14B / 7B)
0.0929 / 0.1446
+0.9% / +2.6% above clean human
Unlatched Task Pass (14B / 7B)
43.8% / 25.0%
Down -12.5 pp / -6.2 pp from clean human
Bugs alone fail to reproduce self-authored NLL or entropy contraction
Clean Self-Authorship
Model Correct (14B Oracle, 68% Self)
Self-Authored Fraction (14B)
68% (75% s1)
Hidden-test Best-of-5 (12%–38% human fallback)
Repository ΔNLL (14B)
-0.0550 (-0.0919 s1)
Contracts cleanly even with zero prior bugs
Late / Cumulative Pass (14B)
50.0% / 50.0%
Matches clean human reference (7B noisier: 43% self)
Self-authorship drives NLL contraction without destroying correctness
Confidence Blind Spot
Self-Defective (Smoke-Tested, No Rollback)
Repository ΔNLL (14B / 7B)
-0.1252 / -0.1175
Deepest cross-entropy contraction (82%–83% self)
Raw Probe Entropy (14B / 7B)
0.0739 / 0.1102
-19.7% / -21.8% sharper next-token confidence
Isolated vs. Full Task (14B)
65.6% vs 42.2%
Local comfort masks systemic failure (cum = 0%)
Rising local token confidence quietly hides compounding systemic rot
Suite 2 separates bugs from self-authorship using raw pre-processor logits (output_logits=True). Injected human bugs do not trigger entropic contraction (nudging ΔNLL upward), whereas clean oracle self-authorship on 14B contracts ΔNLL without losing late correctness—isolating AEC as the high-confidence, low-correctness blind spot.
04 · Cross-Family Handoff & Decoding Boundaries

Why Neither Model Swaps Nor Entropy-Seeking Decoding Substitute for Strong Tests

We tested two natural mitigations: swapping to a different model family and entropy-restoring Best-of-K decoding.

First, in a symmetric cross-family handoff between Qwen2.5-Coder-14B and DeepSeek-Coder-6.7B (3 paired seeds each), self-authorship remained the lowest-entropy regime on both models—yet reading the other LLM family’s code still contracted cross-entropy and predictive entropy sharply relative to human history (DeepSeek on Qwen-14B: ΔNLL=−0.1107\Delta\mathrm{NLL} = -0.1107, Hprobe=0.1097H_{\mathrm{probe}} = 0.1097 vs. human 0.1566; Qwen-14B on DeepSeek: ΔNLL=−0.0692\Delta\mathrm{NLL} = -0.0692, Hprobe=0.0759H_{\mathrm{probe}} = 0.0759 vs. human 0.0921). Distinct coding LLMs appear to share a convergent low-entropy synthetic-code manifold.

Second, selecting smoke-passing candidates that maximize corpus-divergence novelty (max_ent_corpus_div, T=0.85T=0.85) reliably restores greedy predictive entropy (+0.0261 nats over compute-matched greedy_bok at T=0.7T=0.7, 8/8 runs, p=0.0078p = 0.0078; +58.9% on 14B), yet does not rescue hidden-suite accuracy—and in fact trails plain self_generated on late-task correctness (15.6% vs. 25.0% on 7B; 28.1% vs. 46.9% on 14B) due to lower smoke-pass rates (20%–48%). Inference-time diversity counters predictive narrowing, but durable long-horizon reliability requires strong exogenous specification tests and human-in-the-loop diversity.

(Together with our companion Zerg AI study on Cross-Architecture Activation Delta Alignment, this work probes how model geometry interacts with its operating distribution—both across long agent horizons and across distinct model families.)

Figure 3 · Symmetric Cross-Family Handoff: Distinct LLMs Share Low-Entropy Idioms

Comparison
3 Histories
Qwen2.5-Coder-14B Active Evaluator
On Human Clean History
ΔNLL +0.0046 · H 0.0921
task_all = 56.2%
On DeepSeek-6.7B History
ΔNLL -0.0692 · H 0.0759
Entropy drops -17.6%; inherited bugs cut task to 8.3%
On Qwen-14B Self History
ΔNLL -0.1252 · H 0.0739
Deepest contraction (-19.7% H); task = 42.2%
Cross-family AI code only partially resists NLL contraction
3 Histories
DeepSeek-Coder-6.7B Active Evaluator
On Human Clean History
ΔNLL +0.0056 · H 0.1566
task_all = 25.0%
On Qwen-14B History
ΔNLL -0.1107 · H 0.1097
Entropy drops -30.0%; cleaner Qwen repo lifts task to 10.4%
On DeepSeek-6.7B Self History
ΔNLL -0.0865 · H 0.0983
Lowest predictive entropy (-37.2%); task = 2.1%
Only human code consistently preserves ΔNLL > 0
Swapping between Qwen2.5-Coder-14B and DeepSeek-Coder-6.7B (3 paired seeds each) shows that self-authorship remains the lowest-entropy regime, yet reading another LLM family’s code still contracts cross-entropy and predictive entropy far below human history.

Raw Pre-Processor Predictive Token Entropy Across Regimes (Suite 2, Qwen-14B & 7B)

Mean greedy probe Shannon entropy (nats/token, raw output_logits=True). Human defects do not contract entropy; self-authorship contracts it ~20%.

7B · Human Defective (6 subtle bugs)0.1446
+2.6% above clean human (no contraction)
7B · Human Correct (clean reference)0.1410
Baseline human surprisal
7B · Self-Defective (82% self-authored)0.1102
-21.8% raw probe entropy contraction
14B · Human Defective (6 subtle bugs)0.0929
+0.9% above clean human (no contraction)
14B · Human Correct (clean reference)0.0921
Baseline human surprisal
14B · Cross-Family (DeepSeek-6.7B history)0.0759
-17.6% contraction on another LLM family
14B · Self-Defective (83% self-authored)0.0739
-19.7% raw probe entropy contraction
Full Paper & Open Artifacts

Read the full technical report for derivations, ablations, and complete tables, or explore datasets, models, runs, and raw downloads on Zerg Platform.

References

  1. [1]
    I. Shumailov, Z. Shumaylov, Y. Zhao, N. Papernot, R. Anderson, Y. Gal(2024).AI Models Collapse When Trained on Recursively Generated Data ↗ Nature, 631:755–759.
  2. [2]
    G. Orlanski, D. Roy, A. Yun, C. Shin, A. Gu, A. Ge, D. Adila, N. Roberts, F. Sala, A. Albarghouthi(2026).SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks ↗ arXiv:2603.24755 (March 2026).
  3. [3]
    J. Chen, X. Xu, H. Wei, C. Chen, B. Zhao(2026).SWE-CI: Evaluating Agent Capabilities in Maintaining Codebases via Continuous Integration ↗ arXiv:2603.03823 (March 2026).
  4. [4]
    K. N. A. Shastry, G. Senrayan, S. Satapara, P. Panda, C. Devaguptapu(2026).Beyond Isolated Tasks: A Framework for Evaluating Coding Agents on Sequential Software Evolution (SWE-STEPS) ↗ arXiv:2604.03035 (April 2026).
  5. [5]
    S. Patel, B. L. Hou, A. Purohit, K. Xu, J. Pan, H. He, V. Chen(2026).Is Agent Code Less Maintainable Than Human Code? (CodeThread) ↗ arXiv:2606.21804 (June 2026).
  6. [6]
    Q. Jin, L. Tung, K. Li, Q. Shi et al.(2026).ChainSWE: Benchmarking Coding Agents on Multi-Bug Software Maintenance ↗ EMNLP 2026 · arXiv:2607.02606.
  7. [7]
    R. Pan, J. Zhang, L. Wu, Y. Zhang, H. Zhang, L. Zhang(2026).Do Modifications Made by Coding Agents Make Subsequent Software Maintenance Harder? (SWE-Maintain) ↗ arXiv:2610.14768 (October 2026).
  8. [8]
    X. Zeng, Z. Liu, Z. Lin(2026).Multi-step SWE: Can Coding Agents Keep Building on Their Own Code Over Long Horizons? ↗ arXiv:2611.07166 (November 2026).
  9. [9]
    A. Aspuru-Guzik, V. Bernales(2026).Where the Tokens Go: Heat, Entropy and Error in Agentic Coding ↗ arXiv:2611.23375 (November 2026).
  10. [10]
    A. Panickssery, S. R. Bowman, S. Feng(2024).LLM Evaluators Recognize and Favor Their Own Generations ↗ NeurIPS 2024.
  11. [11]
    S. Alemohammad, J. Casco-Rodriguez, L. Luzi et al.(2024).Self-Consuming Generative Models Go MAD ↗ ICLR 2024.
  12. [12]
    E. Dohmatob, Y. Feng, P. Yang, F. Charton, J. Kempe(2024).A Tale of Tails: Model Collapse as a Change of Scaling Laws ↗ ICML 2024.
  13. [13]
    C. E. Jimenez, J. Yang, A. Wettig, S. Yao et al.(2024).SWE-bench: Can Language Models Resolve Real-World GitHub Issues? ↗ ICLR 2024.
  14. [14]

Citation

@techreport{zergai2026aec,
  title={Agentic Entropic Collapse: Confidence--Correctness Decoupling and In-Context Self-Conditioning in Stateful Coding Agents},
  author={{Zerg AI}},
  year={2026},
  institution={Zerg AI Research},
  url={https://zergscholar.com/site/agentic-entropic-collapse}
}