TL;DR
Standard metrics for evaluating language model (LM) monitors, like AUROC, are "timing-blind"—they reward detecting a failure after it has happened just as much as warning before it starts. This paper introduces PREWARN, a new evaluation protocol that specifically measures a monitor's ability to provide early warnings, and demonstrates that linear probes on model activations can predict repetitive degeneration hundreds of tokens before it becomes visible in the text.
What Problem Does This Paper Address?
As Large Language Models (LLMs) generate text, they can fail in various ways: they might hallucinate, output harmful content, or fall into infinite repetition loops. Most of these failures have a clear onset—a specific token where things start to go wrong.
To build safer systems, we need "monitors" that can flag these failures in real-time. However, the current standard for evaluating these monitors is response-level metrics like AUROC or F1-score. These metrics only care if a monitor eventually flags a bad response. For a developer, this is insufficient. If a monitor fires only after the model has already generated a screen full of gibberish, it's too late to intervene. We need early warning to stop, steer, or resample the generation before the failure manifests.
Methods
The authors propose PREWARN (pre-onset warning evaluation), a three-step protocol designed to evaluate token-level alarms:
- Calibrate: Set the monitor's threshold on a validation set to meet a specific "error budget" (e.g., a 5% false alarm rate). This ensures the monitor is evaluated under realistic deployment conditions.
- Run: Execute the monitor on a test set.
- Score: Evaluate alarms against the annotated onset across three tasks: response classification (did it fail?), failure detection (is it failing now?), and early warning (will it fail soon?).
As a case study, they apply PREWARN to repetitive degeneration (repetition loops). They build monitors using linear probes—simple classifiers trained on the model's internal residual stream activations. They test both "frozen" probes (reading existing activations) and "adapted" probes (using rank-16 LoRA adapters to surface failure signals more clearly).
Datasets
The study uses three open-weights models: APERTUS-8B-INSTRUCT, LLAMA-3.1-8B-INSTRUCT, and MISTRAL-7B-INSTRUCT.
- Prompts: 3,630 prompts from seven sources covering math, code, and medical reasoning.
- Labels: Failures were initially identified by an LLM judge (Claude 3.5 Sonnet) and then human-verified to pinpoint the exact onset token of repetition loops.
Key Insights and Ideas
- AUROC is deceptive for safety: A "token-cap" rule that simply fires when a response hits the maximum length limit achieves a near-perfect AUROC (0.999) because it correctly identifies every failing response. However, it provides zero early warning. PREWARN exposes this gap.
- Failures are "visible" internally before they are "audible" in text: For models like Llama and Apertus, internal activations change significantly before the first repeated token is actually generated.
- Model-specific "Warning Windows": Not all models signal failure the same way. While probes on Apertus and Llama provide strong early warnings, probes on Mistral act more like detectors, firing mostly after the onset.
- The Power of Adaptation: Adding LoRA adapters doesn't necessarily increase the rate of early warnings (how many responses get a warning), but it dramatically increases the coverage (how many tokens before the onset are flagged). It effectively "stretches" the warning signal further back in time.
Key Results
- Lead Time: On Apertus and Llama, the median first alarm occurred 137 to 232 tokens before the onset.
- Warning Rate: Probes on these models achieved an early-warning rate above 0.5, meaning they successfully warned before the onset in more than half of the failing cases.
- Baselines: None of the six untrained baselines (like windowed entropy or n-gram repetition rules) performed significantly better than random alarms for early warning.
- Latent Separation: PCA analysis showed that while "healthy" and "pre-failure" activations overlap in the base model, the adapted probes successfully separate these states in the latent space, allowing for much earlier detection.
Limitations and Future Work
- Onset Convention: The results are sensitive to how the "onset" is defined. The authors chose the very first token of the first loop; a more relaxed definition would make any monitor look "earlier."
- Conservative False Alarms: The study treats any repetition that eventually terminates as "healthy," which might make the false-alarm budget overly conservative.
- Intervention: While the paper proves we can detect failures early, it doesn't explore how to best act on those warnings (e.g., via activation steering or backtracking).
- Generalization: The PREWARN protocol is general, but this study focused only on repetitive degeneration. Future work is needed to apply it to hallucinations and harmful content.
Summary updated