arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.00927cs.CLcs.IR
收藏

使用LLM将文本聚类视为分类任务

Text Clustering as Classification with LLMs

Singapore University of Technology and Design(新加坡科技设计大学);East China Normal University(华东师范大学)

Chen Huang, Guoxiu He

AI总结:

本文提出将文本聚类重构为分类任务的框架,利用LLM的上下文学习能力生成并合并标签,无需微调嵌入模型,在多个数据集上达到与最先进方法相当或更优的性能,同时大幅降低计算复杂度。

摘要:

文本聚类是组织和解释非结构化文本数据的基本技术,特别是在人工标注成本高昂的场景中。随着大型语言模型(LLMs)的快速发展及其在广泛自然语言处理任务中展现的有效性,新兴研究开始探索其在文本聚类领域的潜力。然而,现有的基于LLM的方法仍依赖于微调的嵌入模型和复杂的相似度度量,导致计算密集且需要特定领域的适配。为解决这些局限性,我们提出了一种新颖框架,通过利用LLM的上下文学习能力,将文本聚类重新定义为分类任务。我们的框架无需微调嵌入模型或复杂的聚类算法。它包含两个关键步骤:首先,提示LLM基于数据集生成一组候选标签,然后合并语义相似的标签;其次,为每个文本样本分配最合适的标签。通过利用LLM先进的自然语言理解和泛化能力,所提方法能够在最少人工干预下实现有效聚类。在多个数据集上的实验结果表明,我们的框架在性能上与最先进的基于嵌入的聚类技术相当或更优,同时显著降低了计算复杂度和资源需求。这些发现凸显了LLM在简化和增强文本聚类任务方面的变革潜力。我们将代码公开供使用,网址为https://github.com/ECNU-Text-Computing/Text-Clustering-via-LLM。我们还在仓库中提供了补充附录。

英文摘要:

Text clustering serves as a fundamental technique for organizing and interpreting unstructured textual data, particularly in contexts where manual annotation is prohibitively costly. With the rapid advancement of Large Language Models (LLMs) and their demonstrated effectiveness across a broad spectrum of NLP tasks, an emerging body of research has begun to explore their potential in the domain of text clustering. However, existing LLM-based approaches still rely on fine-tuned embedding models and sophisticated similarity metrics, rendering them computationally intensive and necessitating domain-specific adaptation. To address these limitations, we propose a novel framework that reframes text clustering as a classification task by harnessing the in-context learning capabilities of LLMs. Our framework eliminates the need for fine-tuning embedding models or intricate clustering algorithms. It comprises two key steps: first, the LLM is prompted to generate a set of candidate labels based on the dataset and then merges semantically similar labels; second, it assigns the most appropriate label to each text sample. By leveraging the advanced natural language understanding and generalization capabilities of LLMs, the proposed approach enables effective clustering with minimal human intervention. Experimental results on diverse datasets demonstrate that our framework achieves comparable or superior performance to state-of-the-art embedding-based clustering techniques, while significantly reducing computational complexity and resource requirements. These findings underscore the transformative potential of LLMs in simplifying and enhancing text clustering tasks. We make our code available to the public for utilization at https://github.com/ECNU-Text-Computing/Text-Clustering-via-LLM. We also provide the supplementary Appendix within the repository.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