arXiv:2609.37935stat.MLSep 2026

Manuscript Offprint

arXiv:2609.37935

Post-Anomaly Detection Inference for Deep SVDD

Cao Le Cong Thanh, Dang Quang Vinh, Vo Nguyen Le Duy

Abstract

Deep Support Vector Data Description (Deep SVDD) has become a prominent framework for unsupervised anomaly detection by learning latent representations that compactly characterize normal data around a center. Despite its empirical success, anomaly decisions produced by Deep SVDD are typically made solely based on anomaly scores without rigorous statistical guarantees, thereby limiting their reliability in safety-critical and high-stakes applications where false positives must be strictly controlled. In this paper, we propose PADI (Post-Anomaly Detection Inference), a novel framework that equips a trained and frozen Deep SVDD detector with statistically valid inference by leveraging the Selective Inference framework. Specifically, PADI performs inference conditional on the event that a test instance is identified as anomalous by Deep SVDD, thereby enabling rigorous statistical assessment of anomaly decisions. Based on this formulation, we derive valid selective p-values that quantify the statistical significance of the detected anomaly. Using these p-values, we theoretically establish control of the false positive rate (FPR) at a user-specified significance level α\alpha (e.g., α=0.05\alpha = 0.05). Furthermore, we extend the proposed framework to Deep Semi-Supervised Anomaly Detection (Deep SAD), providing a principled approach for statistically reliable inference in semi-supervised anomaly detection settings. Extensive experiments on both synthetic and real-world benchmark datasets robustly support the theoretical findings. The results demonstrate that PADI consistently achieves proper FPR control while attaining superior true positive rates compared with existing approaches.

1 Introduction

Anomaly detection (AD) plays a fundamental role in modern machine learning, with applications spanning cybersecurity, healthcare, bioinformatics, industrial monitoring, finance, and autonomous systems (Ahmed et al., 2016; Litjens et al., 2017; Zong et al., 2018). Among existing approaches, Support Vector Data Description (SVDD) (Tax & Duin, 2004) has emerged as one of the most influential frameworks for one-class classification and unsupervised AD. The central idea of SVDD is to learn a compact description of normal data by enclosing the normal samples within a minimal hypersphere in a feature space, such that samples lying far from the learned description are identified as anomalies. Owing to its conceptual simplicity and strong empirical effectiveness, SVDD and its deep variants, particularly Deep SVDD (Ruff et al., 2018), have been successfully applied to a wide range of problems (Yi & Yoon, 2020; Gamper et al., 2020; You et al., 2021; Zhang et al., 2022; Kou et al., 2022).

∗^{*}Corresponding author

Despite the empirical success, Deep SVDD suffers from a critical limitation: anomaly decisions are made based on anomaly scores or heuristic thresholds without rigorous statistical guarantees. In practice, this means that the false positive rate (FPR) cannot be reliably controlled. Such a limitation becomes particularly problematic in high-stakes applications where false positives may lead to severe consequences. For example, in bioinformatics and medical diagnosis, incorrectly flagging healthy patients or normal biological samples as anomalous may trigger unnecessary follow-up procedures, expensive laboratory analyses, or inappropriate clinical interventions. Similarly, in cybersecurity, excessive false positives can overwhelm security analysts, leading to alert fatigue and potentially causing truly malicious activities to be overlooked. These challenges highlight the importance of developing a statistically reliable method capable of quantifying the uncertainty of anomaly decisions and rigorously controlling the FPR.

A natural approach to addressing this problem is to formulate anomaly assessment as a statistical hypothesis testing problem. Specifically, given a test instance detected as anomalous by an SVDD-based detector, one aims to quantify its statistical significance. However, constructing valid statistical inference in this setting is highly challenging due to the well-known issue of double dipping (Kriegeskorte et al., 2009) or selection bias. The same data are used both to identify anomalous instances and to conduct statistical inference, resulting in invalid classical p-values and inflated FPR. Consequently, conventional (naive) statistical testing procedures fail to provide reliable FPR control for the Deep SVDD-based AD result.

To overcome this challenge, we leverage the framework of Selective Inference (SI) (Lee et al., 2016), which enables valid statistical inference after a data-driven selection procedure. Building upon this principle, we propose PADI (Post-Anomaly Detection Inference), a novel framework that equips a trained and frozen Deep SVDD detector with statistically valid post-AD inference. The key idea is to perform inference conditional on the event that a test sample is detected as anomalous by Deep SVDD. Based on this formulation, PADI derives valid selective p-values that quantify the statistical significance of the detected anomalies while provably controlling the FPR at a user-specified significance level α\alpha. Importantly, the proposed framework operates in a post hoc manner and does not require retraining or modifying the underlying anomaly detector.

Contributions. The main contributions of this work are summarized as follows:

