Abstract
Contrastive learning (CL) has emerged as a powerful paradigm for graph representation learning. However, its application to Knowledge Graphs (KGs) is hindered by the semantic complexity of edges; unlike homogeneous graphs, neighboring nodes in KGs are not necessarily semantically similar. This paper proposes KGE-SymCL, a framework that identifies positive contrastive pairs through "relation-symmetrical structures"—entities sharing similar structural positions relative to pivot nodes. By leveraging intrinsic graph topology rather than external language models, KGE-SymCL provides an efficient, augmentation-free, and plug-and-play solution that enhances performance across link prediction and entity classification tasks.
What Problem Does This Paper Address?
Knowledge Graph Embedding (KGE) models aim to map entities and relations into continuous vector spaces. Recent efforts have integrated Contrastive Learning (CL) to refine these embeddings by pulling similar samples together and pushing dissimilar ones apart.
A fundamental challenge in KG-based CL is the "neighborhood similarity" assumption. In homogeneous graphs, such as social networks, connected nodes often exhibit homophily. In contrast, KG edges carry specific, often divergent semantics (e.g., Bob $\xrightarrow{\text{enemy}}$ Andy). Treating direct neighbors as positive pairs can thus introduce noise. Existing solutions often rely on pre-trained language models (PLMs) to assess semantic similarity from text labels. However, PLMs are computationally intensive and may overlook the structural semantics inherent in the graph.
Methods
KGE-SymCL addresses the limitations of neighborhood-based CL by identifying entities in symmetrical positions. For instance, if both Bob and Jones connect to Basketball via a play relation, they likely share semantic attributes (i.e., both are athletes).
The KGE-SymCL framework operates in two primary stages:
- Relation-Symmetrical Structure Extraction: The algorithm identifies $k$-hop symmetrical paths starting from an "anchor" entity. Entities at the terminus of these paths form a set of positive candidates.
- Symmetrical Contrastive Learning: As a plug-and-play module, KGE-SymCL can be integrated with various encoders (e.g., TransE, RGCN). It employs a self-supervised alignment loss (Mean Squared Error) to minimize the distance between the anchor entity and its symmetrical counterparts in the latent space.
This approach is notably negative-free and augmentation-free, avoiding the risks of false negative sampling and the potential semantic distortion caused by random edge/node dropping.
Datasets
The framework was evaluated on several standard benchmark datasets:
- Link Prediction: WN18RR (WordNet), FB15k-237 (Freebase), and NELL-995.
- Entity Classification: AIFB, MUTAG, BGS, and AM.
The authors extracted and cached symmetrical structure dictionaries for these benchmarks to facilitate efficient training and reproducibility.
Key Insights and Results
- Symmetry as a Semantic Proxy: Structural symmetry serves as a reliable, deterministic indicator of semantic similarity, removing the need for heavy external models.
- Organic Alternate Views: Symmetrical nodes provide natural "views" for contrastive learning, making artificial data augmentation unnecessary.
- Quantitative Performance: KGE-SymCL consistently outperformed baseline models. On the NELL-995 dataset using the COMPGCN encoder, it achieved a 3.1% improvement in Mean Reciprocal Rank (MRR) and a 3.0% boost in Hit@1. For entity classification, it yielded an average accuracy gain of 1.92%.
- Qualitative Validation: Case studies confirmed the logic; for example, the algorithm successfully paired "Tangerine Dream" and "Trent Reznor" due to their shared symmetrical connection to the node "Post-Industrial Music."
- Computational Efficiency: The extraction phase is a one-time cost (50-120 minutes), and the contrastive module adds minimal overhead during training (e.g., ~2.5 minutes for COMPGCN on WN18RR).
Limitations and Future Work
While KGE-SymCL effectively identifies positive pairs, identifying high-confidence negative pairs using pure structure remains challenging. Future work will focus on developing fine-grained negative sampling strategies and exploring the potential synergy between structural symmetry and language-model-based embeddings.
Summary updated