Cequel: Cost-Effective Querying of Large Language Models for Text Clustering

📄 arXiv: 2504.15640v2 📥 PDF

作者: Hongtao Wang, Taiyan Zhang, Renchi Yang, Jianliang Xu

分类: cs.CL, cs.AI

发布日期: 2025-04-22 (更新: 2025-08-21)


💡 一句话要点

Cequel:一种低成本的大语言模型文本聚类查询框架

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 文本聚类 大语言模型 成本效益 约束聚类 无监督学习

📋 核心要点

  1. 现有文本聚类方法依赖预训练嵌入或图聚类,但大规模使用LLM进行相似度估计成本高昂。
  2. Cequel通过EdgeLLM和TriangleLLM选择信息量大的文本对/三元组,减少LLM查询次数,构建约束条件。
  3. 实验表明,在相同查询预算下,Cequel在多个基准数据集上优于现有无监督文本聚类方法。

📝 摘要(中文)

本文提出了一种名为Cequel的低成本框架,旨在以有限的大语言模型(LLM)查询预算实现精确的文本聚类。Cequel的核心是通过选择性地查询LLM来构建must-link和cannot-link约束,查询对象是信息量大的文本对或三元组,这些文本对或三元组通过我们提出的算法EdgeLLM和TriangleLLM识别。然后,这些约束被用于加权约束聚类算法中,以形成高质量的聚类。具体来说,EdgeLLM和TriangleLLM采用精心设计的贪婪选择策略和提示技术,以高效地识别和提取信息量大的约束。在多个基准数据集上的实验表明,在相同的查询预算下,Cequel始终优于现有的无监督文本聚类方法。

🔬 方法详解

问题定义:文本聚类的目标是将文档集合自动划分为有意义的组。现有方法要么基于预训练文本嵌入进行度量聚类,要么基于从大型机器学习模型(如LLM)导出的成对相似度进行图聚类。然而,大规模利用LLM进行文本聚类面临着巨大的计算和经济成本,因为需要大量的API查询或推理调用。

核心思路:Cequel的核心思想是在有限的LLM查询预算下,通过选择性地查询信息量大的文本对或三元组来构建must-link和cannot-link约束。这些约束随后被用于加权约束聚类算法中,以形成高质量的聚类。通过减少不必要的查询,降低了整体成本。

技术框架:Cequel框架主要包含以下几个阶段:1) 使用EdgeLLM和TriangleLLM算法识别信息量大的文本对和三元组;2) 使用LLM查询这些文本对和三元组,获取相似度信息,并构建must-link和cannot-link约束;3) 使用加权约束聚类算法,结合这些约束形成最终的文本聚类结果。

关键创新:Cequel的关键创新在于EdgeLLM和TriangleLLM算法,它们能够高效地识别和提取信息量大的约束。这两个算法采用精心设计的贪婪选择策略和提示技术,能够在有限的查询预算下最大化约束信息的有效性。与现有方法相比,Cequel避免了对所有文本对进行LLM查询,从而显著降低了成本。

关键设计:EdgeLLM和TriangleLLM算法使用贪婪选择策略,根据一定的评分函数选择最有信息量的文本对或三元组。评分函数的设计考虑了文本之间的相似度和差异性,以及约束对聚类结果的影响。此外,Cequel还使用了特定的prompting技术,以提高LLM查询的准确性和效率。加权约束聚类算法则根据约束的置信度对约束进行加权,以更好地利用约束信息。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,在多个基准数据集上,Cequel在相同的查询预算下始终优于现有的无监督文本聚类方法。具体性能提升幅度未知,但论文强调了Cequel在成本效益方面的优势,即在有限的LLM查询预算下实现了更高的聚类精度。

🎯 应用场景

Cequel可应用于各种需要文本聚类的场景,例如新闻文章分类、社交媒体话题发现、客户反馈分析等。通过降低LLM的使用成本,Cequel使得在资源受限的环境下也能进行高质量的文本聚类成为可能,具有广泛的应用前景。

📄 摘要(原文)

Text clustering aims to automatically partition a collection of documents into coherent groups based on their linguistic features. In the literature, this task is formulated either as metric clustering over pre-trained text embeddings or as graph clustering based on pairwise similarities derived from an oracle, e.g., a large machine learning model. Recent advances in large language models (LLMs) have significantly improved this field by providing high-quality contextualized embeddings and accurate semantic similarity estimates. However, leveraging LLMs at scale introduces substantial computational and financial costs due to the large number of required API queries or inference calls. To address this issue, we propose Cequel, a cost-effective framework that achieves accurate text clustering under a limited budget of LLM queries. At its core, Cequel constructs must-link and cannot-link constraints by selectively querying LLMs on informative text pairs or triplets, identified via our proposed algorithms, EdgeLLM and TriangleLLM. These constraints are then utilized in a weighted constrained clustering algorithm to form high-quality clusters. Specifically, EdgeLLM and TriangleLLM employ carefully designed greedy selection strategies and prompting techniques to identify and extract informative constraints efficiently. Experiments on multiple benchmark datasets demonstrate that Cequel consistently outperforms existing methods in unsupervised text clustering under the same query budget.