# FREDA: Few-Shot Relation Extraction Based on Data Augmentation
## 1 Introduction  
Relation extraction (RE) is one of the fundamental tasks in building knowledge graphs (KGs) in natural language processing [1]. Its primary purpose is to identify the types of relations between pairs of entities in a sentence. Since [PERSON] et al. [2] use CNN-based models for RE tasks and propose methods to capture relevant tokens and sentence-level features automatically, neural-network-based RE methods have replaced mainly traditional algorithms and have been widely used in tasks, such as information retrieval [3], dialogue generation [4], and reading comprehension [5]. Most researchers use supervised learning methods for RE [6, 7], training models based on large amounts of labelled data. However, labelling the dataset is time-consuming and laborious in real life. To address this problem, some researchers have proposed the distantly supervised relation extraction (DSRE) methods. [PERSON] et al. [8] constructed an algorithm that does not rely on labelled data, reducing the dependence on the dataset but not focusing on the information in the bag; [PERSON] et al. [9] exchanged information about the sentences within the bag to make more use of the data in the available bag. The distant supervision method uses a known knowledge base aligned with a large text corpus to generate labelled datasets, which does not require a large amount of manually labelled data but suffers froma relatively severe noise interference problem, leading to the limited performance of RE. Therefore, the researchers propose the few-shot relation extraction (FSRE) method to solve the data scarcity problem [10]. Using a small number of samples in training models has been a research point that attracts more attention [11; 12]. In the field of computer vision, the use of few-shot learning (FSL) [13; 14] has shown promising results. Inspired by this, various FSL-based methods have been introduced in the task of FSRE. Prototype networks are one of the most popular algorithms. [PERSON] et al. [15] introduce prototype networks into FSRE based on a meta-learning framework [16], and the accuracy rate is effectively improved. The FSRE task initially uses only sentence information for model training. [PERSON] et al. [17] and [PERSON] et al. [18] demonstrated the usefulness by comparing them with global-level models and did not focus on information across relations in the dataset; [PERSON] et al. [19] alleviate the relation obfuscation problem using two specific mechanisms. All [17; 18; 19] try to fully use the valuable information in the dataset to achieve a more informative prototype network. Recent FSRE research efforts introduce external information such as relation information (description of relation information) [20; 21; 22] and entity concepts [23], thus effectively improving the performance of FSRE tasks. However, two problems remain: (1) The current work is overly dependent on external information and does not pay sufficient attention to the information already available in the dataset [24]. (2) The approach in using prototype networks tends to construct prototypes by averaging the instances of each class, ignoring the interactive information between the support set and the query set instances [25]. We propose a data enhancement approach in this paper to address the above issues. On the one hand, by introducing the relation triple information, data augmentation can be applied to the information of the instances in the support set; on the other hand, by incorporating an interactive attention module, the interaction information between the instances of the support set and the query set, as well as the instances of the relation triple and the query set, can be enhanced. As shown in Figure 1, the relation triple information contains two parts, the relation's name and the entity pairs, which we can obtain from the support set instances. Our method is as follows. First, we pass the relation triples and sentence information through the same encoder, mapping them to the same semantic space.