Foundations Advanced 2 minute read Updated 2026-06-26 UTC

Code breeding versus model breeding

Why algorithmic change and parameter change require separate genomes, evaluators, permissions, and release processes.

Research statusConceptual synthesis built from software and ML controls Publication statePublished Reviewed byMichael Kappel Source reports2

Two evolutionary domains

Code breeding changes the machinery that trains, routes, evaluates, or serves models. Model breeding changes learned parameters, adapters, experts, quantization, tokenization, or training recipes. They interact, but they should not share unrestricted authority.

DimensionCode breedingModel breeding
Primary artifactSource, AST, IR, workflow, kernel, policyWeights, adapters, expert partitions, tokenizer, recipe
Typical mutationPatch, algorithm swap, threshold logic, compiler optionFine-tune, prune, quantize, merge, distill
Main evaluatorTests, static analysis, security, determinism, performanceTask utility, robustness, calibration, bias, cost
Catastrophic failureExecution compromise or policy bypassBehavioral regression or representational drift
Release boundarySoftware supply chainModel supply chain
Required rollbackPrior code and configurationPrior model package and routing state

The self-referential validation hazard

A candidate must never be able to modify the mechanism that decides whether it is fit. If a model can rewrite its evaluator, reward, holdout data, or hard constraints, selection pressure shifts toward passing the metric rather than improving the intended capability.

The same rule applies to code-breeding agents. A generated patch may improve the evaluation harness only through a separate, higher-trust change process with independent review and re-baselining.

  1. Candidate zone: model artifacts and generated code run with minimal permissions.
  2. Evaluation zone: frozen suites, judges, and scoring code; read-only to candidates.
  3. Policy zone: hard invariants, mutation allowlists, approval thresholds, and resource ceilings.
  4. Release zone: signing, canary control, rollback, and production promotion.
  5. Audit zone: append-only evidence and lineage records.

Cross-domain change protocol

A model-breeding experiment may reveal that the router needs a new feature. That does not authorize automatic code mutation in production. It creates a code-change proposal with evidence, which enters the software lifecycle.

pseudocode
IF model_experiment.requires_code_change
    proposal <- CREATE_CODE_CHANGE_PROPOSAL(
        rationale = model_experiment.evidence,
        requested_capability = model_experiment.missing_runtime_feature
    )

    SEND_TO_CODE_BREEDING_PIPELINE(proposal)
    PAUSE_MODEL_PROMOTION_UNTIL(code_release_is_approved)
END IF

Separation improves scientific validity

Distinct pipelines make it possible to attribute gains. When code, data, evaluator, and weights all change together, the experiment cannot explain why performance moved. Controlled breeding changes one mutation family at a time or uses factorial experiments with explicit ablations.

Source reports used for this guide

These reports are preserved verbatim in the site archive. The guide above is an editorial synthesis and may narrow, qualify, or reorganize claims from the source material.