betaFeedback

Reading v1View latest version

WorksComputer Science

Detection Is Not Early Warning: Evaluating Token-Level Alarms on Language Model Failures

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

Introduction

Many failures of language models begin at a specific token, the onset. From that token on, a response may, for example, turn harmful [23], make unsupported claims [26], or fall into a repetition loop that runs until the token budget is exhausted [14, 36, 29]. A monitor that reads the model during generation can serve three tasks: response classification gives one verdict on the finished response, failure detection raises an alarm once the failure is under way, and early warning raises one before it begins. Only an early warning leaves time to stop, steer or resample the generation before any of the failure is produced [23, 13, 43]. We ask how such monitors should be evaluated, focusing on early warning, with repetitive degeneration as the case study.

Linear probes on model activations are a cheap way to build such monitors. They have been trained to detect deception [10], high-stakes interactions [25], hallucinated entities [27] and repetition loops [38, 42, 7], and are scored as classifiers of whole responses, entities, text chunks or sentences, with AUROC, accuracy, F1F_1 or recall at a fixed false-positive rate. Because every unit after the onset counts as a positive, these metrics reward flagging the failure, not flagging it early. A probe that fires only once the failure is visible in the text scores as well as one that fires before it begins (Figure 1, left).

Figure 1. Overview of PREWARN. Left: a monitor runs a scorer over the generated tokens and alarms where the score crosses τ\tau (dots mark flagged tokens, the flag the first alarm); AUROC rates three such monitors as equal although their first alarms fall well before, just before and after the onset o(r)o(r). Right: what PREWARN needs and its three steps: calibrate the threshold on validation to the budget β\beta, run the monitor on the test split, and score the alarms against the onset on the three tasks.

