A Generalized Active Learning Approach for Unsupervised Anomaly Detection

Tiago Pimentel, Marianne Monteiro, Juliano Viana, Adriano Veloso, Nivio Ziviani

Introduction: The Undecidability of Anomalies

Anomaly detection is a fundamental challenge in machine learning, primarily because the definition of an "anomaly" is often subjective and context-dependent. In purely unsupervised settings, models must rely on mathematical priors—such as the assumption that anomalies reside in low-density regions of the feature space. However, as this research demonstrates, anomaly detection can be inherently "undecidable" without external guidance. A dense cluster of points far from the main distribution could represent a coordinated attack or a legitimate new category. Without human feedback, an unsupervised model cannot distinguish between these possibilities.

The UAI Layer: Bridging the Gap

To address this, the authors introduce the Unsupervised to Active Inference (UAI) layer. This component is designed as a plug-and-play addition to existing deep learning architectures, such as Denoising Autoencoders (DAE) or Multi-Layer Perceptrons (MLP). The UAI layer transforms these unsupervised models into active learning systems by incorporating a small amount of expert feedback.

Architecture and Integration

The UAI layer functions by integrating two primary inputs from the base model: the latent representation (the compressed feature vector) and the unsupervised anomaly score (such as reconstruction error). By combining these, the layer uses a simple logistic regression to predict the probability of a data point being an anomaly.

Architecture of the DAE-UAI model, showing how the UAI layer integrates latent representations and reconstruction error.

Active Learning Strategy

The system employs a "most-likely positive" active learning strategy. It ranks unlabeled data points by their predicted anomaly scores and presents the top $k$ candidates to a human expert for labeling. This feedback is then used to retrain the UAI layer.

Crucially, the architecture allows for backpropagation from the UAI layer into the base model. This "gradient flow" effectively reshapes the latent feature space, forcing normal and anomalous data points to diverge. This process makes anomalies linearly separable from normal data, even when they were initially tangled in the feature space.

Performance and Efficiency

The approach was evaluated on a variety of synthetic and real-world datasets, including MNIST variants and network intrusion benchmarks like KDDCUP. The results demonstrate that the UAI layer significantly enhances the model's ability to detect complex, clustered anomalies that unsupervised models typically miss.

Performance comparison on the MNISThard dataset, demonstrating the rapid learning curve of UAI-enhanced models compared to unsupervised baselines.

On the MNISThard dataset—which uses misclassified points to simulate complex anomalies—the UAI-enhanced models ($Class_{UAI}$ and $DAE_{UAI}$) showed a much steeper learning curve than their unsupervised counterparts. With a minimal labeling budget, these models were able to identify the vast majority of anomalies, outperforming standard active learning competitors.

Conclusion

The UAI layer provides a robust and efficient framework for anomaly detection by bringing a human expert into the loop. By allowing models to adapt their "definition" of an anomaly based on minimal feedback, it overcomes the inherent limitations of unsupervised methods. Its plug-and-play nature and lack of need for extensive hyper-parameter tuning make it a highly practical solution for real-world applications where labeled data is scarce.

Summary updated

BibTeX
@inproceedings{pimentel2020generalized,
  author = {Tiago Pimentel and Marianne Monteiro and Juliano Viana and Adriano Veloso and Nivio Ziviani},
  title = {{A Generalized Active Learning Approach for Unsupervised Anomaly Detection}},
  booktitle = {IJCNN},
  year = {2020},
  doi = {10.1109/ijcnn48605.2020.9206769},
}
Figure