Reconstruction Enhanced Multi-View Contrastive Learning for Anomaly Detection on Attributed Networks

Jiaqiang Zhang, Senzhang Wang, Songcan Chen

Introduction

Attributed networks—graphs where nodes are enriched with feature vectors—are fundamental to representing complex systems like social networks, citation indices, and biological pathways. Detecting anomalies within these structures is critical for identifying fraudulent behavior, misinformation, or system failures. However, anomalies in these contexts are multifaceted: they may be nodes with unusual connections, nodes with attributes that contradict their neighborhood, or nodes that deviate from global network patterns.

This paper introduces Sub-CR (Subgraph-based Contrastive-Reconstruction), a self-supervised framework designed to overcome the limitations of traditional Graph Neural Networks (GNNs) in anomaly detection tasks.

The Challenges of Graph Anomaly Detection

Existing GNN-based approaches often struggle with three primary issues:

  1. The "Low-Pass Filter" Effect: GNNs are designed to smooth signals across neighboring nodes to improve classification. While effective for standard tasks, this smoothing often "washes away" the sharp, high-frequency signals that characterize anomalous behavior.
  2. Local vs. Global Blindness: Many models focus exclusively on immediate local neighborhoods or the broader global structure, failing to integrate the two perspectives effectively.
  3. Feature-Structure Mismatch: Capturing the subtle tension between a node's structural position and its actual attribute data remains a significant hurdle.

The Sub-CR Framework

Sub-CR addresses these challenges by combining two complementary self-supervised learning modules: Multi-View Contrastive Learning and Masked Attribute Reconstruction.

1. Multi-View Contrastive Learning

To capture both local and global structural information without the risk of over-smoothing, Sub-CR decouples the network into two distinct views:

  • Local View: Generated through subgraph sampling to capture immediate neighborhood dynamics.
  • Global View: Generated using Graph Diffusion or Personalized PageRank to capture long-range dependencies.

The model employs Intra-view contrastive learning to ensure a node's representation is consistent with its own subgraph, and Inter-view contrastive learning to ensure that the discriminative scores of a node remain consistent across both local and global perspectives.

2. Masked Attribute Reconstruction

Inspired by the success of masked autoencoders in Computer Vision and NLP (such as BERT), Sub-CR utilizes a reconstruction module to enforce the "attribute consistency principle." The model masks a target node's attributes and attempts to reconstruct them using only the representations of its neighbors. A high reconstruction error indicates that the node’s attributes do not align with its structural context, marking it as a potential anomaly.

The final anomaly score is calculated as a weighted combination of the contrastive agreement score and the reconstruction error.

Experimental Results

The Sub-CR framework was evaluated on five benchmark datasets: BlogCatalog, Flickr, Cora, CiteSeer, and Pubmed. Since real-world ground truth for anomalies is often scarce, the researchers utilized standard protocols to inject synthetic anomalies (perturbing both attributes and structures).

Sub-CR consistently outperformed seven state-of-the-art baselines, including CoLA and ANEMONE, across all datasets in terms of AUC (Area Under the Curve):

  • Flickr: Achieved an AUC of 0.7975, a 3.38% improvement over the previous best baseline.
  • Pubmed: Reached a peak AUC of 0.9709, outperforming the previous state-of-the-art by 1.61%.

Ablation Studies further validated the hybrid approach. Removing either the reconstruction module or the contrastive module led to performance drops of up to 17%, demonstrating that both structural contrast and attribute reconstruction are essential for robust detection.

Discussion and Future Work

Sub-CR demonstrates that decoupling local and global information is key to preserving anomalous signals that deeper GNNs might otherwise erase. By turning the "homophily" assumption—that similar nodes tend to cluster—into a mathematical tool for reconstruction, the model effectively identifies nodes that violate network norms.

Despite its success, the authors note several areas for future research:

  • Hyperparameter Automation: The model currently relies on a manual balancing parameter ($\gamma$) to weigh reconstruction against contrastive scores, which varies by dataset.
  • Real-World Validation: Future work should focus on testing the model against large-scale, organic anomalies rather than synthetic injections.
  • Scalability: The computational cost of generating global views via graph diffusion remains a challenge for networks with millions of nodes.

Summary updated

BibTeX
@inproceedings{zhang2022reconstruction,
  author = {Jiaqiang Zhang and Senzhang Wang and Songcan Chen},
  title = {{Reconstruction Enhanced Multi-View Contrastive Learning for Anomaly Detection on Attributed Networks}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.24963/ijcai.2022/330},
}
Figure