Continual Few-shot Relation Learning via Embedding Space Regularization and Data Augmentation

Chengwei Qin, Shafiq R. Joty

Abstract

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 scenarios. We formulate this challenging yet practical problem as Continual Few-shot Relation Learning (CFRL). We propose ERDA (Embedding space Regularization and Data Augmentation), a novel method that generalizes to new few-shot tasks while avoiding catastrophic forgetting of previous knowledge by enforcing extra constraints on relational embeddings and utilizing self-supervised data augmentation.

Introduction

In real-world Relation Extraction (RE) systems, the set of relations is dynamic. Systems must adapt as new types of relationships emerge. While Continual Relation Learning (CRL) addresses sequential task learning, it typically assumes abundant labeled data. Conversely, Few-shot Learning (FSL) handles data scarcity but ignores the need to retain old knowledge. This paper introduces CFRL to bridge this gap, focusing on learning novel relational patterns with very few labeled examples while maintaining performance on previous tasks.

The CFRL Challenge: Feature Distortion and Forgetting

The primary difficulty in CFRL is twofold:

  1. Feature Distortion: Learning from sparse examples often causes the model to overfit, "warping" the embedding space in a way that is incompatible with previously learned tasks.
  2. Catastrophic Forgetting: As the model updates its weights for new tasks, its performance on older tasks typically plummets. Standard memory-based methods often fail to maintain sharp decision boundaries when new tasks are learned from minimal data.

The ERDA Framework

The authors propose ERDA to address these issues through two main pillars: embedding space regularization and self-supervised data augmentation.

The ERDA framework architecture, illustrating the flow from training data and memory through data augmentation to the final similarity scoring.

1. Embedding Space Regularization

ERDA imposes geometric constraints on internal representations to stabilize the embedding space:

  • Multi-margin Loss ($L_{mm}$): Pushes examples of the same relation closer together, promoting intra-class compactness.
  • Pairwise Margin Loss ($L_{pm}$): Increases the distance between an example and its nearest incorrect label, making the model robust against confusingly similar relations.
  • Contrastive Learning with Hard Negatives: Using a tiny memory (one sample per relation), ERDA generates "hard negatives" by swapping entities. This forces the model to distinguish between valid relations and subtle, incorrect variations, effectively using memory to maintain sharp decision boundaries rather than just for simple replay.

2. Self-supervised Data Augmentation

To mitigate data scarcity, ERDA retrieves additional relevant examples from a large unlabeled corpus (e.g., Wikipedia) using two strategies:

  • Entity Matching: Searching for sentences containing the same entity pairs as the few-shot examples.
  • Similarity Search: Using a BERT-based relational similarity model to find semantically similar sentences, even if the entities differ.
t-SNE visualization comparing IDLVQ-C and ERDA, showing how ERDA maintains clearer separation between relation clusters in the embedding space during new tasks.

Key Insights and Experimental Results

  • Distortion Discovery: The authors found that few-shot learning actively distorts the embedding space. As shown in the t-SNE visualizations, ERDA's regularization acts as a stabilizer, preventing this warping and maintaining clear separation between classes.
  • Performance Gains: On the FewRel 10-way 5-shot benchmark, ERDA achieved a final accuracy of 53.23% after 8 tasks, outperforming the previous state-of-the-art (IDLVQ-C) by over 12%.
  • Resistance to Forgetting: While baseline models like SeqRun saw accuracy drop from ~92% to ~12% by the end of the sequence, ERDA maintained a much higher performance floor. Interestingly, in few-shot settings, ERDA can even outperform "Joint Training" because it avoids the confusion caused by massive data imbalance between initial and subsequent tasks.

Conclusion

ERDA demonstrates that combining discriminative margin-based losses with self-supervised data augmentation effectively enables models to learn on the fly from minimal data. By addressing feature distortion directly, the framework provides a robust solution for the practical challenge of continual few-shot relation learning. Future work may explore integrating meta-learning to further accelerate adaptation and scaling memory management for larger relation sets.

Summary updated

Abstract

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.
BibTeX
@inproceedings{qin2022continual,
  author = {Chengwei Qin and Shafiq R. Joty},
  title = {{Continual Few-shot Relation Learning via Embedding Space Regularization and Data Augmentation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.198},
}
Figure