Unleashing the Potential of Unsupervised Deep Outlier Detection through Automated Training Stopping

Yihong Huang, Yuang Zhang, Liping Wang, Xuemin LinarXiv 2023

Abstract

Outlier detection (OD) is a critical task in data science, yet deep learning approaches remain notoriously difficult to tune. Recent research highlights that deep OD models are extremely sensitive to hyperparameters, with training time being a primary, often overlooked factor. Without labels, practitioners typically train models for a fixed number of iterations, often missing the peak performance window where the model distinguishes inliers from outliers most effectively. This paper introduces EntropyStop, a novel, label-free method that utilizes a "loss entropy" metric to automatically terminate training at the optimal moment. By leveraging the phenomenon of "Inlier Priority," EntropyStop identifies the point of maximum discriminative power, improving detection accuracy while reducing training time by up to 95%.

The Challenge of Training Time in Deep OD

In unsupervised outlier detection, the goal is to identify anomalies without prior knowledge of their characteristics. While deep learning has advanced the state-of-the-art, these models suffer from extreme hyperparameter sensitivity. A critical finding of this research is that training time itself acts as a dominant hyperparameter.

Figure 1: (a) AUC performance over training iterations shows a sharp peak followed by significant degradation. (b) Comparison of AUC at the end of training versus the theoretical optimal iteration across multiple runs.

As shown in Figure 1, deep models often exhibit a "U-curve" in performance. Because deep models are highly expressive, they eventually begin to minimize the loss for outliers as well as inliers. If training continues for too long, the model "learns" the anomalies, and its ability to distinguish them from normal data collapses. In supervised learning, early stopping is managed via a validation set; in unsupervised OD, the lack of labels makes identifying this peak "notoriously difficult."

The EntropyStop Solution

The proposed solution, EntropyStop, is built on the principle of Inlier Priority. Because normal data (inliers) are more numerous and share consistent patterns, deep models naturally prioritize learning their representations first. This creates a window where the loss for inliers has dropped significantly, while the loss for outliers remains high.

To track this window without labels, the authors introduce Loss Entropy. This metric monitors the distribution of losses across the dataset. When the model successfully fits the majority (inliers), the loss distribution becomes concentrated (lower entropy). When the model begins to fit the scattered, inconsistent outliers, the distribution flattens, and entropy rises.

Figure 4: Diagnostic plots showing the alignment between (a) AUC peak, (b) the gap between inlier and outlier loss, and (c) the minimum of the loss entropy curve. (d) and (e) show the loss distribution becoming more discriminative at the optimal iteration.

As illustrated in Figure 4, the minimum of the loss entropy curve (c) aligns remarkably well with the peak of the AUC curve (a). The EntropyStop algorithm monitors this entropy on an unlabeled evaluation set, halting training once the entropy hits a minimum and begins to trend upward. This allows the model to stop exactly when the separation between inlier and outlier loss is maximized (b).

Empirical Results and Efficiency

The authors validated EntropyStop across tabular and image datasets (including MNIST benchmarks) and various anomaly types (global, local, and cluster). The results demonstrate three major benefits:

  1. Performance Gains: EntropyStop consistently achieves results close to the theoretical "Optimal" performance that would only be possible if labels were available to pick the best iteration.
  2. Massive Compute Savings: By stopping early, the method reduces training time by 60% to 95% compared to naive training. On MNIST, the savings exceeded 95%.
  3. Robustness: The method significantly reduces variance. Even when other hyperparameters (like architecture or learning rate) are sub-optimal, stopping at the right time can salvage the model's performance.

Conclusion and Future Work

EntropyStop represents the first reliable, label-free strategy for identifying the optimal training iteration in deep outlier detection. While highly effective, the authors note limitations regarding "local outliers"—anomalies that reside very close to the normal data distribution—where the inlier priority signal is weaker. Future work may focus on refining the entropy metric for these edge cases and exploring the impact of heavy pre-training on the initial loss distribution. Nevertheless, EntropyStop provides a practical, efficient, and robust tool for deploying deep OD models in real-world, unlabeled environments.

Summary updated

BibTeX
@misc{huang2023unleashing,
  author = {Yihong Huang and Yuang Zhang and Liping Wang and Xuemin Lin},
  title = {{Unleashing the Potential of Unsupervised Deep Outlier Detection through Automated Training Stopping}},
  year = {2023},
  eprint = {2305.16777},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.16777},
}
Figure