Razin safety monitor
Razin safety monitor is observational instrumentation for the idealized one-position SFT mass-flow theorem described in Razin safety.
Project status: Registered as safety_monitor; observational sidecar, not a blocking safety gate. This entry describes the source audit of 14 September 2026; historical measurements retain their original dates.
Mechanism
For probability vector p, target t, and idealized logit-SGD step eta, compute M_p(eta) = −log(sum_k p_k exp(eta(1[k=t] − p_k)))/eta. A non-target token j grows exactly when p_j < M_p(eta) in that model. Intersect the resulting grower set with a watchlist to report alarms.
Implementation and controls
objectives/safety.py consumes target positions, target IDs, input IDs, and masks returned by the primary objective. It performs a no-gradient forward, calculates thresholds in log space, and unions daemon, batch, and sample watchlists. Missing primary target metadata raises an error. SFT, weighted SFT, NTP, and CoH expose the required metadata; registration alone does not imply compatibility with every objective.
Evidence and evaluation
The sharpened theorem notes a 10,000-case numerical characterization check with zero nonnumerical mismatches, alongside the proof work. This verifies the idealized predicate, not a 10,000-run neural-training safety experiment. The pre-existing Razin safety page documents the theorem's narrowed scope and unresolved composite-unlike track.
Limitations and interpretation
The production optimizer changes shared neural parameters, not independently optimized logits. Neither an alarm nor silence certifies the realized AdamW/LoRA update. In particular, the code docstring's claim that an alarm is “definitely unsafe” under AdamW is stronger than the cited theorem establishes. This monitor does not roll back training or enforce a hard probability constraint.
Sources
- trainfer: trainfer/objectives/safety.py — checkout audited
1c6391f3773b. - cont: docs/research/proofs/razin-safety-sharpened.md — checkout audited
87946914c7b9. - cont: docs/research/pr-specs/safety-monitor-primitive.md — checkout audited
87946914c7b9.