Optimized Algorithms for Text Clustering with LLM-Generated Constraints
Chaoqi Jia, Weihong Wu, Longkun Guo, Zhigang Lu, Chao Chen, Kok-Leong Ong
Abstract
Clustering is a fundamental tool that has garnered significant interest across a wide range of applications including text analysis. To improve clustering accuracy, many researchers have incorporated background knowledge, typically in the form of must-link and cannot-link constraints, to guide the clustering process. With the recent advent of large language models (LLMs), there is growing interest in improving clustering quality through LLM-based automatic constraint generation. In this paper, we propose a novel constraint-generation approach that reduces resource consumption by generating constraint sets rather than using traditional pairwise constraints. This approach improves both query efficiency and constraint accuracy compared to state-of-the-art methods. We further introduce a constrained clustering algorithm tailored to the characteristics of LLMgenerated constraints. Our method incorporates a confidence threshold and a penalty mechanism to address potentially inaccurate constraints. We evaluate our approach on five text datasets, considering both the cost of constraint generation and the overall clustering performance. The results show that our method achieves clustering accuracy comparable to the state-of-the-art algorithms while reducing the number of LLM queries by more than 20 times.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d41b37a6-b827-4a77-8686-52afc79288fdBuilds on6
- Bipartite Matching in Nearly-linear Time on Moderately Dense GraphsJan van den Brand, Yin Tat Lee, Danupon Nanongkai, Richard Peng et al.FOCS 2020 · 72 citations
- ClusterLLM: Large Language Models as a Guide for Text ClusteringYuwei Zhang, Zihan Wang, Jingbo ShangEMNLP 2023 · 43 citations
- Goal-Driven Explainable Clustering via Language DescriptionsZihan Wang, Jingbo Shang, Ruiqi ZhongEMNLP 2023 · 19 citations
- Unraveling Privacy Risks of Individual Fairness in Graph Neural NetworksHe Zhang, Xingliang Yuan, Shirui PanICDE 2024 · 9 citations
- A3S: A General Active Clustering Method with Pairwise ConstraintsXun Deng, Junlong Liu, Han Zhong, Fuli Feng et al.ICML 2024 · 4 citations
Related papers
- Co-Evolving LLMs and Embedding Models via Density-Guided Preference Optimization for Text ClusteringZetong Li, Qinliang Su, Minhua Huang, Yin YangEMNLP 2025
- Information-Theoretic Generative Clustering of DocumentsXin Du, Kumiko Tanaka-IshiiAAAI 2025 · 1 citation
- Unlocking Anticipatory Text Generation: A Constrained Approach for Large Language Models DecodingLifu Tu, Semih Yavuz, Jin Qu, Jiacheng Xu et al.EMNLP 2024 · 2 citations
- In-context Clustering-based Entity Resolution with Large Language Models: A Design Space ExplorationJiajie Fu, Haitong Tang, Arijit Khan, Sharad Mehrotra et al.SIGMOD 2026 · 8 citations
- Contrastive Learning on LLM Back Generation Treebank for Cross-domain Constituency ParsingPeiming Guo, Meishan Zhang, Jianling Li, Min Zhang et al.ACL 2025
