HIP-1401: Evolutionary Candidate & Population Protocol
Abstract
This HIP specifies the Evolutionary Candidate & Population Protocol for Hanzo OS. It defines the immutable EvolutionCandidate artifact format, permitted mutation surfaces, multi-objective population search over a Pareto frontier, Level 1 Product Fitness and Level 2 Evolutionary Fitness scoring, and independent qualification and rollback gates. The protocol governs how Harness (hanzoai/kata), Agent Engine (hanzoai/gen), Model Router (hanzoai/enso), and research workflows (hanzoai/research) safely propose, evaluate, and promote improvements.
Motivation
Iterative improvement of AI systems often collapses into ad-hoc prompt tweaking, unrecorded hyperparameter sweeps, or single-metric hill climbing that regresses cost, latency, or safety. Without a formal candidate lineage and population protocol:
- Improvements cannot be traced to the exact parent configuration, diff, and evaluation gate that justified them.
- Greedy selection on a single score destroys diversity and traps the system in local optima.
- Self-modifying loops risk tampering with their own evaluation harnesses or security boundaries.
HIP-1401 builds directly on the Evidence and Research primitives of HIP-1103, HIP-1145, and HIP-1334 to make evolutionary search auditable, multi-objective, and strictly bounded.
Specification
The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be interpreted as in RFC 2119.
1. EvolutionCandidate Schema
Every proposed mutation in an evolutionary run MUST be represented as an immutable, content-addressed EvolutionCandidate record:
{
"candidate_id": "sha256:...",
"parent_ids": ["sha256:..."],
"spec_version": "1.0.0",
"mutation_surface": "harness.policy",
"artifact_digest": "sha256:...",
"diff_ref": "artifact://...",
"proposer": "did:hanzo:org:agent-or-principal",
"created_at": "2026-11-19T00:00:00Z",
"gate_ref": "gate://...",
"evidence_refs": ["audit://..."],
"signature": "ml-dsa-65:..."
}
candidate_idMUST be the cryptographic hash (SHA-256) of the canonical JSON representation excludingcandidate_id,signatureandattestationsfor new candidates (see §7).parent_idsMUST list one or more immutable parentcandidate_idvalues (or["root"]for a baseline seed), forming a directed acyclic lineage graph.mutation_surfaceMUST name a declared, permitted surface (see §2).artifact_digestMUST match the exact content digest of the deployable artifact (code patch, harness configuration, prompt bundle, routing weights, or model checkpoint).gate_refMUST reference a prospectively frozen evaluation gate (HIP-1334) created prior to candidate evaluation.signatureMUST be a valid cryptographic signature from the proposing principal or service identity.
2. Mutation Surfaces & Immutability Boundaries
Evolutionary proposers MAY mutate only explicitly authorized surfaces:
harness.policy— scheduling, retry, context-budget, and tool-supervision policies inhanzoai/kata.engine.strategy— reasoning templates, planning heuristics, and recovery loops inhanzoai/gen.router.cascade— model selection rules and fallback thresholds inhanzoai/enso.model.adapter— fine-tuned weights, LoRA adapters, or system prompts.research.protocol— hypothesis-generation and experiment-selection heuristics (subject to HIP-1403).
Evolutionary proposers MUST NOT mutate:
- Sandbox isolation boundaries and resource enforcement (
hanzoai/visor). - Frozen evaluation gates, private holdout datasets, or grading verifiers (HIP-1334).
- Evidence ledger write paths, cryptographic signing keys, or promotion authority (
hanzoai/audit). - Conformance rules in
standard.json(HIP-1400) without human governance review.
3. Fitness Evaluation
Candidates MUST be assessed with the applicable fitness profile. Private holdout fitness is available only to precommitted finalists under §7 and HIP-1403, never every search trial.
3.1 Level 1: Product Fitness
For qualification, evaluated inside an isolated Sandbox (hanzoai/visor) on a prospectively frozen gate; search uses development proxies only:
- Verified Success: Fraction of holdout tasks passing independent verification.
- Cost Efficiency: Total compute and token cost per verified success.
- Latency: Median (p50) and tail (p95) wall-clock time to verified completion.
- Robustness: Non-regression rate on private holdout and safety/adversarial suites.
3.2 Level 2: Evolutionary Fitness
For candidates that modify the research or evolution process itself:
- Research Yield ($Y_R$): $\Delta H_{\text{verified}} / C_{\text{total_research}}$, measuring verified capability gain per unit of total research cost.
- Successor Research Lift ($L_R$): $Y_R(\text{successor}) / Y_R(\text{predecessor})$.
- Discovery Rate: Independently qualified improvements per 100 experiments.
- Transfer Rate: Fraction of improvements that generalize to unseen benchmark domains.
- Reproducibility: Fraction of improvements confirmed under independent clean-room replay.
4. Population Search & Selection
- The population archive MUST retain a diverse set of non-dominated candidates across the multi-objective Pareto frontier:
(Verified Success, Cost Efficiency, Latency, Robustness, Safety). - Selection MUST NOT discard a candidate solely because it trails on a single scalar objective if it dominates on another objective or occupies an under-explored behavioral niche.
- Every archive state transition (insertion, dominance pruning, promotion, retirement) MUST be recorded in the Evidence ledger (HIP-1103).
5. Independent Qualification & Promotion Gates
Before any EvolutionCandidate is promoted to production:
- Conformance: It MUST pass all normative conformance tests for its layer (HIP-1400).
- Holdout Verification: An independent qualification runner MUST evaluate the candidate on private holdout tasks not accessible to the proposing agent.
- Integrity & Safety: Zero regressions on mandatory security, sandbox containment, and safety checks.
- Validated Rollback: A tested rollback artifact pointing to the previous qualified production candidate MUST be staged and verified prior to cutover.
6. Optional External Verifiable Attestations
An EvolutionCandidate record MAY include an optional attestations array containing external, independently verifiable cryptographic attestations (such as transparency-log inclusion proofs or third-party audit receipts). This extension point is reserved for future specification and MUST remain strictly optional: full conformance with HIP-1401 MUST NOT require a blockchain or external ledger.
7. Evolutionary discovery profile (Phase II)
This section is normative for new evolutionary campaigns. The protocol is shared by Python and Rust SDKs; a language binding MUST NOT define a second candidate identity, archive or evidence store. Research objects and their authoritative state remain under HIP-1334.
Identity correction: for new candidates the canonical identity preimage excludes candidate_id itself, signature and attestations. Canonical encoding follows HIP-1334; reject noncanonical or nonfinite values, sort object keys according to that encoding, and bind the schema version. Verify existing identifiers according to their recorded version; never silently rehash historical records.
7.1 Genome and population
A genome is an immutable typed Artifact referenced by EvolutionCandidate.artifact_digest; training outputs are separate artifacts bound by Run and Evaluation. The following logical fields are required (names are proposed schema fields, not claims of shipped routes):
| Record | Required fields |
|---|---|
| Genome | schema_version, domain, base_artifact_digest, ordered typed loci, compatibility constraints, operator_version, seed, parent_ids, checkpoint_inheritance_ref if used |
| Population manifest | campaign_id, population_id, domain, genome_schema_digest, search_dataset_refs, objective_schema_digest, strategy_digest, allowed_operator_digests, budget_ref, archive_descriptor_schema, seed_schedule |
| Trial | candidate_id, population_id, generation, proposal_sequence, strategy_digest, operator_digest, parent_ids, run_ref, evaluation_refs, fidelity, resource_receipt_refs, status |
| Archive snapshot | population_id, sequence, preceding_snapshot_digest, niche coordinates, candidate and evaluation refs, dominance rule version, RNG state, pending trial refs |
Genome loci declare scalar, categorical, bounded integer, vector, graph or typed program values, permitted ranges and dependencies. Mutation and crossover MUST validate constraints before execution. Crossover requires compatible representations or a versioned explicit adapter; inheritance MUST identify checkpoint, optimizer state, tensor shape and source training split. Incompatible candidates are rejected with recorded reason. Identical genomes under the same evaluation context MAY reuse eligible results, but the reuse and avoided cost are recorded. Candidate identity and semantic genome identity are distinct.
7.2 Search algorithms and control
Implement a common ask/tell contract: propose(state, budget, seed) -> typed candidate or stop; observe(state, trial receipt) -> next state. Proposals are pure with respect to persisted input and seed where supported; asynchronous completions are applied in recorded sequence or by an explicitly versioned deterministic reduction. Every strategy MUST be checkpointable and replayable; Python/Rust parity fixtures MUST cover canonical genome serialization, operators, constraints, archive insertion, budget decisions and resumed proposal sequences.
The controlled strategy suite includes sequential optimization, random search, regularized evolution (age-based retirement with declared tournament), Bayesian optimization (versioned surrogate and acquisition), MAP-Elites with ASHA (frozen descriptors, bins, rungs and promotion fraction), and Hanzo hybrid (declared operator/strategy mixture). Strategies share initial conditions, fidelity definitions, data, budget limits and evaluation code. No strategy sees sealed qualification feedback during search. ASHA promotions consume recorded remaining budget; comparisons account for censored trials and fidelity differences. Preserve failed, duplicate, interrupted and refuted trials.
The population controller MUST support adaptive operator allocation, bounded mutation, compatible crossover, elitism where declared, diversity preservation, and migration between related populations. Migration is an explicit lineage edge with source evaluation context; fitness is recomputed on the target development split and transferred checkpoints undergo contamination checks. MAP-Elites stores best eligible candidates within declared behavior niches; Pareto ranking uses frozen objective directions and constraints, with deterministic tie-break. Retain history when archive membership changes.
7.3 Search versus qualification fitness
Search selection uses only training-derived and search-development measurements; independent validation may select finalists under a frozen rule, but cannot be fed back into the same adaptive search. Section 3 product fitness on private holdout is qualification-only; it MUST NOT be exposed to search controllers, proposal agents, surrogate fitting, mutation allocation, dashboards used to steer search, or migration. Separate development Pareto archives from qualified evidence projections. Apply HIP-1403's sealed lockbox and fresh challenge rules.
Objectives MUST define direction, units, uncertainty, thresholds and aggregation. Mandatory correctness, policy, safety, memory and budget limits are hard constraints, not compensable weights. Report best qualified result, Pareto hypervolume against a preregistered reference point, regret against a declared observed reference (not an unknown global optimum), time and compute to threshold (censor unmet runs), niche coverage, transfer yield, replication rate and magnitude of validated improvement per resource unit. Improvement counts alone MUST NOT rank strategies.
7.4 Model and executable mutation surfaces
Extend §2's allowlist, only when explicitly authorized by the campaign manifest:
- model.reader: hierarchical readers, representation layers, adaptive chunking, evidence-conditioned and cross-option readers, rubric conditioning, multilingual backbone selection.
- model.training: teacher mixtures, hard/soft distillation objectives, multi-task curricula, architecture search, quantization and difficulty-conditioned compute; frozen backbone profiles MUST prove weights unchanged by digest.
- research.strategy: strategy hyperparameters, operator allocation, surrogate selection and migration; research.coordination: bounded resource allocations across campaigns (HIP-1403).
- engine.kernel, engine.inference, storage.algorithm, scheduler.algorithm: typed, sandboxed candidates for CUDA/Vulkan kernels, routing, caching, batching, VFS and scheduling; Zen, Enso, ML and Kai share the protocol.
Executable candidates MUST be compiled from an allowlisted typed representation or reviewed source patch in an isolated build; validate types, bounds, memory safety, deterministic correctness and differential/property tests before timing. Enforce timeout, memory, device and syscall/egress limits; no access to evaluator source, keys or promotion endpoints beyond the declared test interface. Benchmark on matched hardware, compiler, clocks and workload with warmup and repeated trials; retain numerical tolerances and failure receipts. Never deploy discovered code automatically outside existing promotion authority and rollback policy.
7.5 SDK and acceptance
Expose equivalent manifest validation, seed, propose, evaluate-dispatch, observe, archive, checkpoint and resume operations in the shared Python and Rust research SDKs. Representation cache keys bind tenant/authorization, dataset and split digest, sample ID, preprocessing/tokenizer, model weights/layer, precision and runtime version; verify cache content digests, deny cross-split/tenant access and account for build/storage cost. Conformance fixtures MUST prove cache invalidation, deterministic lineage, invalid operator rejection, asynchronous replay, budget enforcement, lockbox noninterference and native artifact qualification. Publish versioned packages and schema compatibility fixtures; no implementation status is asserted by this specification.
Rationale
Separating mutation surfaces from immutable qualification and sandbox boundaries prevents reward hacking and self-certification. Maintaining a Pareto-optimal population rather than a single champion preserves low-cost and low-latency operating points alongside peak-accuracy configurations. Making external attestations an optional extension keeps the core evolutionary protocol lightweight, deterministic, and deployable in any air-gapped or local environment.
Security Considerations
- Evaluation Gaming: If a proposing agent can read or influence the private holdout suite or grading script, Level 1 and Level 2 fitness scores become invalid. Qualification runners MUST execute with separate credentials and read-only access to holdout datasets inside isolated Visor sandboxes.
- Supply-Chain Integrity: All candidate artifacts MUST be verified by content digest (
artifact_digest) before execution to prevent time-of-check-to-time-of-use tampering between qualification and deployment. - Runaway Compute: Harness policies MUST enforce strict per-generation and per-experiment compute budgets so evolutionary loops cannot exhaust cluster resources.
References
- HIP-0000 — Hanzo AI Architecture & Framework
- HIP-1103 — Audit Tamper-Evident Trail
- HIP-1145 — Research Experiment Record
- HIP-1334 — Research: The Unified Research Runtime
- HIP-1400 — Hanzo OS Conformance & Specification Manifest
- HIP-1402 — Hanzo XP — Verified Contribution Protocol
- HIP-1403 — Autonomous Scientific Research Protocol
Copyright
Released under CC0 1.0 Universal Public Domain Dedication.