Semi-Supervised Isolation Forest for Anomaly Detection

Luca Stradiotti, Lorenzo Perini, Jesse DavisSDM 2024

Introduction

Anomaly detection is a critical task in high-stakes environments, such as identifying credit card fraud, manufacturing failures, or ice buildup on wind turbine blades. Traditionally, this has been an unsupervised challenge, relying on the assumption that anomalies are inherently easier to isolate due to their rarity and distinctiveness. However, real-world data is often messy, and anomalies do not always stand out clearly.

This paper introduces SSIF (Semi-Supervised Isolation Forest), a method developed by researchers at KU Leuven. SSIF demonstrates that even a small amount of labeled data can significantly enhance the performance of the classic Isolation Forest (IF) by guiding tree construction and anomaly scoring through a probabilistic framework.

Methodology

SSIF moves away from the uniform random approach of standard Isolation Forests, introducing three key probabilistic pillars to leverage available labels effectively:

  1. Probabilistic Tree Induction: Instead of selecting split points at random, SSIF calculates a split distribution. This distribution combines a labeled component (utilizing Information Gain to separate known anomalies) and an unlabeled component (using variance to identify natural clusters).
  2. Informative Feature Selection: SSIF prioritizes features based on their "peakedness." Using Kullback-Leibler (KL) divergence, the model measures how much a feature's split distribution deviates from a uniform one. Features with clear, high-quality split points are prioritized during tree construction.
  3. Label-Aware Scoring: In standard IF, the anomaly score is derived solely from path length. SSIF adjusts this score based on leaf node contents: if a test instance lands in a leaf with a known anomaly, its path is "shortened" (increasing the score); if it lands with a known normal instance, the path is "lengthened."
Illustration of SSIF's steps: (a) 2D toy dataset, (b) computing split distributions for features, (c) feature selection based on informativeness, and (d) sampling the final split.

Experimental Results

The authors evaluated SSIF on a robust suite of 20 datasets, including six real-world wind turbine datasets and 14 standard benchmarks like Shuttle and Spambase.

SSIF emerged as the top-performing model across all evaluations. It achieved the best average AUROC and the lowest average ranking across all datasets and label percentages. Notably, the performance gap between SSIF and its competitors—including state-of-the-art neural networks like DevNet and REPEN—was largest when labels were most limited (e.g., 5-15% labeling). With just 15% labeled data, SSIF's average AUROC surpassed the nearest runners-up by more than 10%.

Discussion and Conclusion

The primary strength of SSIF lies in its ability to blend supervised guidance with unsupervised exploration. By maintaining the unlabeled variance component in its split criteria, it retains the ability to find novel, unseen types of anomalies while using known labels to sharpen its focus.

While the probabilistic nature of SSIF introduces more computational overhead than the "blind" random splitting of a standard IF, its label efficiency makes it highly practical for real-world scenarios where labels are expensive to obtain. Future research may explore extending this framework to handle complex data types like time-series or integrating it into active learning systems.

Summary updated

BibTeX
@inproceedings{stradiotti2024semi,
  author = {Luca Stradiotti and Lorenzo Perini and Jesse Davis},
  title = {{Semi-Supervised Isolation Forest for Anomaly Detection}},
  booktitle = {SDM},
  year = {2024},
  doi = {10.1137/1.9781611978032.77},
}
Figure