Papers
Topics
Authors
Recent
Search
2000 character limit reached

No Accidental Software Agent First Canonical Code for Human Code Entropy Reduction and 30 to 500 times Lower Frontier Model Requirements

Published 12 Jun 2026 in cs.SE and cs.AI | (2606.14357v1)

Abstract: Frontier coding models may spend substantial capacity learning not only program behavior, but also accidental entropy in human repositories. Such repositories contain valuable signals: tests, incidents, migrations, edge cases, product judgment, and operational history. These signals are entangled with framework churn, naming drift, generated-source ambiguity, dependency rituals, CI dialects, weak proof routes, and human-oriented review customs. We propose agent-first canonical code, a proof-carrying substrate that rewrites routine product software into canonical behavior profiles, typed change algebra, proof lanes, constrained edit grammars, semantic patch cells, runtime negative memory, and proof-carrying change objects. The core hypothesis is that quotienting software by behavior equivalence under a declared oracle can collapse equivalent encodings into governed representatives with explicit evidence and proof obligations. The endpoint is amortized cost per verified correct change, including source, context, reasoning, tools, verification, security, provenance, review, failed loops, defects, and foundry cost under a common oracle. Reported reduction bands are hypotheses, not measured frontier results. The proposed limit is a No-Accident Horizon: removable accident decreases until residual novelty, evidence, governance, risk, and future optionality dominate. For supported routine-product distributions, this gives a defensible planning target near 100-fold all-in cost reduction, not a guarantee for all software. Preliminary QLoRA experiments on Qwen2.5-Coder-14B show that 64,088 canonical trajectories are learnable and suppress tested forbidden-language markers, but do not establish behavior preservation, scaling economics, or verified-change cost. The contribution is a falsifiable program centered on minimum functional description length and verified-change cost.

Authors (1)

Summary

  • The paper introduces an agent-first canonicalization method that transforms chaotic raw code into a structured, cost-efficient substrate.
  • It employs governed canonical profiles, behavior cells, and proof-carrying change objects to compress representation and action spaces markedly.
  • Empirical results demonstrate improved learnability and a reduction in verified change costs by 30×–500× in routine software domains.

Canonical Code and the No-Accident Horizon: An Agent-First Compression Theory for Code LLMs

Motivation and Thesis

The paper introduces a high-precision research agenda for reducing the "accidental representation" endemic to human software repositories by transforming raw code corpora into an agent-first canonical substrate. The central thesis is that current code LLMs are not merely learning product behaviors—they are also forced to model and generalize over a chaotic collection of local conventions, duplicated contracts, naming drift, CI folklore, and insufficiently structured repository artifacts. This accidental entropy imposes a fourfold cost: during model training, context gathering, inference/tool use, and human review. The authors propose substrate-level canonicalization, claiming that for routine product domains the all-in cost per verified correct change can be reduced by factors ranging from 30×30\times to 500×500\times compared to current state-of-the-art code models, anchored to measurable outcome denominators.

Human-Code Entropy and Canonical Substrate Design

Human repositories contain valuable operational memory—behavior, incidents, migrations, tests—but are structurally noisy. The canonical code proposal is not a style filter; it is a transformation of the training target:

  • Governed canonical profiles: Each software class receives a versioned configuration specifying language role, naming, file grammar, generated boundaries, repository and dependency policy, and proof lanes.
  • Behavior cells: Product primitives (CRUD, auth, billing, workflow, migration, audit, jobs, observability) map to reusable, parameterized behavior cells; domain-specific novelty is isolated explicitly.
  • Proof-carrying change objects: Every accepted change is expressed not as a raw patch but as a structured object: intent, affected cells, typed diff, schema/migration/security/test delta, proof receipts, rollback plan, and provenance.

By transforming the code archive into this substrate, the action and reasoning spaces experienced by agentic models are directly compressed: fewer legal encodings, more constrained edit grammars, and explicit proof obligations.

Quotienting by Behavior and Information-Theoretic Framing

The paper formulates the canonicalization process as quotienting software by declared oracles of observable behavior. Rather than learning the full orbit of possible surface implementations (PP), the model learns the representative of the behavior-equivalence class under the oracle (P/OP/\sim_O), accompanied by evidence and a disposition ledger for residual novelty/risk.

This aligns with information-theoretic compression: canonicalization reduces human-code conditional entropy given fixed behavior, contracts, and environment:

Hhuman=H(representationbehavior,contracts,environment)H_{\text{human}} = H(\text{representation} \mid \text{behavior},\text{contracts},\text{environment})

The accidental representation tax is quantified as:

