Adaptive Prompting for Continual Relation Extraction: A Within-Task Variance Perspective

Minh Le, Tien Ngoc Luu, An Nguyen The, Thanh-Thien Le, Trang Nguyen, Tung Thanh Nguyen, Linh Ngo Van, Thien Huu Nguyen

Abstract

Continual Relation Extraction (CRE) requires models to learn new relation types sequentially without forgetting previously acquired knowledge. Traditional rehearsal-based methods mitigate catastrophic forgetting by storing past examples, which poses privacy and storage challenges. Prompt-based methods offer a rehearsal-free alternative but often struggle with "within-task variance"—the linguistic diversity within a single relation—and inaccurate task selection at test time. This paper introduces WAVE-CRE (Within-Task Variance Awareness for Continual Relation Extraction), a framework that utilizes task-specific prompt pools and generative latent replay. By modeling latent feature distributions and employing a dedicated task predictor, WAVE-CRE achieves state-of-the-art performance on standard benchmarks without storing raw data.

Introduction

The goal of Continual Relation Extraction (CRE) is to identify relationships between entities in a stream of text data. The primary obstacle is catastrophic forgetting, where learning new tasks degrades performance on older ones. While rehearsal-based methods are effective, they are often impractical due to privacy constraints. Prompt-based methods, which use small sets of tunable parameters to guide frozen models, have emerged as a promising alternative. However, existing prompt-based approaches typically assign a single prompt per task, failing to capture the inherent variance in how a single relation can be expressed. WAVE-CRE addresses these limitations by introducing a "Mixture of Experts" approach via prompt pools.

Methodology

WAVE-CRE is built upon three core components designed to handle variance and prevent forgetting:

  1. Task-specific Prompt Pools: Instead of a static prompt, each task is assigned a pool of prompts. A key-query mechanism selects the most appropriate prompt for a given input, allowing the model to adapt to different linguistic contexts within the same relation.
  2. Generative Latent Replay: To avoid storing raw examples, WAVE-CRE models the distributions of prompted representations as Gaussians. During training for new tasks, synthetic features are replayed from these distributions to maintain the relation classifier's performance on past tasks.
  3. Dedicated Task Predictor: To solve the challenge of selecting the correct prompt pool at test time, a Multi-Layer Perceptron (MLP) is trained on generated latent features to predict the task identity of incoming samples.
The WAVE-CRE architecture, highlighting the task-specific prompt pool and the flow from input to relation classification.

Experimental Results

The framework was evaluated on the FewRel and TACRED datasets, each split into 10 sequential tasks. WAVE-CRE consistently outperformed existing rehearsal-free methods.

  • FewRel: On the final task ($T_{10}$), WAVE-CRE achieved 85.0% accuracy, significantly higher than previous prompt-based methods like HiDe-Prompt (67.2%) and L2P (44.6%).
  • TACRED: It reached 78.7% accuracy at the final stage, maintaining a lead over other rehearsal-free methods.

Notably, WAVE-CRE's performance is competitive with state-of-the-art rehearsal-based methods (like CDec+ACA) that require a memory buffer, demonstrating the effectiveness of generative latent replay and prompt pools in maintaining high accuracy without compromising data privacy.

Performance comparison of WAVE-CRE against baseline models on FewRel and TACRED datasets across 10 sequential tasks.

Conclusion and Future Work

WAVE-CRE demonstrates that accounting for within-task variance through prompt pools and utilizing generative latent replay can effectively mitigate catastrophic forgetting in CRE. While the current Gaussian modeling of features is efficient, future research could explore more complex generative models like VAEs and more sophisticated expert architectures to further enhance the model's robustness and accuracy.

Summary updated

BibTeX
@inproceedings{le2025adaptive,
  author = {Minh Le and Tien Ngoc Luu and An Nguyen The and Thanh-Thien Le and Trang Nguyen and Tung Thanh Nguyen and Linh Ngo Van and Thien Huu Nguyen},
  title = {{Adaptive Prompting for Continual Relation Extraction: A Within-Task Variance Perspective}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i23.34616},
}
Figure