Unifying Dual-Space Embedding for Entity Alignment via Contrastive Learning

Cunda Wang, Weihua Wang, Qiuyu Liang, Feilong Bao, Guanglai Gao

Abstract

Entity Alignment (EA) is critical for integrating Knowledge Graphs (KGs) from diverse sources. Traditional methods primarily utilize Euclidean embeddings, which often struggle with hierarchical data structures and node over-smoothing. We present UniEA, a novel framework that unifies Euclidean and hyperbolic embeddings through contrastive learning. By integrating Graph Attention Networks (GAT) with Hyperbolic Graph Convolutional Networks (HGCN) through contrastive learning, UniEA captures both local neighborhood information and complex hierarchical structures. This approach addresses common issues like hierarchical distortion and over-smoothing, achieving state-of-the-art performance on benchmark datasets.

Introduction

Entity Alignment aims to identify identical real-world entities across different KGs. Most existing approaches rely on Graph Neural Networks (GNNs) operating in Euclidean space. However, KGs frequently exhibit hierarchical or "tree-like" structures where the distance between levels does not scale linearly in Euclidean geometry, leading to significant hierarchical distortion. Furthermore, entities sharing similar neighborhoods often suffer from over-smoothing, where their embeddings become nearly indistinguishable.

Conceptual illustration of hierarchical structures and the advantage of hyperbolic distance in representing them.

As shown in Figure 1, representing a hierarchy (e.g., The Avengers to Iron Man) in Euclidean space can be inefficient. Hyperbolic geometry provides a more natural fit for such structures, allowing for exponential growth in volume relative to radius, which minimizes distortion when embedding deep hierarchies.

Methodology: The UniEA Framework

UniEA addresses these challenges by embedding KGs in both Euclidean and hyperbolic spaces simultaneously, using contrastive learning to bridge the two geometries.

The UniEA framework architecture, featuring dual-space embedding branches and contrastive learning objectives.

Dual-Space Embedding

The framework consists of two primary branches:

  1. Euclidean Branch: Utilizes a Graph Attention Network (GAT) to aggregate local neighborhood features. A layer-wise attention mechanism is employed to weigh contributions from different depths, filtering noise from distant nodes.
  2. Hyperbolic Branch: Employs a Hyperbolic Graph Convolutional Network (HGCN) within the Poincaré ball model. This branch is specifically optimized to capture the hierarchical depth and global structure of the KG.

Contrastive Learning Objectives

To unify these spaces, UniEA introduces two contrastive loss functions:

  • Inter-graph Contrastive Loss ($L_{inter}$): Ensures that the Euclidean and hyperbolic embeddings of the same entity remain consistent. This treats the geometric shift as a form of "structural augmentation," providing a robust alternative to destructive methods like edge dropping.
  • Intra-graph Contrastive Loss ($L_{intra}$): Forces embeddings of distinct entities within the same KG to stay further apart. This directly mitigates the over-smoothing problem by ensuring that entities with similar roles remain identifiable.

Relation Encoding

UniEA incorporates both in-degree and out-degree relation encoders. This dual-directional approach captures the full semantic context of entity relationships, which is often lost in models that only consider incoming edges.

Experiments and Results

UniEA was evaluated on the OpenEA (15K-V1) benchmark, covering monolingual (D-W-15K, D-Y-15K) and cross-lingual (EN-FR-15K, EN-DE-15K) datasets.

Performance

UniEA achieved state-of-the-art results among structure-based EA methods. For instance, on the EN-FR-15K dataset, it reached a Hits@1 of 0.580, surpassing previous benchmarks like GSEA (0.561). Visualization via t-SNE confirmed that UniEA produces a more uniform entity distribution compared to competitors, which often exhibit problematic "clumping" that makes alignment difficult.

Ablation Study

Ablation studies highlighted the importance of the contrastive losses. The $L_{intra}$ loss, in particular, proved crucial for preventing model confusion between entities occupying similar graph positions. While the dual-space approach increases parameter count (approx. 15.86M), UniEA maintains high training efficiency by avoiding the need for frequent graph topology re-augmentation required by other contrastive methods.

Conclusion

UniEA demonstrates that unifying Euclidean and hyperbolic geometries through contrastive learning significantly enhances Entity Alignment. By leveraging hyperbolic space for hierarchical preservation and contrastive learning for distinctiveness, the model overcomes the limitations of single-space embeddings. Future work includes incorporating entity attributes (names, descriptions) and exploring unsupervised learning variants to reduce dependency on pre-aligned seed entities.

Summary updated

BibTeX
@inproceedings{wang2025unifying,
  author = {Cunda Wang and Weihua Wang and Qiuyu Liang and Feilong Bao and Guanglai Gao},
  title = {{Unifying Dual-Space Embedding for Entity Alignment via Contrastive Learning}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2025},
}
Figure