I spent the last year building quality gates for AI agent outputs — deterministic verification, diff reviews, delivery checks. I even shipped one for the ECC project (200K+ stars). It worked.
Then I started fine-tuning models.
Training loss dropped from 9.2 to 8.8. Solid convergence. Everything looked great.
So I ran a test prompt:
19999999999999999999999999999999...
Every prompt. Every time. Perplexity never flagged it.
That's when I realized: this quality-gate philosophy applies at the weight layer too. You just need a different metric.
The gap loss curves don't cover
| Signal | What it tells you | What it missed |
|---|---|---|
| Training loss | "Model is learning" | Output is digit garbage |
| Perplexity | Token-level quality | Mode collapse |
| BLEU/ROUGE | n-gram overlap | Behavioral degradation |
Behavioral Drift: three signals, one score
import evaluate
drift = evaluate.load("behavioral_drift")
r = drift.compute(predictions=ft_outputs, references=base_outputs)
print(r["drift_score"]) # 0.95 = healthy, 0.05 = collapse
Three signals multiplied into one score:
- self-BLEU — output similarity (high = mode collapse)
- digit density delta — numeric characters vs baseline
- repetition ratio — unique token ratio (low = looping)
The bigger picture
Same quality-gate philosophy across layers — from agent reasoning to model training: don't trust the proxy metric; check the actual output.
- hermes-workspace: n=30 causal experiment (p=0.0092)
- gategrow: Agent-layer quality gates
- training-gate: Model-layer quality gates
- PR #778: Metric submitted to HF evaluate
Has this happened to you — loss down, model broken?
Top comments (0)