Introduction
Relation Classification (RC) is a fundamental task in Natural Language Processing, aimed at identifying semantic relationships between entities in text. Traditional RC models typically operate under a "closed-world" assumption, where the set of relations is fixed during training. However, real-world applications often encounter novel relations with limited labeled data. Addressing this requires incremental few-shot learning, where a model must learn new relations from a few examples without suffering from "catastrophic forgetting" of previously learned base relations.
The Incompatible Embedding Problem
A significant challenge in incremental learning for RC is the incompatible feature embedding problem. When a model optimized for a set of base relations is presented with novel relations, the resulting feature space often becomes distorted.
As shown in the visualization above, while base relations form tight, distinct clusters, novel relations tend to "explode" across the embedding space, overlapping with existing knowledge and leading to high misclassification rates.
Proposed Method: IncreProtoNet
To overcome these issues, the researchers proposed IncreProtoNet, a two-phase framework designed to balance stability (retaining old knowledge) and plasticity (learning new knowledge).
Phase 1: Base Relation Training
The model first trains a Deep Prototypical Network on a large-scale dataset of base relations. This phase establishes a robust feature extractor and a set of base prototypes. Once trained, the base feature extractor is frozen to prevent the degradation of existing knowledge.
Phase 2: Incremental Few-shot Learning
In the second phase, the model adapts to novel relations using three primary components:
- MetaCNN Encoder: A separate encoder is introduced to capture features specific to novel relations, avoiding the distortion of the base embedding space.
- Prototype Attention Alignment (ProtoAtt-Alignment): This mechanism dynamically merges features from both the base and novel encoders. By calculating attention weights, the model can prioritize the most relevant features for a given query instance.
- Triplet Loss: An auxiliary triplet loss is employed to refine the embedding space, pushing different relation clusters apart while pulling instances of the same relation closer together.
Experimental Results
The model was evaluated on the FewRel dataset, comparing it against various baselines including standard Prototypical Networks and incremental learning methods adapted from computer vision (e.g., Imprint, LwoF).
The BERT-enhanced version, BERT-IncreProtoNet, demonstrated state-of-the-art performance. In a 5-way 5-shot setting, it achieved an overall accuracy of 82.26%. Notably, it maintained high performance on base relations while significantly improving the recognition of novel relations (65.77% accuracy), outperforming simpler incremental baselines by a wide margin. Ablation studies confirmed that both the attention alignment and the triplet loss are critical to the model's success.
Conclusion
IncreProtoNet effectively addresses the incompatible embedding problem in incremental few-shot relation classification. By utilizing a dual-encoder strategy and a dynamic attention alignment mechanism, the model achieves a superior balance between learning new information and preserving old knowledge. Future work may explore the scalability of this approach to hundreds of emerging relations in open-world scenarios.
Summary updated