GNN-Transformer Cooperative Architecture for Trustworthy Graph Contrastive Learning

Jianqing Liang, Xinkai Wei, Min Chen, Zhiqiang Wang, Jiye Liang

TL;DR

GTCA is a novel graph contrastive learning framework that ditches risky random data augmentations in favor of a "cooperative" dual-encoder architecture. By combining the local-focus of GNNs with the global-reach of Transformers and selecting positive pairs only where multiple views agree, it achieves state-of-the-art performance while ensuring the learned representations remain semantically "trustworthy."

What Problem Does This Paper Address?

Graph Contrastive Learning (GCL) typically relies on creating two "views" of a graph by randomly dropping nodes or edges and then training a model to recognize that these views represent the same underlying data. However, the authors point out a major flaw: unlike images, where a cropped or recolored photo of a red panda is still clearly a red panda, graphs are fragile. Removing a single atom from a molecule or an edge from a social network can fundamentally change its identity or "semantics."

Augmentations on images vs. graphs

Furthermore, standard Graph Neural Networks (GNNs) often suffer from "over-smoothing" (where node features become indistinguishable) and "over-squashing" (where information fails to propagate across long distances). This prevents them from capturing the complex, global structures present in many real-world graphs.

Methods

The authors propose GTCA (GNN-Transformer Cooperative Architecture), which introduces three key innovations:

  1. Augmentation-Free Dual Encoders: Instead of perturbing the graph, GTCA uses two different types of encoders to generate views: a GCN (Graph Convolutional Network) to capture local neighborhood structures and a NodeFormer (a linear-complexity Transformer) to capture long-range, global dependencies.
  2. Trustworthy Positive Pair Selection: To find "positive" pairs (nodes that should be similar in embedding space), the model looks for the intersection of three sets:
  3. The $k$-nearest neighbors in the GNN's embedding space.
  4. The $k$-nearest neighbors in the Transformer's embedding space.
  5. The $k$-nearest neighbors based on actual graph topology (hop distance). By requiring all three views to agree, the model avoids the "noise" and semantic drift common in random augmentation.

  6. Multi-Positive Contrastive Loss: While traditional methods often use a single positive pair per node, GTCA employs a modified loss function that pulls an anchor node toward its entire set of "trustworthy" neighbors across both encoder views simultaneously.

The GTCA Architecture

Datasets

The model was evaluated on five standard benchmark datasets for node classification:

  • Cora: A citation network.
  • Wiki-CS: A reference network based on Wikipedia.
  • Coauthor-CS: A co-authorship network.
  • Amazon-Computers & Amazon-Photo: Product co-purchase networks.

Key Insights and Ideas

  • The Power of Intersection: One of the most striking findings is that using a single encoder to find neighbors is highly unreliable. As shown in Figure 4, the "correct ratio" of positive pairs for a single encoder is often below 40%. By taking the intersection of GNN, Transformer, and topological views, that ratio jumps to over 80%.
  • Local + Global = Better: GNNs and Transformers are complementary. GNNs excel at immediate relationships, while Transformers can "see" across the entire graph. The ablation studies confirmed that removing either encoder type leads to a significant drop in accuracy.
  • Semantic Stability: By avoiding random edge/node dropping, GTCA ensures that the "ground truth" of the graph isn't accidentally destroyed during the learning process, leading to more robust downstream performance.
Correct ratio of positive pairs

Key Results

GTCA demonstrated superior performance across the board, ranking 1st on three datasets (Cora, Coauthor-CS, Amazon-Photo) and 2nd on the remaining two.

  • Accuracy: On the Cora dataset, GTCA achieved 82.5% accuracy, outperforming popular methods like GRACE (79.6%) and GCA (79.0%).
  • Visualization: PCA visualizations show that GTCA produces much tighter, more distinct clusters for different node categories compared to other leading self-supervised methods like DGI or NCLA.
Embedding Visualization

Limitations and Future Work

The primary limitation identified by the authors is computational complexity. While they use a linear Transformer, the overall architecture—especially the $k$-nearest neighbor calculations and the dual-encoder setup—poses a significant burden when scaling to massive, billion-node graphs.

The authors suggest that future research should focus on more efficient implementation techniques, such as parallel processing and distributed systems, to make this "trustworthy" approach viable for industrial-scale data.

Summary updated

BibTeX
@inproceedings{liang2025gnn,
  author = {Jianqing Liang and Xinkai Wei and Min Chen and Zhiqiang Wang and Jiye Liang},
  title = {{GNN-Transformer Cooperative Architecture for Trustworthy Graph Contrastive Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i18.34054},
}
Figure