Knowledge Graph Completion Combining Dynamic Learnability and Contrastive Learning
摘要
Knowledge Graph Completion (KGC) is an active area for enhancing and improving the content of knowledge graphs. Currently, knowledge graphs often suffer from issues like data sparsity and the underutilization of many implicit relationships between entities. Existing KGC approaches have limitations in terms of dynamic data adaptability and feature representation capability. This paper presents a method for Knowledge Graph Completion combining Dynamic Learnability and Contrastive Learning (DCLKGC). This method dynamically assigns neighbor weights to better capture relational semantics, greatly improving the model's ability to differentiate negative samples for link prediction in knowledge graphs. The method consists of three modules. (1) Dynamic Neighbor Aggregation Based on Graph Attention Mechanism. It dynamically assigns different weights to the neighbors of each node, enabling the model to flexibly capture sparse relationships when node connections are limited. (2) Complex Relationship Capturing Based on Dynamic Learnable Functions. This module emphasizes relational semantics and reduces feature information loss, helping better capture the relational semantics between nodes. (3) Negative Sample Discrimination Optimization Based on Contrastive Learning. It combines contrastive loss with cross-entropy loss and introduces more negative samples to enrich feedback for sparse entities, thus improving the model’s ability to distinguish sparse entities. Experimental results show that this method outperforms other methods in terms of MRR and Hits@10 on three benchmark datasets, CoDEx.