A Generic Method for Fine-grained Category Discovery in Natural Language Texts

Chang Tian, Matthew B. Blaschko, Wenpeng Yin, Mingzhe Xing, Yinliang Yue, Marie-Francine Moens

Introduction: The Challenge of Fine-grained Discovery

In many real-world applications, datasets often come with "coarse" labels that lack the specificity needed for advanced tasks. For instance, while a system might label thousands of user queries under the broad category of "Banking," it may fail to distinguish between "balance inquiries," "loan applications," or "lost cards." Manually labeling these sub-categories is not only expensive but also requires significant domain expertise.

This challenge is known as Fine-grained Category Discovery (FCDC). As illustrated below, the goal is to discover latent sub-categories (like "Roadster" vs. "Off-road") when only coarse labels (like "Vehicle") are available.

Comparison of coarse-grained intent (Buy_Vehicle) vs. fine-grained discovery (Off-road vs. Roadster).

Current FCDC methods often struggle with subtle semantic overlaps between sub-categories. Additionally, most existing discovery techniques rely on batch-clustering during inference, which is too computationally intensive for real-time applications like chatbots or virtual assistants.

The STAR Methodology

To overcome these limitations, the authors introduce STAR, a generic loss function designed to be integrated into existing contrastive learning frameworks. The core innovation of STAR is its handling of Comprehensive Semantic Similarities (CSS) to guide data organization.

The STAR framework architecture, highlighting the interaction between encoders and the KL-based similarity weighting.

1. Logarithmic to Euclidean Mapping

STAR measures semantic similarity using bidirectional Kullback-Leibler (KL) divergence in a logarithmic space. Since KL divergence grows slowly, the method applies an exponential transformation—using a trainable base $B$—to amplify these differences ($B^{d_{KL}}$). This "weighted" similarity then dictates how samples are positioned in the Euclidean embedding space, creating sharper boundaries between similar sub-categories.

2. The STAR Objective

Unlike traditional contrastive losses that treat all negative samples equally, the STAR objective uses KL-based weights to ensure that semantically distant samples are pushed further away, while semantically similar samples form tighter, more distinct clusters.

3. Centroid Inference for Real-time Systems

To enable real-time deployment, STAR moves away from test-time batch clustering. Instead, it approximates fine-grained cluster centroids during the training phase. At inference, the system simply calculates the cosine similarity between a new input and these pre-calculated centroids, significantly reducing latency.

Experimental Evaluation

The researchers evaluated the STAR method across three diverse text classification benchmarks: CLINC (150 intents), WOS (33 scientific categories), and HWU64 (64 home assistant categories).

Key Results and Insights

The STAR-enhanced models consistently outperformed 22 baseline methods across all datasets:

  • Performance Gains: On the HWU64 dataset, the STAR-DOWN variant achieved an accuracy (ACC) of 80.31%, surpassing the previous state-of-the-art (DOWN) at 78.92%.
  • Clustering Quality: Significant improvements were observed in Adjusted Rand Index (ARI) and Normalized Mutual Information (NMI), indicating that the discovered clusters align closely with ground-truth categories.
  • Efficiency: The centroid inference mechanism achieved performance nearly identical to traditional batch clustering but at a fraction of the computational cost, proving its readiness for live deployment.

Conclusion

The STAR method provides a robust, plug-and-play solution for fine-grained category discovery. By amplifying subtle semantic differences and optimizing for real-time inference, it bridges the gap between unsupervised discovery and practical application. Future work will focus on reducing the memory overhead of the data queue and refining the use of Large Language Models (LLMs) to automatically name the discovered categories.

Summary updated

BibTeX
@inproceedings{tian2024generic,
  author = {Chang Tian and Matthew B. Blaschko and Wenpeng Yin and Mingzhe Xing and Yinliang Yue and Marie-Francine Moens},
  title = {{A Generic Method for Fine-grained Category Discovery in Natural Language Texts}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.208},
}
Figure