Hard Negative Samples Enhanced Contrastive Knowledge Graph Completion
-
Abstract
Hard negative samples are a key factor affecting contrastive learning performance. Aiming at the problem of contrastive knowledge graph completion (CKGC), we propose a hard negative sample enhanced CKGC framework. Under this framework, we design three hard negative sample generation methods based on text semantics, knowledge graph structure, and data ensemble. According to these methods, three effective hard negative sample pools are obtained. Then, several samples are taken from three hard negative sample pools to augment the negative sample set generated by In-Batch negative sampling. Finally, such enhanced negative sample set and the positive samples set are trained through contrastive learning to obtain an optimized CKGC model. Experiments on the WN18RR and the FB15k-237 datasets show that all three methods can generate hard negative samples that improve the performance of the CKGC model.
-
-