# Adaptive Attentional Network for Few-Shot Relational Learning of Knowledge Graphs
## 1 Introduction  
A knowledge graph (KG) is composed of a large number of triples in the form (head entity, relation, tail entity) (h, r, t), and this structured knowledge is crucial for many downstream applications such as question answering and the semantic web. In recent years, the proposed knowledge graphs all represent each piece of information as a triple relation, such as DBpedia [1], Free-base [2], NELL [3], Probase [4], WikAmong meta-learning-based methods, MetaR [9] uses a meta-learning encoder for inference, using gradient elements to change relation elements to obtain the minimum value of the loss function, thereby speeding up the learning process of the model. The goal of this model is to map small-sample entities to relational elements better and then use gradient elements to speed up the convergence of relational elements. However, both works ignore the different contributions of neighbors to entities. However, both works ignore the different contributions of neighbors to entities. FSRL [10] learns entity embeddings through domain graph structure and fixed weights to infer real entities, given a small set of reference entity pairs for each relation. However, this method does not work very well for one-shot cases. Since neighbors are assigned fixed weights, they cannot accommodate different inference relations. This paper believes that the accuracy of inference results is not only affected by the dominant features of the entity itself but also affected by the recessive features. At the same time, one-shot task scenarios are more common in the real world than few-shot tasks. For example, the features of an entity's neighboring neighbors can cascade to affect the overall features of the entity [11; 12]. Figure 1 is a schematic diagram of the attribute relationship of the knowledge graph of [PERSON] as the source node. The triple relationship on the left of Figure 1 is \"Work_with\", \"Proxy_for\", and \"Parter\", all of which belong to [PERSON]'s business relationship. The triple relationship on the right side of Figure 1 is \"Marry_to\", \"Has_Child\", and \"Is_child_of\", all of which belong to [PERSON]'s family relationship. From Figure 1, it can be seen that the two types of relations are very different, and the relations of the same attribute are closer in the embedding vector space. If the model query task is ([PERSON], Ceo_of,?) triplet, then model training should pay more attention to [PERSON]'s business relationship. Therefore, the tail entity of the business relationship should have a higher weight than the tail entity of the family relationship. The same attribute relation triples should also have different weights for the source entity. In Figure 1, the triples ([PERSON], Work_With, [PERSON]), ([PERSON], Proxy_For, Alibaba), and ([PERSON], partner, [PERSON]) that all belong to [PERSON]'s business relationship are in the model training process. Since [PERSON] and [PERSON] are closer to the inference result, so ([PERSON], Proxy_For, Alibaba) should have the highest weight. In addition to the above two weighting scenarios, it is also necessary to consider the influence of entities with different hops on the same path on the source entity. Because the entities and relations of the knowledge graph are represented by embedding vectors, the embedding relation of triples satisfies \(\mathrm{h+r\approx t}\). So when in triples ([PERSON], Proxy_For, Alibaba) and (Alibaba, year of creation, 1999), the Alibaba embedding vector is closer to the embedding vector of the source entity [PERSON] than the 1999 embedding vector. Figure 1: Schematic diagram of knowledge graph reasoning attribute relationship. The previous methods cannot solve the above problems. The feature influence of entity neighbors on the source entity in dynamic scenarios cannot be distinguished, and the feature influence of the same attribute relationship is not considered.