Few-Shot, No Problem: Descriptive Continual Relation Extraction

Nguyen Xuan Thanh, Anh Duc Le, Quyen Tran, Thanh-Thien Le, Linh Ngo Van, Thien Huu Nguyen · OpenReview

Abstract

Few-shot Continual Relation Extraction (CRE) is a crucial challenge for enabling AI systems to identify and adapt to evolving relationships in dynamic real-world domains. Traditional memory-based approaches often overfit to limited samples, failing to reinforce old knowledge. We propose DCRE (Descriptive Continual Relation Extraction), a retrieval-based framework that leverages Large Language Models (LLMs) to generate stable relation descriptions. These descriptions act as anchors in the latent space, facilitating a bi-encoder training paradigm and a retrieval-based inference method. Our approach significantly advances the state-of-the-art on FewRel and TACRED benchmarks, effectively addressing catastrophic forgetting.

1. Introduction

Continual Relation Extraction (CRE) requires models to learn a sequence of new relation types without losing the ability to recognize previously learned ones. This task is particularly difficult in "few-shot" scenarios, where only a handful of examples (e.g., 5–10) are available for each new relation.

Standard approaches often rely on a "memory buffer" to store and replay past samples. However, in few-shot settings, these samples are frequently unrepresentative of the broader class distribution, leading the model to overfit to specific noise rather than the underlying semantics. This results in catastrophic forgetting, where the model's performance on older tasks plummets as it adapts to new data.

2. The DCRE Framework

To overcome these limitations, we introduce DCRE, which shifts the focus from sample-based rehearsal to description-based retrieval.

2.1 LLM-Generated Semantic Anchors

Instead of relying on the brief, often ambiguous relation labels provided in standard datasets, DCRE utilizes a Large Language Model (LLM)—specifically Gemini 1.5—to generate $K$ detailed descriptions and illustrative examples for every relation. These descriptions serve as stable "pivots" or anchors in the latent space. Because the definition of a relation remains constant even as new tasks are introduced, these anchors provide a consistent reference point for the model.

2.2 Description-Pivot Learning

The training phase employs a bi-encoder architecture designed to align sample representations with their corresponding descriptive anchors. Two primary loss functions guide this alignment:

  • Hard Margin Loss (HM): This contrastive objective forces the model to maximize the distance between a sample and "hard" negative descriptions while minimizing the distance to its true descriptive anchor.
  • Mutual Information Loss (MI): This loss maximizes the mutual information between input samples and their retrieved descriptions, ensuring that the latent representations capture the essential semantic features defined by the LLM.

2.3 Descriptive Retrieval Inference (DRI)

During inference, DCRE treats relation extraction as a retrieval task rather than a simple classification problem. It employs Reciprocal Rank Fusion (RRF) to combine two distinct scores:

  1. Prototype Proximity: The spatial distance between the test sample and the mean vector (prototype) of known classes.
  2. Semantic Similarity: The similarity between the test sample and the LLM-generated relation descriptions.

By fusing these scores, the model achieves a more robust prediction that balances learned sample distributions with fixed semantic definitions.

3. Experimental Evaluation

We evaluated DCRE on two primary benchmarks: FewRel (a large-scale few-shot dataset) and TACRED (a noisier, more challenging dataset).

3.1 Results

DCRE established new state-of-the-art (SOTA) benchmarks across multiple configurations:

  • Accuracy Improvements: Using a BERT backbone, DCRE outperformed the previous best method (CPL) by 3.74% on FewRel and 5.82% on TACRED.
  • Mitigating Forgetting: The "Accuracy Drop" ($\Delta$), which quantifies performance degradation over sequential tasks, was significantly reduced. On FewRel, DCRE showed a drop of 26.69%, compared to 34.40% for the RP-CRE baseline.
  • Backbone Scalability: When integrated with LLM2Vec, DCRE achieved over 80% accuracy on FewRel even after eight sequential tasks, demonstrating that the method scales effectively with more powerful encoders.

4. Discussion and Conclusion

The success of DCRE highlights several key insights for continual learning:

  • Stability through Semantics: While individual samples are variable, relation definitions are constant. Anchoring models to these definitions provides a safeguard against the shifting distributions inherent in continual learning.
  • Efficient LLM Integration: DCRE uses the LLM as an "offline expert." The LLM generates descriptions once, meaning the system gains semantic depth without the high latency or cost of calling an LLM during training or inference.
  • Retrieval as a Robust Alternative: Framing classification as a retrieval task against stable anchors proves more resilient to forgetting than traditional linear classification heads.

Future work will explore making these descriptions dynamic to adapt to evolving contexts and optimizing the retrieval process for scenarios involving thousands of relations.

Summary updated

BibTeX
@inproceedings{thanh2025few,
  author = {Nguyen Xuan Thanh and Anh Duc Le and Quyen Tran and Thanh-Thien Le and Linh Ngo Van and Thien Huu Nguyen},
  title = {{Few-Shot, No Problem: Descriptive Continual Relation Extraction}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i24.34715},
}
Figure