Graph Contrastive Learning via Interventional View Generation

Zengyi Wo, Minglai Shao, Wenjun Wang, Xuan Guo, Lu Lin

Introduction: The Homophily Assumption and its Failures

Most Graph Neural Networks (GNNs) and Graph Contrastive Learning (GCL) frameworks operate under the homophily assumption: the principle that connected nodes are likely to share similar features or labels. While effective for citation networks, this assumption fails in heterophilic graphs. In domains like fraud detection (fraudsters connecting to victims) or dating apps (connections between different genders), connected nodes are intentionally dissimilar.

Standard GCL methods applied to heterophilic graphs often suffer from "over-smoothing," where indiscriminate information aggregation makes different classes indistinguishable in the embedding space. This paper introduces GCL-IVG, a framework designed to disentangle homophilic and heterophilic structures through causal intervention, learning superior representations without requiring labels.

Methodology: GCL-IVG

The GCL-IVG framework addresses the heterophily challenge through two primary components:

1. Interventional View Generation

Instead of relying on stochastic augmentations like random edge dropping, GCL-IVG employs a causal inference approach. It poses a counterfactual question: "Would this edge exist if the homophily property of this node pair were different?" - Treatment Estimation: The model estimates the likelihood of homophily (the "treatment") based on node context. - View Generation: It generates two distinct interventional views: a homophilic view focusing on similar neighbors and a heterophilic view focusing on dissimilar ones. This process uses a learned MLP-based generator optimized via bi-level optimization.

2. Dual Encoder Contrastive Learning

Recognizing that homophilic and heterophilic views contain different frequency signals, the framework processes them using specialized branches:

  • Low-Pass Filter: Applied to the homophilic view to encourage smoothness among similar neighbors.
  • High-Pass Filter: Applied to the heterophilic view to capture sharp changes and distinctiveness between dissimilar neighbors.

The final node representation is a concatenation of embeddings from both branches, optimized using the InfoNCE contrastive loss.

Experimental Evaluation

The model was evaluated across nine benchmark datasets, including heterophilic graphs (Texas, Wisconsin, Actor) and homophilic citation networks (Cora, Citeseer).

Key Results and Clustering Quality

GCL-IVG demonstrates significant performance gains, particularly on heterophilic datasets. For instance, on the Texas dataset, it achieved 90.09% accuracy, substantially outperforming vanilla GCL methods like GRACE (63.54%).

t-SNE visualizations and cluster similarity metrics demonstrating the superior discriminative power of GCL-IVG compared to baseline methods.

As shown in the visualizations above, GCL-IVG (represented in panel d) produces significantly tighter and more distinct clusters compared to baseline methods (panels a-c). Quantitative analysis using the Silhouette coefficient (panel e) confirms that the interventional approach effectively maximizes intra-cluster similarity while maintaining appropriate inter-cluster separation.

Discussion and Limitations

A key insight of this work is that separating homophilic and heterophilic signals is a requirement for discriminative learning in complex graphs. By using causality as a guide and integrating spectral signal processing, GCL-IVG avoids the "indistinguishable trap" of vanilla GCL.

However, challenges remain:

  • Scalability: Computing similarity for counterfactual estimation can reach $O(|V|^2)$ complexity, requiring downsampling for massive graphs.
  • Feature Dependency: The quality of interventional views is sensitive to the quality of initial node features and structural encodings.

Future work may explore more complex GNN backbones to further enhance the representation power of the dual-encoder architecture.

Summary updated

BibTeX
@inproceedings{wo2024graph,
  author = {Zengyi Wo and Minglai Shao and Wenjun Wang and Xuan Guo and Lu Lin},
  title = {{Graph Contrastive Learning via Interventional View Generation}},
  booktitle = {The Web Conference},
  year = {2024},
  doi = {10.1145/3589334.3645687},
}
Figure