Manuscript Offprint

arXiv:2610.02925

Positive-Unlabeled Learning for Agent Safety False Alarm Auditing

Xichen Yan, Chongyang Gao, Kezhen Chen, Guangyi Zhang, Jiaqi Wu, Lixu Wang

ABSTRACT

Safety monitors help safeguard language-model agents interacting with external tools and environments, but conservative monitoring can generate many false alarms, consuming extensive review resources and weakening trust in alerts. Because false and genuine alarms often remain interleaved in native monitor scores, obtaining a reliable cutoff still requires substantial manual verification. In practice, a small set of verified-safe non-alarmed trajectories may be available while alarms remain unlabeled, naturally casting false-alarm auditing as a positive-unlabeled (PU) ranking problem. The key challenge is monitor-induced selection, since observed safe references are accepted by the monitor, while the hidden safe alarms of interest are precisely those it incorrectly flags, making the observed positives poorly representative of the positives to be recovered. To address this challenge, we propose a two-stage framework in which Trust-aware PU Supervision adapts safe references toward the alarm domain and protects plausible false alarms from excessive negative pressure, while Reliability-gated Rank Distillation consolidates consistent ordering preferences from multiple PU reference models into a single student. Consensus-guided Structural Refinement then improves the student ranking using hierarchical safe-reference support, alarm relations, and predicted reference consensus. The framework requires no alarm safety labels for fitting and leaves the underlying monitor unchanged. Across mainstream safety monitors, our method achieves a macro AUPRC of 0.6444, outperforming eight evaluated PU baselines by 5.27–16.98 absolute percentage points; compared with PULDA, the strongest evaluated PU baseline, it recovers 33.3% more false alarms at a 5% review budget. Code is available at https://anonymous.4open.science/r/safe-alarm-ranking-c4d2/.

1 INTRODUCTION

Language-model agents increasingly perform real-world tasks through multi-round interactions with external tools and environments. During execution, they may be exposed to prompt injection attacks or take actions that violate safety constraints, potentially causing serious harm (Debenedetti et al., 2024; Wang et al., 2022; Sun et al., 2026; Jiao et al., 2025; Feng et al., 2026). An agent's execution trajectory records its intermediate actions, observations, and tool interactions, providing a natural basis for safety monitoring mechanisms that detect unsafe behavior (Liu et al., 2026; Xiang et al., 2025; Chen et al., 2025). Existing trajectory monitors assess such execution traces using learned evaluators or explicit safety criteria and produce safety scores, risk judgments, or intervention signals when potentially unsafe behavior is detected. These approaches have demonstrated effective detection of unsafe agent behavior across a range of settings, including coding, web interaction, and tool-use tasks (Liu et al., 2026; Xiang et al., 2025; Chen et al., 2025; Li et al., 2026a).

*Work carried out during a research internship at The Chinese University of Hong Kong, Shenzhen.

†^{\dagger}Corresponding author.

(a) False alarms by monitor

Figure

(b) Native-score order

Figure 1: False alarms and overlap in the native score order. (a) Share of safe trajectories among alarms in four dataset–monitor settings. (b) The native monitor-score ordering for the same four settings, with lower-risk alarms on the left. Each tile is one alarm (teal for FP, sand for TP); row widths are normalized to cohort size, and N gives the alarm count. All 510 alarms are shown. FP and TP remain interleaved within each order, leaving no clean score cutoff. Ground-truth labels determine tile colors only, not the ordering; ties in native scores are broken by sample ID.

However, this seemingly strong performance in unsafe-behavior detection comes with a substantial cost. Agent trajectories vary considerably in structure and format across tasks and datasets, while the safety of an individual action often depends on both the task context and the preceding execution history (Yuan et al., 2024; Chen et al., 2026). To reduce the risk of overlooking unsafe behavior across such heterogeneous settings, safety monitors often favor sensitivity, for example by adopting permissive alarm thresholds or overly inclusive safety criteria that also flag borderline cases. Our empirical study reveals that this design choice results in a substantial number of false alarms: across mainstream safety monitors, 39.4%–57.9% of triggered alarms actually correspond to safe trajectories and should therefore be regarded as false positives (FPs) (Figure 1a). Such a high false-positive rate is consequential. Repeated false warnings can erode users' trust in the monitoring system and reduce their willingness to respond to subsequent alerts (Chancey et al., 2017). Moreover, each false alarm must be investigated before it can be dismissed, incurring additional human effort and computational overhead (Alahmadi et al., 2022; Yang et al., 2024; Oliver et al., 2024).

