# Link Prediction Based on Data Augmentation and Metric Learning Knowledge Graph Embedding
## 5 Conclusions  
The introduction of knowledge graphs has offered novel perspectives for knowledge representation and application. However, existing models face challenges such as incomplete structural information and inadequate semantic details in learned knowledge graph embeddings. This study addresses these issues through the following approaches. \begin{table}
\begin{tabular}{l l l l l l l l} \hline \hline
**Models** & **Methods** & **FB15k-237** & \multicolumn{4}{c}{**WN18 RR**} \\ \hline  & & **MR** & **MRR** & **Hit@10** & **MR** & **MRR** & **Hit@10** \\ \hline TransE & Uniform & 357 & 0.294 & 0.465 & 3384 & **0.226** & 0.501 \\  & KBGAN & 722 & 0.293 & 0.466 & 5356 & 0.181 & 0.432 \\  & NSCaching & - & 0.299 & 0.476 & 4472 & 0.2 & 0.478 \\  & EANS & 169 & 0.338 & 0.526 & 3488 & 0.222 & 0.526 \\  & GNS & **159** & **0.343** & **0.53** & **2906** & 0.030 & **0.523** \\ \hline TransD & Uniform & 188 & 0.245 & 0.429 & 3555 & 0.19 & 0.464 \\  & KBGAN & 825 & 0.247 & 0.444 & 4083 & 0.188 & 0.464 \\  & NSCaching & 189 & 0.286 & 0.479 & **3104** & 0.201 & 0.484 \\  & EANS & 208 & 0.334 & 0.519 & 6937 & 0.218 & 0.476 \\  & GNS & **167** & **0.341** & **0.529** & 5199 & **0.226** & **0.495** \\ \hline DistMult & Uniform & 254 & 0.241 & 0.419 & 5110 & 0.43 & 0.49 \\  & KBGAN & 276 & 0.227 & 0.4 & 11351 & 0.204 & 0.295 \\  & NSCaching & 273 & 0.283 & 0.456 & 7708 & 0.413 & 0.455 \\  & EANS & 397 & **0.309** & **0.482** & 4938 & **0.438** & 0.538 \\  & GNS & **176** & 0.302 & 0.477 & **3580** & 0.391 & **0.539** \\ \hline ComplEx & Uniform & 339 & 0.247 & 0.428 & 5261 & 0.44 & 0.51 \\  & KBGAN & 881 & 0.191 & 0.321 & 7528 & 0.318 & 0.355 \\  & NSCaching & 221 & 0.302 & 0.481 & 5365 & 0.446 & 0.509 \\  & EANS & 454 & **0.323** & **0.503** & 5350 & 0.463 & 0.558 \\  & GNS & **203** & 0.27 & 0.428 & **3842** & **0.468** & **0.559** \\ \hline RotatE & Uniform & 187 & 0.295 & 0.478 & 3274 & 0.473 & 0.565 \\  & EANS & 169 & **0.341** & **0.528** & 3149 & 0.487 & 0.574 \\  & GNS & **162** & 0.334 & 0.52 & **3105** & **0.492** & **0.577** \\ \hline \hline \end{tabular} The bold text here in the “Model” column represents our proposed model, while under each evaluation metric, it signifies the best results.  
\end{table} 
Table 4: Link prediction results with GNS using other negative sampling methods for different scoring functions. Figure 7: Visualizations before and after applying GNS: (**a**) the visualization results of KGE-EML embeddings; (**b**) the results after incorporating GNS negative sampling and auxiliary loss. Firstly, an investigation into the impact of the number of negative samples and different sampling strategies is conducted. The random sampling method is refined, introducing the Gibbs negative sampling method. Additionally, a contrast loss function is applied to mitigate gradient vanishing during training, expanding the influence of high-quality negative samples through the GNS module. Secondly, to bolster relationship modeling, a metric learning-based KGE model is introduced. Entities' projection onto hyperplanes, determined by relations, is utilized. The semantic similarity measurement replaces the Euclidean distance comparison, enhancing the model's representational power. Furthermore, a graph attention network layer is incorporated to fuse embedded relation information, augmenting the expressive capabilities of relations. Link prediction experiments on public and private datasets demonstrated the superiority of the proposed KGE-EML model over baseline models, showcasing a high prediction accuracy and high generalization capabilities. Refinement tests based on relationship types illustrate the model's effectiveness in capturing complex relationships. Finally, an auxiliary loss is introduced to extend the model into a generative adversarial network-based model. The experimental results indicate improved performance in link prediction compared to the original model. Furthermore, comparisons with other negative sampling methods affirm the significant advantage of the proposed GNS module.