# Few-Shot Knowledge Graph Completion Model Based on Relation Learning
## 1 Introduction  
The Knowledge Graph (KG) is a concept introduced by Google in 2012 to improve the speed of search engines [1]. It contains rich and diverse relational data and is widely used in various production tasks in society. Existing knowledge graphs include Freebase [2], YAGO [3], NELL [4], and Wikidata [5]. They all contain many triples formed by facts, which are usually represented in the form of (head entity, relation, tail entity), i.e., \((h,r,t)\). In the real world, this graph-structured knowledge plays an important role in many downstream applications, such as semantic search [6], intelligent question answering [7], and personalized recommendations [8]. However, knowledge graphs still suffer from the issue of incomplete facts. To address this problem, it is necessary to use Knowledge Graph Completion (KGC) to automatically infer and fill in missing facts, further enhancing the value of knowledge graphs. In recent years, researchers have proposed many knowledge graph completion models based on knowledge graph embedding techniques [9] for the KGC task, including TANE [10], TransH [11], DistMult [12], ComplEx [13], and ConvE [14]. These models have partially addressed the incomplete entity and relation problem in knowledge graphs. However, these embedding models usually focus on a small proportion of frequent relations, while in real-world knowledge graphs, most relations exhibit long-tailed distributions [15]. For example, in Wikidata, approximately 10% of relations have fewer than 10 triples. Furthermore, in most practical applications, such as recommendation systems and social media networks, knowledge graphs undergo dynamic changes over time. That is, a relation typically contains thousands of associated triples, while most relations only contain a few triples. In the practical context with only a few entities and relations, the performance of traditional knowledge graph completion models significantly declines. To address the knowledge graph completion problem for uncommon entities and relations, researchers have proposed a variety of Few-Shot Knowledge Graph Completion (FKGC) methods. The GMatching model [16] was the first to be proposed for solving FKGC. It enhances entity embeddings using one-hop neighbor structures to improve the referenced semantic representation and employs a Long Short-Term Memory network (LSTM) to match the embedding representations with the target, obtaining similarity scores for relation prediction. Building on this, the FSRL model [17] and the FAAN model [18] use attention mechanisms to improve neighbor encoders. The MetaR model [19] solves this problem by passing meta information specific to the relations. The GANA model [20] addresses this issue by designing a gated and attention-based neighborhood aggregator and constructing a global-to-local framework to handle complex relations simultaneously. In the FKGC task, the aforementioned models have achieved good results. However, these methods still have some limitations: (1) FAAN fails to effectively utilize the valuable information from high-order neighboring entities (the most relevant high-order neighborhood set in nonlocal graphs [21]) and cannot discern the importance of information for different neighbors, leading to noise-related issues. (2) FSRL simply uses a recurrent autoencoder to aggregate a small reference set. However, during the training process, the FSRL model tends to depend excessively on entity embeddings, leading to overfitting of relations and a decline in the generalization capability of the model. (3) FSRL does not consider the translational property of the TransE model during matching queries, which can lead to a decline in matching accuracy. (4) Previous models have not adequately considered the impact of entity pairs on contextual semantics [21], resulting in reduced accuracy in link prediction. To overcome the limitations of existing methods, we propose utilizing high-order neighborhood entity information to represent each few-shot relation.