Can we Defend Against the Unknown? An Empirical Study About Threshold Selection for Neural Network Monitoring
Khoi Tran Dang, Kevin Delmas, Jérémie Guiochet, Joris Guérin
TL;DR
This work tackles threshold selection for neural network runtime monitors operating under unknown threats. It compares four threshold-optimization-set strategies (ID, ID+T, ID+O, ID+T+O) across three image datasets and multiple monitor types, evaluating performance with fixed thresholds on threat-inclusive evaluation sets. The study finds that using knowledge of the anticipated target threat (ID+T) yields the strongest thresholding performance, while incorporating generic threats (ID+O, ID+T+O) can degrade robustness to unforeseen threats; the choice of effectiveness measure also significantly shapes outcomes. These results challenge the reliance on threshold-agnostic metrics and offer practical guidance for deploying robust monitors, highlighting the tradeoffs between safety and availability and suggesting future work on narrower threat categories and broader task generalization.
Abstract
With the increasing use of neural networks in critical systems, runtime monitoring becomes essential to reject unsafe predictions during inference. Various techniques have emerged to establish rejection scores that maximize the separability between the distributions of safe and unsafe predictions. The efficacy of these approaches is mostly evaluated using threshold-agnostic metrics, such as the area under the receiver operating characteristic curve. However, in real-world applications, an effective monitor also requires identifying a good threshold to transform these scores into meaningful binary decisions. Despite the pivotal importance of threshold optimization, this problem has received little attention. A few studies touch upon this question, but they typically assume that the runtime data distribution mirrors the training distribution, which is a strong assumption as monitors are supposed to safeguard a system against potentially unforeseen threats. In this work, we present rigorous experiments on various image datasets to investigate: 1. The effectiveness of monitors in handling unforeseen threats, which are not available during threshold adjustments. 2. Whether integrating generic threats into the threshold optimization scheme can enhance the robustness of monitors.
