AC2L-GAD: Active Counterfactual Contrastive Learning for Graph Anomaly Detection
Kamal Berahmand, Saman Forouzandeh, Mehrnoush Mohammadi, Parham Moradi, Mahdi Jalili
TL;DR
AC$^2$L-GAD tackles label scarcity and extreme class imbalance in graph anomaly detection by fusing information-theoretic active node selection with principled counterfactual augmentation in a graph contrastive learning framework. It generates anomaly-preserving positive counterfactuals and normalized hard negative counterfactuals for a strategically chosen subset of nodes, reducing computational overhead by about 65% relative to full-graph counterfactual generation while preserving detection quality. Across nine benchmarks, including real-world GADBench datasets, AC$^2$L-GAD achieves competitive or superior AUC/F1 against eighteen baselines, with the largest gains on datasets with complex attribute-structure interactions. The approach scales to large graphs and demonstrates robustness to feature and structural perturbations, offering practical utility for real-world graph anomaly detection tasks.
Abstract
Graph anomaly detection aims to identify abnormal patterns in networks, but faces significant challenges from label scarcity and extreme class imbalance. While graph contrastive learning offers a promising unsupervised solution, existing methods suffer from two critical limitations: random augmentations break semantic consistency in positive pairs, while naive negative sampling produces trivial, uninformative contrasts. We propose AC2L-GAD, an Active Counterfactual Contrastive Learning framework that addresses both limitations through principled counterfactual reasoning. By combining information-theoretic active selection with counterfactual generation, our approach identifies structurally complex nodes and generates anomaly-preserving positive augmentations alongside normal negative counterparts that provide hard contrasts, while restricting expensive counterfactual generation to a strategically selected subset. This design reduces computational overhead by approximately 65% compared to full-graph counterfactual generation while maintaining detection quality. Experiments on nine benchmark datasets, including real-world financial transaction graphs from GADBench, show that AC2L-GAD achieves competitive or superior performance compared to state-of-the-art baselines, with notable gains in datasets where anomalies exhibit complex attribute-structure interactions.
