Introduction
Anomaly Detection (AD) is a critical task in identifying rare events such as fraud or medical conditions. However, real-world applications often face a scarcity of labeled data in the "target domain." Domain Adaptation (DA) addresses this by leveraging knowledge from a data-rich "source domain."
While effective, the combination of DA and AD introduces a significant challenge: selection bias. When the same data is used to adapt the domain, select outliers, and then test for significance, traditional statistical tests become "naive." These tests fail to account for the selection process, leading to inflated False Positive Rates (FPR) and unreliable $p$-values. This paper introduces STAND-DA, a framework designed to provide statistically valid $p$-values for anomalies detected through deep learning pipelines involving both DA and Autoencoders (AE).
Methodology: The STAND-DA Framework
The core of STAND-DA is the application of Selective Inference (SI). Unlike standard tests, SI computes a conditional $p$-value that asks: "Given that this point was already flagged as an anomaly by our specific pipeline, how likely is it to be a fluke?"
Characterizing Selection Events
The authors mathematically demonstrate that pipelines utilizing ReLU-based neural networks can be represented as a series of linear inequalities, known as polyhedral constraints. By treating the feature extractor and the Autoencoder's reconstruction error as piecewise-linear functions, the framework can identify the exact "truncation region" of the data distribution that leads to a specific point being classified as an anomaly.
GPU-Accelerated Selective Inference
Selective Inference is computationally intensive because it requires repeated model evaluations (line searches). To make this feasible for deep architectures, the authors developed a custom implementation using Numba's CUDA extension. By offloading matrix operations and interval updates to the GPU, STAND-DA achieves significant speedups over standard CPU-based implementations.
Experimental Evaluation
The framework was tested on synthetic datasets and real-world benchmarks, including the UCI Heart Disease dataset, Breast Cancer Wisconsin data, and the CDC Diabetes Health Indicators dataset.
Key Results: Rigorous FPR Control
A primary finding is the failure of naive methods to control false positives. In synthetic tests, naive $p$-values resulted in FPRs as high as 70% to 100%. In contrast, STAND-DA consistently maintained the FPR at the target significance level ($\alpha = 0.05$).
Beyond FPR control, STAND-DA demonstrated superior statistical power (True Positive Rate) compared to the Bonferroni correction, which is often overly conservative. On medical datasets, the framework produced well-calibrated $p$-values, enabling more reliable identification of true disease cases in low-data target domains.
Conclusion and Future Work
STAND-DA bridges the gap between complex deep learning pipelines and rigorous statistical validation. By accounting for the "double-dipping" inherent in selection-based workflows, it provides a path toward trustworthy AI in high-stakes domains like healthcare.
Future research directions include extending the framework to handle non-linear reconstruction metrics (such as $L_2$ loss) and expanding the scope to include other generative architectures like GANs or Transformers used in domain adaptation.
Summary updated