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:
- 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.
- 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.
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.
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