Abstract
Knowledge distillation for knowledge graph embedding (KGE) models effectively compresses KGE models by reducing their embedding dimensions. While existing methods distill knowledge from a high-dimensional teacher to a low-dimensional student, they typically rely on a single teacher embedding space, thereby overlooking valuable complementary knowledge from teachers in distinct embedding spaces. This paper introduces DTDES-KGE, a novel knowledge distillation framework that significantly enhances distillation performance by leveraging dual teachers in distinct embedding spaces. To overcome the challenge of spatial heterogeneity when integrating knowledge from dual teachers, we propose a spatial compatibility module for reconciliation. Additionally, we introduce a student-aware knowledge fusion mechanism to fuse the knowledge from dual teachers dynamically. Extensive experiments on two real-world datasets validate the effectiveness of DTDES-KGE.
Introduction
Knowledge Graphs (KGs) represent facts as triples (head entity, relation, tail entity). To utilize these in downstream tasks, Knowledge Graph Embedding (KGE) models map entities and relations into low-dimensional vector spaces. However, high-performance models often require large embedding dimensions, leading to significant memory and computational overhead. Knowledge Distillation (KD) has emerged as a solution, where a compact "student" model learns from a larger "teacher."
Existing KD methods for KGE typically utilize a single teacher model. However, KGs often contain diverse structural patterns. For instance, hierarchical structures (like taxonomies) are best represented in Hyperbolic space, while linear chain structures are better suited for Euclidean space. Relying on a single teacher limits the student to a single geometric perspective.
Methodology: The DTDES-KGE Framework
DTDES-KGE addresses the limitation of single-teacher KD by employing dual teachers—one in Euclidean space and one in Hyperbolic space. The primary challenge is "inter-space heterogeneity," as the mathematical properties of these spaces differ significantly.
1. Spatial Compatibility Module
To reconcile the teachers, the framework employs a two-step process:
- Pre-distillation Phase: Heterogeneous teacher embeddings are first distilled into a "homogeneous" intermediate model (such as RotatE). This provides a common ground for the student to learn structural information without being hindered by coordinate system mismatches.
- Optimal Distribution Selection: This sub-module maps the varying output scores from the dual teachers into a unified target distribution, ensuring the student receives consistent signals.
2. Student-aware Knowledge Fusion
Rather than simple averaging, DTDES-KGE uses a dynamic weighting mechanism:
- Static Weights: These are derived from the graph's inherent structure. Relations that exhibit high hierarchy favor the Hyperbolic teacher, while those with chain-like properties favor the Euclidean teacher.
- Dynamic Weights: These adapt based on the student's current learning state and the teachers' confidence levels for specific queries, allowing the student to prioritize the most relevant "expert" at any given time.
3. Multi-level Distillation
The framework distills knowledge at two levels:
- Logits-level: The student mimics the final prediction scores of the fused teachers.
- Feature-level: The student aligns its internal embedding structures with the fused teacher structures using an InfoNCE-based loss, preserving the geometric relationships between entities.
Experimental Results
The framework was evaluated on the FB15k-237 and WN18RR datasets.
- Performance: DTDES-KGE achieved state-of-the-art results. On FB15k-237, it reached a Mean Reciprocal Rank (MRR) of 40.5, outperforming the best baseline by 5.5%.
- Extreme Compression: These gains were achieved with an embedding dimension of just 32, demonstrating extreme efficiency compared to traditional high-dimensional models.
- Efficiency: Despite the dual-teacher setup during training, the student model remains highly efficient during inference, with speeds comparable to single-teacher distilled models.
Conclusion
DTDES-KGE demonstrates that leveraging multiple geometric perspectives significantly improves the compression of KGE models. By reconciling spatial heterogeneity and employing adaptive fusion, the framework allows a compact student to inherit the strengths of both Euclidean and Hyperbolic experts. Future work will explore extending this framework to Graph Neural Network architectures and incorporating privacy-preserving techniques like federated learning.
Summary updated