Detection Is Not Early Warning: Evaluating Token-Level Alarms on Language Model Failures
Marco De Negri, Luca Sartori, Lorenzo Baggi, Moritz Reihs, Eduard Frank Ďurech, Mennatallah El-Assady, Valentina Pyatkin, Anna Hedström
Abstract
Many failures of language models begin at a specific token, the onset. A monitor that reads the model during generation can classify the finished response, detect the failure once it is under way, or warn before it begins, and only a warning leaves time to stop or steer the generation. Monitors are usually evaluated with response-level metrics such as AUROC, which ignore when the monitor fires. We introduce PREWARN, an evaluation protocol for any failure with an annotated onset. It calibrates each monitor's threshold on validation data to an error rate chosen for the application, runs the monitor, and scores its alarms relative to the onset on all three tasks. As a case study we apply it to repetitive degeneration in three open language models, with early warning as the main task, using linear probes on activations and six untrained baselines. Response-level metrics saturate on this failure, and a rule that reads only the response length scores almost perfectly, while probes that AUROC ranks as equal warn very differently under PREWARN. Probes warn before the onset on most degenerate responses of two of the three models, low-rank adapters below the probe more than double the share of tokens just before the onset that it flags, largely by flagging degenerate responses long before the onset, and no untrained baseline warns much more often than random alarms. We release the probes with calibrated thresholds at https://huggingface.co/collections/marcodene/prewarn-degeneration-probes
Create a lesson
Metadata
- Categories
- cs.LG, cs.CL
- Comments
- Accepted at the NeurIPS 2026 Workshop on Interpretability as a Science. 30 pages (10 main text), 6 figures, 16 tables. Code: https://github.com/swiss-ai/degeneration-probe
Related papers
Evaluable Language-Model Treatment Policies for Sepsis Resuscitation via Offline Value-Guided Selection
Shared title terminologycs.LGYue Pei, Shining Bo, Yingying Zhang et al.
Before the Word: Name Information in Description-Derived States of Small Language Models, With and Without Naming Failure
Shared title terminologycs.LGFernando Cardenas Piepereit
WeightBench: Evaluating Language Models as Weight-Space Programmers
Shared title terminologycs.LGAayush Marasini, Barsat Khadka, Nick Rahimi
f-Divergence Self-Play for Tabular Anomaly Detection via Large Language Models
Shared title terminologycs.LGHoang Tran Vuong, Linh Ngo Van, Dang Nguyen et al.
On the Difficulty of Sequence-Level Supervised Learning for Autoregressive Language Models
Shared title terminologycs.LGMathieu Blondel, Michaël E. Sander, Germain Vivier-Ardisson et al.
Tokenization and Architecture Jointly Allocate Component Roles in Time Series Transformers
Shared title terminologycs.LGMingyu Kim, Doguk Kim