Decoupling Representation and Knowledge for Few-Shot Intent Classification and Slot Filling

Jie Han, Yixiong Zou, Haozhao Wang, Jun Wang, Wei Liu, Yao Wu, Tao Zhang, Ruixuan Li

Abstract

Few-shot Natural Language Understanding (NLU) faces significant challenges due to domain gaps where intent-slot relationships vary across tasks. We present Joint Modeling with Relationship Masking (JMRM), a framework that decouples universal semantic representations from domain-specific knowledge. By using specialized masking modules (I2S-Mask and Masked Slot Decoding) to capture task-specific rules on the fly, JMRM avoids the "transfer disaster" common in traditional methods. Evaluations on Snips and FewJoint benchmarks demonstrate that JMRM achieves state-of-the-art performance, particularly in joint accuracy.

Introduction

Natural Language Understanding (NLU) typically involves two primary tasks: Intent Classification (e.g., identifying that a user wants to "Book a Flight") and Slot Filling (e.g., extracting "London" as the destination). In few-shot scenarios, models must adapt to new domains with only a handful of labeled examples.

The standard approach involves training on a data-rich source domain and transferring that experience to a target domain. However, researchers have identified a major bottleneck: Domain Gaps. While general semantic meaning is often shared across domains, the specific relationships between intents and slots are not. Transferring these rigid relationships as a whole often leads to a "transfer disaster," where the model gets confused by the conflicting logic of different domains.

Conceptual comparison between previous methods and the proposed decoupling approach.

Methodology

The proposed Joint Modeling with Relationship Masking (JMRM) framework treats NLU as a joint task but separates the learning process into two distinct streams to ensure flexibility and better generalization.

General Semantic Representation

The model utilizes a standard BERT encoder to learn the universal meaning of utterances. This component is transferred directly to new domains as it captures general linguistic patterns rather than domain-specific rules.

Domain-Specific Knowledge

Instead of transferring rigid rules, JMRM uses two specialized modules to capture them dynamically for each new task:

  • I2S-Mask (Intent-to-Slot): This module constructs a correlation matrix from the provided few-shot examples. It acts as a filter, setting the probability of unrelated slots (e.g., "Cuisine" for a "PlayMusic" intent) to negative infinity.
  • Masked Slot Decoding (MSD): This module captures slot-to-slot relations using BIO (Beginning, Inside, Outside) annotation rules, ensuring the model produces logically valid sequences.

By integrating these masks with the Viterbi algorithm during decoding, the model is forced to rely on the BERT encoder for meaning while the masks handle the structural "rules of the game."

Experimental Results

The researchers evaluated JMRM on two major benchmarks: Snips (English) and FewJoint (a large-scale Chinese dataset featuring 141 intent classes).

Performance comparison of JMRM against baseline models on Snips and FewJoint datasets.

As shown in the table above, JMRM achieved state-of-the-art (SOTA) results across the board. The most significant improvements were observed in Joint Accuracy, which requires both the intent and all slots to be correctly identified. In the 1-shot setting for Snips, Joint Accuracy improved from 27.80% to 41.76%. In the 5-shot setting for FewJoint, the model reached 60.79% Joint Accuracy, up from 46.54%.

Key Insights

  • Decoupling is Efficiency: By not forcing the model to remember specific intent-slot pairings from the source domain, it remains flexible enough to adapt to the target domain's unique structure.
  • Bi-directional Guidance: Confident intent predictions help "mask out" impossible slots, and clear slot sequences help narrow down the likely intent.
  • Robustness: The method proved effective regardless of the similarity function used (Cosine, Euclidean, or Vector Projection), suggesting the masking logic is the primary driver of success.

Conclusion and Future Work

JMRM demonstrates that decoupling representation from domain-specific knowledge significantly boosts few-shot NLU performance. While the method depends on the quality of the support set and introduces some computational overhead via the Viterbi algorithm, it provides a robust solution to the domain gap problem. Future research may explore the potential of this decoupling approach for cross-lingual transfer and further reducing dependency on support set quality.

Summary updated

BibTeX
@inproceedings{han2024decoupling,
  author = {Jie Han and Yixiong Zou and Haozhao Wang and Jun Wang and Wei Liu and Yao Wu and Tao Zhang and Ruixuan Li},
  title = {{Decoupling Representation and Knowledge for Few-Shot Intent Classification and Slot Filling}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i16.29775},
}
Figure