Supporting Clustering with Contrastive Learning

Dejiao Zhang, Feng Nan, Xiaokai Wei, Shang-Wen Li, Henghui Zhu, Kathleen R. McKeown, Ramesh Nallapati, Andrew O. Arnold, Bing Xiang

Introduction

Unsupervised clustering of short text, such as tweets or news headlines, presents a significant challenge in natural language processing. The primary difficulty lies in the "chicken and egg" nature of the problem: high-quality clustering requires robust representations, yet learning category-specific representations typically necessitates labeled data. In short text scenarios, this is exacerbated by data sparsity and the inherent semantic overlap of different categories in initial embedding spaces, even when using powerful pre-trained models like BERT.

Standard deep clustering approaches often fail because they pull points toward cluster centers without first resolving these overlaps, leading to "impure" clusters. This paper introduces SCCL (Supporting Clustering with Contrastive Learning), a framework that jointly optimizes "top-down" clustering with "bottom-up" instance-wise contrastive learning to achieve state-of-the-art results.

Methodology

The SCCL framework consists of three integrated components designed to work in synergy:

  1. Backbone Encoder: A Sentence Transformer (specifically distilbert-base-nli-stsb-mean-tokens) maps input text into a high-dimensional embedding space.
  2. Instance-wise Contrastive Learning (Bottom-Up): Utilizing an InfoNCE loss, this head forces an instance and its augmented version (created via contextual word substitution) to be close while pushing all other instances in the batch away. This "push" mechanism effectively scatters the data, creating separation between overlapping semantic categories.
  3. Clustering Head (Top-Down): This component employs a KL-divergence-based loss to estimate cluster centroids and pull instances toward them. A "sharpening" target distribution is used to encourage high-confidence cluster assignments.

Unlike previous multi-stage pipelines, SCCL jointly optimizes these objectives. The contrastive "push" acts as a regularizer, preventing the clustering "pull" from collapsing into suboptimal local minima.

Experimental Results

The model was evaluated across eight diverse short text benchmarks, including SearchSnippets, StackOverflow, and AgNews. SCCL demonstrated superior performance, outperforming previous state-of-the-art methods on 7 out of 8 datasets.

Visualizing the impact of joint optimization: SCCL produces much clearer cluster separation compared to standalone clustering or instance-CL methods.

Quantitatively, SCCL achieved improvements of 3%–11% in Accuracy (ACC) and 4%–15% in Normalized Mutual Information (NMI) over existing baselines. Ablation studies confirmed that simultaneous training is crucial; the synergy between the "push" of contrastive learning and the "pull" of clustering is what generates the superior embedding space.

Discussion and Conclusion

A key insight from this work is the "Push-Pull Synergy." By forcing every instance to be distinct, contrastive learning creates the necessary "breathing room" in the embedding space for the clustering head to function effectively. However, the authors noted sensitivity to data augmentation; in short text, excessive augmentation can alter semantic meaning, suggesting that augmentation strategies must be carefully tuned.

While SCCL shows remarkable scalability due to its $O(N)$ complexity, some domain-specific challenges remain, particularly in specialized fields like biomedicine where general-purpose backbones may lack necessary vocabulary. Future work will explore more advanced data mixing strategies to further enhance the contrastive signal.

Summary updated

BibTeX
@inproceedings{zhang2021supporting,
  author = {Dejiao Zhang and Feng Nan and Xiaokai Wei and Shang-Wen Li and Henghui Zhu and Kathleen R. McKeown and Ramesh Nallapati and Andrew O. Arnold and Bing Xiang},
  title = {{Supporting Clustering with Contrastive Learning}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.naacl-main.427},
}
Figure