Abstract
Continual Relation Extraction (CRE) requires models to learn new relations incrementally without forgetting previous ones. Current approaches often struggle in "true" few-shot scenarios where data is scarce from the very first task. We introduce Consistent Prototype Learning (ConPL), a framework that leverages prompt-based encoding and multi-information episodic memory to maintain stable feature representations. By enforcing classification and distribution consistency, ConPL minimizes prototype distortion—a key driver of catastrophic forgetting. Our experiments on FewRel and TACRED benchmarks show that ConPL significantly outperforms existing methods, maintaining high accuracy even after multiple learning stages.
Introduction: Addressing the "Few-Shot" Illusion
Relation Extraction (RE) is fundamental for identifying semantic links between entities. However, standard Continual Relation Extraction (CRE) benchmarks often provide an abundance of data for the initial task, which does not reflect real-world "few-shot" constraints. This paper identifies two primary hurdles in true N-way-K-shot Continual Relation Extraction (NK-CRE):
- Initial Data Scarcity: Models fail to build robust representations when the first task is also few-shot.
- Prototype Distortion: Memory-based methods often suffer as the feature space warps to accommodate new tasks, causing the "prototypes" (average representations) of old relations to shift and become unrecognizable.
Methodology: The ConPL Framework
ConPL addresses these challenges through three integrated components:
1. Prompt-Based Encoding
Instead of standard fine-tuning, ConPL utilizes BERT with discrete prompts. By inserting a [MASK] token between entities, the model can better leverage the pre-trained knowledge of the language model to extract high-quality features from minimal examples.
2. Multi-Information Episodic Memory
Unlike models that only store raw samples, ConPL maintains an episodic memory containing both vital samples and refined prototypical representations. These prototypes act as stable anchors for each relation class.
3. Consistency Learning and Focal Loss
The core of ConPL is its consistency module, which employs two specific losses:
- Classification Consistency ($L_{cc}$): Forces the model to keep the features of old samples close to their stored prototypes.
- Distribution Consistency ($L_{dc}$): Ensures the distance between samples and prototypes remains stable across tasks, preventing the feature space from warping. Additionally, a Focal Loss is used to help the model distinguish between highly similar relations (e.g., "father" vs. "mother") by focusing on hard-to-classify instances.
Key Insights: Distortion and Forgetting
A central contribution of this work is the empirical validation of the relationship between feature distortion and catastrophic forgetting. The authors demonstrate that the degree to which a relation's embedding shifts (distortion) directly correlates with the drop in model performance (forgetting).
As shown in Figure 1, ConPL effectively clusters in the low-distortion, low-forgetting quadrant, validating the effectiveness of the consistency losses in anchoring the feature space.
Experimental Results
ConPL was evaluated on the FewRel and TACRED datasets adapted for the NK-CRE setting. In a 10-way-2-shot configuration on FewRel, ConPL maintained superior accuracy across eight sequential tasks compared to baselines like EMAR, RP-CRE, and ERDA.
On the FewRel (10-way-5-shot) task, ConPL achieved a final accuracy of 85.77%, a significant improvement over the previous state-of-the-art (77.02%). Similar gains were observed on TACRED, where ConPL finished with 76.38% accuracy compared to the 68.67% achieved by the best baseline. Overall, ConPL demonstrated performance leaps of up to 20% in long-term accuracy over certain baseline configurations.
Conclusion
Consistent Prototype Learning (ConPL) provides a robust solution for the challenging NK-CRE task. By focusing on prototype consistency and leveraging prompt-based learning, it effectively mitigates catastrophic forgetting. Future work will explore the model's performance under domain shifts and investigate methods to further reduce the storage overhead of maintaining class prototypes.
Summary updated