Introduction
In modern dialog systems, Intent Detection is the core component that interprets user utterances. However, these systems face significant challenges in dynamic environments where new intents (e.g., "check vaccine status") emerge frequently. While standard Few-Shot Intent Detection focuses on learning new classes from limited data, Generalized Few-Shot Intent Detection (GFSID) presents a more realistic and difficult scenario: the model must simultaneously categorize "seen" intents (learned with abundant data) and "novel" intents (learned from only 1–5 examples).
Previous methods often relied on episodic learning, which tends to neglect the preservation of knowledge from original categories, leading to performance degradation on seen intents. This paper introduces a novel framework that reframes GFSID as a class-incremental learning problem, combining prompt-based learning with knowledge-memorizing prototypes to achieve state-of-the-art results.
Methodology
The proposed framework operates in two distinct phases to manage the transition from seen to novel intents:
- Phase 1 (Seen Intents): The model is trained on a large labeled dataset of "seen" intents to establish a robust baseline.
- Phase 2 (Joint Intents): The model is fine-tuned on a combination of seen and novel intents, where novel intents have very few samples.
Prompt-based Learning and Prototypes
Instead of traditional classification layers, the model wraps user input in a template (e.g., "The intent is to [MASK]") and utilizes a Pre-trained Language Model (PLM) like RoBERTa. The hidden vector at the [MASK] position serves as the representation. Supervised Contrastive Learning (SCL) is employed to cluster samples of the same intent and separate different ones, creating distinct "prototypes" (mean vectors) in the vector space.
Knowledge Preservation
To mitigate catastrophic forgetting during Phase 2, two strategies are introduced:
- Data-Agnostic Knowledge Preservation (DAKP): Employs $L_2$ regularization to keep model weights close to Phase 1 parameters, suitable for privacy-sensitive applications.
- Data-Dependent Knowledge Preservation (DDKP): Utilizes a "virtual memory" of old samples and Knowledge Distillation ($L_{KD}$) to ensure the updated model retains the behavior of the initial model on seen data.
Experimental Evaluation
The framework was evaluated on two benchmark datasets: SNIPS (user commands like "Play Music") and NLUE (complex natural language understanding). Testing included both episodic (standard meta-learning) and non-episodic (realistic single-round) settings.
Key Results
The proposed DDKP and DAKP models significantly outperformed existing baselines across both datasets. In the realistic non-episodic ("noneps") setting on the NLUE dataset, the model achieved accuracy improvements of 10.18% for 1-shot and 6.49% for 5-shot scenarios compared to previous state-of-the-art methods.
Ablation studies confirmed the necessity of the knowledge preservation components; removing them led to a performance drop from approximately 94% to 88% in 1-shot SNIPS tasks.
Discussion and Conclusion
The primary insight of this work is that GFSID is more effectively addressed through incremental learning than standard episodic meta-learning. By establishing a stable foundation on seen intents and using prototypes as plug-and-play anchors, the model can efficiently incorporate new intents. While DDKP provides superior performance by leveraging stored data, DAKP offers a viable zero-data alternative for privacy-constrained environments.
Future research may explore scaling the model to handle a continuous stream of many new intent phases (lifelong learning) and automating prompt engineering to reduce sensitivity to template selection. Additionally, optimizing the computational overhead of virtual memory for edge device deployment remains an open challenge.
Summary updated