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

自动文本分类的全面基准测试:从传统方法到大语言模型

A thorough benchmark of automatic text classification: From traditional approaches to large language models

Federal University of Minas Gerais(米纳斯吉拉斯联邦大学);Federal University of São João del Rei(圣若昂德尔雷伊联邦大学)

Washington Cunha, Leonardo Rocha, Marcos André Gonçalves

AI总结:

本文对12种传统与最新自动文本分类方法在22个数据集上进行了成本效益基准测试,发现LLMs有效性最高但计算成本远超传统方法和SLMs,并据此给出了不同应用场景的方法选择建议。

摘要:

自动文本分类(ATC)在过去十年中取得了显著进展,最近的小语言模型和大语言模型(SLMs和LLMs)在Transformer架构的推动下就是最好的例证。尽管近期有效性有所提升,但文献中仍缺乏一项全面的成本效益分析,以探究与SVMs和Logistic Regression等更传统的文本分类方法相比,这些新方法的有效性提升是否能弥补其高得多的成本。在此背景下,本文的主要贡献有两方面:(i)我们对包括五个开源LLMs在内的十二种传统和最新ATC解决方案的成本效益进行了科学严谨的比较分析;(ii)构建了一个包含{22个数据集}的大型基准,涵盖情感分析和主题分类,其(训练-验证-测试)划分基于折叠交叉验证程序,并附有文档和代码。代码、数据和文档的发布使社区能够复现实验,并以更科学严谨的方式推动该领域发展。比较实验结果表明,在有效性方面,LLMs优于传统方法(平均提升最高26%-7.1%)和SLMs(平均提升最高4.9%-1.9%)。然而,由于微调需求,LLMs产生了显著更高的计算成本,平均比传统方法和SLMs分别慢590倍和8.5倍。结果提出以下建议:(1)适用于需要最佳有效性且能承担成本的应用;(2)适用于资源受限或无法承担大型LLMs微调成本的应用的传统方法,如Logistic Regression和SVM;(3)适用于接近最优的有效性与效率权衡的SLMs,如Roberta。

英文摘要:

Automatic text classification (ATC) has experienced remarkable advancements in the past decade, best exemplified by recent small and large language models (SLMs and LLMs), leveraged by Transformer architectures. Despite recent effectiveness improvements, a comprehensive cost-benefit analysis investigating whether the effectiveness gains of these recent approaches compensate their much higher costs when compared to more traditional text classification approaches such as SVMs and Logistic Regression is still missing in the literature. In this context, this work's main contributions are twofold: (i) we provide a scientifically sound comparative analysis of the cost-benefit of twelve traditional and recent ATC solutions including five open LLMs, and (ii) a large benchmark comprising {22 datasets}, including sentiment analysis and topic classification, with their (train-validation-test) partitions based on folded cross-validation procedures, along with documentation, and code. The release of code, data, and documentation enables the community to replicate experiments and advance the field in a more scientifically sound manner. Our comparative experimental results indicate that LLMs outperform traditional approaches (up to 26%-7.1% on average) and SLMs (up to 4.9%-1.9% on average) in terms of effectiveness. However, LLMs incur significantly higher computational costs due to fine-tuning, being, on average 590x and 8.5x slower than traditional methods and SLMs, respectively. Results suggests the following recommendations: (1) LLMs for applications that require the best possible effectiveness and can afford the costs; (2) traditional methods such as Logistic Regression and SVM for resource-limited applications or those that cannot afford the cost of tuning large LLMs; and (3) SLMs like Roberta for near-optimal effectiveness-efficiency trade-off.

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

↑