[Paper Review] Improving Continual Relation Extraction through Prototypical Contrastive Learning
This paper proposes CRECL, a novel continual relation extraction framework that combines a classification network with a prototypical contrastive network to mitigate catastrophic forgetting. By contrasting each instance against learned prototypes of all candidate relations, CRECL enhances feature discrimination across tasks, significantly improving performance on TACRED and FewRel compared to SOTA baselines.
Continual relation extraction (CRE) aims to extract relations towards the continuous and iterative arrival of new data, of which the major challenge is the catastrophic forgetting of old tasks. In order to alleviate this critical problem for enhanced CRE performance, we propose a novel Continual Relation Extraction framework with Contrastive Learning, namely CRECL, which is built with a classification network and a prototypical contrastive network to achieve the incremental-class learning of CRE. Specifically, in the contrastive network a given instance is contrasted with the prototype of each candidate relations stored in the memory module. Such contrastive learning scheme ensures the data distributions of all tasks more distinguishable, so as to alleviate the catastrophic forgetting further. Our experiment results not only demonstrate our CRECL's advantage over the state-of-the-art baselines on two public datasets, but also verify the effectiveness of CRECL's contrastive learning on improving CRE performance.
Motivation & Objective
- Address catastrophic forgetting in continual relation extraction (CRE), where models degrade on previous tasks when learning new relations.
- Improve data distribution separability across old and new tasks to enhance long-term model performance.
- Enable practical class-incremental learning in CRE, where new relations are added without retraining on prior data.
- Leverage negative relation information more effectively than existing memory-based or regularization methods.
- Design a contrastive learning mechanism that stabilizes knowledge retention while maintaining accuracy on current tasks.
Proposed method
- Integrate a classification network with a contrastive network to jointly optimize relation classification and feature discrimination.
- Store relation prototypes in a memory module as the average embedding of $ L $ typical instances per relation, learned via K-means clustering.
- Apply prototypical contrastive learning by contrasting each input instance with all relation prototypes, promoting intra-class compactness and inter-class separability.
- Use a contrastive loss $ \\_\mathcal{L}_{contrast} $ that encourages positive pairs (instance and its true relation prototype) to be close and negative pairs to be far apart.
- Share the encoding network weights between the classification and contrastive branches to maintain consistency and reduce parameter overhead.
- Apply margin loss $ \\_\mathcal{L}_{mag} $ to increase the gap between optimal and suboptimal predictions, further improving generalization.
Experimental results
Research questions
- RQ1Can prototypical contrastive learning effectively reduce catastrophic forgetting in continual relation extraction?
- RQ2How does contrastive learning improve the separability of data distributions across old and new tasks in CRE?
- RQ3Does the proposed CRECL framework achieve better performance than SOTA methods on benchmark datasets like TACRED and FewRel?
- RQ4How sensitive is CRECL’s performance to memory size and prototype selection strategy?
- RQ5To what extent does contrastive learning preserve accuracy on current tasks while improving retention on previous tasks?
Key findings
- CRECL outperforms all SOTA baselines on both TACRED and FewRel, achieving the highest average F1 scores across all continual learning settings.
- The prototypical contrastive learning mechanism significantly improves data distribution separability, as visualized via t-SNE, reducing overlap between old and new task relations.
- CRECL is less sensitive to memory size $ L $ than prior methods like RP-CRE, maintaining stable performance even when $ L \geq 8 $, due to robust prototype representation.
- The ablation study confirms that K-means-based prototype selection is superior to random sampling, as CRECL-K shows lower accuracy and higher instability.
- The contrastive loss $ \\_\mathcal{L}_{contrast} $ and margin loss $ \\_\mathcal{L}_{mag} $ jointly enhance performance without degrading current task accuracy.
- CRECL-MAG, which combines margin loss with contrastive learning, shows the most stable performance with minimal decline on both current and historical tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.