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

Chengwei Qin, Shafiq R. Joty

Introduction: The Challenge of Continual Few-shot Learning

In dynamic real-world environments, Relation Extraction (RE) systems must adapt to new relation types (e.g., born_in, subsidiary_of) as they emerge. Traditional Continual Relation Learning (CRL) assumes that ample labeled data is available for every new task. However, in practice, new relations often appear with only a handful of examples—a scenario known as Few-shot Learning.

The intersection of these fields, Continual Few-shot Relation Learning (CFRL), presents a "double trouble" scenario: learning new relations from minimal data while preventing the model from overwriting weights optimized for previous tasks (catastrophic forgetting).

Comparison of standard Continual Relation Learning (CRL) and the proposed Continual Few-shot Relation Learning (CFRL) paradigms.

Methodology: The ERDA Framework

To address these challenges, the authors introduce ERDA (Embedding space Regularization and Data Augmentation). ERDA utilizes a Siamese encoder architecture and is built upon three core pillars:

1. Embedding Space Regularization

Rather than relying solely on standard cross-entropy, ERDA employs two margin-based losses to structure the embedding space. A Multi-margin loss forces samples of the same relation to cluster tightly while pushing different relations apart. A Pairwise margin loss specifically penalizes the model when the "closest incorrect" relation is too semantically similar to the ground truth.

2. Hard Negative Contrastive Learning

To mitigate forgetting with minimal memory overhead (storing only one sample per relation), ERDA generates "hard negatives" on the fly. By swapping an entity in a memory sample with a random entity from the current batch, the model is forced to focus on the relational context rather than memorizing specific entity pairs.

3. Self-Supervised Data Augmentation

To combat data scarcity in few-shot tasks, ERDA "hunts" for additional examples in an unlabeled corpus like Wikipedia. It employs Entity Matching and Similarity Search (using Faiss) to expand the training set before the main learning phase begins.

Key Results and Visual Proof

ERDA consistently outperformed state-of-the-art methods like EMAR and IDLVQ-C across multiple benchmarks. For instance, on the FewRel 10-way 5-shot benchmark, ERDA achieved 53.23% accuracy after 8 tasks, a nearly 13% improvement over the previous best method.

The effectiveness of the embedding space regularization is most evident in t-SNE visualizations. As shown below, ERDA maintains significantly tighter clusters and larger inter-class margins compared to IDLVQ-C, even after multiple rounds of sequential learning.

t-SNE visualization comparing the embedding space of IDLVQ-C and ERDA across tasks, demonstrating ERDA's superior cluster separation.

Conclusion

ERDA demonstrates that structuring the embedding space into distinct, compact "territories" is critical for successful continual learning under data scarcity. By combining regularization with targeted data augmentation, the framework effectively balances the need to learn new information with the preservation of existing knowledge.

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