X-PACS: eXPlaining Anomalies by Characterizing Subspaces

Meghanath Macha, Leman Akoglu

Abstract

Anomaly detection has numerous applications and has been studied vastly. We consider a complementary problem that has a much sparser literature: anomaly description. Interpretation of anomalies is crucial for practitioners for sense-making, troubleshooting, and planning actions. To this end, we present a new approach called x-PACS (for eXplaining Patterns of Anomalies with Characterizing Subspaces), which "reverse-engineers" the known anomalies by identifying (1) the groups (or patterns) that they form, and (2) the characterizing subspace and feature rules that separate each anomalous pattern from normal instances. Explaining anomalies in groups not only saves analyst time and gives insight into various types of anomalies, but also draws attention to potentially critical, repeating anomalies. In developing x-PACS, we first construct a desiderata for the anomaly description problem. From a descriptive data mining perspective, our method exhibits five desired properties in our desiderata. Namely, it can unearth anomalous patterns (i) of multiple different types, (ii) hidden in arbitrary subspaces of a high dimensional space, (iii) interpretable by the analysts, (iv) different from normal patterns of the data, and finally (v) succinct, providing the shortest data description. Furthermore, x-PACS is highly parallelizable and scales linearly in terms of data size. No existing work on anomaly description satisfies all of these properties simultaneously. While not our primary goal, the anomalous patterns we find serve as interpretable "signatures" and can be used for detection. We show the effectiveness of x-PACS in explanation as well as detection on real-world datasets as compared to state-of-the-art.

Introduction

In fields like fraud detection, cybersecurity, and medicine, identifying an anomaly is only half the battle. A human analyst needs to understand the "signature" of the anomaly to troubleshoot the system or plan a response. While most anomaly detection algorithms tell you that a data point is strange, they rarely explain why.

The authors identify a major gap in current research: most "anomaly description" methods treat anomalies as isolated, scattered points. However, in the real world, anomalies often form patterns—such as a specific coordinated fraud scheme or a recurring sensor failure. Existing tools often struggle with high-dimensional data (the "curse of dimensionality"), produce "black-box" explanations that humans can't interpret, or fail to provide a succinct summary of the data. x-PACS (eXplaining Patterns of Anomalies with Characterizing Subspaces) fills this gap by identifying the specific groups anomalies form and the succinct, low-dimensional rules that define them.

The x-PACS Framework

The x-PACS framework consists of three main stages designed to satisfy a "desiderata" of five properties: identifying different types, handling high-dimensionality, interpretability, discriminative power, and succinctness.

  1. Subspace Clustering: The algorithm uses a bottom-up, Apriori-style search to find "hyper-rectangles" (boxes) in various feature subspaces that contain a high density of anomalies and a low density of normal points.
  2. Refinement via Optimization: Because boxes are rigid, x-PACS refines these into axis-aligned hyper-ellipsoids. This is done using a convex optimization formulation (specifically a Semi-Definite Program or SDP). Axis-alignment is a critical choice here: it ensures the resulting rules are simple ranges on original features (e.g., "Feature A is between 0.5 and 0.8"), which are easy for humans to grasp.
  3. Summarization (MDL): To avoid "over-explaining" or providing redundant rules, the authors use the Minimum Description Length (MDL) principle. They treat the problem as a non-monotone submodular function maximization, solved via a "Random-Greedy" algorithm. This mathematically identifies the smallest set of "packs" that collectively explain the most anomalies with the fewest "bits" of information.

Experimental Evaluation

The authors evaluated x-PACS on a mix of synthetic-style "case study" datasets and standard benchmarks:

  • Image Datasets: Headshot images where anomalies were defined by specific traits like wearing sunglasses, beards, or white t-shirts.
  • Digit Datasets: Hand-drawn digits (from the UCI repository) where one digit (e.g., '7') is treated as an anomaly against another (e.g., '0').
  • UCI Benchmarks: Standard datasets including Breast Cancer (BrCancer), Arrhythmia, Wine, and Yeast.
Anomalous patterns (1-9) vs. a typical normal image (10) in the headshot dataset.

Results and Discussion

Succinctness and Interpretability

x-PACS achieved massive data compression, reducing the "cost" of describing anomalies by 88% to 99% across various datasets compared to describing them individually. By using MDL, the algorithm naturally balances the "completeness" of an explanation against its "complexity." It won't create a new rule for a single outlier if it's "cheaper" (in terms of bits) to just leave it unexplained.

Description cost reduction as a function of the number of anomaly patterns identified.

When compared to Decision Trees and other rule learners (like Ripper or RuleFit), x-PACS produced "purer" groups (fewer normal points mixed in) and tighter, more specific feature rules. While rotated ellipsoids might fit data better, they are impossible to explain in simple text. Forcing axis-alignment is a deliberate trade-off favoring the human analyst.

Detection and Scalability

Although designed for description, the rules found by x-PACS were highly effective at detecting future anomalies, often outperforming standard baselines and rivaling state-of-the-art "black-box" detectors like SVMs. Furthermore, the algorithm scales linearly with the number of data points, making it practical for large-scale industrial datasets.

Conclusion and Future Work

The core insight of x-PACS is that anomalies often "hunt in packs," sharing a common source or strategy. By focusing on characterizing subspaces, x-PACS ignores noise to find the dimensions that truly matter.

One limitation is that while the algorithm is linear relative to the number of data points, it is exponential relative to the dimensionality of the largest characterizing subspace found. Additionally, the current implementation is optimized for continuous data. Future work could involve tighter integration for mixed-type datasets and categorical features.

Summary updated

BibTeX
@inproceedings{macha2018x,
  author = {Meghanath Macha and Leman Akoglu},
  title = {{X-PACS: eXPlaining Anomalies by Characterizing Subspaces}},
  booktitle = {Data Min. Knowl. Discov},
  year = {2018},
  url = {https://openreview.net/forum?id=55BkyKb_ZNv},
}
Figure