Incorporating Feedback into Tree-based Anomaly Detection

Shubhomoy Das, Weng-Keen Wong, Alan Fern, Thomas G. Dietterich, Md Amran SiddiquiarXiv 2017

Abstract

Anomaly detectors are often used to produce a ranked list of statistical anomalies, which are examined by human analysts in order to extract the actual anomalies of interest. Unfortunately, in real-world applications, this process can be exceedingly difficult for the analyst since a large fraction of high-ranking anomalies are false positives and not interesting from the application perspective. In this paper, we aim to make the analyst's job easier by allowing for analyst feedback during the investigation process. Ideally, the feedback influences the ranking of the anomaly detector in a way that reduces the number of false positives that must be examined before discovering the anomalies of interest. In particular, we introduce a novel technique for incorporating simple binary feedback into tree-based anomaly detectors. We focus on the Isolation Forest algorithm as a representative tree-based anomaly detector, and show that we can significantly improve its performance by incorporating feedback, when compared with the baseline algorithm that does not incorporate feedback. Our technique is simple and scales well as the size of the data increases, which makes it suitable for interactive discovery of anomalies in large datasets.

Introduction: The Semantic Mismatch Problem

In unsupervised anomaly detection, an "outlier" does not always equate to an "anomaly of interest." Standard algorithms like Isolation Forest (IF) excel at identifying mathematically rare data points—statistical noise—that may hold no value for a human analyst. This "semantic mismatch" leads to high false-positive rates, forcing analysts to spend significant time sifting through irrelevant results.

To address this, we need an interactive loop where simple binary feedback ("true anomaly" vs. "noise") can update the model in real-time. This paper introduces IF-AAD, a method that incorporates human feedback to re-weight the nodes of an Isolation Forest, effectively teaching the algorithm to prioritize specific types of anomalies.

Methods: Isolation Forest as a Linear Model

The core innovation of IF-AAD lies in re-imagining the Isolation Forest as a linear model. In a standard IF, points are scored based on average path length. IF-AAD instead treats every node in every tree as a binary feature. If a data point passes through a node, that feature is assigned a value of "1"; otherwise, it is "0." This transformation turns the forest into a high-dimensional sparse feature vector.

Isolation Tree construction schematic showing random feature splits and leaf nodes.

The algorithm then applies the Active Anomaly Discovery (AAD) framework to this feature space. Rather than using the default uniform weights, an optimization process learns new weights ($w$) for each node. To ensure the model remains grounded in the data's underlying structure, a regularization term prevents weights from drifting too far from the original Isolation Forest logic. Furthermore, the use of a quantile-based "hinge loss" approach makes the feedback loop computationally efficient enough for interactive use.

Experimental Setup and Results

The researchers evaluated IF-AAD on a mix of synthetic data and eight real-world benchmark datasets from the UCI repository, covering domains such as medicine (Mammography, ANN-Thyroid), physical environments (Abalone, Forest Cover), and security (KDD-Cup-99, Shuttle). To simulate real-world "needle in a haystack" scenarios, anomaly classes were often down-sampled to approximately 2%.

IF-AAD consistently outperformed the standard Isolation Forest and other state-of-the-art active learning baselines like LODA-AAD. On the ANN-Thyroid dataset, for instance, the algorithm detected nearly twice as many true anomalies as the baseline within the first 60 queries.

Anomaly score contours generated by a single isolation tree on a synthetic dataset.

Key insights from the results include:

  • Granular Control: Treating individual nodes as ensemble members allows for finer adjustments than re-weighting entire trees.
  • Importance of Internal Nodes: Assigning weights to internal nodes, rather than just leaves, provides a measurable performance boost by capturing broader regions of the feature space.
  • Efficiency: By switching to quantile-based constraints, the authors reduced the computational overhead of incorporating feedback, enabling near real-time updates. Visualizations confirmed that the algorithm successfully learns to ignore regions previously flagged as false positives.

Conclusion and Future Work

IF-AAD provides a scalable and effective way to bridge the gap between statistical outliers and human-defined anomalies. While the current implementation uses a static tree structure—updating weights rather than growing new trees—it demonstrates significant gains in discovery efficiency. Future work may involve extending this node-weighting framework to other tree-based detectors like HS-Trees or RS-Forest, and further optimizing performance for massive, real-time streaming datasets.

Summary updated

BibTeX
@misc{das2017incorporating,
  author = {Shubhomoy Das and Weng-Keen Wong and Alan Fern and Thomas G. Dietterich and Md Amran Siddiqui},
  title = {{Incorporating Feedback into Tree-based Anomaly Detection}},
  year = {2017},
  eprint = {1708.09441},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.09441},
}
Figure