05 · SWARMAdversarial 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

Worked exampleA run whose cycle scores read 0.70, 0.85, 0.96, 0.97, 0.97, 0.96 converges: the last three cycles clear the 0.95 threshold, no score has improved by 0.01 or more in three cycles, and the trend is steady rather than oscillating. A run reading 0.70, 0.85, 0.92, 0.96, 0.97, 0.97 does not converge — only two cycles are above threshold, so the swarm keeps probing. A plateau below threshold (best recent score 0.91 against a 0.95 target) doesn't end the run either; it signals AutoResearch to evolve the rubrics and the loop re-extracts, re-synthesizes, and re-trains.

In the literature

The vocabulary

For agents

$ curl "https://qukaizen.com/what?term=swarm&world=nucleus"

# the raw compiled artifact: /worlds/nucleus/terms.json

Dictionary →