CoCoID: Learning Contrastive Representations and Compact Clusters for Semi-Supervised Intent Discovery

Qian Cao, Deyi Xiong, Qinlong Wang, Xia PengEMNLP 2022

Introduction

In conversational AI, chatbots frequently encounter user requests that fall outside their predefined categories. Identifying these "novel intents" is the primary objective of Intent Discovery. While semi-supervised approaches have leveraged small amounts of labeled data to guide clustering, they often struggle to learn sufficiently discriminative features and fail to ensure cluster "compactness"—where all items within a cluster are semantically similar.

Presented at EMNLP 2022, CoCoID is a semi-supervised framework designed to address these limitations by integrating contrastive learning with a novel cluster regularization technique.

The Challenge of Intent Discovery

The core difficulty in intent discovery lies in grouping user utterances into meaningful categories when only a subset of possible intents is known a priori. Existing models frequently produce "loose" clusters where distinct intents overlap, or they fail to capture the subtle semantic nuances required to distinguish similar queries (e.g., "How do I pay my bill?" vs. "Why is my bill so high?").

The authors identify two critical gaps in current methodologies:

  1. Representation Learning: The need for models to understand semantic nuances deeply enough for accurate grouping.
  2. Cluster Compactness: The mathematical requirement to force clusters to be as tight as possible, thereby reducing misclassification.

The CoCoID Framework

CoCoID utilizes a BERT-based backbone and introduces two pivotal components to the training objective:

  1. Contrastive User Utterance Representation Learning (CL): Inspired by SimCSE, this component passes a single utterance through the encoder twice with different dropout masks. These versions form a "positive pair" that the model aims to bring closer in vector space, while other utterances in the minibatch serve as "negative samples." This process encourages the learning of robust, discriminative features.
  2. Intra-Cluster Knowledge Distillation (ICKD): This novel component addresses cluster compactness. Within a cluster, the model designates one utterance as an "anchor" and uses its predictive distribution (logits) to guide other cluster members. By minimizing the distance between these distributions, the model regularizes the cluster to be more cohesive.
The CoCoID framework architecture, highlighting the Contrastive Learning and ICKD components.

Experimental Setup

The framework was evaluated on four diverse datasets:

  • CLINC: 150 intents across 10 domains.
  • BANKING: 77 fine-grained intents in the banking domain.
  • StackOverflow: 20 classes of technical question titles.
  • DBPedia: 14 non-overlapping ontology classes.

These datasets provide a rigorous test of the model's ability to handle varying query lengths and semantic complexities.

Results and Discussion

CoCoID achieved state-of-the-art (SOTA) results across all evaluated datasets. On average, it outperformed the previous leading model, DeepAligned, by 1.43 points in Accuracy (ACC), 1.47 points in Adjusted Rand Index (ARI), and 1.12 points in Normalized Mutual Information (NMI).

Performance comparison across NMI, ARI, and ACC metrics on the BANKING dataset with varying labeled data ratios.

Key findings include:

  • Robustness to Data Scarcity: CoCoID maintains a significant lead over baselines even when labeled data is extremely limited, as shown in the performance plots.
  • Global Regularization: While contrastive learning improves local separation, ICKD provides global cluster-level regularization, leading to cleaner, more distinct clusters.
  • Resilience to Novelty: The model remains reliable as the ratio of "unknown" intents increases, a critical feature for real-world deployment.

Conclusion

CoCoID represents a significant advancement in semi-supervised intent discovery. By combining contrastive representation learning with intra-cluster knowledge distillation, it produces tighter, more accurate clusters. Future work will explore optimal strategies for balancing loss functions and investigate the impact of utterance length on performance. For developers of dialogue systems, CoCoID provides a robust blueprint for creating bots that adapt to evolving user needs with minimal manual intervention.

Summary updated

BibTeX
@inproceedings{cao2022cocoid,
  author = {Qian Cao and Deyi Xiong and Qinlong Wang and Xia Peng},
  title = {{CoCoID: Learning Contrastive Representations and Compact Clusters for Semi-Supervised Intent Discovery}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-industry.23},
}
Figure