A natural way to prioritize likely false alarms for review is to reuse the monitor's original safety score, possibly with an additional cutoff. Our empirical study shows that false and true alarms often receive similar scores and remain mixed in the native ordering (Figure 1b). With this overlap, moving the cutoff cannot reliably separate the two groups. Even if stronger future monitors produced better-separated scores, choosing a cutoff that preserves genuine alarms would require manually verifying many cases. That verification is impractical under a limited review budget.

Let us reconsider the alarm-isolation problem from a different perspective. In practice, it is often easy to obtain a small set of verified-safe trajectories, either from routine benign traces that do not trigger alarms or from the monitor's training data. Because safety monitors are typically conservative, trajectories that they confidently classify as safe provide reliable positive examples. Treating safety as the class of interest, these verified-safe trajectories form the observed positive set, while false alarms hidden within the alarm pool constitute latent positives. The task therefore becomes one of identifying positive-class samples from an otherwise unlabeled alarm pool, naturally giving rise to a positive-unlabeled (PU) learning formulation (Elkan & Noto, 2008). However, this setting differs fundamentally from standard PU learning. The safety monitor itself has already partitioned the two types of safe trajectories across its alarm boundary: observed positives correspond to safe behavior that the monitor accepts, whereas the latent positives of interest are precisely the safe trajectories that it incorrectly rejects. Consequently, the observed positive set may not be representative of the false alarms in the unlabeled pool. Learning directly from these positives without accounting for this selection mechanism risks reproducing the monitor's existing decision pattern rather than correcting its errors (Bekker & Davis, 2018).

In this work, to prioritize false-alarm agent trajectories identified by safety monitors, we propose a two-stage positive-unlabeled ranking framework that can prioritize most-likely false alarms in an auditing queue. In the first stage, we adapt the verified-safe non-alarms towards the alarm pool and reduce excessive negative pressure on plausible false alarms to mitigate the shift between the safe references and the false alarms, which helps us develop much more effective PU classifiers. But due to the uncertainty of PU learning process, we found that trained classifiers with different initializations provide distinctive auditing queues. Therefore, we propose a reliability-gated distillation strategy to distill the consistent alarm orderings across multiple PU classifiers into a single student. Then, in the second stage, we can obtain an initial auditing queue by ranking the scores predicted by the student PU classifier. To further exploit structure across task contexts, we refine the auditing queue with consensus-guided structural refinement driven by hierarchical safe-reference support, target-alarm relations, and reference agreement. Extensive experiments on two benchmark datasets and four dataset-monitor settings demonstrated the superiority of our proposed framework in prioritizing false alarms of agent trajectories compared with a variety of state-of-the-art potential baseline approaches. In summary, our main contributions are:

• We identify the issue of frequent false alarms raised by current agent safety monitors, and to our best knowledge, propose the first effective framework to prioritize most-likely false alarms in the auditing queue.

• We formulate agent false-alarm auditing as a special positive–unlabeled ranking problem under monitor-conditioned selection and develop a series of designs to mitigate the shift between positives and hidden positives and search for consistency across PU learning processes and task contexts.

• We conduct extensive experiments against established PU methods, direct auditing controls based on native monitor scores and frozen representations, and local LLM re-judgment. Across mainstream safety monitors, our method achieves a macro AUPRC of 0.6444, outperforming eight evaluated PU baselines by 5.27–16.98 absolute percentage points and recovering 33.3% more false alarms than PULDA at only a 5% auditing budget (Table 1).

References (49)