Existing continual relation learning ( CRL ) methods rely on plenty of labeled training data for learning a new task, which can be hard to acquire in real scenario as getting large and representative labeled data is often expensive and time-consuming. It is therefore necessary for the model to learn novel relational patterns with very few labeled data while avoiding catastrophic forgetting of previous task knowledge. In this paper, we formulate this challenging yet practical problem as continual few-shot relation learning ( CFRL ). Based on the finding that learning for new emerging few-shot tasks often results in feature distributions that are incompatible with previous tasks' learned distributions, we propose a novel method based on embedding space regularization and data augmentation. Our method generalizes to new few-shot tasks and avoids catastrophic forgetting of previous tasks by enforcing extra constraints on the relational embeddings and by adding extra relevant data in a self-supervised manner. With extensive experiments we demonstrate that our method can significantly outperform previous state-of-the-art methods in CFRL task settings. 1 1 Introduction Relation Extraction (RE) aims to detect the relationship between two entities in a sentence, for example, predicting the relation birthdate in the sentence  Kamala Harris was born in Oakland, California, on October 20, 1964 . for the two entities Kamala Harris and October 20, 1964 . It serves as a fundamental step for downstream tasks such as search and question answering (Dong et al., 2015; Yu et al., 2017). Traditionally, RE methods were built by considering a fixed static set of relations (Miwa and Bansal, 2016; Han et al., 2018a). However, similar to entity recognition, RE is also an open-vocabulary problem (Sennrich et al., 2016), 1 Code and models are available at https://github.com/qcwthu/Continual_Fewshot_Relation_Learning Figure 1: Difference between Continual Relation Learning ( CRL ) and Continual Few-shot Relation Learning ( CFRL ). Despite their effectiveness, one major limitation 2776 of these methods is that they all assume plenty of training data for learning new relations (tasks), which is hard to satisfy in real scenario where continual learning is desirable, as acquiring large labeled datasets for every new relation is expensive and sometimes impractical for quick deployment ( e.g., RE from news articles during the onset of an emerging event like Covid-19). where the relation set keeps growing as new relation types emerge with new data. A potential solution is to formalize RE as Continual Relation Learning or CRL (Wang et al., 2019). In CRL , the model learns relational knowledge through a sequence of tasks, where the relation set changes dynamically from the current task to the next. The model is expected to perform well on both the novel and previous tasks, which is challenging due to the existence of Catastrophic Forgetting phenomenon (McCloskey and Cohen, 1989; French, 1999) in continual learning. In this phenomenon, the model forgets previous relational knowledge after learning new relational patterns. Existing methods to address catastrophic forgetting in CRL can be divided into three categories: ( i ) regularization-based methods, ( ii ) architecture-based methods, and ( iii ) memory-based methods. Recent work shows that memory-based methods which save several key examples from previous tasks to a memory and reuse them when learning new tasks are more effective in NLP (Wang et al., 2019; Sun et al., 2020). Successful memory-based CRL methods include EAEMR (Wang et al., 2019), MLLRE (Obamuyide and Vlachos, 2019), EMAR (Han et al., 2020), and CML (Wu et al., 2021). In fact, one of the main objectives of continual learning is to quickly adapt to new environments or tasks by exploiting previously acquired knowledge, a hallmark of human intelligence (Lopez-Paz and Ranzato, 2017). If the new tasks are few-shot , the existing methods suffer from over-fitting as shown later in our experiments (4). Considering that humans can acquire new knowledge from a handful of examples, it is expected for the models to generalize well on the new tasks with few data. We regard this problem as Continual Few-shot Relation Learning or CFRL (Fig. 1). Indeed, in relation to CFRL , Zhang et al. (2021), Zhu et al. (2021) and Chen and Lee (2021) recently introduce methods for incremental few-shot learning in Computer Vision. Based on the observation that the learning of emerging few-shot tasks may result in distorted feature distributions of new data which are incompatible with previous embedding space (Ren et al., 2020), this work introduces a novel model based on Embedding space Regularization and Data Augmentation (ERDA) for CFRL . In particular, we propose a multi-margin loss and a pairwise margin loss in addition to the cross-entropy loss to impose further relational constraints in the embedding space. We also introduce a novel contrastive loss to learn more effectively from the memory data. Our proposed data augmentation method selects relevant samples from unlabeled text to provide more relational knowledge for the few-shot tasks. The empirical results show that our method can significantly outperform previous state-of-the-art methods. In summary, our main contributions are:  To the best of our knowledge, we are the first one to consider CFRL . We define the CFRL problem and construct a benchmark for the problem. We propose ERDA, a novel method for CFRL based on embedding space regularization and data augmentation. With extensive experiments, we demonstrate the effectiveness of our method compared to existing ones and analyse our results thoroughly. Conventional RE methods include supervised (Ze-lenko et al., 2002; Liu et al., 2013; Zeng et al., 2014; Miwa and Bansal, 2016), semi-supervised (Chen et al., 2006; Sun et al., 2011; Hu et al., 2020) and distantly supervised methods (Mintz et al., 2009; Yao et al., 2011; Zeng et al., 2015; Han et al., 2018a). These methods rely on a predefined relation set and have limitations in real scenario where novel relations are emerging. There have been some efforts which focus on relation learning without predefined types, including open RE (Shinyama and Sekine, 2006; Etzioni et al., 2008; Cui et al., 2018; Gao et al., 2020) and continual relation learning (Wang et al., 2019; Obamuyide and Vlachos, 2019; Han et al., 2020; Wu et al., 2021). Continual Learning (CL) aims to learn knowledge from a sequence of tasks. The main problem CL attempts to address is catastrophic forgetting (Mc-Closkey and Cohen, 1989), i.e., the model forgets previous knowledge after learning new tasks. Prior methods to alleviate this problem can be mainly divided into three categories. First, regularization-based methods impose constraints on the update of neural weights important to previous tasks to alleviate catastrophic forgetting (Li and Hoiem, 2017; Kirkpatrick et al., 2017; Zenke et al., 2017; Ritter et al., 2018). Second, architecture-based methods dynamically change model architectures to acquire new information while remembering previous knowledge (Chen et al., 2016; Rusu et al., 2016; Fernando et al., 2017; Mallya et al., 2018). Finally, memory-based methods maintain a memory to save key samples of previous tasks to prevent forgetting (Rebuffi et al., 2017; Lopez-Paz and Ranzato, 2017; Shin et al., 2017; Chaudhry et al., 2019). These methods mainly focus on learning a single type of tasks. More recently, researchers have considered lifelong language learning (Sun et al., 2020; Qin and Joty, 2022), where the model is expected to continually learn from different types of tasks. Few-shot Learning (FSL) aims to solve tasks containing only a few labeled samples, which faces the issue of over-fitting. To address this, existing methods have explored three different directions: ( i ) data-based methods use prior knowledge to augment data to the few-shot set (Santoro et al., 2016; Benaim and Wolf, 2018; Gao et al., 2020); ( ii ) model-based methods reduce the hypothesis space using prior knowledge (Rezende et al., 2016; Triantafillou et al., 2017; Hu et al., 2018); and 2777 ( iii ) algorithm-based methods try to find a more suitable strategy to search for the best hypothesis in the whole hypothesis space (Hoffman et al., 2013; Ravi and Larochelle, 2017; Finn et al., 2017). Summary. Existing work in CRL which involves a sequence of tasks containing sufficient training data, mainly focuses on alleviating the catastrophic forgetting of previous relational knowledge when the model is trained on new tasks. The work in few-shot learning mostly leverages prior knowledge to address the over-fitting of novel few-shot tasks. In contrast to these lines of work, we aim to solve a more challenging yet more practical problem CFRL where the model needs to learn relational patterns from a sequence of few-shot tasks continually. CFRL involves learning from a sequence of tasks T = ( T 1 , . . . , T n ) , where every task T k has its own training set D k train , validation set D k valid , and test set D k test . Each dataset D contains several samples { ( x i , y i ) } | D | i =1 , whose labels y i belong to the relation set R k of task T k . In contrast to the previously addressed continual relation learning ( CRL ), CFRL assumes that except for the first task which has enough data for training, the subsequent new tasks are all few-shot , meaning that they have only few labeled instances (see Fig. 1). For example, consider there are three relation learning tasks T 1 , T 2 and T 3 with their corresponding relation sets R 1 , R 2 , and R 3 , each having 10 relations. In CFRL , we assume the existing task T 1 has enough training data ( e.g., 100 samples for every relation in R 1 ), while the new tasks T 2 and T 3 are few-shot with only few ( e.g., 5 ) samples for every relation in R 2 and R 3 . Assuming that the relation number of each few-shot task is N and the sample number of every relation is K , we call this setup N -way K -shot continual learning. The problem setup of CFRL is aligned with the real scenario, where we generally have sufficient data for an existing task, but only few labeled data as new tasks emerge. The model in CFRL is expected to first learn T 1 well, which has sufficient training data to obtain good ability to extract the relation information in the sentence. Then at time step k , the model will be trained on the training set D k train of few-shot task Figure 2: Our framework for CFRL . T k . After learning T k , the model is expected to perform well on both T k and the previous k  1 tasks, as the model will be evaluated on  D k test =  ki =1 D i test consisting of all known relations after learning T k , i.e.,  R k =  ki =1 R i . This requires the model to overcome the catastrophic forgetting of previous knowledge and to learn new knowledge well with very few labeled data. To overcome the catastrophic forgetting problem, a memory M = (cid:8) M 1 , M 2 , ... (cid:9) , which stores some key samples of previous tasks is maintained during the learning. When the model is learning T k , it has access to the data saved in memory M 1 , ..., M k  1 . As there is no limit on the number of tasks, the size of memory M k is constrained to be small. Therefore, the model has to select only key samples from the training set D k train to save them in M k . In our CFRL setting, only one sample per relation is allowed to be saved in the memory. Our framework for CFRL is shown in Fig. 2 and Alg. 1 describes the overall training process (see Appendix A.1 for a block diagram). At time step k , given the training data D k train for the task T k , depending on whether the task is a few-shot or not, the process has four or three working modules, respectively. The general learning process (3.3) has three steps that apply to all tasks. If the task is a few-shot task ( k > 1 ), we apply an additional step to create an augmented training set (cid:101) D k train . For the initial task ( k = 1 ), we have (cid:101) D k train = D k train . For any task T k , we use a siamese model to encode every new relation r i  R k into r i  IR d as well as the sentences, and train the model on (cid:101) D k train to acquire relation information of the new data (3.3.2). To overcome forgetting, we select the most informative sample for each relation r i  R k from D k train and update the memory  M k (3.3.3). Finally, we combine (cid:101) D k train and  M k as the training data for learning new relational patterns and 2778 Algorithm 1 Training process at time step k Require: the training set D k train and the relation set R k of the current task T k , the current memory  M k  1 and the known relation set  R k  1 , the model  , the similarity model S  , and the unlabeled text corpus C . remembering previous knowledge (3.3.4). We also simultaneously update the representation of all relations in  R k , which involves making a forward pass through the current model. The learning and updating are done iteratively for convergence. For data augmentation in few-shot tasks (3.4), we select reliable samples with high relational similarity score from an unlabelled Wikipedia corpus using a fine-tuned BERT (Devlin et al., 2019), which serves as the relational similarity model S  . In the interests of coherence, we first present the general learning method followed by the augmentation process for few-shot learning. The siamese encoder ( f  ) aims at extracting generic and relation related features from the input. The input can be a labeled sentence or the name of a relation. We adopt two kinds of encoders:  Bi-LSTM To have a fair comparison with previous work, we use the same architecture as Han et al. (2020). It takes GloVe embeddings (Pen-nington et al., 2014) of the words in a given input and produces a vector representation through a Bi-LSTM (Hochreiter and Schmidhuber, 1997). BERT We adopt BERT base which has 12 layers and 110M parameters. As the new tasks are few-shot, we only fine-tune the 12-th encoding layer and the extra linear layer. We include special tokens around the entities (#' for the head entity and @' for the tail entity) in a given labeled sentence to improve the encoder's understanding of relation information. We use the [ CLS ] token features as the representation of the input sequence. At time step k , to have a good understanding of the new relations, we fine-tune the model on the expanded dataset (cid:101) D k train . The model f  first encodes the name of each new relation r j  R k into its representation r j  IR d by making a forward pass. Then, we optimize the parameters (  ) by minimizing a loss L new that consists of a cross entropy loss, a multi-margin loss and a pairwise margin loss. where  R k is the set of all known relations at step k , g ( , ) is a function used to measure similarity between two vectors ( e.g., cosine similarity or L2 distance), and  a,b is the Kronecker delta function  a,b = 1 if a equals b , otherwise  a,b = 0 . In inference, we choose the relation label that has the highest similarity with the input sentence (Eq. 8). To ensure that an example has the highest similarity with the true relation, we additionally design two margin-based losses, which increase the score between an example and the true label while decreasing the scores for the wrong labels. The first one is a multi-margin loss defined as: L mm = (cid:88) ( x i ,y i )  (cid:101) D k train |  R k | (cid:88) j =1 ,j  = t i max (cid:16) 0 , m 1  g ( f  ( x i ) , r t i ) + g ( f  ( x i ) , r j ) (cid:17) (2) where t i is the correct relation index in  R k satisfying r t i = y i and m 1 is a margin value. The L mm loss attempts to ensure intra-class compactness while increasing inter-class distances. The second one is a pairwise margin loss L pm : (cid:88) ( x i ,y i )  (cid:101) D k train max(0 , m 2  g ( f  ( x i ) , r t i ) + g ( f  ( x i ) , r s i )) (3) 2779 where m 2 is the margin for L pm and s i = arg max s g ( f  ( x i ) , r s ) s.t. s  = t i , the closest wrong label. The L pm loss penalizes the cases where the similarity score of the closest wrong label is higher than the score of the correct label (Yang et al., 2018). Both L mm and L pm improve the discriminative ability of the model (4.4). The total loss for learning on T k is defined as: L new =  ce L ce +  mm L mm +  pm L pm (4) where  ce ,  mm and  pm are the relative weights of the component losses, respectively. After training the model f  with Eq. (4), we use it to select one sample per new relation. Specifically, for every new relation r j  R k , we obtain the centroid feature c j by averaging the embeddings of all samples labeled as r j in D k train as follows. where D kr j = { ( x i , y i ) | ( x i , y i )  D k train , y i = r j } . Then we select the instance closest to c j from D kr j as the most informative sample and save it in memory M k . Note that the selection is done from D k train , not from the expanded set (cid:101) D k train . As the learning of new relational patterns may cause catastrophic forgetting of previous knowledge (see baselines in 4), our model needs to learn from the memory data to alleviate forgetting. We combine the expanded set (cid:101) D k train and the whole memory data  M k =  kj =1 M j into (cid:101) H k to allow the model to learn new relational knowledge and consolidate previous knowledge. However, the memory data is limited containing only one sample per relation. To learn effectively from such limited data, we design a novel method to generate a hard negative sample set P i for every sample in  M k . The negative samples are generated on the fly. After sampling a mini-batch B t from (cid:101) H k , we consider all memory data in B t as MB t . For every sample ( x i ,  y i ) in MB t , we replace its head entity e hi or tail entity e ti with the corresponding entity of a randomly selected sample in the same batch B t to get the hard negative sample set P i = { ( x P i j ,  y i ) } | P i | j =1 . margin-based contrastive loss L con as follows. L con = (cid:88) ( x i ,  y i )  M Bt max (cid:16) 0 , m 3  g ( f  ( x i ) , r  t i )+ (cid:88) ( x Pij ,  y i )  P i g ( f  ( x P i j ) , r  t i ) (cid:17) (6) where  t i is the relation index satisfying r  t i =  y i and m 3 is the margin value for L con . This loss forces the model to distinguish the valid relations from the hard negatives so that the model learns more precise and fine-grained relational knowledge. In addition, we also use the three losses L ce and L mm and L pm defined in 3.3.2 to update  on B t . The total loss on the memory data is: L mem =  ce L ce +  mm L mm +  pm L pm +  con L con (7) where  ce ,  mm ,  pm and  con are the relative weights of the corresponding losses. Updating Relation Embeddings After training the model on (cid:101) H k for few steps, we use the memory  M k to update the relation embedding r i of all known relations. For a relation r i   R k , we average the embeddings (obtained by making a forward pass through f  ) of the relation name and memory data to obtain its updated representation r i . The training of  and updating of r i is done iteratively to grasp new relational patterns while alleviating the catastrophic forgetting of previous knowledge. For a given input x i in  D k test , we calculate the similarity between x i and all known relations, and pick the one with the highest similarity score: For each few-shot task T k , we aim to get more data by selecting reliable samples from an unlabeled corpus C with tagged entities before the general learning process (3.3) begins. We achieve this using a relational similarity model S  and sentences from Wikipedia as C . The model S  (described later) takes a sentence as input and produces a normalized vector representation. The cosine similarity between two vectors is used to measure the relational similarity between the two corresponding sentences. A higher similarity means the two sentences are more likely to have the same relation label. We propose two novel selection methods, which are complementary to each other. (a) Augmentation via Entity Matching For each instance ( x i , y i ) in D k train , we extract its entity pair ( e hi , e ti ) with e hi being the head entity and e ti being the tail entity. As sentences with the same entity pair are more likely to express the same relation, we first collect a candidate set Q = { (cid:101) x j } |Q| j =1 from C , where (cid:101) x j shares the same entity pair ( e hi , e ti ) with x i . If Q is a non-empty set, we pair all (cid:101) x j in Q with x i , and denote each pair as  (cid:101) x j , x i  . Then we use S  to obtain a similarity score s j for  (cid:101) x j , x i  . After getting scores for all pairs, we pick the instances (cid:101) x j with similarity score s j higher than a predefined threshold  as new samples and label them with relation y i . The selected instances are then augmented to D k train as additional data. (b) Augmentation via Similarity Search The hard entity matching could be too restrictive at times. For example, even though the sentences  Harry Potter is written by Joanne Rowling  and  Charles Dickens is the author of A Tale of Two Cities  share the same relation author , hard matching fails to find any relevance. Therefore, in cases when entity matching returns an empty Q , we resort to similarity search using Faiss (Johnson et al., 2017). Given a query vector q i , it can efficiently search for vectors { v j } Kj =1 with the topK highest similarity scores in a large vector set V . In our case, q i is the representation of x i and V contains the representations of the sentences in C . We use S  to obtain these representations; the difference is that V is pre-computed while q i is obtained during training. We labeled the topK most similar instances with y i and augment them to D k train . Similarity Model To train S  , inspired by Soares et al. (2019), we adopt a contrastive learning method to fine-tune a BERT base model on C , whose sentences are already tagged with entities. Based on the observation that sentences with the same entity pair are more likely to encode the same relation, we use sentence pairs containing the same entities in C as positive samples. For negatives, instead of using all sentence pairs containing different entities, we select pairs sharing only one entity as hard negatives ( i.e., pair ( x i , x j ) where e hi = e hj and e ti  = e tj or e ti = e tj and e hi  = e hj ). We randomly sample the same number of negative samples as the positive ones to balance the training. where S  ( x ) is the normalized representation of x obtained from the final layer of BERT. Then we optimize the parameters  of S  by minimizing a binary cross entropy loss L pretrain as follows. where C p is a positive batch and C n is a negative batch. This objective tries to ensure that sentence pairs with the same entity pairs have higher cosine similarity than those with different entities. We define the benchmark and evaluation metric for CFRL before presenting our experimental results. Benchmark As the benchmark for CFRL needs to have sufficient relations as well as data and be suitable for few-shot learning, we create the CFRL benchmark based on FewRel (Han et al., 2018b). FewRel is a large-scale dataset for few-shot RE, which contains 80 relations with hundreds of samples per relation. We randomly split the 80 relations into 8 tasks, where each task contains 10 relations ( 10-way ). To have enough data for the first task T 1 , we sample 100 samples per relation. All the subsequent tasks T 2 , ..., T 8 are few-shot; for each relation, we conduct 2-shot , 5-shot and 10-shot experiments to verify the effectiveness of our method. In addition, to demonstrate the generalizability of our method, we also create a CFRL benchmark based on the TACRED dataset (Zhang et al., 2017) which contains only 42 relations. We filter out the special relation n/a (not available) and split the remaining 41 relations into 8 tasks. Except for the first task that contains 6 relations, all other tasks have 5 relations ( 5-way ). Similar to FewRel, we randomly sample 100 examples per relation in T 1 and conduct 5-shot and 10-shot experiments. Metric At time step k , we evaluate the model performance through relation classification accuracy on the test sets  D k test =  ki =1 D i test of all seen tasks {T i } ki =1 . This metric reflects whether the model can alleviate catastrophic forgetting while acquiring novel knowledge well with very few data. Since the model performance might be influenced by task sequences and few-shot training samples, we run every experiment 6 times each time with a different random seed to ensure a random task order and model initialization, and report the average 2781 Method Task index 1 2 3 4 5 6 7 8 SeqRun 92 . The model settings are shown in Appendix A.2. We compare our approach with the following baselines:  SeqRun fine-tunes the model only on the training data of the new tasks without using any memory data. It may face serious catastrophic forgetting and serves as a lower bound . Joint Training stores all previous samples in the memory and trains the model on all data for each new task. It serves as an upper bound in CRL . EMR (Wang et al., 2019) maintains a memory for storing selected samples from previous tasks. When training on a novel task, EMR combines the new training data and memory data. EMAR (Han et al., 2020) is the state-of-the-art on CRL , which adopts memory activation and reconsolidation to alleviate catastrophic forgetting. IDLVQ-C (Chen and Lee, 2021) introduces quantized reference vectors to represent previous knowledge and mitigates catastrophic forgetting by imposing constraints on the quantized vectors and embedded space. It was originally proposed for image classification with state-of-the-art results in incremental few-shot learning. We compare the performance of different methods using the same setting as EMAR (Han et al., 2020), which uses a Bi-LSTM encoder. We also report the results with a BERT encoder. settings. 2 From the results, we can observe that:  Our proposed ERDA outperforms previous baselines in all CFRL settings, which demonstrates the superiority of our method. Simply fine-tuning the model with new few-shot examples leads to rapid drops in accuracy due to severe over-fitting and catastrophic forgetting. Although EMR and EMAR adopt a memory module to alleviate forgetting, their performance still decreases quickly as they require plenty of training data for learning a new task. Compared with EMR and EMAR, IDLVQ-C is slightly better as it introduces quantized vectors that can better represent the embedding space of few-shot tasks. However, IDLVQ-C does not necessarily push the samples from different relations to be far apart in the embedding space and the up-2 To avoid visual clutter, we report only mean scores over 6 runs in Table 1 and refer to Table 6 and Table 5 in Appendix for variance and elaborate results for different task order. dating method for the reference vectors may not be optimal. ERDA outperforms IDLVQ-C by a large margin through embedding space regularization and self-supervised data augmentation. To verify this, we show the embedding space of IDLVQ-C and ERDA using t-SNE (Van der Maaten and Hinton, 2008). We randomly choose four classes from the first task of FewRel and two classes from the new task, and visualize the test data of these classes in Fig. 4. As can be seen, the embedding space obtained by ERDA shows better intra-class compactness and larger inter-class distances. Unlike CRL , joint training does not always serve as an upper bound in CFRL due to the extremely imbalanced data distribution. Benefiting from the ability to learn feature distribution with very few data, both ERDA and IDLVQ-C perform better than joint training in the 2-shot setting. However, as the number of few-shot samples increases, the performance of IDLVQ-C falls far behind joint training, while ERDA still performs better. In the 5-shot setting, ERDA could achieve better results than joint training which verifies the effectiveness of self-supervised data augmentation (more on this in 4.4). Although ERDA performs worse than joint training in the 10-shot setting, its results are still much better than other baselines. After learning all few-shot tasks, ERDA outperforms IDLVQ-C by 9.69 % , 12.67 % and 11.49 % in the 2-shot , 5-shot and 10-shot settings, respectively. Moreover, the relative gain of ERDA keeps growing with the increasing number of new few-shot tasks. This demonstrates the ability of our method in handling a longer sequence of CFRL tasks. TACRED Benchmark Fig. 5 shows the 5-way 5-shot and 5-way 10-shot results on TACRED. We can see that here also ERDA outperforms all other methods by a large margin which verifies the strong 2 4 6 8 Task index 40 50 60 70 80 90 100 A cc u r a c y ( % ) Results with BERT We show the results with BERT base of different methods on FewRel in Fig. 6 for 10-way 2-shot and 10-shot and Table 4 for 10-way 5-shot (in Appendix). The results of on TACRED benchmark are shown in Fig. 7 for 5-way 5-shot and 10-shot . From the results, we can observe that ERDA outperforms previous baselines in all CFRL settings with a BERT encoder. We conduct several ablations to analyze the contribution of different components of ERDA on the FewRel 10-way 5-shot setting. In particular, we investigate seven other variants of ERDA by removing one component at a time: ( a ) the multi-margin loss L mm , ( b ) the pairwise margin loss L pm , ( c ) the margin-based contrastive loss L con , ( d ) the whole 2-stage data augmentation module, ( e ) the entity matching method of augmentation, ( f ) the similarity search method of augmentation, and ( g ) memory. From the results in Table 3, we can observe that all components improve the performance of our model. Specifically, L mm yields about 1.51 % performance boost as it brings samples of the same 2783  con 0 0.01 0.02 0.05 0.1 0.2 0.5 1.0 Accuracy ( % ) 51 . relation closer to each other while enforcing larger distances among different relation distributions. The L pm improves the accuracy by 3.18 % , which demonstrates the effect of contrasting with the nearest wrong label. The adoption of L con leads to 1.28 % improvement, which shows that generating hard negative samples for memory data can help to better remember previous relational knowledge. To better investigate the influence of L con , we conduct experiments with different  con and show the results in Table 2. We can see that the model achieves the best accuracy of 53.38 with  con = 0 . 02 while the accuracy is only 52.13 with  con = 0 . 5 . In addition, the performance of the variant without L con is worse than the performance of all other variants, which demonstrates the effectiveness of L con . The data augmentation module improves the performance by 1.72 % as it can extract informative samples from unlabeled text which provide more relational knowledge for few-shot tasks. The results of variants without entity matching or similarity search verify that the two data augmentation methods are generally complementary to each other. One could argue that the data augmentation module increases the complexity of ERDA compared to other models. However, astute readers can find that even without data augmentation, ERDA outperforms IDLVQ-C significantly for all tasks (compare ERDA w.o. DA' with the baselines in Table 1). ERDA's Performance under CRL Although ERDA is designed for CFRL , we also evaluate the embedding space regularization (ERDA w.o. DA') in the CRL setting. We sample 100 examples per relation for every task in FewRel and compare our method with the state-of-the-art method EMAR. The results are shown in Fig. 8. We can see that ERDA outperforms EMAR in all tasks by 1.25 -4.95 % proving that the embedding regularization can be a general method for CRL . We have introduced continual few-shot relation learning ( CFRL ), a challenging yet practical problem where the model needs to learn new relational knowledge with very few labeled data continually. We have proposed a novel method, named ERDA, to alleviate the over-fitting and catastrophic forgetting problems which are the core issues in CFRL . ERDA imposes relational constraints in the embedding space with innovative losses and adds extra informative data for few-shot tasks in a self-supervised manner to better grasp novel relational patterns and remember previous knowledge. Extensive experimental results and analysis show that ERDA significantly outperforms previous methods in all CFRL settings investigated in this work. In the future, we would like to investigate ways to combine meta-learning with CFRL .
abstain abstain method objective objective objective abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain objective abstain abstain abstain abstain objective objective objective result objective method objective objective other other other other other other other other other other other other other other other other objective abstain abstain abstain abstain abstain method abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain method other abstain method abstain method abstain abstain abstain method abstain method abstain abstain method abstain abstain abstain abstain method method other abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method method abstain other abstain method abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain abstain abstain abstain method abstain abstain abstain abstain method method method method abstain method abstain abstain result abstain abstain abstain abstain result abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method abstain method abstain other result abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result objective objective abstain objective objective