Introduction
Graph-level anomaly detection (GLAD) is a critical task in various domains, ranging from identifying toxic molecules in biochemical databases to detecting fraudulent transaction patterns in financial networks. Unlike node-level detection, GLAD focuses on identifying entire graphs that deviate from the norm. However, existing methodologies often struggle with two primary challenges: feature imbalance and subtle structural differences. Many models apply a "one-size-fits-all" approach, failing to distinguish whether an anomaly is driven by specific node attributes or the global topology of the graph. Furthermore, standard reconstruction-based methods often fail to capture outliers that are structurally similar to normal data because they lack an explicit mechanism to separate these representations in the embedding space.
To address these gaps, this paper introduces MssGAD (Multi-representations Space Separation based Graph-level Anomaly-aware Detection), a framework designed to dynamically balance feature importance and explicitly partition the representation space between normal and abnormal samples.
The MssGAD Framework
The MssGAD architecture is built upon a Graph Convolutional Network (GCN) backbone, utilizing max-pooling to generate global graph representations. Its core innovation lies in two distinct modules: the Anomaly-aware Module and the Multi-representations Space Separation module.
Anomaly-aware Module
Recognizing that the "signal" for an anomaly can reside at different scales depending on the dataset, the Anomaly-aware Module moves away from fixed feature weighting. It introduces two dynamic factors, $\alpha$ and $\beta$, to balance node-level and graph-level representations. The model calculates the Euclidean distance between normal and abnormal samples within the training set to determine which feature level is more discriminative for a specific context. If node-level variances are the primary indicator of an anomaly, the model increases the weight of those features; conversely, if the global structure is the differentiator, the focus shifts to the graph-level representation.
Multi-representations Space Separation
While many anomaly detection models are "one-class" (learning only the distribution of normal data), MssGAD leverages a small subset of known abnormal data to improve boundary definition. The model selects "anchor graphs"—representative samples of both normal and abnormal classes. During the training phase, a custom loss function is employed to pull normal graphs toward the "normal anchor" space while simultaneously pushing abnormal graphs toward the "abnormal anchor" space. This creates a wide, clear margin between the two categories in the embedding space, making the decision boundary significantly more robust.
Experimental Evaluation
The researchers evaluated MssGAD against five baseline models, including traditional methods like OCSVM and modern deep learning approaches such as OCGTL and GOOD-D. The evaluation spanned ten public datasets primarily focused on bioinformatics and chemistry:
- Chemical/Small-scale: AIDS, DHFR, MUTAG, PTC-FM.
- Bio-activity/Large-scale: HSE, MMP, P53, PPAR.
- Protein Structures: ENZYMES, PROTEINS.
These datasets present a rigorous test for adaptability, with average node counts ranging from approximately 14 to 42 and varying edge densities.
Key Results
MssGAD demonstrated state-of-the-art performance, achieving the highest Mean AUC on 6 out of the 10 datasets. Notably, on the AIDS dataset, the model achieved a near-perfect 99.61% AUC.
Beyond raw accuracy, the model exhibited remarkable stability. In many GLAD tasks, performance can fluctuate depending on which class is designated as the anomaly. MssGAD maintained consistent results regardless of class labeling, suggesting it captures the underlying data distribution more effectively than its competitors. Ablation studies further confirmed that both the anomaly-aware weighting and the anchor-based separation are essential; removing either component resulted in a measurable performance decline across all test cases.
Discussion and Future Work
While MssGAD sets a new benchmark for graph-level detection, the research identifies specific areas for improvement. On larger, more complex datasets like HSE or MMP, the model's performance was occasionally surpassed by baselines. This is attributed to "anchor selection sensitivity"—as the complexity of a dataset grows, randomly selecting a few anchor graphs becomes less likely to represent the full diversity of the data distribution. Additionally, the calculation of multiple Euclidean distances for the anomaly-aware module introduces some computational overhead during training.
Future research will focus on developing more sophisticated, non-random methods for selecting or evolving anchor graphs to better capture the nuances of high-complexity datasets. By refining how the model identifies representative anchors, the framework can potentially extend its high-accuracy performance to even larger-scale graph databases.
Summary updated