Few-shot Low-resource Knowledge Graph Completion with Reinforced Task Generation (2023)

Abstract: Despite becoming a prevailing paradigm for organizing knowledge, most knowledge graphs (KGs) suffer from the low-resource issue due to the deficiency of data sources. The enrichment of KGs by automatic knowledge graph completion is impeded by the intrinsic long-tail property of KGs. In spite of their prosperity, existing few-shot learning-based models have difficulty alleviating the impact of the long-tail issue on low-resource KGs because of the lack of training tasks. To tackle the challenging long-tail issue on low-resource KG completion, in this paper, we propose a novel few-shot low-resource knowledge graph completion framework, which is composed of three components, i.e., few-shot learner, task generator, and task selector. The key idea is to generate and then select the beneficial few-shot tasks that complement the current tasks and enable the optimization of the few-shot learner using the selected few-shot tasks. Extensive experiments conducted on several real-world knowledge graphs validate the effectiveness of our proposed method.

## introduction recent years have witnessed a rapidly increasing amount of research attention and industry demand on knowledge graphs (kgs), which organize knowledge in the form of triples and have been playing a crucial role in many knowledge-intensive applications, such as question answering @xcite , recommendation systems @xcite , and dialogue systems @xcite . despite the fact that several large-scale kgs, such as nell @xcite and freebase @xcite , have been well-developed for organizing general knowledge, most of the existing kgs are built for domain-specific knowledge using domain-specific data sources. these kgs inevitably suffer from the low-resource issue, i.e., * equal contribution. the incompleteness in terms of entities, relations, and triples that exist in the real world but are absent in kgs, caused by the deficiency of data sources, especially those in non-global languages. for example, the number of articles in norwegian wikipedia is 10 times less than that in english wikipedia foot_0 . a kg built using norwegian wikipedia would have a severer incompleteness issue compared with the kg extracted from english wikipedia. although automatic kg completion (kgc) @xcite @xcite has empowered the discovery of more triples to enrich kgs, it is far from perfect to enrich low-resource kgs due to the difficulty in the discovery that stems from the relations associated with missing triples and varies with the change of relation frequency. since most kgs generally follow long-tail distribution @xcite @xcite , where a large fraction of relations have only a few triples, the existence of rare relations on low-resource kgs leads to dramatic performance degradation on the discovery of missing triples and impede the development of an effective completion model. a line of efforts @xcite @xcite attempt to improve the capability of inference on rare relations by formulating the kg completion problem into a few-shot learning framework and exploiting inference models for frequent relations to facilitate inference on rare relations. such kind of methods require abundant training tasks to ease the effect of memorization and improve the generalization @xcite . however, low-resource kgs do not always have adequate training tasks for mimicking the few-shot learning scenarios of rare relations. for example, the greek kg @xcite used in experiments only contains 21 training tasks, as many relations are unknown or cannot offer triples for training task construction. therefore, the few-shot kg completion models tend to overfit on the scarce tasks and engender unsatisfactory results. motivated by the above-discussed limitation on low-resource kgs, we propose to generate new few-shot tasks to augment current tasks for easing the impact of memorization and improving the generalization. although straightforward, the materialization of this idea is non-trivial due to two crucial challenges. the first challenge (c1) is to design an effective strategy to generate new few-shot tasks. a few-shot task is formed as a set of pairs corresponding to the same relation, each of which includes two entities, i.e., head entity and tail entity. on the one hand, the discrete nature of tasks to generate hinders the harness of prevailing generative models. on the other hand, the generation of few-shot tasks with novel relations is arduous due to the lack of related data samples. if possible to generate, the second challenge (c2) is to ensure the authenticity of generated few-shot tasks. the generated tasks ineluctably consist of noisy tasks which cannot represent the designated relation and would be detrimental to few-shot learning. thus, how to select beneficial tasks is an essential problem. in this paper, we propose a novel few-shot low-resource kg completion framework with reinforced task generation, named flow-kgc, to promote the kg completion on rare relations in low-resource kgs. specifically, we formulate kg completion into a few-shot learning framework and train a simple yet effective few-shot learner to learn representations for rare relations with a small support set. the learned representation can be further used for inference. to address challenge c1, we represent few-shot tasks in a latent continuous space and then build a task generator in this latent space, rather than generating original discrete structure samples. then the generated tasks can be utilized to update the few-shot learner. to select beneficial synthetic few-shot tasks and tackle challenge (c2), we design an adaptive task selector, which makes decisions on keeping or discarding generated tasks and receives feedback from the few-shot learner and conducts optimization using reinforcement learning. the task generator and task selector collaboratively complete the process of task generation. these three components, i.e., few-shot learner, task generator, and task selector, constitute our proposed method flow-kgc and can be updated in an alternative optimization way. overall, our contributions in this work include: ## problem formulation a knowledge graph g can be denoted as @xmath0, r, t p), where e refers to the set of entities and r denotes the set of relations, and t p is represented as a set of triples {(h, r, t)} ⊆ e × r × e, each of which includes a head entity h, a relation r, and a tail entity t. the kg completion problem is to infer the most plausible missing triples from the candidate set {(h, r, t)|@xmath1, r, t) / ∈ t p} for each incomplete triple (h, r, ?) (or inferring from {(h, r, t)|@xmath2, r, t) / ∈ t p} for (?, r, t)). in our few-shot low-resource kgc problem, the majority of relations have a few training triples. formally, for a rare relation r i , there are a support set s @xmath3, t)|(h, r i , t) ∈ t p} including only |s| training triples. the task is to predict the tail entity for a query triple (h, r i , ?), i.e., ranking all tail entity candidates such that the true tail entity t is ranked higher than other candidates in c h,r i , which is defined as c h,r @xmath4, r i , t c ) / ∈ t p}. following the notations in meta-learning, a few-shot task with @xmath5. since this k for a rare relation r i is often small (e.g., less than 10), the learning problem is organized by working on meta-tasks in the meta-training stage, there are a set of fewshot tasks t @xmath6, where each task t i represents a relation r @xmath7. a few-shot learn-ing model can be optimized using meta-training tasks following the meta-learning principle @xcite . in the meta-testing stage, with a set of testing tasks t @xmath8, the model should make inferences on new relation r @xmath9. note that all relations that appear in the meta-testing tasks are unseen during meta-training, i.e., r train ∩ r @xmath10. low-resource kgs suffer from severer incompleteness issue and consist of fewer relations. due to the long-tail distribution of these relations, there are only a small number of relations with a high frequency qualified to offer triples for task construction, leading to insufficient t train . our proposed solution enriches t train by generating and selecting beneficial new tasks for virtual relations which are undiscovered and not present in kgs. ## the proposed method in this section, we introduce the proposed method flow-kgc, describe each component in detail, and elaborate on the optimization and inference, following the overview shown in figure 1 . ## conclusion in this paper, we proposed a novel few-shot kg completion model to ease the adverse impact of the long-tail issue on low-resource kg completion. specifically, we designed a task generator based on a conditional variational autoencoder to generate synthetic meta-tasks and proposed a task selector to adaptively select beneficial meta-tasks for optimizing a few-shot learner, which further provides the feedback to update the task selector following the principle of reinforcement learning. these three components constitute our method flow-kgc. extensive experimental results demonstrate the rationality and effectiveness of our proposed method.