# Few-Shot Knowledge Graph Completion Model Based on Relation Learning
## 4 Model
### Loss Function
This is due to the fact that the model may learn more irrelevant information when learning the relation representation with more reference information, leading to a decrease in prediction accuracy. Additionally, with more reference information, entities may have more meanings, which increases the complexity of relation learning, leading to a decrease in prediction accuracy. ## 6 Conclusions and Future Work

This study proposes a Few-shot Relation Learning-based Knowledge Graph Completion model (FRL-KGC), specifically designed for few-shot knowledge graph completion tasks. FRL-KGC incorporates a gating mechanism during the aggregation of high-order neighborhood entity information, effectively filtering out noise from neighboring entities and improving the quality of entity encoding. In the process of learning relation representations, FRL-KGC leverages the information embedded in the neighborhood relations of entity pairs in the reference set, enhancing the quality of relation embeddings and reducing reliance on specific entity pairs, thus improving the model's generalization ability. Furthermore, the introduction of an LSTM network in the Transformer learner further improves the quality of few-shot relations. The experimental results indicate that the FRL-KGC model outperforms existing FKGC models in terms of link prediction accuracy. However, the design of the dataset does not fully capture the dynamic nature of few-shot knowledge graphs. If the knowledge graph undergoes real-time changes, ensuring the model's inference accuracy becomes a challenging problem. In our future work, we plan to explore the use of timestamps to enhance the model's representation capacity of the knowledge graph and maintain inference accuracy in dynamic few-shot knowledge graph learning. Additionally, we will investigate the use of external knowledge sources to augment the representations of entities and relations, such as leveraging textual descriptions of entities and relations. Figure 7: Impact of few-shot size \(K\) in the performance of FKGC methods on Wiki-One dataset. **Author Contributions:** Conceptualization, J.G. and W.L. ; Methodology, J.G. and W.L. ; Software, J.G. ; Validation, A.L., Y.G. and X.Z. ; Formal analysis, A.L., Y.G. and X.Z. ; Resources, Y.G. ; Data curation, J.G. ; Writing--original draft, J.G. ; Writing--review & editing, W.L. and A.L. ; Visualization, A.L. ; Supervision, Y.G. and X.Z. ; Project administration, W.L. ; Funding acquisition, W.L. All authors have read and agreed to the published version of the manuscript. **Funding:** This work was supported by the Basic Scientific Research in Central Universities of North Minzu University (2021 JCYJ12), the Ningxia Natural Science Foundation Project (2021 AAC03215), the National Natural Science Foundation of China (62066038, 61962001). **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable. **Data Availability Statement:** The data presented in this study are available on request from the corresponding author. **Conflicts of Interest:** The authors declare no conflict of interest. ## References

* [1] [PERSON]; [PERSON]; [PERSON] A review: Knowledge reasoning over knowledge graph. _Expert Syst. Appl._**2020**, _141_, 112948. [CrossRef]
* [2] [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON] Freebase: A collaboratively created graph database for structuring human knowledge. In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data, Vancouver, BC, Canada, 9-12 June 2008; pp. 1247-1250. * [3] [PERSON]; [PERSON]; [PERSON] Yago: A core of semantic knowledge. In Proceedings of the 16 th International Conference on World Wide Web, Banff, AB, Canada, 8-12 May 2007; pp. 697-706. * [4] [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; [PERSON]; et al. Never-ending learning. _Commun. ACM_**2018**, _61_, 103-115. [CrossRef]
* [5] [PERSON]; [PERSON] Wikidata: A free collaborative knowledgebase. _Commun. ACM_**2014**, _57_, 78-85.