• We formulate anomaly assessment in Deep SVDD under the SI framework and address the fundamental double-dipping issue arising from conducting inference after AD. Based on this formulation, we derive valid selective p-values and theoretically establish control of the FPR at a user-specified significance level α\alpha. The proposed PADI method operates in a post hoc manner and can be directly applied to trained and frozen Deep SVDD models without requiring any retraining or modification of the underlying detector. The proposed inference procedure additionally requires an independent set of normal data, from which normal reference samples are drawn for computing selective p-values. Furthermore, we extend PADI to deep semi-supervised AD model (Ruff et al., 2019).

• We provide a GPU-accelerated implementation of PADI to improve computational efficiency. By alleviating the computational burden associated with post-AD inference, this implementation extends the practical applicability of PADI to a broader range of deep architectures beyond simple fully connected networks.

• We conduct extensive experiments on both synthetic and real-world benchmark datasets to validate the proposed method. The experimental results consistently demonstrate that PADI achieves reliable FPR control while maintaining superior true positive rates compared with existing methods.

Related works. Unsupervised AD aims to identify abnormal or rare samples without requiring labeled anomaly instances during training. Early approaches include distance-based methods (Knorr et al., 2000), density-based techniques such as Local Outlier Factor (LOF) (Breunig et al., 2000), clustering-based methods (Jain et al., 1999). One-class classification methods, particularly One-Class SVM (Schölkopf et al., 2001) and Support Vector Data Description (SVDD) (Tax & Duin, 2004), have also become foundational techniques due to their ability to characterize the distribution of normal data. More recently, deep learning has substantially advanced AD by enabling representation learning in high-dimensional and complex data domains. Representative deep anomaly detection approaches include autoencoder-based methods (Sakurada & Yairi, 2014), GAN-based methods such as f-AnoGAN (Schlegl et al., 2019), and Deep SVDD (Ruff et al., 2018). Although these deep learning-based methods often demonstrate strong AD performance, most of

Figure

Figure 1: Overview of the proposed PADI method. A trained and frozen Deep SVDD model first maps test instances into the latent space and selects anomalies whose distance-based anomaly scores exceed a fixed threshold. For each selected anomaly, PADI performs SI conditional on the anomaly-selection event induced by the Deep SVDD detector. Using independent normal reference samples, PADI computes a selective p-value that quantifies the statistical significance of the detected anomaly while accounting for the selection event. The right panel illustrates how PADI differs from conventional inference: unlike naive p-values that ignore the anomaly-selection process, PADI provides statistically valid inference for detected anomalies.

them still lack a principled statistical framework for rigorously quantifying the significance and reliability of anomaly decisions.

Traditional statistical inference methods fail in this setting because their validity fundamentally relies on the target anomalies being predetermined prior to observing the data. When classical inference procedures are directly applied to anomalies identified by an anomaly detection (AD) algorithm, the resulting statistical tests become invalid due to selection bias, leading to the inability to properly control the FPR at the desired significance level. Selective Inference (SI) (Fithian et al., 2014; Lee et al., 2016) has emerged as a promising approach for addressing the invalidity of classical post-selection inference. The core idea of SI is to conduct inference conditional on the event that a particular hypothesis has been selected, thereby removing the selection bias and restoring statistical validity in the sense that the FPR is properly controlled. Following the seminal work of Lee et al. (2016), SI has been extensively studied and successfully applied to a broad range of machine learning and statistical problems, including feature selection (Lockhart et al., 2014; Fithian et al., 2014; Tibshirani et al., 2016; Yang et al., 2016; Suzumura et al., 2017; Le Duy & Takeuchi, 2022), changepoint detection (Umezu & Takeuchi, 2017; Hyun et al., 2018; Duy et al., 2020; Jewell et al., 2022), clustering (Lee et al., 2015; Inoue et al., 2017; Gao et al., 2024), image segmentation tasks (Tanizaki et al., 2020; Duy et al., 2022), saliency map analysis (Miwa et al., 2023), and attention map interpretation in vision transformers (Shiraishi et al., 2024).

Statistical inference for AD has recently begun to attract attention within the SI literature. Existing studies have explored SI for anomaly testing in the context of robust regression (Chen & Bien, 2020; Tsukurimichi et al., 2022; Phong et al., 2025). The authors of Niihori et al. (2025) recently investigated the statistical significance of anomalies detected by a k-nearest-neighbor-based model. Their test statistic is constructed based on whether a test instance and its data-selected k-th nearest normal neighbor share the same underlying signal. The k-nearest-neighbor-based AD framework is fundamentally different from SVDD, resulting in distinct formulations of the selection event and, consequently, different challenges in developing the corresponding SI procedure. Kiet et al. (2026) further investigated selective inference (SI) for autoencoder-based AD following representation-learning-based domain adaptation, in contrast to our work, which focuses on SI for AD in the conventional, non-domain-adaptation setting. Moreover, their implementation is primarily designed for relatively simple operations in traditional fully connected neural networks, such as ReLU, and their experimental evaluation is conducted on tabular datasets. Consequently, their method cannot be directly applied to the more complex operations commonly encountered in CNN architectures, such as Conv2D, BatchNorm, and MaxPool, or to image data, which are also considered in our work. To the best of our knowledge, no existing study has explored the SI framework for quantifying the statistical significance of AD results produced by Deep SVDD.

References (74)