Introduction
Continual Relation Extraction (CRE) is a critical task in natural language processing where a model must learn to identify new semantic relationships between entities from a continuous stream of data. The central challenge in this setting is catastrophic forgetting: as the model adapts to new tasks, it tends to overwrite knowledge acquired from previous ones.
While traditional "rehearsal-based" methods mitigate this by storing a subset of old data, they face significant hurdles regarding data privacy and storage efficiency. Recent prompt-based approaches offer a rehearsal-free alternative by using small, learnable parameters to guide the model. However, these methods often struggle with "within-task variance"—the linguistic diversity within a single task—and "cross-task interference," where similar contexts across different tasks lead to confusion.
The WAVE-CRE Framework
To address these limitations, we propose WAVE-CRE (Within-Task Variance Awareness for CRE). This framework introduces three innovative components designed to capture task diversity and preserve historical knowledge without storing raw text.
1. Task-Specific Prompt Pools
Instead of assigning a single prompt to each task, WAVE-CRE maintains a pool of prompts for every task, inspired by the Mixture of Experts (MoE) architecture. For a given input, a key-query mechanism selects the most relevant prompts from the pool. This allows the model to adapt to various linguistic "sub-styles" within a task, effectively modeling within-task variance. Mathematically, this approach increases model flexibility while maintaining a low parameter count by using short "expert" lengths.
2. Generative Latent Replay
To prevent forgetting in the shared relation classifier, WAVE-CRE employs a generative approach. Rather than saving raw text snippets, the model stores the mean and covariance of the latent representations (embeddings) for each relation, assuming a Gaussian distribution. During the training of new tasks, the model "imagines" previous data by sampling from these stored distributions to refresh the classifier's memory. This method is both privacy-preserving and memory-efficient.
3. Dedicated Task Predictor
Since the task identity is unknown at test time, WAVE-CRE utilizes a dedicated Multi-Layer Perceptron (MLP) to predict which task a sentence belongs to. This ensures that the correct task-specific prompt pool is activated for the final relation classification.
Experimental Evaluation
We evaluated WAVE-CRE on two standard benchmarks: FewRel (80 relations) and TACRED (42 relations). Both datasets were partitioned into 10 sequential tasks to simulate a continual learning environment.
Key Results
As shown in the experimental results, WAVE-CRE establishes a new state-of-the-art for rehearsal-free CRE methods:
- Superior Accuracy: On the final task ($T_{10}$) of the FewRel dataset, WAVE-CRE achieved 85.0% accuracy, vastly outperforming other prompt-based methods such as L2P (44.6%) and HiDe-Prompt (67.2%).
- Competitive with Rehearsal: Remarkably, WAVE-CRE matches or exceeds the performance of rehearsal-based methods that store actual raw data, demonstrating the effectiveness of generative latent replay.
- Ablation Insights: Ablation studies confirmed the importance of the prompt pool; removing it resulted in a 1.8% drop in accuracy on the TACRED dataset, proving that capturing within-task variance is essential for high performance.
Conclusion
WAVE-CRE demonstrates that by accounting for within-task variance through prompt pools and utilizing generative latent replay, models can effectively learn new relations without forgetting old ones. While the system's performance is currently tied to the accuracy of its task predictor, it represents a significant step forward in developing privacy-preserving, scalable continual learning systems for natural language processing. Future work will explore more complex "expert" designs and non-Gaussian latent modeling to further enhance the framework's robustness.
Summary updated