ART(y,τ)=logEy,τlogCy,τ\mathrm{ART}(y, \tau) = \log |\mathcal{E}_{y,\tau}| - \log |\mathcal{C}_{y,\tau}|

where Ey,τ\mathcal{E}_{y,\tau} is the set of behavior-equivalent raw encodings and Cy,τ\mathcal{C}_{y,\tau} is the canonical subset.

Canonicalization Compression Cascade

The paper describes a compression ladder, starting from raw human code and progressing through canonical profiles, contract-first generation, behavior cells, semantic patch cells, proof lanes, reasoning digests, and constrained edit grammars. The aggregate effect is a theoretical reduction in:

  • Effective representation-space: 40×40\times150×150\times
  • Agent action-space: 500×500\times0–500×500\times1
  • Reasoning/token space: 500×500\times2–500×500\times3
  • Training-token efficiency: 500×500\times4–500×500\times5
  • Cost per verified correct change: 500×500\times6–500×500\times7

Each layer is measured separately and cannot be multiplied naively; causal overlap and denominators are explicitly acknowledged.

Empirical Evidence: Learnability and Loss Convergence

The authors present a QLoRA parameter-efficient fine-tuning experiment using Qwen2.5-Coder-14B-Instruct on 64,088 canonically translated agentic coding trajectories. The raw loss curve demonstrates robust learnability and strict adherence to the target profile, with zero forbidden-language markers over all evaluation checkpoints. Figure 1

Figure 1: Training and validation loss convergence for Qwen2.5-Coder-14B on 64,088 canonical trajectories; loss drops from 2.707/2.261 to 0.419/0.646 respectively, with no forbidden-language markers.

This demonstrates that canonical data is learnable and profile constraints can be reliably enforced under parameter-efficient adaptation, but does not yet prove cost-per-correct-change reduction, behavior preservation, or token-space efficiency against raw human repositories.

No-Accident Horizon: Compression Limit and Planning Regime

The strongest theoretical claim is the existence of the "No-Accident Horizon"—the asymptotic limit, as accidental representation and repeated architecture are quotiented away, of verified change cost reduction achievable by canonicalization. Figure 2

Figure 2: Reduction curves for all-in verified-change cost, with conservative, central, and aggressive bands converging to 500×500\times8, 500×500\times9, and PP0 limits for routine software domains.

This limit is formalized as:

PP1

where PP2 is the fraction of removable work under supported domain and declared oracle.

  • For arbitrary programs: PP3 (no compression; distribution-free limit).
  • For routine product/software domains: PP4; this covers SaaS/web/backend/data, where canonicalization and certified cells absorb the bulk of repetitive behavior.

Verification, Falsification, and Evaluation Protocol

The paper defines explicit falsification criteria for each hypothesis:

  • Substrate value: Same-model ablation on paired raw/canonical repositories must yield lower files opened, reasoning tokens, tool calls, invalid edits, and cost per verified correct change.
  • Training-token efficiency: Paired scaling curves must demonstrate lower tokens to target accuracy.
  • Behavior preservation: Canonical ports must pass graded evidence tiers—tests, traces, migration replay, security negatives, human review.
  • Economics: Foundry amortization must be repaid by downstream cost savings.
  • Theoretical limit: If the residual floor (PP5) for routine product changes exceeds PP6, or behavior-cell coverage stalls below PP7, aggressive bands must be rejected.

Practical and Theoretical Implications

Practically, canonical code offers a path to lower training budgets for code LLMs, increased serving throughput for dense-active inference, reduced agent sprawl during context and reasoning, and amortizable improvements in software maintenance, security, and review. Theoretically, it reframes code LLM pretraining as learning behavior quotients rather than surface orbits, and establishes information-theoretic and economic limits for agentic software systems.

Future directions include mining software "genomes" (global atlas of behavior cells), establishing behavior IR and typed change algebras, exploiting proof receipts and negative memory, and institutionalizing runtime evidence as first-class evaluation artifacts. Mature foundries should publish corpus and change ledgers for transparent accounting.

Conclusion

This paper develops a falsifiable compression theory for code LLMs, anchored in agent-first canonicalization and quotient learning by declared behavior oracles. Routine product software is shown to admit theoretical reduction in all-in verified-change cost by PP8–PP9, provided substrate transformation, behavior-cell census, graded evidence, and amortization conditions are met. The proposal is not universal for arbitrary software but is precise for supported domains, and every major claim is tied to measurable outcome denominators and kill-chain validation experiments. The end state is a constrained substrate for software agents, in which novel engineering effort is spent exclusively on irreducible product novelty, evidence, governance, and safety.

(2606.14357)

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.