To score early warning, an evaluation needs two things: an annotated onset, so that alarms before it can be scored separately from those after it, and a threshold fixed in advance at the error rate the monitor will be deployed with, so that the monitor is evaluated as it will be used. Evaluations that report timing each miss at least one of these. Li et al. [ [23] report how much of the response their monitor of harmful content reads before stopping it, not whether the harm had already begun. Evaluations that locate the onset either count an earlier alarm the same as one raised in the first unsafe sentence [Kavumba et al., 2026] or give it no credit [32, 18]. Huang et al. [ [16] fix the false-alarm rate, but label only whether a run failed, so they measure how early an alarm comes from the end of the run. Duan et al. [ [7] credit only alarms raised before repetition starts, but tune their threshold for detection. Section A.1 covers related work in full.

We propose PREWARN (pre-onset warning evaluation), a protocol for monitors of any failure with an annotated onset. It fixes each monitor’s threshold on validation data at a chosen error rate and evaluates the monitor on each of the three tasks, measuring its alarms relative to the onset (Figure 1, right). Which error to fix, and at what rate, depends on the failure at hand. For repetitive degeneration we fix the share of healthy (non-degenerate) responses that raise an alarm, the false-alarm budget. For harmful content, a missed failure can cost more than a false alarm [23], so one may instead fix the false-negative rate.

We apply PREWARN to repetitive degeneration in APERTUS-8B-INSTRUCT [31], LLAMA-3.1-8B-INSTRUCT [11] and MISTRAL-7B-INSTRUCT [19], sampled stochastically without balancing the classes, and test whether response-level metrics, the standard for response classification, also identify the monitors that warn early. For repetitive degeneration they do not. Only a few percent of responses degenerate, so a monitor that never alarms is highly accurate, and since every degenerate response runs to the token limit, a rule that only checks length reaches an almost perfect AUROC, though it fires only once the budget is spent and so can never warn.

Probes that AUROC ranks as equal warn very differently under PREWARN, and on APERTUS, selecting by AUROC picks one that warns less. Frozen probes, which read the model’s own activations, raise their first alarm before the onset on most loops of APERTUS and LLAMA, while on MISTRAL they mostly fire after the onset and work better as detectors. Low-rank adapters trained below the probe more than double how much of the window just before the onset it flags, mostly with flags long before it, but barely raise how often the first alarm precedes it. None of six untrained baselines, which read only the text or the model’s confidence, warns much more often than random alarms.

Our contributions are:

  • PREWARN, a protocol that evaluates token-level monitors of any failure with an annotated onset on all three tasks, at an error rate fixed in advance (§ 3).

  • Evidence that response-level AUROC and accuracy saturate on repetitive degeneration and only weakly predict which probes warn early (Section 4.2).

  • A comparison with untrained baselines, in which only the probes warn before most loops on two of three models, and an analysis of what low-rank adapters add (§ 4.3 to 4.5).

  • Frozen and adapted linear probes for APERTUS, LLAMA and MISTRAL, released with thresholds calibrated at 1%, 5% and 10% at huggingface.co/collections/marcodene/prewarn-degeneration-probes.

The code for training, scoring and evaluating the probes is available at github.com/swiss-ai/degeneration-probe.

Preliminaries

Responses and activations. We study a decoder-only Transformer ff with LL layers, numbered 0 to L−1L-1, and hidden size dd. A response r=(r1,…,rT)r = (r_1, \ldots, r_T) is sampled from ff given a prompt, and ht(ℓ)∈Rdh_t^{(\ell)} \in\mathbb{R}^d is the residual-stream activation after layer ℓ\ell when token rtr_t is generated.

Failures and onset. We consider failures that begin at a specific token. A response fails, F(r)=1F(r) = 1, if it contains the failure, and is healthy, F(r)=0F(r) = 0, otherwise. The onset o(r)o(r) of a failing response is the position of the first token of the failure, and is annotated together with F(r)F(r). Our case study is repetitive degeneration, where a response fails if it enters a repetitive pattern that persists until the token budget is exhausted, and the onset is the first token of the first loop (§ 4.1).

Scorers and monitors. A scorer assigns a score st∈[0,1]s_t \in[0, 1] to every position tt using only information available when rtr_t is generated, such as the prefix or the activation ht(ℓ)h_t^{(\ell)}, so it can run during decoding. A monitor runs a scorer with a threshold τ\tau: position tt is flagged when st≥τs_t \ge\tau, and the first alarm αr\alpha_r of a response is its first flagged position, with αr=∞\alpha_r = \infty if none is flagged.

Monitoring tasks. A monitor serves one of three tasks (§ 1, Figure 1). Response classification asks whether F(r)=1F(r) = 1 once the response is complete. Failure detection asks whether the failure is under way at position tt, that is, whether t≥o(r)t \ge o(r). Early warning asks whether tt lies in the warning window, the WW positions just before the onset, o(r)−W≤t<o(r)o(r) - W \le t < o(r).

Prewarn

PREWARN evaluates a monitor on the three tasks for any failure with an onset. It needs the token scores of a scorer on a validation and a test split, the labels of both splits, that is, which responses fail and where their onset lies, and an error budget β\beta, the highest rate of one kind of error the monitor may make. Which error is bounded, and at what rate, depends on the task and the application, and is left to whoever deploys the monitor. The protocol has three steps.

Step 1: Calibrate the threshold. The threshold τ\tau is set to the lowest value at which the monitor’s error rate on the validation split stays within the budget, then held fixed on the test split, so that the monitor is evaluated as it will be deployed. For repetitive degeneration we choose β\beta to be the false-alarm budget, the largest share of healthy responses allowed to raise an alarm. With H\mathcal{H} the healthy validation responses, the threshold is

τ∗(β)=min⁡{τ:∣{r∈H:αr<∞}∣≤β∣H∣}.(1)\tau^*(\beta) = \min\{\tau: |\{r \in\mathcal{H} : \alpha_r < \infty\}| \le\beta|\mathcal{H}|\}. \tag*{(1)}

Step 2: Run the monitor. The monitor runs the scorer with τ\tau over every test response, which gives the flags and the first alarm αr\alpha_r of each response (§ 2). A monitor may also require several consecutive flags before it raises an alarm; Section A.9 examines this variant.

Step 3: Score the alarms against the onset. Let F\mathcal{F} be the failing responses of a split and A⊆F\mathcal{A} \subseteq\mathcal{F} those that raise an alarm. AA coverage is the share of flagged positions in a range, pooled over the responses in F\mathcal{F}. We group the metrics by the task they measure, as in Table 1.

Table 1: Probes against the baselines on the human-verified in-domain test split at β=5%\beta= 5\%. Scorers are grouped, from top to bottom, by what they read: nothing (random alarms, the chance reference), only the length of the response, the emitted tokens, the generator’s confidence in them, or the activations. Each baseline is read at the setting chosen on validation (Section A.6). Probes are labelled with the layer they read; adapted probes also train rank-16 LoRA adapters in the layers up to it. Metrics as defined in § 3; Lead is in tokens, negative when the first alarm precedes the onset. nn: number of degenerate responses. †: raises an alarm on fewer than 90% of degenerate responses, so its Early and Lead describe only part of them and are left out of the comparison. FA and Pre are not ranked. Best value in each other column and model in bold, values within one standard deviation of it underlined. Mean ± one standard deviation over three seeds for probes; the baselines are deterministic, and random alarms are given in closed form.

Response classificationFailure detectionEarly warning
ScorerAUROC ↑Detection ↑Post ↑Warn256 ↑Early ↑Lead ↓FA (%)Pre
APERTUS (n=116n = 116)
random alarms0.89010.321×10−41 \times10^{-4}1×10−41 \times10^{-4}0.2460.246†+985†5.01×10−41 \times10^{-4}
token-cap rule0.99901.003×10−43 \times10^{-4}0.0000.000+32760.20.000
repeated-nn-gram rule0.99720.990.7790.0040.139+1873.20.003
windowed seq-rep-nn0.98150.930.8760.2070.296+1485.20.128
rep/ℓ\ell0.99831.000.9120.2280.267+2304.80.150
windowed entropy0.99711.000.7870.0230.112+5366.20.054
windowed negative log-probability0.99641.000.8080.0210.129+4005.20.053
frozen probe, L150.9994±0.00001.00±0.000.865±0.0070.186±0.0070.658±0.013−172±35.6±0.30.063±0.005
adapted probe, L150.9991±0.00011.00±0.00<u>0.966±0.002</u>0.523±0.0220.695±0.020−214±374.8±0.60.351±0.012
adapted probe, L300.9982±0.00121.00±0.000.973±0.0120.577±0.0130.716±0.015−232±334.6±0.10.399±0.020
LLAMA (n=284n = 284)
random alarms0.88100.299×10−59 \times10^{-5}9×10−59 \times10^{-5}0.3400.340†+632†4.99×10−59 \times10^{-5}
token-cap rule0.99881.004×10−44 \times10^{-4}0.0000.000+29580.20.000
repeated-nn-gram rule0.89870.810.6080.0560.2970.297†+156†3.30.015
windowed seq-rep-nn0.99530.990.8720.3070.358+2315.40.185
rep/ℓ\ell0.99811.000.8670.3150.359+2624.20.193
windowed entropy0.96550.840.3640.0260.1180.118†+964†5.40.034
windowed negative log-probability0.96850.940.4620.0180.097+9454.80.029
frozen probe, L150.9986±0.00011.00±0.000.635±0.0140.087±0.0080.594±0.010−137±185.4±0.10.029±0.004
adapted probe, L150.9980±0.00081.00±0.000.945±0.0080.488±0.0090.655±0.020−236±65.5±0.20.240±0.007
adapted probe, L60.9948±0.00131.00±0.000.920±0.0190.462±0.0180.578±0.019−182±455.3±0.20.231±0.002
MISTRAL (n=315n = 315)
random alarms0.90260.351×10−41 \times10^{-4}1×10−41 \times10^{-4}0.1670.167†+1254†4.81×10−41 \times10^{-4}
token-cap rule0.99951.003×10−43 \times10^{-4}0.0000.000+36880.10.000
repeated-nn-gram rule0.95390.910.7570.0080.066+1561.80.007
windowed seq-rep-nn0.99811.000.935<u>0.186</u>0.203+1925.60.186
rep/ℓ\ell0.99741.000.916<u>0.162</u>0.200+3014.50.187
windowed entropy0.99280.970.8200.0330.075+4964.60.050
windowed negative log-probability0.99220.980.8160.0170.052+3473.30.035
frozen probe, L50.9916±0.00040.99±0.000.572±0.0180.031±0.0020.262±0.007+108±55.2±0.10.047±0.002
adapted probe, L50.9942±0.00180.99±0.010.862±0.0540.147±0.0170.309±0.011+76±35.2±0.50.137±0.012
adapted probe, L110.9952±0.00060.99±0.000.813±0.0420.220±0.0810.393±0.054+44±124.5±0.70.213±0.073

Table 1.

  • Response classification. The response-level metrics are the AUROC and the best accuracy of the response score max⁡tst\max_t s_t.

  • Failure detection. The detection rate (Detection) ∣A∣/∣F∣|\mathcal{A}|/|\mathcal{F}| is the share of failing responses that raise an alarm at all. Post-onset coverage (Post) is the coverage of the positions t≥o(r)t \ge o(r).

  • Early warning. Warning coverage Warn⁡W\operatorname{Warn}_{W} is the coverage of the warning window, with W=256W = 256. The early-warning rate (Early) is the share of responses in A\mathcal{A} whose first alarm precedes the onset, αr<o(r)\alpha_r < o(r). The lead (Lead) is the median of αr−o(r)\alpha_r - o(r) over A\mathcal{A}, negative when the first alarm is a warning and positive when it is a detection. Early and Lead are computed over A\mathcal{A} only, so they are read together with the detection rate. Warning coverage rises when a scorer simply flags more tokens everywhere, so it is read together with pre-window coverage (below), and the early-warning rate is read against random alarms, a chance reference that flags each token with a fixed probability calibrated to the same budget. Their first alarm is equally likely to fall anywhere in a response, so their early-warning rate reflects only where the onsets lie, and a scorer warns only to the extent that it exceeds this level.

  • Other. Pre-window coverage (Pre) is the coverage of the positions before the warning window, t<o(r)−Wt < o(r) - W. Pre has no preferred direction, since a high value can reflect an early judgement that the response will fail or flags unrelated to the onset. The false-alarm rate (FA) is the share of healthy responses of a split that raise an alarm. Calibration sets it to at most β\beta on validation, and on a test split it shows whether the threshold carries over.

We call the detection and early-warning metrics the onset-aligned metrics. Section A.3 gives the full definitions.

Probes for early warning. We propose linear probes on activations as scorers for early warning, with the training strategy and selection rule below, which did best among the 26 strategies we compared on degeneration (Section A.4). A probe reads the residual stream at one layer, st=σ(w⊤LN⁡(ht(ℓ))+b)s_t = \sigma\left(w^\top\operatorname{LN}(h_t^{(\ell)}) + b\right), where the affine parameters of the layer norm are trained together with ww and bb. A frozen probe trains only these parameters and reads the generator’s own activations as they are computed, so it needs no extra forward pass. An adapted probe also trains rank-16 LoRA adapters [15] on every linear projection of the attention and MLP sublayers of layers 0 to ℓ\ell, jointly with the probe, as O et al. [2025] do for hallucination probes. Since the generator itself must stay unchanged, an adapted probe needs a second forward pass through the adapted layers.

Probes are trained with binary cross-entropy on a target that is positive from K=256K = 256 tokens before the onset onward, yt=1[t≥o(r)−K]y_t = 1[t \ge o(r) - K], which asks the probe to fire before the failure is visible in the text, on positions drawn from a window around the onset (Section A.4). Frozen and adapted probes are trained at every layer from 1 to L−1L - 1, and we select the layer and checkpoint with the highest validation Warn⁡256\operatorname{Warn}_{256} at β=1%\beta= 1\% among those whose post-onset coverage is at least 0.3, so that a probe is not chosen for warnings it raises without detecting the failure that follows.

Experiments

Experimental setup

Models and responses. We apply Prewarn to repetitive degeneration in Apertus-8B-Instruct [31], Llama-3.1-8B-Instruct [Graffiori et al., 2024] and Mistral-7B-Instruct [19], all with L=32L = 32. For each model we sample 10 responses to each of 3,630 prompts from seven sources that span mathematics, code, instruction following and medical reasoning, with temperature 0.7, top-pp 0.9 and at most Tmax⁡=4096T_{\max} = 4096 new tokens. A response is terminated if it emits the end-of-sequence token before Tmax⁡T_{\max}, and capped otherwise. Splits are assigned per prompt. Five sources provide the training, validation and in-domain test prompts (1,701, 364 and 365), and two are held out entirely and used only for testing (1,200 prompts).

Labels. Since every degenerate response is capped, only capped responses need a label, and since repetition can also be legitimate, as in enumerations or code, CLAUDE SONNET 5 assigns it as an LLM judge [45]. It reads the prompt and the response and quotes where the loop begins, which we locate in the tokens to obtain o(r)o(r). Terminated responses are healthy, and capped responses the judge cannot rule on are left out. We then review by hand every capped response of both test splits of each model, and confirm the label and the onset, move the onset, or overturn the label. The main text reports on this human-verified test split. The reviewers confirm 97% to 99% of the judge’s degenerate labels and keep its onset for 74% to 92% of the confirmed responses (Section A.2).

Baselines. Each baseline is a fixed formula with no learned weights that uses only information available when rtr_t is generated, so it can run during generation. We group them with the probes by what they read: only the length of the response, the emitted tokens, the generator’s confidence in them, or its activations. The token-cap rule scores the last token of a capped response 1 and every other token 0. Windowed seq-rep-n and rep/ℓ\ell measure how many of the last SS tokens repeat earlier ones [36], and the repeated-n-gram rule counts how often the nn-gram ending at tt has already occurred, a criterion Pipis et al. [2026] use to label looping responses. Windowed entropy and windowed negative log-probability invert the generator’s average uncertainty over the last SS tokens, since a loop is generated with high confidence, and are standard comparisons for probes that detect hallucinations [24, 27]. Section A.6 gives the definitions. The window SS, the look-back ℓ\ell and the nn-gram size nn are chosen per model on validation with the rule that selects the probes, so each baseline is tuned and calibrated as the probes are.

Reported probes. Except in Q1, which compares training strategies on APERTUS, all experiments use the three models and the probes of § 3, with three seeds per probe. For each model we report the frozen probe at its selected layer (15 for APERTUS and LLAMA, 5 for MISTRAL), the adapted probe at the same layer, so that only the adaptation differs, and the adapted probe at its own selected layer (30, 6 and 11), which also changes how many layers are adapted. Unless stated otherwise we report β=5%\beta= 5\% on the human-verified in-domain test split, as the mean ±\pm one standard deviation over seeds. Section A.7 reports the judge-labelled in-domain test split and the held-out split under both labels, and Section A.8 reports β=1%\beta= 1\% and β=10%\beta= 10\%.

We organise the experiments around four questions.

  • Q1 Can response-level metrics tell which scorers warn early?

  • Q2 Do linear probes warn before the onset on every model?

  • Q3 What does low-rank adaptation add to the probe?

  • Q4 Do untrained baselines warn as early as the probes?

Q1: Can response-level metrics tell which scorers warn early?

Since our case study is early warning of degeneration, we evaluate the probes with the early-warning metrics of PREWARN. We first show why the response-level metrics of prior work cannot do this.

Setup. We compare four scorers on APERTUS at layer 15 on the three monitoring tasks of § 2: the token-cap rule of § 4.1, which fires based only on the length of the response, the adapted probe, and the two frozen probes with the highest and the lowest validation AUROC at this layer among the training strategies whose three seeds all pass the post-onset floor (Section A.5). We also read the frozen probe of Figure 3 across layers.

Figure 3. Probes warn before most loops on APERTUS and LLAMA but not on MISTRAL. Frozen (solid) and adapted (hatched) probe of each model at its selected layer (Table 1). (a) Post-onset and (b) warning coverage, with pre-window coverage (Pre) as a light-blue tick. (c) Early-warning rate; dashed lines are random alarms. (d) Lead, the median first alarm minus the onset in tokens; negative values are warnings. β=5%\beta= 5\%, human-verified in-domain test split; error bars are one standard deviation over three seeds.

Only the onset-aligned metrics show how differently the scorers perform, both at one layer and across layers. On response classification the four scorers are indistinguishable, and the token-cap rule reaches the highest best accuracy (Figure 2a). The detection rate, which like AUROC counts whole responses, is close to 1 for all four (Figure 2b). Differences appear only in the metrics that take the onset into account. Post-onset coverage singles out the token-cap rule, which flags almost none of the loop, while the three probes flag most of it (Figure 2b). The early-warning metrics also differ between the three probes, and warning coverage, which our selection rule uses, differs most, with the adapted probe covering more than three times as much of the warning window as either frozen probe (Figure 2c). Response-level metrics miss these differences because they score a response by its highest token score, wherever that token lies. For example, keeping only that token, which usually lies deep inside the loop, removes almost every early warning but leaves AUROC unchanged (Table 4 in Section A.5). The same pattern holds across layers (Figure 2d). AUROC, which is 0.5 for a random scorer and 1 for a perfect one, stays above 0.96 at every layer, and best accuracy varies by less than 3%, so every layer separates degenerate from healthy responses about equally well. Warning coverage is seven times higher at the best layer than at the worst, so the early signs of degeneration are much easier to read at some layers than at others.

Figure 2. Response-level metrics rate four scorers as equal, while only the onset-aligned metrics show how differently they perform. Scorers on APERTUS at layer 15: the frozen probes with the highest and lowest validation AUROC (Section A.5), the adapted probe (hatched) and the token-cap rule, which flags only the last token of a capped response. Panels (a)–(c) group the metrics by task (§ 3); dashed lines in (c) are random alarms. (d) The frozen probe with the selected strategy across layers, with each metric’s best-to-worst ratio; lower plot on a log scale. β=5%\beta= 5\%, human-verified in-domain test split; error bars and bands are one standard deviation over three seeds.

ScorerScoresPostWarn256EarlyLeadPreAUROCPostWarn256EarlyLeadPre
frozen, highest AUROC AUROC 0.9998as scored0.8220.0280.24+1240.0180.99980.8830.0800.24+1240.044
shuffled0.6780.6270.96−8160.5070.99970.7880.7530.96−8090.679
argmax only0.00030.0000.01+26940.000010.5000–––––
frozen, lowest AUROC AUROC 0.9980as scored0.6980.0180.24+880.0010.99730.7920.0520.20+1100.009
shuffled0.5850.5180.95−7950.3770.99710.7520.7030.95−7910.597
argmax only0.00030.0000.01+20370.000010.5000–––––
adapted AUROC 0.9991as scored0.8460.2200.43+410.1110.99900.8990.2960.43+330.166
shuffled0.7140.6710.96−8190.6000.99920.8300.8020.96−8100.760
argmax only0.00030.000040.02+22940.000010.5000–––––

Table 4.

AUROC ranks the probes consistently, but not by how much they warn. In Figure 2a and in the zoom of Figure 2d, the response-level metrics differ little between scorers and layers, but they still show an ordering. We rank the 27 probes of Table 3 by each metric on validation and compare with their ranking on test (Table 5). The ranking by AUROC reproduces itself on test (Kendall’s τ=0.79\tau= 0.79, against 0.53 for best accuracy), so the ordering of AUROC is not noise, but it agrees only weakly with the test ranking by warning coverage (τ=0.33\tau= 0.33). The ranking by validation warning coverage predicts it closely (τ=0.94\tau= 0.94), so our selection rule uses validation warning coverage. For example, at layer 15, selecting by validation AUROC would pick a frozen probe that covers less than a third as much of the warning window as the adapted probe.

Training strategyLayerAUROCPostWarn256_{256} (val, 1%)Warn256_{256}Early
Token selection (frozen, hard target, K=0K=0)
rollout_balanced (128)16 (15–16)0.9998 ± 0.00010.925 ± 0.0010.0482 ± 0.00430.158 ± 0.0040.580 ± 0.010
all_tokens12 (12–15)0.9997 ± 0.00000.923 ± 0.0070.0475 ± 0.00400.166 ± 0.0160.552 ± 0.023
random_window (64)15 (12–15)0.9998 ± 0.00000.927 ± 0.0060.0444 ± 0.00170.159 ± 0.0140.552 ± 0.015
frontier_window (256)6 (6–16)0.9990 ± 0.00020.814 ± 0.0250.0416 ± 0.00510.098 ± 0.0080.552 ± 0.038
frontier_window (128)40.9986 ± 0.00020.610 ± 0.0050.0380 ± 0.00090.072 ± 0.0010.486 ± 0.005
random_window (128)12 (4–15)0.9993 ± 0.00090.867 ± 0.0920.0370 ± 0.00270.127 ± 0.0370.514 ± 0.039
frontier_window (512)12 (5–16)0.9987 ± 0.00120.823 ± 0.1150.0363 ± 0.00500.111 ± 0.0340.537 ± 0.057
random_window (256)4 (4–12)0.9985 ± 0.00110.802 ± 0.1080.0328 ± 0.00090.106 ± 0.0430.474 ± 0.034
random_window (512)4 (4–12)0.9981 ± 0.00140.777 ± 0.1220.0321 ± 0.00110.097 ± 0.0390.466 ± 0.023
frontier_window (64)60.9981 ± 0.00040.526 ± 0.0320.0239 ± 0.00060.042 ± 0.0030.477 ± 0.005
Target horizon (frozen, hard target from KK tokens before the onset)
frontier_window (512) centred K=256K=256150.9994 ± 0.00000.865 ± 0.0070.0743 ± 0.00450.186 ± 0.0070.658 ± 0.013
all_tokens K=1024K=102415 (14–15)0.9996 ± 0.00010.900 ± 0.0040.0737 ± 0.00420.193 ± 0.0100.647 ± 0.031
all_tokens K=256K=25612 (12–15)0.9997 ± 0.00000.921 ± 0.0070.0714 ± 0.00090.205 ± 0.0180.589 ± 0.010
frontier_window (512) trailing K=512K=512150.9989 ± 0.00000.823 ± 0.0160.0688 ± 0.00630.172 ± 0.0090.670 ± 0.005
frontier_window (1024) trailing K=512K=512150.9987 ± 0.00010.858 ± 0.0070.0592 ± 0.00330.162 ± 0.0080.664 ± 0.000
frontier_window (512) centred K=128K=12815 (14–15)0.9993 ± 0.00010.878 ± 0.0040.0563 ± 0.00650.161 ± 0.0050.632 ± 0.005
frontier_window (512) trailing K=256K=256150.9985 ± 0.00010.826 ± 0.0180.0548 ± 0.00480.143 ± 0.0120.647 ± 0.015
frontier_window (1024) centred K=256K=256120.9994 ± 0.00000.910 ± 0.0100.0510 ± 0.00430.194 ± 0.0040.618 ± 0.005
frontier_window (1024) trailing K=256K=25615 (12–16)0.9983 ± 0.00050.861 ± 0.0220.0437 ± 0.00490.144 ± 0.0200.619 ± 0.024
frontier_window (512) trailing K=128K=12812 (8–16)0.9975 ± 0.00070.777 ± 0.0640.0373 ± 0.00420.108 ± 0.0180.545 ± 0.020
frontier_window (1024) centred K=128K=12812 (16–16)0.9992 ± 0.00020.895 ± 0.0110.0372 ± 0.00390.143 ± 0.0150.572 ± 0.013
frontier_window (1024) trailing K=128K=12812 (7–15)0.9977 ± 0.00150.825 ± 0.0710.0289 ± 0.00200.109 ± 0.0300.546 ± 0.070
Soft targets (frozen, frontier_window (512) centred)
exponential, decay 25615 (14–17)0.9992 ± 0.00020.877 ± 0.0090.0577 ± 0.00740.165 ± 0.0030.644 ± 0.013
linear, decay 256150.9994 ± 0.00010.876 ± 0.0020.0504 ± 0.00830.152 ± 0.0050.621 ± 0.015
exponential, decay 12812 (5–15)0.9989 ± 0.00110.823 ± 0.1100.0460 ± 0.00610.134 ± 0.0440.569 ± 0.075
linear, decay 1285 (5–15)0.9982 ± 0.00120.735 ± 0.1070.0384 ± 0.00080.092 ± 0.0260.497 ± 0.070
Adapted (LoRA rank 16 on layers 0 to ℓ\ell)
frontier_window (512) centred K=256K=256300.9982 ± 0.00120.973 ± 0.0120.3035 ± 0.01630.577 ± 0.0130.716 ± 0.015

Table 3. AUROC varies little between training strategies, while warning coverage varies several-fold. Training strategies compared on APERTUS. Within each group, strategies are ordered by validation Warn256_{256} at β=1%\beta= 1\%, the score the selection rule of § 3 uses, and the selected strategy is in bold. The number after a window strategy is its window size in tokens. Layer: median and range over seeds of the selected layer. Warn256_{256} (val, 1%) is measured on validation at β=1%\beta= 1\%, the other metric columns on the human-verified in-domain test split at β=5%\beta= 5\%. All values are mean ± one standard deviation over three seeds, each read at its selected layer.

Ranking on validationReproduces itself on testPredicts test Warn256
AUROC+0.79+0.33
Best accuracy+0.53+0.36
Warn256+0.94+0.94
Post+0.93+0.61

Table 5.

Q2: Do linear probes warn before the onset on every model?

Since only the onset-aligned metrics tell scorers apart by when they fire, we use them from here on, and ask whether the probes trained for early warning (§ 3) warn before the onset, and on which models.

Probes on Apertus and Llama warn before most loops. On APERTUS and LLAMA the early-warning rate of the frozen and the adapted probe is above one half and well above that of random alarms, and the median first alarm comes 137 to 232 tokens before the onset (Figure 3c,Figure 3d). The probes also flag a larger share of the warning window than of tokens before it, with warning coverage 1.4 to 3 times pre-window coverage (Figure 3b), which suggests a signal of the coming loop.

Probes on Mistral fire mostly after the onset. On MISTRAL the early-warning rate of every probe stays below one half, although above that of random alarms, and the median first alarm comes after the onset (Figure 3c,Figure 3d). Warning coverage is close to pre-window coverage, so the probes flag the same share of tokens in the warning window as before it and find no clear signal of the approaching loop (Figure 3b). Their detection rate is still 0.99 (Table 1), so on MISTRAL the probes are useful for failure detection but not for early warning. This holds for adapted probes too. Adaptation cannot add information absent from the response so far, only make it easier for a linear probe to read, so on MISTRAL the signal of the coming loop may be weak or absent until the loop begins (Section 4.4).

The error budget carries over to test, but frozen probes warn less on held-out sources. At the 5% budget, the thresholds fixed on validation give every probe a false-alarm rate of 4.5% to 5.6% on test and below 1% on the held-out sources (Table 12 in Section A.7). There, the frozen probes of LLAMA and MISTRAL still raise an alarm on almost every degenerate response, but their early-warning rate drops to 0.20 and 0.12 and their median first alarm comes after the onset. The adapted probes degrade less and warn before almost all of the 24 degenerate held-out responses of APERTUS.

ScorerAUROC ↑\uparrowDetection ↑\uparrowPost ↑\uparrowWarn256_{256} ↑\uparrowEarly ↑\uparrowLead ↓\downarrowFA (%)Pre
APERTUS (n=24n = 24)
random alarms0.91490.321×10−41 \times10^{-4}1×10−41 \times10^{-4}0.218†0.218^{\dagger}+1081†+1081^{\dagger}3.71×10−41 \times10^{-4}
token-cap rule0.99991.003×10−43 \times10^{-4}0.0000.000+34400.00.000
repeated-nn-gram rule0.95320.920.6800.0010.136+1900.80.001
windowed seq-rep-nn0.99910.920.8050.0280.045+4740.60.000
rep/ℓ\ell1.00001.000.8660.1960.250+4301.50.068
windowed entropy0.99991.000.7580.0170.042+5781.20.008
windowed negative log-probability0.99971.000.7980.0440.042+4271.40.032
frozen probe, L151.0000±0.00001.0000 \pm0.00001.00±0.001.00 \pm0.000.822±0.0100.822 \pm0.0100.164±0.0020.164 \pm0.0020.458±0.0000.458 \pm0.000+33±8+33 \pm80.3±0.00.3 \pm0.00.047±0.0020.047 \pm0.002
adapted probe, L150.9999±0.00000.9999 \pm0.00001.00±0.001.00 \pm0.000.999±0.0000.999 \pm0.0000.796±0.0260.796 \pm0.0260.986±0.0240.986 \pm0.024−633±22-633 \pm220.8±0.40.8 \pm0.40.823±0.0420.823 \pm0.042
adapted probe, L300.9999±0.00000.9999 \pm0.00001.00±0.001.00 \pm0.001.000±0.0001.000 \pm0.0000.917±0.0480.917 \pm0.0481.000±0.0001.000 \pm0.000−632±24-632 \pm240.2±0.10.2 \pm0.10.923±0.0420.923 \pm0.042
LLAMA (n=133n = 133)
random alarms0.89980.299×10−59 \times10^{-5}9×10−59 \times10^{-5}0.142†0.142^{\dagger}+1370†+1370^{\dagger}4.09×10−59 \times10^{-5}
token-cap rule1.00001.003×10−43 \times10^{-4}0.0000.000+37620.00.000
repeated-nn-gram rule0.96150.920.7700.0370.122+2101.60.015
windowed seq-rep-nn0.99800.970.8880.1050.109+2190.50.210
rep/ℓ\ell0.99990.990.8170.0680.061+5600.30.163
windowed entropy0.98490.800.4010.0200.037†0.037^{\dagger}+1018†+1018^{\dagger}2.20.011
windowed negative log-probability0.98380.900.5240.0160.025+8742.30.008
frozen probe, L151.0000±0.00001.0000 \pm0.00001.00±0.001.00 \pm0.000.716±0.0150.716 \pm0.0150.032±0.0040.032 \pm0.0040.201±0.0110.201 \pm0.011+83±9+83 \pm90.3±0.00.3 \pm0.00.021±0.0030.021 \pm0.003
adapted probe, L150.9999±0.00000.9999 \pm0.00001.00±0.001.00 \pm0.000.965±0.0040.965 \pm0.0040.597±0.0410.597 \pm0.0410.559±0.0040.559 \pm0.004−155±12-155 \pm120.3±0.10.3 \pm0.10.754±0.0760.754 \pm0.076
adapted probe, L60.9999±0.00000.9999 \pm0.00001.00±0.001.00 \pm0.000.916±0.0500.916 \pm0.0500.590±0.0120.590 \pm0.0120.530±0.0040.530 \pm0.004−86±55-86 \pm550.1±0.00.1 \pm0.00.747±0.0070.747 \pm0.007
MISTRAL (n=129n = 129)
random alarms0.91190.351×10−41 \times10^{-4}1×10−41 \times10^{-4}0.196†0.196^{\dagger}+1153†+1153^{\dagger}4.31×10−41 \times10^{-4}
token-cap rule0.99991.003×10−43 \times10^{-4}0.0000.000+35680.00.000
repeated-nn-gram rule0.95940.910.7210.0340.128+1670.60.027
windowed seq-rep-nn0.99971.000.8850.1190.147+3220.80.165
rep/ℓ\ell0.99981.000.8630.1120.116+4880.70.167
windowed entropy0.99611.000.8240.0770.132+5046.00.136
windowed negative log-probability0.99361.000.7970.0470.155+3344.10.126
frozen probe, L50.9989±0.00020.9989 \pm0.00020.96±0.010.96 \pm0.010.352±0.0330.352 \pm0.0330.027±0.0030.027 \pm0.0030.115±0.0180.115 \pm0.018+258±27+258 \pm270.4±0.10.4 \pm0.10.031±0.0090.031 \pm0.009
adapted probe, L50.9996±0.00020.9996 \pm0.00020.98±0.000.98 \pm0.000.806±0.1030.806 \pm0.1030.130±0.0290.130 \pm0.0290.318±0.0180.318 \pm0.018+79±15+79 \pm150.3±0.10.3 \pm0.10.120±0.0570.120 \pm0.057
adapted probe, L110.9997±0.00040.9997 \pm0.00041.00±0.001.00 \pm0.000.888±0.1430.888 \pm0.1430.643±0.4950.643 \pm0.4950.727±0.4060.727 \pm0.406−316±345-316 \pm3450.5±0.20.5 \pm0.20.654±0.4910.654 \pm0.491

Table 12. As Table 11, with human-verified labels.

Q3: What does low-rank adaptation add to the probe?

The adapted probes of Q2 flag more of the warning window than the frozen ones, so we now analyse what low-rank adaptation adds to the probe, where the added flags fall and how to interpret them.

Adaptation more than doubles warning coverage but barely raises the early-warning rate. We first compare the frozen probe with the adapted probe at the same layer, which differ only by the LoRA adapters. On every model adaptation more than doubles warning coverage and raises post-onset coverage, but it barely raises the early-warning rate (Table 1), so most of the early warning is already present in the frozen probe. The early-warning rate counts a response once, at its first alarm, so adding flags to a response that already has one before the onset does not raise it. Pre-window coverage rises with warning coverage, so many of the added flags fall long before the onset. Reading the adapted probe at its own layer shows the same behaviour. Since the probe stays linear, these changes come from the representation it reads. In Section A.10 we project the activations of one degenerate response per model onto their first two principal components and show that, at the frozen probe’s layer, the tokens before the warning window, in it and after the onset overlap, while after adaptation they fall in largely separate regions (Figure 6).

Figure 6. In the frozen model, the tokens before the warning window, in it and after the onset overlap; after adaptation they fall in largely separate regions. Residual-stream activations of the tokens of one degenerate response per model (APERTUS: numinamath_1_5_00388, LLAMA: numinamath_1_5_00044, MISTRAL: numinamath_1_5_00517, all from the in-domain test split, projected onto their first two principal components (x: PC1, y: PC2). Columns: the layer read by the frozen probe (left), the adapted probe at the same layer (middle) and the adapted probe at its own selected layer (right). Each panel has its own projection, and its title gives the share of variance each component explains. Blue: before the warning window. Yellow: warning window. Red: after the onset. The adapted panels use the seed with the highest validation warning coverage.

On Apertus and Llama, adaptation adds flags long before the onset, which on Llama may partly track response length. Figure 4 shows where the added flags fall. On APERTUS and LLAMA the frozen probe flags more tokens as the onset approaches. The adapted probes show the same rise, shifted up by a level of flags already present more than a thousand tokens before the onset (top row). Much of the gain therefore comes from flags spread over the whole degenerate response, as for the long-window repetition rules of Section 4.5. On healthy responses every probe flags more the longer the response runs (bottom row). On APERTUS the adapted probes flag more of a degenerate response long before its onset than of a healthy response at any of the first 2,048 positions, which suggests a judgement, made long before the onset, that the response will degenerate. On LLAMA healthy responses reach the same level once they run long enough, so these flags may partly reflect how long the response has run. On both models the onset typically comes after a healthy response has ended, so position alone carries part of the label, and the probes may partly rely on it.

Figure 4. On APERTUS and LLAMA, probes flag more tokens as the onset approaches, and adaptation adds flags long before it; on MISTRAL, flags rise only after the onset. Top: share of flagged tokens on degenerate responses by distance from the onset (bins of 32 tokens; positions more than 1,024 tokens before the onset pooled on the left). Bottom: the same on healthy responses by position (bins of 128 tokens), where flags also rise with length; the strip below gives the number of responses still running, on a log scale. Panel titles give the layers of the three probes. β=5%\beta= 5\%, human-verified in-domain test split; mean over three seeds with 95% intervals from leaving out one prompt at a time.

On Mistral, adaptation raises flags evenly before the onset, not toward it. On MISTRAL all three probes flag every position before the onset at about the same rate and rise only after it. Adaptation raises this rate without adding a rise toward the onset, which keeps warning coverage close to pre-window coverage (Figure 3b).

Q4: Do untrained baselines warn as early as the probes?

Finally, we ask whether the warning of the probes could also come from the baselines of § 4.1, which need no training. Table 1 compares them with the probes on the three tasks.

Every scorer has a high AUROC, and the token-cap rule the highest on two models. As in Q1, response classification tells the scorers apart least. Every scorer but random alarms and the repeated-nn-gram rule on LLAMA has an AUROC above 0.95, and the token-cap rule has the highest AUROC on LLAMA and MISTRAL, although its only flag falls on the last token of a capped response, after the loop has filled the budget. On APERTUS the adapted probe at layer 30, which covers the most of the warning window, has a lower AUROC than both the token-cap rule and rep/ℓ\ell. Ranking by AUROC would again not select the scorers that warn.

The adapted probes flag most of the loop, but on Mistral the long-window repetition rules flag more. Every scorer raises an alarm on at least 81% of the degenerate responses, and most on nearly all of them, so the ranking on failure detection comes down to post-onset coverage. The adapted probes flag the largest share of the loop on APERTUS and LLAMA, while on MISTRAL windowed seq-rep-nn and rep/ℓ\ell flag more. The text baselines measure repetition in the emitted tokens, which appears only once the loop has completed its first cycle, and the confidence baselines measure how confidently the generator predicts the next token, which rises only once tokens repeat the previous cycle. Both appear after the onset, so these baselines can detect the loop but not warn of it.

The probes warn earliest on every model, and no baseline warns much more often than random alarms. On every model the probes have the highest early-warning rate and the earliest median first alarm, and on APERTUS and LLAMA they are the only scorers with an early-warning rate above one half. No baseline warns much more often than random alarms, and the token-cap, repeated-nn-gram and confidence rules warn less often. Windowed seq-rep-nn and rep/ℓ\ell cover more of the warning window than the frozen probe on every model, but warning coverage is not read alone (§ 3). They flag much of the text before the warning window too (Pre), and their first alarm comes well after the onset, so they do not pick up the coming loop but flag much of the response. Both select windows of 1,024 to 4,096 tokens on validation (Table 8 and Table 9), so their score measures how repetitive the response has been so far, and a response that repeats itself from the start is flagged throughout, warning window included. The adapted probe at its own layer still flags 2.5 and 1.5 times as much of the warning window as the best baseline on APERTUS and LLAMA and is within one standard deviation of windowed seq-rep-nn on MISTRAL.

nnSSApertus PostApertus Warn256Llama PostLlama Warn256Mistral PostMistral Warn256
2320.1120.0000.0280.0030.1120.003
2640.1740.0000.0610.0050.1620.003
21280.2750.0220.1440.0150.3240.009
22560.4330.0310.2410.0200.5560.018
25120.6190.0440.4290.0480.6710.021
210240.7820.0990.5720.0650.7580.032
220480.7910.0920.5740.0690.7770.037
240960.7800.0920.5160.0670.7740.037
3320.1220.0000.0420.0040.1240.003
3640.1950.0000.0740.0070.2080.007
31280.3070.0200.1540.0160.3640.010
32560.5070.0430.2720.0210.5650.014
35120.6750.0490.4590.0460.6970.019
310240.7990.1000.6180.0720.7470.026
320480.8100.0920.6340.0670.7890.034
340960.8020.0920.5920.0690.7920.038
4320.1230.0000.0430.0040.1320.003
4640.1960.0000.0840.0080.2450.007
41280.3200.0150.1640.0160.3890.009
42560.5090.0440.2870.0210.5670.012
45120.6780.0420.4800.0480.7120.017
410240.8130.0910.6390.0720.7560.027
420480.8050.0800.6420.0620.7930.036
440960.7980.0800.6280.0720.7850.033

Table 8. NN-gram order nn and window SS of windowed seq-rep-nn. Validation split, β=1%\beta= 1\%. Bold: the setting selected for that model (Section A.6). Grey: below the post-onset floor of 0.3. A coverage near 0 marks a setting on which healthy responses already reach the top of the score range, so the calibrated threshold sits at that top and almost no token is flagged.

ℓ\ellSSAPERTUS PostAPERTUS Warn256LLAMA PostLLAMA Warn256MISTRAL PostMISTRAL Warn256
32320.0000.0000.0000.0000.0000.000
32640.1850.0000.1100.0050.0000.000
321280.2020.0090.1190.0040.3230.006
322560.2120.0190.1480.0220.3650.010
325120.2260.0250.1780.0360.4370.021
3210240.2350.0260.1870.0350.4400.018
3220480.2210.0270.1650.0160.4210.015
3240960.2150.0270.1360.0160.4060.011
64320.0000.0000.0000.0000.0000.000
64640.0000.0000.0000.0000.0000.000
641280.3250.0190.1650.0060.4930.013
642560.3440.0210.2310.0270.5170.017
645120.3900.0380.2680.0430.5650.024
6410240.4030.0310.2860.0520.5740.024
6420480.3810.0320.2540.0290.5430.016
6440960.3590.0320.2040.0260.5290.013
128320.0000.0000.0000.0000.0000.000
128640.0000.0000.0000.0000.0000.000
1281280.0000.0000.0000.0000.0000.000
1282560.4290.0140.3070.0130.6330.021
1285120.4970.0230.3770.0420.6470.023
12810240.5350.0380.4110.0470.6790.021
12820480.5120.0330.3660.0390.6440.017
12840960.4890.0340.2620.0260.6530.022
256320.0000.0000.0000.0000.0000.000
256640.0000.0000.0000.0000.0000.000
2561280.0000.0000.0000.0000.0000.000
2562560.6150.0140.3980.0070.0000.000
2565120.6750.0290.4640.0310.6950.020
25610240.7210.0480.5110.0470.7490.029
25620480.6800.0320.4810.0640.7190.034
25640960.6440.0350.3400.0390.6960.026
5122560.0000.0000.0000.0000.0000.000
5125120.8070.0510.4850.0210.7650.029
51210240.7950.0860.5650.0430.7730.041
51220480.7740.0830.5470.0630.7520.040
51240960.7450.0690.4280.0550.7490.034
10242560.0000.0000.0000.0000.0000.000
10245120.8250.0340.5240.0300.0000.000
102410240.8010.0900.5820.0660.7660.032
102420480.7790.0820.5930.0830.7590.042
102440960.7670.0750.4440.0620.7460.039

Table 9. Look-back ℓ\ell and window SS of rep/ℓ\ell. Validation split, β=1%\beta= 1\%. Bold: the setting selected for that model (Section A.6). Grey: below the post-onset floor of 0.3. A coverage near 0 marks a setting on which healthy responses already reach the top of the score range, so the calibrated threshold sits at that top and almost no token is flagged.

Conclusion

We asked how a token-level monitor of a language model failure should be evaluated, and whether linear probes on activations can warn of repetitive degeneration before it begins. Response-level metrics score whether a response fails, not when a monitor fires, and for repetitive degeneration they rate every scorer as near-perfect, including a length-only rule. PREWARN instead calibrates the threshold on validation data at whichever error rate the task calls for, runs the monitor with that threshold, and scores every alarm against the annotated onset on all three tasks (§ 3). It needs only token scores, annotated onsets and an error budget, so it applies to any failure with an onset, such as harmful content [23] or hallucinated entities [27], which we leave to future work. Under PREWARN, probes that response-level metrics rate as equal differ widely in how much they warn (Section 4.2). Probes on APERTUS and LLAMA fire before the onset on most of the loops they flag, while on MISTRAL their median alarm comes after the onset (§ 4.3). Low-rank adaptation below the probe more than doubles warning coverage on every model, mostly with flags long before the onset, while the early-warning rate rises little (Section 4.4). No untrained baseline warns much more often than random alarms (Section 4.5).

The two kinds of probe suit different deployments. A frozen probe reads the generator’s own activations at no extra cost and already provides most of the early warning. An adapted probe flags much more of the warning window and of the loop, at the cost of a second forward pass through the adapted layers. On a model like MISTRAL, where neither warns before most loops, a probe is better used as a detector. Because the probes we release come with thresholds calibrated at 1%, 5% and 10%, they can directly trigger an intervention, such as stopping, resampling or steering the generation before the loop begins, a direction we have not yet explored.

Limitations

First, the lead times depend on the onset convention. We place the onset at the first token of the first loop, before the repetition is visible in the text, and a later convention would make every alarm come earlier relative to the onset. Second, under our definition of degeneration, a response that loops and then emits the end-of-sequence token counts as healthy, so our false-alarm rates are conservative. Third, some prompts call for repetition that is requested or informative, such as explicit requests to repeat, enumerations, brute-force search or code. These responses are labelled healthy, but we do not test whether the probes can tell such repetition apart from degeneration. Fourth, on APERTUS and LLAMA the onset usually comes after a healthy response has ended, so part of what the probes flag may reflect how long the response has run (Section 4.4). Fifth, the training strategy and selection rule of § 3 were chosen on degeneration alone. Another failure may call for a different strategy, or for scorers other than linear probes.

Acknowledgments and Disclosure of Funding

This research was supported by the ETH AI Center through an ETH AI Center postdoctoral fellowship to Anna Hedström. This work was supported as part of the Swiss AI Initiative by compute grant infra01 from the Swiss National Supercomputing Centre (CSCS) on Alps.

Appendix

Related work in full

Repetitive degeneration. Holtzman et al. [ [14] show that repetition, a long-standing failure of neural text generation, is most frequent under likelihood-maximising decoding, with 73.66% of greedy continuations ending in repetition, and Xu et al. [ [40] show that the more often a sentence already appears in the context, the more likely the model is to generate it again. Welleck et al. [ [36] trace repetition to the training objective and define the lexical measures seq-rep-n and rep/ℓ\ell. The failure has re-emerged in reasoning models, where a loop consumes the remaining decoding budget [38, 7], and Pipis et al. [ [29] find that raising the temperature reduces looping without removing its cause.

Detectors of degeneration. Xie et al. [ [38] classify each chunk of a reasoning trace from the final layer, reaching 89.8–93.5% accuracy on R1-Distill-Qwen-7B at temperature 0, and stop the generation after two consecutive flagged long chunks (or five short ones). Yu et al. [ [42] detect recurrent generation from the similarity of MLP activation patterns across all layers, on prompts found by a search for inputs that trigger loops. Duan et al. [ [7] classify sentences from their last-layer states and accumulate the scores with a cumulative-sum rule. They count a detection only if it precedes a rule-based start of repetition, and report early-detection rates of 0.64–0.76 at false-positive rates of 0.24–0.34 and lead times of 1306–1872 tokens, with greedy decoding, balanced test sets and thresholds tuned on held-out data. Zhang et al. [ [44] read attention statistics and report that, averaged over responses, their score crosses moderate thresholds before the recorded onset, on loops induced by adversarial or missing-premise prompts, and Oladri et al. [ [28] probe residual states to predict that a reasoning model will exhaust its budget, with an AUROC of 0.61 on one model. These detectors read the model at a fixed place, the final layer or all layers together, although linear features are often most readable in the middle of the network [Skean et al., 2025]. We therefore read our probes at every layer. None of these works evaluates token-level alarms against an annotated onset under a fixed false-alarm budget, and none studies naturally occurring loops in non-reasoning instruction-tuned models under stochastic sampling.

Monitors for other failures with an onset. Linear probes on activations classify deceptive responses [10], reporting recall at a fixed false-positive rate on control data, classify high-stakes interactions [25], and flag hallucinated entities while they are generated [27]. Probes on prompt activations can also predict response-level behaviours, such as format failures or jailbreak compliance, before generation starts [1], but each prompt then gets a single prediction, so timing within the response is not evaluated. Streaming monitors of harmful content read each prefix and can halt the output [23, 32], and Kavumba et al. [ [21] forecast the harm of likely continuations from a prefix. Kavumba et al. [ [21] count an alarm as timely if it fires by the end of the first unsafe sentence, so an alarm raised before the unsafe content begins and one raised partway through that sentence count the same. Qwen Team [ [32] count an alarm as a hit only if it falls inside that sentence and report earlier alarms separately, without credit. StreamGuard reports false positives at a default threshold, and the latency evaluation of Qwen3Guard contains only unsafe responses. Sing Team [ [34] annotate where the unsafe part starts but score guards only with response- and token-level AUROC. Itkin [ [18] measures the delay of hallucination detectors after the annotated onset at a fixed per-token false-alarm rate, and charges an alarm raised before the onset as a miss. PreAct-Bench [39] asks LLM judges, guard models and a linear probe to predict, from an agent trajectory cut before the first overtly unethical step, whether the agent will act unethically, and scores them by F1F_1 on balanced pairs without a false-alarm budget. Concurrent work fixes the false-alarm rate of language-model monitors on runs without the failure [33, 8, 9, 16] and argues that AUROC does not establish a valid alarm policy [9], but none credits alarms raised before an annotated onset. Huang et al. [ [16] warn of failures in agent runs at a budget set on successful runs, but take their labels from the final outcome only and measure lead time from the end of the run.

Evaluating early-warning systems. Seizure prediction evaluates sensitivity together with the false prediction rate, for a given prediction horizon and occurrence period [37], and clinical systems count an event as caught if an alarm fires within a window before it, reporting precision and alarms per patient-hour at a fixed event recall [17]. Security work compares attacks by their true-positive rate at a low false-positive rate, which AUROC hides [5]. Kamran et al. [ [20] report that the Epic Sepsis Model reaches an AUROC of 0.87 over all its predictions, but 0.62 on predictions made before sepsis criteria are met and 0.47 on predictions made before clinical recognition (the first culture, lactate, antibiotic or fluid order), suggesting that it partly reacts to clinicians’ suspicion. A token-level monitor scored with pooled metrics can look good in the same way, by firing once the failure is already visible. Yang et al. [ [41] argue that clinical early-warning models should be judged against an independently adjudicated onset, sorting each alarm as before, around or after it, and reporting false alarms at the chosen threshold. For dialogs and agent trajectories, Baidya et al. [ [2] compare failure alerts by their trade-off between accuracy and earliness, measured as the trigger turn over the trajectory length.

Acting on an alarm and adapting the probe. Activation steering can be applied only when a condition read from the activations holds [22] or when a calibrated estimate says it will reduce the error [13], and a model can be trained to discard an unsafe partial response and regenerate it [43]. For degeneration, Xie et al. [ [38] cut the trace and regenerate once a loop is detected. These interventions act on a failure that is already under way or on a prediction made from the prompt, and acting on a warning raised before the onset of degeneration is left to future work. To make the warning easier to read, low-rank adapters [15] can be trained in the layers below a linear probe jointly with it, which raises the AUROC of hallucination probes [27]. Fine-tuning tends to strengthen mechanisms the model already has [30], but it can also change what a probe reads, to the point of hiding a harmful state from it [3].

Data and labels

Prompts and responses. The prompts come from seven sources: mathematics (deepmath_103k [12], numinamath_1_5 and aime_2025), instruction following (if_sft_data_verified), reasoning traces from the llama_nemotron post-training data [4], competitive programming (codeforces) and medical reasoning (medical_o1 [6]). Each prompt is answered 10 times by each model, with temperature 0.7, top-p 0.9 and at most 4,096 new tokens. Splits are assigned per prompt, so all responses to a prompt fall in the same split, and the two held-out sources appear only in the held-out test split. Table 2 gives the sizes.

SplitPromptsDegenerate responses — ApertusDegenerate responses — LlamaDegenerate responses — Mistral
Train1,701567 (3.3%)1,411 (8.3%)1,668 (9.8%)
Validation364108 (3.0%)272 (7.5%)389 (10.7%)
Test, in-domain365116 (3.2%)284 (7.8%)315 (8.6%)
Test, held-out1,20024 (0.2%)133 (1.1%)129 (1.1%)

Table 2. Dataset size per split: prompts, and degenerate responses per model with their share of evaluated responses (10 responses per prompt and model, minus those the judge could not label). codeforces and medical_o1 appear only in the held-out split. Test rows use the human-verified labels, train and validation rows the judge’s.

Judge. Claude Sonnet 5 labels every capped response. It receives the prompt and the response, decides whether the response degenerates, and if it does returns a short verbatim quotation of where the repetitive pattern begins. The quotation marks the first occurrence of the pattern, not a later repeat, even when it is not yet clear at that point that the pattern will repeat. We locate the quotation in the tokenised response, and its first token is the onset o(r)o(r). Terminated responses are treated as healthy without judging. A response that loops and then emits the end-of-sequence token therefore counts as healthy, and an alarm on it is charged to the false-alarm budget, which makes the budget conservative. Responses whose quotation cannot be located, or on which the judge fails, are left out of every split. Capped responses the judge rules healthy are healthy responses like the terminated ones.

Judge system prompt. The judge receives only the original prompt and generated completion; it does not observe any of the heuristic repetition scores used elsewhere in our analysis. We use the following system prompt:

You are judging whether a language model’s completion degenerated
into repetitive, low-information text (looping on a phrase, sentence,
or pattern without making progress), as opposed to repetition that
is a normal, expected part of the task.  You will see both the
prompt and the completion – read the prompt first, since it changes
what counts as degeneration.

Two things that look repetitive but are NOT degeneration:

1.  Genuine incremental work.  Brute-force search, case enumeration,
    or a step-by-step derivation often produces a fixed template with a
    changing value each time (e.g. “N = 41: ...” then “N = 42: ...”
    then “N = 43: ...”).  This is fine as long as each occurrence is
    doing new work - checking a new candidate, advancing to the next
    step, covering a new case.  A useful test: if you deleted every
    occurrence but the first, would the completion lose information
    needed to solve the task?  If yes, it’s legitimate enumeration, not
    degeneration.  Only flag it if the “progress” is illusory - e.g. it
    starts re-checking values it already covered, drifts into a template
    that stops advancing, or cycles without ever converging on an
    answer.

2.  Instructed repetition.  If the prompt itself asks for repeated
    output (e.g. “repeat X ten times”, “write a line for each of the
    following ...”), producing that repetition is correct
    instruction-following, not degeneration - unless the completion
    overruns what was asked (keeps going well past the requested count)
    or the repetition itself becomes corrupted or loops in a way the
    prompt didn’t ask for.

Completions are all hard-capped at the same fixed max-token budget.
A completion that ends abruptly mid-sentence, mid-word, or mid-token
is expected simply because it hit that cap - this is not, by itself,
evidence of degeneration one way or the other.  Judge based on the
quality and content of the text alone, not on whether or how it was
cut off.

Human verification. Every capped response of the two test splits that the judge rules on is read by one of four reviewers, 149 for APERTUS, 425 for LLAMA and 450 for MISTRAL. The reviewer sees the prompt, the full response and the judge’s verdict, onset and rationale, and either confirms the verdict and the onset, moves the onset, or overturns the verdict. The human-verified test split takes the reviewer’s verdict and onset for every response. The reviewers confirm 139 of the 143 degenerate verdicts on APERTUS (97%), 417 of 424 on LLAMA (98%) and 444 of 450 on MISTRAL (99%), and of the seven capped responses the judge rules healthy they mark one as degenerate. Their notes describe most of the 17 overturned verdicts as enumerations or brute-force searches that still do work for the task, the kind of repetition the judge prompt asks it not to flag.

When both call a response degenerate, the reviewer keeps the judge’s onset in 74% of the APERTUS, 92% of the LLAMA and 87% of the MISTRAL responses (Figure 5). On LLAMA and MISTRAL, 97% of the judge’s onsets lie within 64 tokens of the reviewer’s, and only two responses per model are off by 256 tokens or more, the width of the warning window. APERTUS has a longer tail. Thirteen of its 139 onsets are off by 256 tokens or more, and on ten of these the judge places the onset 380 to 1,250 tokens after the reviewer does. A late onset moves the warning window into degenerate text, where an alarm counts as a warning although it comes after the loop has begun. Consistent with this, the human-verified labels lower warning coverage on APERTUS by up to 0.05 on the in-domain split and up to 0.12 on the held-out split at β=5%\beta= 5\%, while on LLAMA and MISTRAL no scorer moves by more than 0.011 (Section A.7). Each response is read by a single reviewer, so we do not measure how often two reviewers agree.

Figure 5. Signed distance between the judge’s onset and the reviewer’s onset on the capped test responses that both call degenerate, pooled over the two test splits, in log-spaced bins. Negative values mean the judge places the onset earlier than the reviewer. Every number is a percentage of the model’s responses. The bars give the responses whose onset moved and the middle column those whose onset the reviewer kept, so the numbers of one model add up to 100.

Metric definitions

Let F\mathcal{F} be the failing responses of a split, TrT_r the length of response rr, and ft=1[st≥τ∗(β)]f_t = 1[s_t \ge\tau^*(\beta)] the flag of token tt. Coverage is pooled over tokens:

Post⁡=∑r∈F∑t=o(r)Trft∑r∈F(Tr−o(r)+1),Warn⁡W=∑r∈F∑t=max⁡(1,o(r)−W)o(r)−1ft∑r∈Fmin⁡(W,o(r)−1).(2)\operatorname{Post} = \frac{\sum_{r \in\mathcal{F}} \sum_{t=o(r)}^{T_r} f_t}{\sum_{r \in\mathcal{F}} (T_r - o(r) + 1)}, \qquad\operatorname{Warn}_{W} = \frac{\sum_{r \in\mathcal{F}} \sum_{t=\max(1,o(r)-W)}^{o(r)-1} f_t}{\sum_{r \in\mathcal{F}} \min(W,o(r)-1)}. \tag*{(2)}

Pre-window coverage (Pre) is defined like WarnW_W over the positions 1≤t<o(r)−W1 \le t < o(r) - W before the warning window. With A\mathcal{A} the failing responses whose first alarm αr\alpha_r (Section 2) is finite, the detection rate is ∣A∣/∣F∣|\mathcal{A}|/|\mathcal{F}|, the early-warning rate is ∣{r∈A:αr<o(r)}∣/∣A∣|\{r \in\mathcal{A} : \alpha_r < o(r)\}|/|\mathcal{A}|, and the lead is the median of αr−o(r)\alpha_r - o(r) over A\mathcal{A}. With H′\mathcal{H}' the healthy responses of the split, the false-alarm rate is ∣{r∈H′:αr<∞}∣/∣H′∣|\{r \in\mathcal{H}' : \alpha_r < \infty\}|/|\mathcal{H}'|. The response-level metrics use the response score max⁡tst\max_t s_t. AUROC is the area under its ROC curve, and best accuracy is the highest accuracy any threshold on it reaches, including the threshold that flags nothing.

Persistence. The main text raises an alarm at the first flagged token. With a persistence of mm tokens, the first alarm is instead the first position that completes a run of mm consecutive flagged tokens,

αr=min⁡{t:st′≥τ for all t′∈(t−m,t]},(3)\alpha_r = \min\{t : s_{t'} \ge\tau\text{ for all } t' \in(t-m,t]\}, \tag*{(3)}

with αr=∞\alpha_r = \infty if no such run exists, and the threshold is calibrated on this αr\alpha_r ((1)). With m=1m = 1 it is the first flagged token. Section A.9 compares m∈{1,16,64}m \in\{1, 16, 64\}.

Training strategies

All training strategies train the probe of Section 3 with binary cross-entropy, AdamW at a learning rate of 10−410^{-4} for the probe and 10−510^{-5} for the LoRA adapters, with LoRA rank 16, α=32\alpha= 32 and dropout 0.05, no weight decay, gradient clipping at norm 1, 3,000 steps of 4,096 tokens, and three seeds. Healthy responses are subsampled to four per degenerate response, stratified by source, and a quarter of the supervised positions in each batch are positive. The loss weights positive targets by the ratio of negative to positive targets in the training set. Every probe is evaluated on the validation split every 100 steps, and the selected strategy, frontier_window centred on the onset with a window of 512 tokens and a hard target with K=256K = 256, draws the supervised positions of a healthy response from a window at a random position. The strategies differ along two axes. Token selection decides which positions are supervised. all_tokens uses every position, rollout_balanced samples the same number of positions from each response, random_window samples one contiguous window, and frontier_window places the window of a degenerate response around the onset, either centred on it or ending at it (trailing), and samples it at random in a healthy response. The target is either hard, positive from KK tokens before the onset, or soft, rising towards the onset with an exponential or linear decay over λ\lambda tokens. Table 3 compares the 26 frozen training strategies and the adapted version. of the selected one. At layer 31, the last layer, a frozen probe reads the activation after the model’s final normalization, since this is the last activation the model returns. Every other layer is read at its output. All experiments run on the Alps supercomputer of the Swiss National Supercomputing Centre (CSCS), on NVIDIA GH200 GPUs.

Response-level against onset-aligned metrics

Scorers. The scorers of Figure 2 are, at layer 15 of APERTUS, the frozen random_window probe with a window of 64 tokens and K=0K=0, which has the highest validation AUROC of the 26 frozen training strategies, the frozen frontier_window probe with a trailing window of 1,024 tokens and K=128K=128, which has the lowest among the strategies whose three seeds all pass the post-onset floor at this layer, and the adapted probe. Panel (d) reads the frozen probe with the training strategy of § 3, which the adapted probe also uses.

Same AUROC, different timing. The four scorers of Figure 2 reach almost the same AUROC (0.9980 to 0.9998) but differ several-fold in warning coverage. A response-level metric scores each response only by its highest token score, max⁡tst\max_t s_t, so it cannot see when a scorer fires. Table 4 shows how far apart two scorers with the same AUROC can be. From each probe we build two scorers that keep the highest score of every response, and so also its AUROC and calibrated threshold at persistence m=1m=1, but move its other flags to opposite extremes. Shuffled permutes the scores within each response, which spreads the flags over the whole response, including its first tokens. Argmax only sets every score except the highest to the minimum, which leaves at most one flag per response, usually deep inside the loop. Table 4 is computed at β=1%\beta= 1\%.

With the same AUROC, warning coverage ranges from 0.000 for argmax only to 0.52–0.67 for shuffled, and the early-warning rate from 0.01–0.02 to 0.95–0.96. Neither is a monitor one could deploy, since shuffling moves scores from after the onset to the start of the response, but both have the AUROC of a real probe. A response-level metric therefore cannot tell a scorer that never warns from one that warns before almost every loop. With persistence m=4m = 4 and the threshold recalibrated, shuffled keeps its AUROC and its early alarms, while argmax only never fires (AUROC 0.5).

Selection by response-level metrics. Because the response-level metrics do not see where the flags fall, selecting a probe by them can pick one that warns poorly. Ranked by validation AUROC, the adapted probe is 14th of the 27 probes at layer 15, 0.0003 below the top. Selecting by validation AUROC picks the random_window probe, whose test warning coverage is 3.4× lower than the adapted probe’s. Among the frozen probes alone, the probe selected by AUROC covers 1.2× less of the warning window than the one selected by warning coverage. Table 5 compares the ranking of the 27 probes, each at its selected layer, on validation and on test (Section 4.2 discusses it).

Table 4: Scorers with the same AUROC range from one that almost never warns to one that warns before almost every loop. From each probe of Figure 2, two transforms keep the highest score of every response, and with it the AUROC and the calibrated threshold at m=1m = 1, but move its other flags. Shuffled: the token scores of each response permuted at random, which spreads the flags over the whole response. Argmax only: every score except the highest set to the minimum, which leaves at most one flag per response. As scored: the original scores. mm: number of consecutive flagged tokens needed for an alarm (Equation (3)); at m=4m = 4 the threshold is recalibrated. AUROC is given once per scorer for m=1m = 1. –: no alarm. Lead in tokens, negative for warnings. APERTUS, layer 15, human-verified in-domain test split, β=1%\beta= 1\%, mean over three seeds

Table 5: Rank transfer from validation to the human-verified in-domain test split, Kendall’s τ\tau over the 27 APERTUS training strategies of Table 3, each read at the layers selected there, at β=5%\beta= 5\%. Left: whether a metric reproduces its own ordering. Right: whether its validation ordering predicts the test ordering by warning coverage.

Baselines

Definitions. Every baseline assigns a score st∈[0,1]s_t \in[0,1] to each position tt of a response r=(r1,…,rT)r = (r_1,\ldots,r_T) using only r1,…,rtr_1,\ldots,r_t and the generator’s output up to tt. Only the order of the scores matters, since every threshold is calibrated on validation. Several baselines average over the trailing window

St={max⁡(1,t−S+1),…,t},S_t = \{\max(1,t-S+1),\ldots,t\},

which holds fewer than SS positions at the start of a response, so that a short prefix is averaged over the tokens it has.

Token-cap rule. The score is 1 on the last token of a capped response and 0 elsewhere,

st=1[t=T=Tmax⁡].s_t = 1[t = T = T_{\max}].

Windowed seq-rep-n. Let GtG_t be the list of nn-grams that lie entirely inside the window StS_t. The score is the share of these nn-grams that repeat an earlier one in the same window [36],

st=1−∣set⁡(Gt)∣∣Gt∣,t≥n,s_t = 1 - \frac{|\operatorname{set}(G_t)|}{|G_t|}, \qquad t \ge n,

and st=0s_t = 0 for t<nt < n, where no complete nn-gram exists yet.

rep/ℓ\ell. Here ℓ\ell is a number of tokens, not a layer. A token is counted as repeated if it already occurred among the ℓ\ell tokens before it,

zt=1[rt∈{rj:max⁡(1,t−ℓ)≤j<t}],st=1∣St∣∑j∈Stzj.z_t = 1\left[r_t \in\{r_j : \max(1,t-\ell) \le j < t\}\right], \qquad s_t = \frac{1}{|S_t|}\sum_{j \in S_t} z_j.

Repeated-nn-gram rule. Let gt=(rt−n+1,…,rt)g_t = (r_{t-n+1}, \ldots, r_t) be the nn-gram ending at tt and ct=∣{j:n≤j≤t,gj=gt}∣c_t = |\{j : n \le j \le t, g_j = g_t\}| the number of times it has occurred so far, including at tt. The score is

st=1−1ct,t≥n,s_t = 1 - \frac{1}{c_t}, \qquad t \ge n,

and st=0s_t = 0 for t<nt < n. A threshold τ\tau on sts_t is a threshold 1/(1−τ)1/(1-\tau) on the count, so calibrating τ\tau chooses how many repeats of an nn-gram trigger an alarm. Pipis et al. [ [29] use a count of this kind to label a response as looping, when some 30-gram occurs at least 20 times.

Windowed entropy. Let ptp_t be the generator’s next-token distribution at position tt, computed from the raw logits at temperature 1, before top-pp truncation, and Ht=−∑vpt(v)log⁡pt(v)H_t = -\sum_v p_t(v)\log p_t(v) its entropy. The score inverts the average entropy over the window,

st=11+1∣St∣∑j∈StHj,s_t = \frac{1}{1 + \frac{1}{|S_t|}\sum_{j \in S_t} H_j},

so a stretch of confident predictions scores close to 1.

Windowed negative log-probability. The same construction on the surprise of the emitted token, ut=−log⁡pt(rt)u_t = -\log p_t(r_t),

st=11+1∣St∣∑j∈Stuj.s_t = \frac{1}{1 + \frac{1}{|S_t|}\sum_{j \in S_t} u_j}.

Random alarms. Each token is flagged independently with probability qq, chosen so that the expected share of healthy validation responses that raise an alarm equals the budget,

1∣H∣∑r∈H(1−(1−q)Tr)=β.\frac{1}{|\mathcal{H}|}\sum_{r \in\mathcal{H}}\left(1-(1-q)^{T_r}\right)=\beta.

Their metrics follow in closed form from the lengths and onsets of the responses.

Selection. The window SS, the look-back ℓ\ell and the nn-gram size nn are chosen per model on the validation split with the rule that selects the probes’ layer and checkpoint. Among the settings whose post-onset coverage at β=1%\beta= 1\% is at least 0.3, we take the one with the highest Warn256_{256} at β=1%\beta= 1\%. Tables 6 to 9 list every setting we evaluated. For windowed entropy and windowed negative log-probability on LLAMA, no setting reaches the floor, and we take the one with the highest Warn256_{256}. Windowed seq-rep-nn and rep/ℓ\ell select windows of 1,024 to 4,096 tokens, the confidence-based baselines windows of 256 and 512 tokens.

BaselineSSAPERTUSLLAMAMISTRAL
PostWarn256_{256}PostWarn256_{256}PostWarn256_{256}
entropy80.0000.0000.0000.0000.0000.000
160.0020.0000.0000.0010.0000.000
320.0080.0000.0010.0020.0000.000
640.0180.0030.0010.0020.0000.000
1280.2280.0050.0030.0030.0480.003
2560.6710.0100.0180.0100.3490.008
5120.6670.0170.0240.0070.6160.014
10240.6120.0010.0350.0030.5490.007
20480.3680.0000.0240.0000.3690.003
−log⁡p-\log p80.0000.0000.0000.0000.0000.000
160.0000.0000.0000.0010.0000.000
320.0070.0000.0010.0020.0000.000
640.0200.0030.0010.0020.0000.000
1280.2290.0050.0030.0050.0670.005
2560.6650.0100.0110.0090.4080.010
5120.6650.0050.0270.0060.6160.007
10240.5880.0000.0330.0000.5300.007
20480.3360.0000.0100.0000.3180.003

Table 6. Window SS of windowed entropy and windowed negative log-probability. On LLAMA no window reaches the floor, and the window with the highest Warn256_{256} is selected. Validation split, β=1%\beta= 1\%. Bold: the setting selected for that model (Section A.6). Grey: below the post-onset floor of 0.3. A coverage near 0 marks a setting on which healthy responses already reach the top of the score range, so the calibrated threshold sits at that top and almost no token is flagged.

nnAPERTUSLLAMAMISTRAL
PostWarn256_{256}PostWarn256_{256}PostWarn256_{256}
40.4260.0060.1780.0060.4460.009
60.4860.0080.2260.0070.5120.008
80.5420.0070.2680.0080.5270.006
120.6320.0110.2810.0060.6050.006
160.6430.0080.3340.0060.6340.007
240.7330.0220.3630.0050.6650.007
300.7200.0150.4160.0070.6670.007
480.7380.0100.4770.0080.7160.009
640.7750.0140.4990.0070.7210.010
960.7520.0070.5230.0110.7220.008
1280.7340.0030.5020.0060.7350.008

Table 7. NN-gram size nn of the repeated-nn-gram rule. Validation split, β=1%\beta= 1\%. Bold: the setting selected for that model (Section A.6). Grey: below the post-onset floor of 0.3. A coverage near 0 marks a setting on which healthy responses already reach the top of the score range, so the calibrated threshold sits at that top and almost no token is flagged.

Judge-labelled and human-verified test splits

The main text reports the human-verified in-domain test split. Table 10 gives the same scorers on the judge-labelled in-domain test split, before review. Table 11 and Table 12 report them on the two held-out sources, excluded from training and validation, with judge labels and with human-verified labels. All thresholds are calibrated on the in-domain validation split. Table 13 splits warning coverage and the early-warning rate by source, for both test splits.

ScorerAUROC ↑Detection ↑Post ↑Warn256 ↑Early ↑Lead ↓FA (%)Pre
APERTUS (n=117n = 117)
random alarms0.89020.321×10−41 \times10^{-4}1×10−41 \times10^{-4}0.248†+971†5.01×10−41 \times10^{-4}
token-cap rule0.99911.003×10−43 \times10^{-4}0.0000.000+32610.20.000
repeated-nn-gram rule0.99160.980.7740.0080.148+1473.20.002
windowed seq-rep-nn0.98150.930.8800.2310.312+1415.20.120
rep/ℓ\ell0.99851.000.9160.2650.308+2014.70.140
windowed entropy0.99711.000.7950.0320.120+5266.10.033
windowed negative log-probability0.99641.000.8130.0400.145+3835.20.033
frozen probe, L150.9993±0.00000.9993\pm0.00001.00±0.001.00\pm0.000.858±0.0070.858\pm0.0070.237±0.0060.237\pm0.0060.661±0.0050.661\pm0.005−190±8-190\pm85.6±0.35.6\pm0.30.060±0.0030.060\pm0.003
adapted probe, L150.9991±0.00010.9991\pm0.00011.00±0.001.00\pm0.000.966±0.0020.966\pm0.0020.570±0.0170.570\pm0.0170.732±0.0130.732\pm0.013−258±14-258\pm144.8±0.64.8\pm0.60.333±0.0110.333\pm0.011
adapted probe, L300.9982±0.00130.9982\pm0.00131.00±0.001.00\pm0.000.973±0.0130.973\pm0.0130.607±0.0230.607\pm0.0230.724±0.0260.724\pm0.026−269±23-269\pm234.6±0.14.6\pm0.10.389±0.0220.389\pm0.022
LLAMA (n=291n = 291)
random alarms0.88180.299×10−59 \times10^{-5}9×10−59 \times10^{-5}0.341†+627†4.89×10−59 \times10^{-5}
token-cap rule0.99991.004×10−44 \times10^{-4}0.0000.000+29640.00.000
repeated-nn-gram rule0.89220.790.5940.0560.303†+156†3.20.014
windowed seq-rep-nn0.98870.980.8610.3080.364+2055.30.186
rep/ℓ\ell0.99781.000.8590.3120.359+2524.10.195
windowed entropy0.96740.840.3710.0250.122†+951†5.20.034
windowed negative log-probability0.97040.950.4660.0180.102+9244.60.028
frozen probe, L150.9988±0.00020.9988\pm0.00021.00±0.001.00\pm0.000.628±0.0130.628\pm0.0130.087±0.0080.087\pm0.0080.603±0.0110.603\pm0.011−144±21-144\pm215.2±0.15.2\pm0.10.029±0.0040.029\pm0.004
adapted probe, L150.9983±0.00050.9983\pm0.00051.00±0.001.00\pm0.000.943±0.0080.943\pm0.0080.487±0.0090.487\pm0.0090.653±0.0190.653\pm0.019−238±6-238\pm65.3±0.25.3\pm0.20.239±0.0060.239\pm0.006
adapted probe, L60.9955±0.00130.9955\pm0.00131.00±0.001.00\pm0.000.922±0.0180.922\pm0.0180.458±0.0170.458\pm0.0170.580±0.0210.580\pm0.021−179±41-179\pm415.1±0.25.1\pm0.20.229±0.0020.229\pm0.002
MISTRAL (n=318n = 318)
random alarms0.90290.351×10−41 \times10^{-4}1×10−41 \times10^{-4}0.167†+1256†4.81×10−41 \times10^{-4}
token-cap rule1.00001.003×10−43 \times10^{-4}0.0000.000+36910.00.000
repeated-nn-gram rule0.94930.900.7490.0080.070†+158†1.80.007
windowed seq-rep-nn0.99811.000.9330.1900.204+1965.50.193
rep/ℓ\ell0.99791.000.9160.1660.201+2984.40.193
windowed entropy0.99270.970.8140.0370.077+4964.50.057
windowed negative log-probability0.99210.980.8100.0210.054+3513.20.038
frozen probe, L50.9919±0.00030.9919\pm0.00030.99±0.000.99\pm0.000.570±0.0180.570\pm0.0180.033±0.0020.033\pm0.0020.261±0.0090.261\pm0.009+112±7+112\pm75.1±0.15.1\pm0.10.047±0.0020.047\pm0.002
adapted probe, L50.9944±0.00170.9944\pm0.00170.99±0.010.99\pm0.010.859±0.0540.859\pm0.0540.152±0.0170.152\pm0.0170.306±0.0110.306\pm0.011+79±3+79\pm35.1±0.55.1\pm0.50.140±0.0130.140\pm0.013
adapted probe, L110.9951±0.00060.9951\pm0.00060.99±0.000.99\pm0.000.808±0.0440.808\pm0.0440.223±0.0810.223\pm0.0810.392±0.0550.392\pm0.055+46±14+46\pm144.4±0.64.4\pm0.60.213±0.0720.213\pm0.072

Table 10. As Table 1, with judge labels.

ScorerAUROC ↑Detection ↑Post ↑Warn256 ↑Early ↑Lead ↓FA (%)Pre
APERTUS (n=26n = 26)
random alarms0.91500.321×10−41 \times10^{-4}1×10−41 \times10^{-4}0.244†+986†3.71×10−41 \times10^{-4}
token-cap rule1.00001.003×10−43 \times10^{-4}0.0000.000+34400.00.000
repeated-nn-gram rule0.91370.850.6460.0170.227†+149†0.80.002
windowed seq-rep-nn0.99920.920.8430.0690.083+2680.60.005
rep/ℓ\ell1.00001.000.8930.2600.346+3731.50.097
windowed entropy0.99981.000.7770.0160.038+5301.20.006
windowed negative log-probability0.99951.000.8030.0420.038+3831.40.025
frozen probe, L151.0000±0.00001.0000\pm0.00001.00±0.001.00\pm0.000.790±0.0140.790\pm0.0140.287±0.0030.287\pm0.0030.577±0.0000.577\pm0.000−68±19-68\pm190.3±0.00.3\pm0.00.091±0.0020.091\pm0.002
adapted probe, L151.0000±0.00001.0000\pm0.00001.00±0.001.00\pm0.000.999±0.0000.999\pm0.0000.802±0.0300.802\pm0.0300.987±0.0220.987\pm0.022−633±22-633\pm220.8±0.40.8\pm0.40.859±0.0330.859\pm0.033
adapted probe, L301.0000±0.00001.0000\pm0.00001.00±0.001.00\pm0.001.000±0.0001.000\pm0.0000.916±0.0480.916\pm0.0480.987±0.0220.987\pm0.022−632±24-632\pm240.2±0.10.2\pm0.10.938±0.0340.938\pm0.034
LLAMA (n=133n = 133)
random alarms0.89980.299×10−59 \times10^{-5}9×10−59 \times10^{-5}0.142†+1371†4.09×10−59 \times10^{-5}
token-cap rule1.00001.003×10−43 \times10^{-4}0.0000.000+37620.00.000
repeated-nn-gram rule0.96150.920.7700.0370.114+2111.60.015
windowed seq-rep-nn0.99800.970.8870.1060.109+2200.50.213
rep/ℓ\ell0.99990.990.8170.0720.068+5620.30.163
windowed entropy0.98490.800.4000.0200.037†+1018†2.20.010
windowed negative log-probability0.98380.900.5240.0160.025+8742.30.008
frozen probe, L151.0000±0.00001.0000\pm0.00001.00±0.001.00\pm0.000.715±0.0150.715\pm0.0150.032±0.0040.032\pm0.0040.198±0.0090.198\pm0.009+84±8+84\pm80.3±0.00.3\pm0.00.023±0.0030.023\pm0.003
adapted probe, L150.9999±0.00000.9999\pm0.00001.00±0.001.00\pm0.000.964±0.0040.964\pm0.0040.604±0.0420.604\pm0.0420.559±0.0040.559\pm0.004−155±12-155\pm120.3±0.10.3\pm0.10.755±0.0750.755\pm0.075
adapted probe, L60.9999±0.00000.9999\pm0.00001.00±0.001.00\pm0.000.915±0.0500.915\pm0.0500.597±0.0120.597\pm0.0120.530±0.0040.530\pm0.004−86±55-86\pm550.1±0.00.1\pm0.00.748±0.0070.748\pm0.007
MISTRAL (n=132n = 132)
random alarms0.91200.351×10−41 \times10^{-4}1×10−41 \times10^{-4}0.194†+1162†4.31×10−41 \times10^{-4}
token-cap rule1.00001.003×10−43 \times10^{-4}0.0000.000+35940.00.000
repeated-nn-gram rule0.94850.890.7030.0330.128†+169†0.60.027
windowed seq-rep-nn0.99981.000.8810.1160.144+3340.80.166
rep/ℓ\ell0.99991.000.8620.1090.114+4920.70.168
windowed entropy0.99621.000.8190.0720.129+5026.00.137
windowed negative log-probability0.99381.000.7900.0430.152+3384.00.127
frozen probe, L50.9990±0.00020.9990\pm0.00020.96±0.010.96\pm0.010.352±0.0330.352\pm0.0330.026±0.0030.026\pm0.0030.113±0.0180.113\pm0.018+270±24+270\pm240.3±0.10.3\pm0.10.032±0.0090.032\pm0.009
adapted probe, L50.9997±0.00010.9997\pm0.00010.98±0.000.98\pm0.000.800±0.1030.800\pm0.1030.125±0.0270.125\pm0.0270.305±0.0160.305\pm0.016+90±11+90\pm110.3±0.10.3\pm0.10.121±0.0570.121\pm0.057
adapted probe, L110.9998±0.00030.9998\pm0.00031.00±0.001.00\pm0.000.885±0.1430.885\pm0.1430.632±0.4870.632\pm0.4870.720±0.3990.720\pm0.399−296±335-296\pm3350.5±0.20.5\pm0.20.652±0.4900.652\pm0.490

Table 11. As Table 1, on the held-out sources (codeforces and medical_o1), with judge labels.

SourceAPERTUS nnAPERTUS frozen, L15APERTUS adapted, L30LLAMA nnLLAMA frozen, L15LLAMA adapted, L6MISTRAL nnMISTRAL frozen, L5MISTRAL adapted, L11
Warn256_{256}
deepmath_103k230.070.381030.080.421230.040.18
numinamath_1_5330.230.631090.110.471000.030.17
aime_20251––160.090.62220.030.43
if_sft_data_verified370.180.46330.040.28400.030.13
llama_nemotron220.250.89230.040.71300.000.48
codeforces230.170.95730.040.841280.020.64
medical_o11––600.020.001––
Early
deepmath_103k230.620.641030.670.551230.300.37
numinamath_1_5330.810.821090.650.601000.260.35
aime_20251––160.770.77220.530.70
if_sft_data_verified370.510.53330.260.34400.190.30
llama_nemotron220.700.98230.330.79300.010.56
codeforces230.431.00730.260.951280.110.72
medical_o11––600.130.021––

Table 13. Warning coverage and early-warning rate per source, for the frozen probe and the adapted probe at its own selected layer, at β=5%\beta= 5\% with the thresholds calibrated on the whole validation split. The first five sources form the in-domain test split, the last two the held-out split. nn: number of degenerate responses of the source. Rates are left out (–) for sources with fewer than 10 degenerate responses. Human-verified labels, mean over three seeds.

Performance at β=1%\beta= 1\% and β=10%\beta= 10\%

Tables 14 and 15 report the same comparison as Table 1 at β=1%\beta= 1\% and β=10%\beta= 10\%, on the human-verified in-domain test split.

ScorerResponse classificationFailure detectionEarly warning
AUROC ↑\uparrowDetection ↑\uparrowPost ↑\uparrowWarn256_{256} ↑\uparrowEarly ↑\uparrowLead ↓\downarrowFA (%)Pre
APERTUS (n=116n = 116)
random alarms0.89010.072×10−52 \times10^{-5}2×10−52 \times10^{-5}0.222†0.222^{\dagger}+1133†+1133^{\dagger}1.02×10−52 \times10^{-5}
token-cap rule0.99901.003×10−43 \times10^{-4}0.0000.000+32760.20.000
repeated-nn-gram rule0.99720.980.7160.0020.088+3271.50.001
windowed seq-rep-nn0.98150.900.8020.0780.115†0.115^{\dagger}+404†+404^{\dagger}1.20.051
rep/ℓ\ell0.99830.980.7990.0900.105+5921.00.074
windowed entropy0.99710.970.6390.0000.018+9270.90.023
windowed negative log-probability0.99640.970.6370.0040.035+7921.20.024
frozen probe, L150.9994 ±\pm 0.00000.98 ±\pm 0.000.709 ±\pm 0.0080.056 ±\pm 0.0040.428 ±\pm 0.025+38 ±\pm 81.4 ±\pm 0.10.009 ±\pm 0.001
adapted probe, L150.9991 ±\pm 0.00010.99 ±\pm 0.000.846 ±\pm 0.0570.220 ±\pm 0.0030.426 ±\pm 0.026+41 ±\pm 191.1 ±\pm 0.10.111 ±\pm 0.010
adapted probe, L300.9982 ±\pm 0.00120.95 ±\pm 0.050.806 ±\pm 0.1280.277 ±\pm 0.0160.428 ±\pm 0.022+44 ±\pm 260.9 ±\pm 0.20.153 ±\pm 0.019
LLAMA (n=284n = 284)
random alarms0.88100.072×10−52 \times10^{-5}2×10−52 \times10^{-5}0.315†0.315^{\dagger}+754†+754^{\dagger}1.02×10−52 \times10^{-5}
token-cap rule0.99881.004×10−44 \times10^{-4}0.0000.000+29580.20.000
repeated-nn-gram rule0.89870.760.5270.0100.084†0.084^{\dagger}+414†+414^{\dagger}0.70.003
windowed seq-rep-nn0.99530.900.6440.0960.113+7091.10.067
rep/ℓ\ell0.99810.960.6020.0810.095+11761.20.033
windowed entropy0.96550.190.0310.0040.145†0.145^{\dagger}+1316†+1316^{\dagger}1.70.011
windowed negative log-probability0.96850.130.0190.0040.211†0.211^{\dagger}+1235†+1235^{\dagger}1.80.011
frozen probe, L150.9986 ±\pm 0.00010.97 ±\pm 0.010.281 ±\pm 0.0060.006 ±\pm 0.0000.184 ±\pm 0.014+250 ±\pm 121.2 ±\pm 0.20.002 ±\pm 0.000
adapted probe, L150.9980 ±\pm 0.00080.97 ±\pm 0.020.539 ±\pm 0.1040.049 ±\pm 0.0140.243 ±\pm 0.005+306 ±\pm 141.1 ±\pm 0.10.030 ±\pm 0.006
adapted probe, L60.9948 ±\pm 0.00130.85 ±\pm 0.080.462 ±\pm 0.1020.072 ±\pm 0.0290.224±0.026†0.224 \pm0.026^{\dagger}+414±30†+414 \pm30^{\dagger}1.1 ±\pm 0.20.044 ±\pm 0.015
MISTRAL (n=315n = 315)
random alarms0.90260.082×10−52 \times10^{-5}2×10−52 \times10^{-5}0.148†0.148^{\dagger}+1420†+1420^{\dagger}1.02×10−52 \times10^{-5}
token-cap rule0.99951.003×10−43 \times10^{-4}0.0000.000+36880.10.000
repeated-nn-gram rule0.95390.880.6860.0030.029†0.029^{\dagger}+305†+305^{\dagger}0.60.002
windowed seq-rep-nn0.99810.980.7920.0440.055+6001.10.043
rep/ℓ\ell0.99741.000.7510.0450.044+9211.10.059
windowed entropy0.99280.950.6930.0050.017+6651.10.017
windowed negative log-probability0.99220.830.4640.0030.023†0.023^{\dagger}+811†+811^{\dagger}1.20.005
frozen probe, L50.9916 ±\pm 0.00040.89 ±\pm 0.010.307 ±\pm 0.0140.005 ±\pm 0.0010.079±0.005†0.079 \pm0.005^{\dagger}+300±10†+300 \pm10^{\dagger}1.5 ±\pm 0.10.007 ±\pm 0.001
adapted probe, L50.9942 ±\pm 0.00180.88 ±\pm 0.060.534 ±\pm 0.1260.030 ±\pm 0.0060.126 ±\pm 0.002+250±31†+250 \pm31^{\dagger}1.1 ±\pm 0.20.040 ±\pm 0.007
adapted probe, L110.9952 ±\pm 0.00060.88 ±\pm 0.040.326 ±\pm 0.0650.075 ±\pm 0.0470.197 ±\pm 0.069+140±38†+140 \pm38^{\dagger}1.1 ±\pm 0.30.069 ±\pm 0.042

Table 14. As Table 1, at β=1%\beta= 1\%.

ScorerAUROC ↑Detection ↑Post ↑Warn256_{256} ↑Early ↑Lead ↓FA (%)Pre
APERTUS (n=116n = 116)
random alarms0.89010.562×10−42 \times10^{-4}2×10−42 \times10^{-4}0.279†0.279^{\dagger}+795†+795^{\dagger}9.92×10−42 \times10^{-4}
token-cap rule0.99901.003×10−43 \times10^{-4}0.0000.000+32760.20.000
repeated-nn-gram rule0.99720.990.8500.0390.296+688.60.007
windowed seq-rep-nn0.98150.940.8990.2910.413+4010.30.182
rep/ℓ\ell0.99831.000.9460.3200.405+769.30.221
windowed entropy0.99711.000.8030.0380.155+51610.90.066
windowed negative log-probability0.99641.000.8370.0300.172+31111.40.062
frozen probe, L150.9994±0.00001.00±0.000.905±0.0050.281±0.0100.750±0.009−253±610.7±0.60.111±0.007
adapted probe, L150.9991±0.00011.00±0.000.985±0.0030.658±0.0190.799±0.013−340±129.3±0.40.464±0.020
adapted probe, L300.9982±0.00121.00±0.000.991±0.0020.700±0.0060.782±0.020−369±269.8±0.80.499±0.010
LLAMA (n=284n = 284)
random alarms0.88100.522×10−42 \times10^{-4}2×10−42 \times10^{-4}0.374†0.374^{\dagger}+472†+472^{\dagger}9.72×10−42 \times10^{-4}
token-cap rule0.99881.002×10−42 \times10^{-4}0.0000.000+29580.20.000
repeated-nn-gram rule0.89870.810.6080.0560.297†0.297^{\dagger}+156†+156^{\dagger}3.30.015
windowed seq-rep-nn0.99531.000.9360.4640.519−349.60.295
rep/ℓ\ell0.99811.000.9340.4820.528−638.40.327
windowed entropy0.96550.990.6630.0630.185+6327.80.057
windowed negative log-probability0.96850.980.6440.0420.137+6337.10.042
frozen probe, L150.9986±0.00011.00±0.000.810±0.0070.222±0.0100.721±0.007−368±239.6±0.10.092±0.005
adapted probe, L150.9980±0.00081.00±0.000.986±0.0010.688±0.0010.790±0.005−503±1910.0±0.20.409±0.008
adapted probe, L60.9948±0.00131.00±0.000.973±0.0060.622±0.0080.727±0.011−411±69.8±0.40.379±0.006
MISTRAL (n=315n = 315)
random alarms0.90260.602×10−42 \times10^{-4}2×10−42 \times10^{-4}0.195†0.195^{\dagger}+1041†+1041^{\dagger}9.62×10−42 \times10^{-4}
token-cap rule0.99951.003×10−43 \times10^{-4}0.0000.000+36880.10.000
repeated-nn-gram rule0.95390.920.8010.0360.197+906.60.030
windowed seq-rep-nn0.99811.000.9610.2800.321+10210.10.264
rep/ℓ\ell0.99741.000.9480.2630.295+1688.70.257
windowed entropy0.99280.990.8530.0650.109+4258.20.082
windowed negative log-probability0.99221.000.8820.0450.102+2758.30.064
frozen probe, L50.9916±0.00040.99±0.000.701±0.0150.067±0.0030.381±0.006+57±39.3±0.30.088±0.002
adapted probe, L50.9942±0.00181.00±0.000.937±0.0160.252±0.0170.449±0.008+20±58.7±0.20.220±0.006
adapted probe, L110.9952±0.00061.00±0.000.908±0.0330.309±0.0930.507±0.054−40±528.7±0.90.307±0.085

Table 15. As Table 1, at β=10%\beta= 10\%.

Persistence

Requiring mm consecutive flagged tokens before an alarm (Equation (3) in Section A.3) suppresses isolated flags on healthy responses, so at the same false-alarm budget the calibrated threshold drops as mm grows. Table 16 reports the probes at m∈{1,16,64}m \in\{1, 16, 64\}. Coverage counts every token at or above the threshold of that mm, while the first alarm is the token that completes the run, m−1m - 1 tokens after its first flag. A larger mm raises warning coverage because its lower threshold flags more tokens. Many of these flags come before a run of mm is complete, where the alarm cannot fire yet, so the first alarm does not come earlier (Lead in Table 16). The main text uses m=1m = 1.

ModelProbePost 1Post 16Post 64Warn256_{256} 1Warn256_{256} 16Warn256_{256} 64Early 1Early 16Early 64Lead 1Lead 16Lead 64
APERTUSfrozen, L150.8650.9540.9840.1860.5110.7240.6580.6490.621−172−89−105
adapted, L150.9660.9810.9910.5230.6230.7110.6950.6870.672−214−185−177
adapted, L300.9730.9870.9920.5770.6560.7120.7160.7130.681−232−216−204
LLAMAfrozen, L150.6350.9360.9820.0870.4660.6930.5940.5680.561−137−99−108
adapted, L150.9450.9740.9850.4880.6080.6760.6550.6530.641−236−231−224
adapted, L60.9200.9540.9670.4620.5510.5970.5780.5680.572−182−171−152
MISTRALfrozen, L50.5720.8870.9610.0310.2140.4080.2620.2500.259+108+110+114
adapted, L50.8620.9400.9670.1470.2550.3590.3090.3110.296+76+78+103
adapted, L110.8130.9270.9650.2200.3420.4460.3930.3830.371+44+48+80

Table 16. Requiring consecutive flags raises coverage but does not move the first alarm earlier. Probes at persistence m∈{1,16,64}m \in\{1, 16, 64\}, the number of consecutive flagged tokens needed for an alarm (Equation (3)), with the threshold recalibrated at each mm for β=5%\beta= 5\%. Coverage counts every token at or above the threshold, while the first alarm is the token that completes the run. Lead in tokens, negative for warnings. Human-verified in-domain test split, mean over three seeds.

Representations before and after adaptation

Figure 6 follows one degenerate response per model through the three probes of Section 4.4. For each probe we take the residual stream of the response at the layer the probe reads, with that probe’s adapters for the two adapted ones, and project every token onto the first two principal components of the response. In the frozen model, the tokens before the warning window, in it and after the onset overlap in this plane. After adaptation they fall in largely separate regions, most clearly at the adapted probe’s own layer, with the warning window between the other two. The two components also explain more of the variance after adaptation, 26–49% against 11–20%, so the split between the three regions becomes one of the main directions of variation. This is the intuition behind the gain in warning coverage of Section 4.4.

References

  1. [1]Dhananjay Ashok and Jonathan May. Language models can predict their own behavior. In Advances in Neural Information Processing Systems, 2025. arXiv:2502.13329.arxiv.org/abs/2502.13329
  2. [2]Avinash Baidya, Xinran Liang, Ruocheng Guo, Xiang Gao, and Kamalika Das. When evidence is sparse: Weekly supervised early failure alerting in dialogs and LLM-agent trajectories. arXiv preprint arXiv:2606.05414, 2026.arxiv.org/abs/2606.05414
  3. [3]Luke Bailey et al. Obfuscated activations bypass LLM latent-space defenses. In International Conference on Learning Representations, 2026. arXiv:2412.09565.arxiv.org/abs/2412.09565
  4. [4]Akhiad Bercovich et al. Llama-Nemotron: Efficient reasoning models. arXiv preprint arXiv:2505.00949, 2025.arxiv.org/abs/2505.00949
  5. [5]Nicholas Carlini, Steve Chien, Milad Nasr, Shuang Song, Andreas Terzis, and Florian Tramèr. Membership inference attacks from first principles. In IEEE Symposium on Security and Privacy, 2022.arxiv.org/abs/2112.03570
  6. [6]Junying Chen et al. HuatuoGPT-o1, towards medical complex reasoning with LLMs. arXiv preprint arXiv:2412.18925, 2024.arxiv.org/abs/2412.18925
  7. [7]Zenghao Duan, Liang Pang, Zihao Wei, Wenbin Duan, Yuxin Tian, Shicheng Xu, Jingcheng Deng, Zhiyi Yin, and Xueqi Cheng. Circular reasoning: Understanding self-reinforcing loops in large reasoning models. arXiv preprint arXiv:2601.05693, 2026.arxiv.org/abs/2601.05693
  8. [8]Sunny Dubey. Real-time detection and repair of LLM agent failures. arXiv preprint arXiv:2608.02464, 2026.arxiv.org/abs/2608.02464
  9. [9]Xueping Gao. From probe scores to alarm policies: Operational validity of activation monitors for language-model agents. In International Conference on Distributed Artificial Intelligence (DAI), 2026. arXiv:2610.04575.arxiv.org/abs/2610.04575
  10. [10]Nicholas Goldowsky-Dill, Bilal Chughtai, Stefan Heimsheim, and Marius Hobbhahn. Detecting strategic deception with linear probes. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, 2025. arXiv:2502.03407.
  11. [11]Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, et al. The Llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.arxiv.org/abs/2407.21783
  12. [12]Zhiwei He et al. DeepMath-103K: A large-scale, challenging, decontaminated, and verifiable mathematical dataset for advancing reasoning. arXiv preprint arXiv:2504.11456, 2025.arxiv.org/abs/2504.11456
  13. [13]Anna Hedström, Salim I. Amoukou, Tom Bewley, Saumitra Mishra, and Manuela Veloso. To steer or not to steer? Mechanistic error reduction with abstention for language models. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 22924–22945, 2025. arXiv:2510.13290.arxiv.org/abs/2510.13290
  14. [14]Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. In International Conference on Learning Representations, 2020.
  15. [15]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022.arxiv.org/abs/2106.09685
  16. [16]Xinmiao Huang, Jinwei Hu, Qisong He, Rajarshi Roy, Changshun Wu, Yi Dong, and Xiaowei Huang. PrefixGuard: Online failure warning and trace-grounded diagnosis for LLM agents. arXiv preprint arXiv:2605.06455, 2026.arxiv.org/abs/2605.06455
  17. [17]Stephanie L. Hyland et al. Early prediction of circulatory failure in the intensive care unit using machine learning. Nature Medicine, 26:364–373, 2020.
  18. [18]Igor Itkin. Quickest detection of hallucination onset: Delay bounds and learned CUSUM statistics. arXiv preprint arXiv:2606.12476, 2026.arxiv.org/abs/2606.12476
  19. [19]Albert Q. Jiang et al. Mistral 7B. arXiv preprint arXiv:2310.06825, 2023.arxiv.org/abs/2310.06825
  20. [20]Fahad Kamran, Donna Tjandra, Andrew Heiler, et al. Evaluation of sepsis prediction models before onset of treatment. NEJM AI, 2024. doi: 10.1056/Aioa2300032.DOI
  21. [21]Pride Kayumba, Koki Wataoka, Huy H. Nguyen, Jiaxuan Li, and Masaya Ohagi. Predict, don’t react: Value-based safety forecasting for LLM streaming. arXiv preprint arXiv:2604.03962, 2026.
  22. [22]Bruce W. Lee, Inkit Padhi, et al. Programming refusal with conditional activation steering. In International Conference on Learning Representations, 2025. arXiv:2409.05907.arxiv.org/abs/2409.05907
  23. [23]Yang Li, Qiang Sheng, Yehan Yang, Xueyao Zhang, and Juan Cao. From judgment to interference: Early stopping LLM harmful outputs via streaming content monitoring. In Advances in Neural Information Processing Systems, 2025. arXiv:2506.09996.arxiv.org/abs/2506.09996
  24. [24]Potsawee Manakul, Adian Liusie, and Mark J. F. Gales. SelfCheckGPT: Zero-resource black-box hallucination detection for generative large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, 2023.
  25. [25]Alex McKenzie, Urja Pawar, Phil Blandfort, William Bankes, David Krueger, Ekdeep Singh Lubana, and Dmitrii Krasnienkov. Detecting high-stakes interactions with activation probes. In Advances in Neural Information Processing Systems, 2025. arXiv:2506.10805.arxiv.org/abs/2506.10805
  26. [26]Cheng Niu, Yuanhao Wu, Juno Zhu, Siliang Xu, KaShun Shum, Randy Zhong, Juntong Song, and Tong Zhang. RAGTruth: A hallucination corpus for developing trustworthy retrieval-augmented language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 10862–10878, 2024. doi: 10.18653/v1/2024.acl-long.585.DOI
  27. [27]Oscar Obeso, Andy Arditti, Javier Ferrando, Joshua Freeman, Cameron Holmes, and Neel Nanda. Real-time detection of hallucinated entities in long-form generation. arXiv preprint arXiv:2509.03531, 2025.arxiv.org/abs/2509.03531
  28. [28]Renuka Oladri, Niveda Jawahar, and Abdirisak Mohamed. Token budget saturation and mechanistic early detection of reasoning non-convergence in chain-of-thought models. arXiv preprint arXiv:2607.21433, 2026.arxiv.org/abs/2607.21433
  29. [29]Charilaos Pipis, Shivam Garg, Vasilis Kontonis, Vaishnavi Shrivastava, Akshay Krishnamurthy, and Dimitris Papailopoulos. Wait, wait, wait... why do reasoning models loop? In Proceedings of the 43rd International Conference on Machine Learning, 2026. arXiv:2512.12895.arxiv.org/abs/2512.12895
  30. [30]Nikhil Prakash, Tamar Rott Shaham, Tal Haklay, Yonatan Belinkov, and David Bau. Fine-tuning enhances existing mechanisms: A case study on entity tracking. In International Conference on Learning Representations, 2024.arxiv.org/abs/2402.14811
  31. [31]Project Apertus. Apertus: Democratizing open and compliant LLMs for global language environments. arXiv preprint arXiv:2509.14233, 2025.arxiv.org/abs/2509.14233
  32. [32]Qwen Team. Qwen3Guard technical report. arXiv preprint arXiv:2510.14276, 2025.
  33. [33]Mona Schirmer, Metod Jazbec, Alexander Timans, Christian Naesseth, Maja Waldron, and Eric Nalisnick. Online safety monitoring for LLMs. In ICML 2026 Workshop on Hypothesis Testing, 2026. arXiv:2607.02510.arxiv.org/abs/2607.02510
  34. [34]Sing Team. SingProbe technical report. arXiv preprint arXiv:2608.30703, 2026.arxiv.org/abs/2608.30703
  35. [36]Sean Welleck, Ilia Kulikov, Stephen Roller, Emily Dinan, Kyunghyun Cho, and Jason Weston. Neural text generation with unlikelihood training. In International Conference on Learning Representations, 2020.
  36. [37]Matthias Winterhalder et al. The seizure prediction characteristic: A general framework to assess and compare seizure prediction methods. Epilepsy & Behavior, 2003.pubmed.ncbi.nlm.nih.gov/12791335
  37. [38]Wenya Xie, Shaochen Zhong, Hoang Anh Duy Le, Zhaozhuo Xu, Jianwen Xie, and Zirui Liu. Word salad chopper: Reasoning models waste a ton of decoding budget on useless repetitions, self-knowingly. In Conference on Empirical Methods in Natural Language Processing, pages 33588–33598, 2025. doi: 10.18653/v1/2025.emnlp-main.1705.DOI
  38. [39]Hainiu Xu, Italo Luis da Silva, Jiangnan Ye, Yuhao Wang, Wei Liu, Linyi Yang, Jonathan Richard Schwarz, Nicola Paoletti, Yulan He, and Hanqi Yan. Pre-act-Bench: Benchmarking predictive monitoring in LLMs. arXiv preprint arXiv:2606.09890, 2026.arxiv.org/abs/2606.09890
  39. [40]Jin Xu, Xiaojiang Liu, Jianhao Yan, Deng Cai, Huayang Li, and Jian Li. Learning to break the loop: Analyzing and mitigating repetitions for neural text generation. In Advances in Neural Information Processing Systems, 2022.arxiv.org/abs/2206.02369
  40. [41]Jing Yang, Long R. Jiao, Xiujun Cai, and Zongjiu Zhang. Prediction is not detection: Evaluating pre-recognition claims in longitudinal clinical AI. arXiv preprint arXiv:2609.25852, 2026.
  41. [42]Junzhe Yu, Yi Liu, Huijia Sun, Ling Shi, and Yuqi Chen. Breaking the loop: Detecting and mitigating denial-of-service vulnerabilities in large language models. arXiv preprint arXiv:2503.00416, 2025.arxiv.org/abs/2503.00416
  42. [43]Yiming Zhang et al. Backtracking improves generation safety. In International Conference on Learning Representations, 2025. arXiv:2409.14586.arxiv.org/abs/2409.14586
  43. [44]Yuanhe Zhang, Ziwei Wang, Jie Ren, Haoran Gao, Zhenhong Zhou, Fanyu Meng, Cong Wu, Li Sun, and Sen Su. When reasoning goes astray: Attention dynamics of uncontrolled reasoning. arXiv preprint arXiv:2609.38817, 2026.arxiv.org/abs/2609.38817
  44. [45]Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. Judging LLM-as-a-judge with MT-Bench and Chatbot Arena. In Advances in Neural Information Processing Systems, Datasets and Benchmarks Track, 2023.arxiv.org/abs/2306.05685

Paper details

vlnc:W_uja6fz5f
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 16

downloads · 1

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents