05 · SWARM — Adversarial Loop
SWARM
The four-agent adversarial loop that probes, traps, scores, and corrects the student until it can no longer be broken.
● available now — convergence detection — threshold, plateau, and oscillation analysis (nucleus/swarm/convergence.py)
Roadmap: graduation by exhaustive failure-pattern coverage
bus · nucleus.swarm.*
The technical how — run until it breaks
Stage 05 of the Nucleus pipeline: a post-training adversarial improvement loop — the Adversarial Layer of the Pedagogical Phase — in which four agents work to break the freshly fine-tuned student. The Interrogator generates probes across the domain; the Adversary crafts traps targeting the student's specific observed failure modes; the Evaluator scores every response (LLM-as-judge integration); the Corrector amends weak spots, with gold-standard corrections weighted 2.5x in the next cycle. Above the loop, the AutoResearch meta-agent evolves the scoring rubric and the extraction heuristics, so failures feed all the way back upstream: re-tuned KICE/TICE rubrics, re-extraction, re-synthesis, re-training. The agents are decoupled over NATS JetStream (nucleus.swarm.*) and traced with OpenTelemetry. There is no epoch count and no time limit; the loop runs until convergence, which the detector (nucleus/swarm/convergence.py) declares only when all hold: at least `patience` (default 3) consecutive cycle scores at or above `threshold` (default 0.95); a plateau, meaning no improvement of at least 0.01 over the best score seen for `patience` cycles; and no oscillation, detected as direction changes on 75%+ of steps across a 4-score window. The same detector flags pathologies — plateau below threshold (stuck), oscillation (contradictory training data or conflicting rubrics), regression. The model graduates when the swarm gives up trying to break it: convergence is "the swarm gives up," not "the model passes a test." All four agents and the convergence math run end-to-end today as statistical heuristics; AutoResearch-driven exhaustive failure-pattern coverage and real student-model inference behind the probes are the production aim. The adversarial lineage is established in the literature: Lion's imitate-discriminate-generate loop (arXiv:2305.12870), adversarial moment-matching distillation (arXiv:2406.02959), and SPIN's self-play graduation dynamic (arXiv:2401.01335).
The loop — four agents, one rubric above them
AutoResearch
evolves the scoring rubric and the extraction heuristics — failures feed all the way back upstream
01
Interrogator
generates probes across the domain
02
Adversary
crafts traps targeting observed failure modes
03
Evaluator
scores every response (LLM-as-judge)
04
Corrector
amends weak spots — gold corrections weighted 2.5x next cycle
NATSthe agents are decoupled over JetStream on nucleus.swarm.* and traced with OpenTelemetry.
When does it stop? When the swarm gives up.
Convergence
The swarm's stopping rule: graduate when scores plateau above threshold with no oscillation — when the swarm gives up, not when a clock runs out.
Convergence is the Nucleus pipeline's stopping rule for the adversarial SWARM stage: the student model graduates when the swarm exhausts its ability to break it — there is no time limit and no fixed cycle count. The detector (BUILT, nucleus/swarm/convergence.py) analyzes the ordered history of per-cycle average evaluation scores, each in [0.0, 1.0], and declares convergence only when three conditions hold at once: (1) the last patience cycles (default 3) all score at or above threshold (default 0.95); (2) no oscillation — over the trailing 4-score window, if 75%+ of consecutive score deltas flip sign (up-down-up-down), the run is flagged unstable, usually meaning the training data contains contradictory examples or the rubric criteria conflict; and (3) plateau — no meaningful improvement, defined as a gain of at least 0.01 over the best score seen so far, for patience consecutive cycles. The plateau test is what makes graduation honest: a model still improving keeps cycling — in the module's own words, convergence is 'the swarm gives up,' not 'the model passes a test.' When graduation cannot be declared, the same analysis names the failure pattern: plateau-below-threshold (stuck but not good enough — the cue for AutoResearch to evolve its rubrics), oscillation (instability), or regression (scores trending down after improvement). The shipped detection is statistical heuristics (Phase 1a: threshold, plateau, and direction-change analysis); convergence by exhaustive failure-pattern coverage — graduating only when AutoResearch has no remaining experiments — is the Phase 1c+ roadmap stated in the module itself. A converged candidate exits the swarm and proceeds to three-gate certification.
From the detector's own history — A run's cycle scores read 0.70, 0.85, 0.96, 0.97, 0.97, 0.96: the last three cycles all clear 0.95, the best score (0.96 at cycle 3) has not improved by 0.01 in three cycles, and the recent deltas never alternate sign — detect_convergence() declares graduation. Had the tail bounced 0.96, 0.91, 0.97, 0.92 instead, the oscillation flag would fire and the swarm would keep cycling, warning that the training data may contain contradictory examples.
In the World →Graduation is earned, not scheduled: convergence is “the swarm gives up,” not “the model passes a test.” A converged candidate exits the loop and proceeds to three-gate certification.
● available now — the convergence math is real code today: threshold, plateau, and oscillation analysis in nucleus/swarm/convergence.py. Roadmap: graduation by exhaustive failure-pattern coverage — converging only when AutoResearch has no remaining experiments.
Inputs
Trained student · AutoResearch rubric
Outputs
Probes, traps, scores, corrections · convergence signal
In the literature
The vocabulary
sft-raft
SFT + RAFT
Stage 04: LoRA fine-tuning where every batch carries oracle documents plus deliberate distractors, so the student internalizes grounded reasoning instead of memorized answers.
in the dictionary →
three-gate
3-GATE
Three independent certification gates between a swarm-graduated candidate and any seal — external audit on benchmarks the swarm never saw.
in the dictionary →
convergence
Convergence
The swarm's stopping rule: graduate when scores plateau above threshold with no oscillation — when the swarm gives up, not when a clock runs out.
in the dictionary →
kice-tice
KICE + TICE
Stage 02 — twin agents mine the corpus in parallel across seven layers of knowledge, from rare concepts down to tribal know-how.
in the dictionary →
scotd-cotd
SCoTD + CoTD
The synthesis stage: teacher rationales are decomposed into explicit symbolic steps, and those reasoning chains — not raw answers — become the training data.
in the dictionary →
For agents
$ curl "https://qukaizen.com/what?term=swarm&world=nucleus"
# the raw compiled artifact: /worlds/nucleus/terms.json