On Using Classification Datasets to Evaluate Graph Outlier Detection: Peculiar Observations and New Insights

Lingxiao Zhao, Leman AkogluBig Data 2020 · DOI

Abstract

A common practice in outlier mining is to repurpose binary classification datasets by downsampling one class to serve as outliers. This study uncovers a critical flaw in this methodology for Graph-Level Outlier Detection (GLOD): the "performance flip." We observe that ROC-AUC performance varies drastically—often flipping from high to worse-than-random—depending solely on which class is designated as the outlier. This phenomenon is driven by disparity in within-class densities and overlapping support in the embedding space, both of which are amplified by graph propagation.

Introduction: The Evaluation Crisis in GLOD

Outlier detection is notoriously difficult to evaluate due to the scarcity of ground-truth labels for anomalies. To circumvent this, researchers typically repurpose binary classification datasets (e.g., "Enzymes" vs. "Non-enzymes"). By keeping one class as "inliers" and downsampling the other to a small fraction, they create a synthetic outlier detection task.

However, this study identifies a previously unnoticed issue: the ROC-AUC performance of GLOD models "flips" significantly depending on which class is downsampled. A model might achieve an 0.82 AUC when Class A is the outlier, but a dismal 0.18 AUC when Class B is the outlier. Since these scores often sum to approximately 1.0, it suggests models possess an inherent bias toward perceiving one specific class as "more outlying," regardless of its actual frequency in the test set.

Methodology

The researchers investigated this phenomenon across two categories of GLOD models:

  1. Two-Stage Models: These utilize unsupervised embeddings or kernels—specifically the Weisfeiler-Leman (WL) subtree kernel and the Propagation Kernel (PK)—followed by standard detectors like Local Outlier Factor (LOF) or One-Class SVM (OCSVM).
  2. End-to-End Deep Models: The authors developed OCGIN (One-Class Graph Isomorphism Network), adapting the GIN architecture to a one-class classification objective (Deep SVDD).

To quantify the drivers of the performance flip, they introduced NN-Radius (distance to the $k$-th nearest neighbor) to measure local density and NN-Disagreement% to measure distribution overlap between classes.

The Sparsification Effect and Density Disparity

A key insight is that propagation-based methods (like GNNs and WL kernels) naturally make graphs appear more dissimilar as the number of iterations or layers increases. If one class is semantically more diverse than the other, it "sparsifies" much faster in the embedding space.

Similarity matrix for class 0 at iteration 1, showing initial high similarity.

As shown in the similarity matrices, the representation of a class becomes increasingly sparse with more iterations. This leads to a "Density Disparity."

Similarity matrix for class 0 at iteration 11, showing significant sparsification compared to earlier iterations.

Outlier detectors are designed to identify points in low-density regions. Consequently, they will consistently flag the more diverse/sparse class as the outlier, even if it is the majority "inlier" group. This creates "Easy" vs. "Hard" tasks:

  • Easy Task: Downsampling the naturally sparse class. The inliers form a dense cluster, and outliers are scattered far away.
  • Hard Task: Downsampling the naturally dense class. The inliers are sparse, while the outliers form a tight cluster that the model mistakes for "normal" data.

Key Results and Observations

The study utilized 10 real-world binary graph classification datasets, categorized into "X & Non-X" (e.g., PROTEINS, AIDS) and "X & Y" (e.g., IMDB-BINARY).

  • Prevalence: In "X & Non-X" datasets, 67.3% of cases showed a performance gap $\ge 0.2$.
  • Worse than Random: In many "Hard" tasks, ROC-AUC dropped well below 0.5, meaning the model consistently ranked true inliers as more suspicious than actual outliers.
  • Invariance to Rate: The performance flip is largely unaffected by the downsampling rate (e.g., 5% vs 40%), indicating the bias is rooted in the internal class representations.
  • Model Robustness: While OCGIN was more robust on "X & Y" datasets, it still suffered from the flip on "X & Non-X" datasets, suggesting the inductive bias of GNNs is difficult to overcome.

Conclusion

The "performance flip" highlights a sobering reality: current GLOD evaluation protocols are unreliable. Without knowing which class is "naturally" sparser, researchers cannot determine if a model's high performance is due to genuine detection capability or simple class-level bias. Future work must focus on generating non-overlapping, clustered representations without supervision and developing evaluation protocols that account for these inherent biases.

Summary updated

BibTeX
@article{zhao2020using,
  author = {Lingxiao Zhao and Leman Akoglu},
  title = {{On Using Classification Datasets to Evaluate Graph Outlier Detection: Peculiar Observations and New Insights}},
  journal = {Big Data},
  year = {2020},
  doi = {10.1089/big.2021.0069},
}
Figure