Learning to Bridge Metric Spaces: Few-shot Joint Learning of Intent Detection and Slot Filling

Yutai Hou, Yongkui Lai, Cheng Chen, Wanxiang Che, Ting Liu

Introduction

In modern dialogue systems, language understanding (LU) is a dual-task process involving intent detection (sentence-level classification) and slot filling (token-level sequence labeling). These tasks are inherently correlated; for instance, the intent "PlayVideo" is highly likely to co-occur with a "film" slot. While joint learning models excel in data-rich environments, adapting them to new domains with minimal data—Few-Shot Learning (FSL)—remains a significant challenge. Standard FSL methods often treat these tasks in isolation, failing to capture the cross-task dependencies that are crucial for robust domain transfer.

Methodology: The ConProm Framework

To address these limitations, we introduce the Contrastive Prototype Merging network (ConProm). Built upon BERT embeddings and Prototypical Networks, ConProm introduces two primary innovations to explicitly model intent-slot relationships.

Prototype Merging

Unlike traditional methods that maintain separate metric spaces for each task, ConProm bridges them using a cross-attention mechanism. By calculating the relevance between intent and slot prototypes based on the support set, the model generates "fused prototypes." These representations adaptively encode domain-specific relationships, allowing the model to leverage slot information to refine intent detection and vice versa.

The ConProm architecture bridges intent and slot spaces through prototype merging and contrastive alignment.

Contrastive Alignment Learning

To structure the bridged metric space effectively, we employ a margined contrastive loss. This loss function operates on two levels:

  • Intra-Contrastive: Ensures that prototypes within the same task (e.g., different intents) are clearly separated.
  • Inter-Contrastive: Pulls related cross-task prototypes (e.g., "PlayVideo" and "film") closer together while pushing unrelated ones apart.

Experimental Setup

We evaluated ConProm on two major benchmarks restructured for few-shot episodes:

  1. Snips: A standard LU dataset with 7 domains. We combined domains to create a more challenging multi-intent environment.
  2. FewJoint: A comprehensive benchmark from the SMP2020-ECDT contest, featuring 59 domains, 143 intents, and 205 slots.

Results and Analysis

ConProm demonstrates substantial improvements in Joint Accuracy—a strict metric requiring both the intent and all slots to be correctly identified.

Metric Space Visualization

The impact of contrastive alignment is most evident when visualizing the prototype distributions. In baseline models like JointProto, related intent and slot prototypes often appear scattered. In contrast, ConProm successfully clusters related cross-task labels, facilitating better generalization to unseen domains.

Visualization comparing JointProto and ConProm distributions, showing how ConProm clusters related intent and slot prototypes.

Performance Highlights

In the 1-shot setting on Snips, ConProm achieved a Joint Accuracy of 21.72%, more than doubling the performance of the strongest non-finetuned baseline, LD-Proto (10.67%). On the FewJoint dataset, ConProm reached 16.32% Joint Accuracy, outperforming LD-Proto's 13.70%.

Ablation studies confirmed that both Prototype Merging and Contrastive Alignment are essential. Removing either component led to significant performance degradation, highlighting their complementary roles in shaping a transferable metric space.

Conclusion and Future Work

ConProm establishes a new state-of-the-art for few-shot joint LU by explicitly bridging task-specific metric spaces. While the model occasionally introduces noise in pure intent detection due to slot-sharing across intents, its superior joint accuracy proves the value of modeling cross-task dependencies. Future research will focus on mitigating overfitting during target-domain fine-tuning and refining regularization strategies to preserve generalized intent knowledge.

Summary updated

BibTeX
@inproceedings{hou2021learning,
  author = {Yutai Hou and Yongkui Lai and Cheng Chen and Wanxiang Che and Ting Liu},
  title = {{Learning to Bridge Metric Spaces: Few-shot Joint Learning of Intent Detection and Slot Filling}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.findings-acl.282},
}
Figure