Fascinating Supervisory Signals and Where to Find Them: Deep Anomaly Detection with Scale Learning

Hongzuo Xu, Yijie Wang, Juhui Wei, Songlei Jian, Yizhou Li, Ning Liu

Introduction: The Challenge of Tabular Anomaly Detection

Deep anomaly detection for tabular data often struggles due to a lack of intuitive "pretext tasks"—such as rotating an image or masking a word—that are commonly used in computer vision and natural language processing. Anomaly detection is fundamentally an unsupervised task: we have plenty of "normal" data but few, if any, labeled examples of "abnormal" data.

To train deep learning models, researchers typically rely on two strategies, both of which have notable flaws when applied to tabular data:

  1. Generative Models: Autoencoders attempt to reconstruct the input. However, they often over-focus on low-level value noise rather than high-level semantic patterns.
  2. Contrastive/Self-Supervised Learning: Models learn by solving pretext tasks. While successful in perceptual domains, these transformations do not translate well to tabular data, where the order and relationships of features are highly abstract.

Addressing the gap of how to define a meaningful supervisory signal for non-perceptual tabular data, this paper introduces SLAD (Scale Learning-based Anomaly Detection). SLAD creates a novel supervisory signal by learning the "scale"—the relationship between the dimensionality of feature subsets and their latent representations—allowing the model to capture complex structural regularities that distinguish normal data from anomalies.

Methodology: Scale as a Data-Driven Label

The core innovation of SLAD is the introduction of Scale as a supervisory signal. The methodology breaks down into four key steps:

  1. Subspace Sampling: For a single data instance, the model randomly samples multiple "sub-vectors" (subsets of features) of varying lengths.
  2. Transformation ($T$): These sub-vectors are mapped to a unified $h$-dimensional representation space using random linear projections.
  3. Scale Labeling ($G$): A "scale" label is calculated for each sub-vector. Rather than simply counting the number of features, this calculation incorporates feature weights (derived via Pearson correlation) to account for how informative specific features actually are.
  4. Scale Learning via Distribution Alignment: Instead of treating this as a simple regression problem, SLAD approaches it as a distribution alignment task. A neural network predicts the scales of the transformed sub-vectors, and the model is optimized using Jensen-Shannon divergence to match the predicted distribution to the actual scale distribution.

By forcing the model to rank the complexity of different feature subspaces, it learns the inherent "normality" and structural patterns of the data. During testing, anomalies—which fail to fit these learned patterns—produce significantly higher loss values, which naturally serve as their anomaly scores.

Key Insights and Theoretical Contributions

  • Scale as a Structural Proxy: The ratio of input information to representation capacity (scale) is a consistent property for normal data. If a model knows how "dense" a representation should be for a given set of features, it has effectively modeled the underlying data structure.
  • Ranking over Absolute Values: By utilizing distribution alignment rather than point-wise prediction, the model focuses on the relative importance and complexity of feature subsets. This makes the architecture highly robust to noise and irrelevant features.
  • The Inlier-Priority Property: The authors provide theoretical proof and empirical validation that in a dataset with few anomalies, the gradients from "normal" instances dominate the optimization process. The model essentially "ignores" the anomalies during training, making them stand out even more during inference.
  • Handling Multi-modal Normality: Unlike traditional "one-class" methods that assume all normal data fits into a single hypersphere, SLAD's discriminative approach allows it to handle complex, multi-class normal data (e.g., a dataset where "normal" encompasses several distinct types of healthy behavior).

Experimental Results

The authors evaluated SLAD against seven state-of-the-art baselines across a diverse array of benchmarks, including standard medical and physics datasets, modern intrusion detection (UNSW-NB15), tabular versions of vision/NLP tasks, and ADBench (a large-scale collection of 47 classical tabular datasets).

  • State-of-the-Art Performance: SLAD outperformed all competitors on 8 out of 10 primary datasets.
  • Significant Gains: On the popular Thyroid benchmark, SLAD raised the AUC-PR from 0.82 to 0.92. On the Waveform dataset, it achieved a staggering 190% leap in AUC-PR compared to the next best method.
  • Large-Scale Robustness: In the ADBench evaluation across 47 datasets, SLAD achieved the best average rank across six different evaluation metrics.
  • Complexity Resilience: To test the model's ability to handle complicated inlier distributions, the authors used a modified F-MNIST suite. When the number of "normal" classes was increased from 1 to 9, SLAD’s performance dropped by only ~10%, whereas generative models suffered declines of over 30%.

Limitations and Future Work

While highly effective, SLAD does have a few limitations:

  • Computational Overhead: SLAD is slightly less efficient than simpler models on ultra-high-dimensional data because it must prepare multiple neural layers to handle different subspace lengths. However, GPU acceleration keeps total training time for even massive datasets (like Thrombin with 139k features) under 6 minutes.
  • Small Data Sensitivity: Like most deep learning approaches, SLAD performs less effectively on very small datasets (e.g., Arrhythmia with <500 instances) where there is insufficient data to accurately learn the distribution of scales.

Future Directions: The authors suggest extending Scale Learning to other complex data types, such as time series or graphs. Furthermore, the loss values derived from specific feature subspaces could be utilized to provide anomaly interpretation, helping practitioners explain exactly why a specific instance was flagged as abnormal.

Summary updated

BibTeX
@inproceedings{xu2023fascinating,
  author = {Hongzuo Xu and Yijie Wang and Juhui Wei and Songlei Jian and Yizhou Li and Ning Liu},
  title = {{Fascinating Supervisory Signals and Where to Find Them: Deep Anomaly Detection with Scale Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=Bgd-j4b34K},
}
Figure