Abstract
Graph embedding, which maps nodes into a low-dimensional space while preserving their proximities based on graph topology, has gained significant attention. Traditional methods often assume the Markov property, thus overlooking higher-order dependencies. Additionally, most Graph Neural Network-based methods require abundant labeled data, which is usually scarce and costly. To address these challenges, we introduce Higher-Order Contrastive Graph Embedding (HOCGE), a novel self-supervised graph embedding framework that simultaneously models first-order structures and higher-order dependencies. Specifically, HOCGE learns node representations by constructing higher-order networks from sequential data, capturing complex node relationships through advanced random walks. By designing a multi-level contrastive learning mechanism, HOCGE narrows the distance between similar nodes across both first-order and higher-order networks in the embedding space. This self-supervised method alleviates the issue of data scarcity by utilizing the intrinsic structure of the data, reducing the dependence on labeled data. Comprehensive experiments on various benchmarks, including link prediction, node classification, and visualization, demonstrate HOCGE’s superior performance, robustness, and generalizability.
Introduction
Most graph embedding techniques, such as DeepWalk or standard Graph Neural Networks (GNNs), treat graphs as First-Order Networks (FONs). These models typically assume the Markov property, where the next step in a random walk depends solely on the current node. However, real-world sequential data—including web clickstreams, flight itineraries, and shipping routes—often exhibit significant path dependency. For instance, a user's next click is frequently influenced by the sequence of pages previously visited, not just the current page.
While Higher-Order Networks (HONs) can model these dependencies by splitting nodes based on their history (e.g., creating a specific node for "Page C given the user came from Page A"), existing HON embedding methods face challenges. They often rely on scarce labeled data or fail to reconcile fragmented higher-order nodes back into a cohesive representation of the original entity.
Methodology: Higher-Order Contrastive Graph Embedding (HOCGE)
To address these limitations, the authors propose HOCGE, a fully self-supervised pipeline designed to capture both immediate structural ties and long-range path dependencies.
1. HON Construction and Sequence Generation
The framework first builds a variable-order HON by measuring the Kullback-Leibler (KL) divergence of transition probabilities. If historical context significantly alters the probability of the next transition, the node is split into higher-order "conditional" nodes. Subsequently, random walks are performed on this HON, and a Skip-gram model generates initial embeddings.
2. Multi-Level Contrastive Learning
The core innovation of HOCGE is its multi-level contrastive learning mechanism, which operates at two distinct levels:
- HON-level Contrast: This pulls higher-order nodes closer to their sequential predecessors, preserving path-dependent semantics.
- FON-level Contrast: This pulls different higher-order nodes derived from the same base node closer to each other. This step is crucial for restoring the structural identity fragmented during the node-splitting process, ensuring the model recognizes that "C|A" and "C|B" represent the same underlying entity "C".
3. Aggregation
Finally, the framework merges variable-order embeddings into a single representation per base node. Interestingly, the authors found that a frequency-based weighted pooling mechanism outperformed more complex attention-based methods, suggesting that nodes appearing more frequently in specific historical contexts carry the most reliable structural signals.
Experimental Evaluation
HOCGE was evaluated across diverse real-world datasets, including passenger trajectories (Tube), Wikipedia clickstreams (Wiki), flight itineraries (Air), and shipping routes (Ship).
Key Results
- Link Prediction: HOCGE achieved state-of-the-art AUPRC across all datasets, significantly outperforming classic methods like DeepWalk and Node2Vec. It reached 0.936 AUPRC on Wiki and nearly perfect scores on simulated traces.
- Node Classification: The model outperformed all unsupervised baselines, achieving Micro-F1 scores of 0.827 on Tube and 0.892 on Air. It even rivaled semi-supervised methods that utilized ground-truth labels.
- Visualization: t-SNE projections demonstrated that HOCGE creates tighter, more distinct clusters for geographic categories compared to standard GNNs like GCN or GraphSAGE.
Conclusion
HOCGE demonstrates that dual-view contrastive learning effectively solves the fragmentation problem inherent in HONs while capturing complex sequential dependencies. By leveraging the intrinsic structure of sequential data through self-supervision, HOCGE provides a robust alternative to label-heavy GNNs. Future work may involve adapting the framework for temporal networks to capture evolving higher-order dependencies over time.
Summary updated