[Paper Review] Beyond Prompting: Making Pre-trained Language Models Better Zero-shot Learners by Clustering Representations
This paper proposes SimPTC, a simple clustering-based method that improves zero-shot text classification by grouping unlabeled text embeddings using a Bayesian Gaussian Mixture Model initialized with class names. Despite its simplicity, SimPTC achieves state-of-the-art performance, outperforming prompt-based methods by 20% average absolute improvement in macro-F1 across 14 diverse datasets, even without fine-tuning or human-engineered prompts.
Recent work has demonstrated that pre-trained language models (PLMs) are zero-shot learners. However, most existing zero-shot methods involve heavy human engineering or complicated self-training pipelines, hindering their application to new situations. In this work, we show that zero-shot text classification can be improved simply by clustering texts in the embedding spaces of PLMs. Specifically, we fit the unlabeled texts with a Bayesian Gaussian Mixture Model after initializing cluster positions and shapes using class names. Despite its simplicity, this approach achieves superior or comparable performance on both topic and sentiment classification datasets and outperforms prior works significantly on unbalanced datasets. We further explore the applicability of our clustering approach by evaluating it on 14 datasets with more diverse topics, text lengths, and numbers of classes. Our approach achieves an average of 20% absolute improvement over prompt-based zero-shot learning. Finally, we compare different PLM embedding spaces and find that texts are well-clustered by topics even if the PLM is not explicitly pre-trained to generate meaningful sentence embeddings. This work indicates that PLM embeddings can categorize texts without task-specific fine-tuning, thus providing a new way to analyze and utilize their knowledge and zero-shot learning ability.
Motivation & Objective
- To improve zero-shot text classification without task-specific fine-tuning or prompt engineering.
- To explore whether clustering in PLM embedding spaces can better leverage pre-trained model knowledge.
- To evaluate the method on diverse datasets with varying topics, text lengths, and class counts.
- To analyze the clustering properties of different PLM embedding spaces, including those not explicitly trained for sentence embeddings.
- To provide a lightweight, efficient alternative to complex prompting or self-training pipelines.
Proposed method
- Uses SimCSE sentence embeddings as the base representation for texts and class names.
- Initializes cluster centers using class names by generating anchor sentences and computing their embeddings.
- Applies a Bayesian Gaussian Mixture Model (BGMM) to fit unlabeled text embeddings with class-specific Gaussian distributions.
- Assigns initial cluster assignments based on cosine similarity between text embeddings and class anchor embeddings.
- Optimizes cluster parameters via expectation-maximization without updating the PLM.
- Uses shared covariance matrices across classes for regularization and improved generalization.
Experimental results
Research questions
- RQ1Can clustering in PLM embedding space improve zero-shot text classification without prompting or fine-tuning?
- RQ2How does SimPTC perform compared to prompt-based methods across diverse datasets with varying class numbers and text lengths?
- RQ3Do PLM embeddings naturally cluster by topic even when not pre-trained for sentence embeddings?
- RQ4How do different PLM architectures and sizes affect clustering quality and zero-shot performance?
- RQ5What are the limitations of clustering-based zero-shot learning, especially with abstract or rare class names?
Key findings
- SimPTC achieves a 20% absolute improvement in macro-F1 over prompt-based zero-shot learning across 14 diverse datasets.
- On unbalanced datasets, SimPTC significantly outperforms prior methods, demonstrating robustness to class imbalance.
- Even RoBERTa-large, which is not pre-trained for sentence embeddings, produces well-separated topic clusters in its embedding space.
- SimCSE embeddings enable sub-cluster formation by sub-topics (e.g., books vs. products in Amazon reviews), revealing linear semantic structures.
- Larger models like T5-3B match or exceed fully supervised BERT performance on some datasets when used with SimPTC.
- The method performs poorly on abstract class names (e.g., subjective vs. objective), indicating a key limitation in handling semantic abstraction.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.