GradStop: Exploring Training Dynamics in Unsupervised Outlier Detection through Gradient
Yuang Zhang, Liping Wang, Yihong Huang, Yuanxing Zheng, Fan Zhang, Xuemin Lin
TL;DR
This work tackles unsupervised outlier detection (UOD) in contaminated datasets, where label-free evaluation makes training difficult due to misalignment between optimization and OD goals. It introduces GradStop, a gradient-based, label-free early-stopping method that uses GradSample to form two gradient sets and computes cohesion $\oldsymbol{C}$ and divergence $\boldsymbol{D}$ to monitor training dynamics relative to the inlier-priority OD mechanism. The approach is theoretically grounded and empirically validated across 47 real-world datasets and four deep UOD models, significantly improving AutoEncoder (AE) performance and outperforming state-of-the-art baselines. GradStop demonstrates robust, generalizable gains and offers a practical solution to prevent toxicity during UOD training, with potential extensions to integrate the metrics into optimization and to leverage pseudo-labeling for weak supervision.
Abstract
Unsupervised Outlier Detection (UOD) is a critical task in data mining and machine learning, aiming to identify instances that significantly deviate from the majority. Without any label, deep UOD methods struggle with the misalignment between the model's direct optimization goal and the final performance goal of Outlier Detection (OD) task. Through the perspective of training dynamics, this paper proposes an early stopping algorithm to optimize the training of deep UOD models, ensuring they perform optimally in OD rather than overfitting the entire contaminated dataset. Inspired by UOD mechanism and inlier priority phenomenon, where intuitively models fit inliers more quickly than outliers, we propose GradStop, a sampling-based label-free algorithm to estimate model's real-time performance during training. First, a sampling method generates two sets: one likely containing more outliers and the other more inliers, then a metric based on gradient cohesion is applied to probe into current training dynamics, which reflects model's performance on OD task. Experimental results on 4 deep UOD algorithms and 47 real-world datasets and theoretical proofs demonstrate the effectiveness of our proposed early stopping algorithm in enhancing the performance of deep UOD models. Auto Encoder (AE) enhanced by GradStop achieves better performance than itself, other SOTA UOD methods, and even ensemble AEs. Our method provides a robust and effective solution to the problem of performance degradation during training, enabling deep UOD models to achieve better potential in anomaly detection tasks.
