Learning Robust Heterogeneous Graph Representations via Contrastive-Reconstruction under Sparse Semantics

Di Lin, Wanjing Ren, Xuanbin Li, Rui ZhangarXiv 2025 · DOI · arXiv

TL;DR

HetCRF is a new dual-channel framework that masters heterogeneous graph representations by combining the strengths of generative reconstruction (local focus) and contrastive learning (global focus). By introducing a two-stage aggregation strategy and novel positive sample augmentation, it overcomes the common pitfalls of missing data and "gradient dilution," setting new state-of-the-art benchmarks for node classification and clustering.

What Problem Does This Paper Address?

Heterogeneous Information Networks (HINs)—graphs with multiple types of nodes and edges, like academic or social networks—are notoriously difficult to model. While Self-Supervised Learning (SSL) has shown promise, two main paradigms currently dominate, each with a fatal flaw:

  1. Generative Learning (Masked Autoencoders): Excellent at capturing local neighborhood details but fails to grasp the "big picture" or global structure.
  2. Contrastive Learning: Great at capturing global patterns but relies heavily on high-quality data to create "views." When data is "semantically sparse" (e.g., nodes are missing features), these models fall apart.

Furthermore, existing hybrid models that try to combine these two often force a single encoder to do two different jobs simultaneously, leading to a "semantic mismatch." They also suffer from gradient imbalance, where the signal from a single positive sample pair is drowned out by the sheer volume of negative samples.

Methods

The authors propose HetCRF (Heterogeneous Contrastive-Reconstruction Framework) to bridge these gaps:

  • Dual-Channel Architecture: The model features a shared encoder but splits into two specialized channels. The Generative Channel focuses on reconstructing masked features and meta-paths. The Contrastive Channel uses a secondary Graph Convolutional Network (GCN) layer to "specialize" the shared embeddings for global structural tasks.
  • Embedding-Based View Construction: Instead of augmenting raw, potentially missing features, HetCRF creates contrastive views based on the encoder's output embeddings. This makes the model much more robust when input data is incomplete.
  • Positive Sample Augmentation (PSA): To solve the gradient imbalance problem, the authors mathematically prove that a single positive pair is often "diluted" by negative samples. They introduce two strategies to expand the positive sample set:
  • Meta-path Connection Count: Identifying nodes with high structural connectivity.
  • Clustering-based Augmentation: Using K-means to find "key deviated nodes" within clusters to provide a stronger learning signal.

Datasets

The model was evaluated on four real-world HIN datasets:

  • DBLP & ACM: Classified as "semantically rich" scenarios.
  • Aminer & Freebase: Classified as "semantically sparse" scenarios (specifically modified to simulate missing node features).

Key Insights and Ideas

  • The "Secondary Aggregation" Fix: The authors realized that a shared encoder is a bottleneck. By adding a lightweight GCN for the contrastive channel, they allow the model to adapt its internal "language" to meet the distinct needs of reconstruction vs. contrast.
  • Solving Gradient Dilution: One of the most interesting theoretical contributions is the proof (Theorem 1) that the gradient contribution of a single positive sample equals the sum of all negative samples. In large datasets, this means the positive signal is too weak. Augmenting the positive set re-balances the "tug-of-war" during training.
  • Robustness via Embeddings: By performing data augmentation on learned representations rather than raw pixels or features, the model maintains "semantic invariance" even when the underlying graph is messy or incomplete.

Key Results

HetCRF consistently outperformed ten representative baselines (including HeCo, HGMAE, and GraphMAE).

  • Sparse Data Superiority: On the feature-missing Aminer and Freebase datasets, HetCRF improved the Macro-F1 score by 2.75% and 2.2% respectively over the next-best model.
  • Clustering Performance: The model achieved significantly higher Normalized Mutual Information (NMI) and Adjusted Rand Index (ARI) scores, proving that the learned embeddings are more discriminative and organized.
  • Ablation Success: Experiments confirmed that the hybrid approach is better than either generative or contrastive learning alone, and that the PSA strategies are vital for preventing the model from collapsing into a "degenerate state."

Limitations and Future Work

The authors noted that some hybrid frameworks (like GC-HGNN) could not be directly compared due to inaccessible source code. While HetCRF handles sparse semantics well, the paper does not deeply explore the computational overhead of the two-stage aggregation on extremely large-scale graphs (billions of edges). Future work could involve optimizing the efficiency of the clustering-based augmentation for real-time applications.

Summary updated

Abstract

In graph self-supervised learning, masked autoencoders (MAE) and contrastive learning (CL) are two prominent paradigms. MAE focuses on reconstructing masked elements, while CL maximizes similarity between augmented graph views. Recent studies highlight their complementarity: MAE excels at local feature capture, and CL at global information extraction. Hybrid frameworks for homogeneous graphs have been proposed, but face challenges in designing shared encoders to meet the semantic requirements of both tasks. In semantically sparse scenarios, CL struggles with view construction, and gradient imbalance between positive and negative samples persists. This paper introduces HetCRF, a novel dual-channel self-supervised learning framework for heterogeneous graphs. HetCRF uses a two-stage aggregation strategy to adapt embedding semantics, making it compatible with both MAE and CL. To address semantic sparsity, it enhances encoder output for view construction instead of relying on raw features, improving efficiency. Two positive sample augmentation strategies are also proposed to balance gradient contributions. Node classification experiments on four real-world heterogeneous graph datasets demonstrate that HetCRF outperforms state-of-the-art baselines. On datasets with missing node features, such as Aminer and Freebase, at a 40% label rate in node classification, HetCRF improves the Macro-F1 score by 2.75% and 2.2% respectively compared to the second-best baseline, validating its effectiveness and superiority.
BibTeX
@misc{lin2025learning,
  author = {Di Lin and Wanjing Ren and Xuanbin Li and Rui Zhang},
  title = {{Learning Robust Heterogeneous Graph Representations via Contrastive-Reconstruction under Sparse Semantics}},
  year = {2025},
  eprint = {2506.06682},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.06682},
  howpublished = {arXiv},
}
Figure