PyTorch Implementation for "Beyond Homophily: Graph Contrastive Learning with Macro-Micro Message Passing ".
We propose M3P-GCL to address the limitations of homophily assumption in current GCL frameworks by introducing an Aligned Priority-Supporting View Encoding (APS-VE) strategy for structural and attribute views at the macro-level, and an Adaptive Self-Propagation (ASP) strategy for self-loops at the micro-level. These innovations diversify the message passing mechanism, enabling M3P-GCL to improve performance in homophilous and non-homophilous graphs.
.\model.py
: M3P-GCL model implementation..\train.py
: Model training..\run.sh
: Reproduction script for experimental results across 7 datasets.
numpy==1.26.2
scikit_learn==1.4.0
torch==2.0.1
torch-geometric==2.5.3
This model is developed based on JialuChenChina/ASP: The code of "Attribute and Structure preserving Graph Contrastive Learning" (AAAI 2023 oral).