TL;DR
Traditional semi-supervised clustering requires a prohibitive amount of human feedback to align with a user's intent. This paper demonstrates that Large Language Models (LLMs) can act as "pseudo-oracles," amplifying a handful of human demonstrations into massive amounts of high-quality feedback to significantly improve clustering performance across entity canonicalization and text grouping tasks.
What Problem Does This Paper Address?
Clustering is fundamentally an "underspecified" problem. Without guidance, an algorithm might group news articles by topic, while the user actually wanted them grouped by sentiment or writing style. Semi-supervised clustering attempts to solve this by incorporating human feedback (like "these two points must be together"), but it typically requires hundreds of interactions to be effective.
The authors address the feedback bottleneck: how can we get the benefits of semi-supervised clustering without the high cost of manual human labeling? They propose using LLMs to bridge this gap, leveraging the models' latent world knowledge and few-shot reasoning capabilities to guide the clustering process.
Methods
The researchers explored incorporating LLMs at three distinct stages of the clustering pipeline:
- Before Clustering (Keyphrase Expansion): This was the most successful method. The user provides a few examples of how to describe documents. The LLM then generates task-specific keyphrases for every document in the dataset. These keyphrases are embedded and concatenated with the original document vectors, effectively "steering" the embedding space toward the user's desired features.
- During Clustering (Pairwise Constraints): The LLM acts as a "pseudo-oracle." Given a few human-labeled pairs, the LLM predicts whether thousands of other pairs should be in the same cluster. These "pseudo-constraints" are then fed into a constrained clustering algorithm (PCKMeans).
- After Clustering (Post-Correction): The system identifies "low-confidence" points (those sitting on the border between clusters) and asks the LLM to re-assign them to the most likely cluster based on representative examples from each group.
Datasets
The authors evaluated their methods on five datasets across three distinct tasks:
- Entity Canonicalization: Grouping different surface strings that refer to the same entity (e.g., "Joe Biden" and "46th U.S. President").
- Datasets: OPIEC59k and ReVerb45k.
- Intent Clustering: Grouping banking or assistant queries by the user's goal.
- Datasets: Bank77 and CLINC.
- Topic Grouping: Categorizing social media posts.
- Dataset: Tweet.
Key Insights and Ideas
- LLMs as Feature Engineers: The most effective way to use an LLM isn't to let it do the clustering itself, but to use it to enrich the data. By generating keyphrases, the LLM injects "world knowledge" (e.g., knowing that "B.A." and "Bachelor's" are related) that standard text encoders often miss.
- Instructions vs. Demonstrations: The paper found that both the natural language instruction (the "what") and the few-shot demonstrations (the "how") are necessary. Omitting either leads to less consistent improvements.
- The Failure of Post-Correction: Interestingly, asking an LLM to "fix" clusters after the fact provided very little benefit. The LLM tended to be most inaccurate on the same "hard" points where the original clustering algorithm struggled.
- Scale Matters: GPT-3.5 significantly outperformed smaller, instruction-tuned encoders (like Instructor-XL) even when given the exact same prompts, suggesting that the "reasoning" required for few-shot clustering benefits from larger model scales.
Key Results
- State-of-the-Art Performance: The "Keyphrase Clustering" approach achieved state-of-the-art results on both entity canonicalization datasets, beating previous specialized multi-view clustering methods.
- Significant Gains: On the Tweet dataset, LLM-guided clustering improved accuracy from a 57.5 baseline to 65.3.
- Cost-Effectiveness: The authors calculated that spending $41 on LLM API calls generated the equivalent of 20,000 pairwise constraints. To get the same amount of data from human workers (at $11/hour), it would cost the same but yield fewer than 700 labels—making the LLM roughly 30 times more efficient for data labeling in this context.
Limitations and Future Work
- API Costs and Latency: While more efficient than humans, querying an LLM for every single document in a massive dataset (millions of rows) would still be expensive and slow.
- Constraint Selection: For the pairwise method, the performance is highly sensitive to which pairs you ask the LLM to label. Better active learning strategies to pick the most informative pairs could improve results.
- Surface Form Bias: In entity canonicalization, the models still struggle with polysemy (e.g., "Marseille" referring to both the city and the football club) when the context is stripped away.
- Future Direction: The authors suggest exploring how to more tightly integrate natural language instructions directly into the underlying clustering objective functions, rather than using them as a pre-processing or post-processing step.
Summary updated