对比12种文本分类方法,发现大模型效果好但成本极高。
A thorough benchmark of automatic text classification: From traditional approaches to large language models
- 系统比较传统模型与大模型在22个数据集上的表现
- 大模型平均提升7.1%,但训练速度慢590倍
- 适合追求极致效果或预算充足者使用
自动文本分类(ATC)在过去十年中取得显著进展,尤其得益于Transformer架构的小型和大型语言模型(SLMs和LLMs)。尽管性能提升明显,但现有研究尚缺乏对最新方法在成本效益方面的全面分析,即其性能提升是否足以抵消相比传统方法(如SVM、逻辑回归)更高的开销。本文贡献有二:(1)对12种传统与新兴的ATC方案(含5个开源大模型)进行科学的代价-收益比较;(2)构建一个包含22个数据集的大规模基准,涵盖情感分析与主题分类等任务,所有数据集均基于折叠交叉验证划分训练/验证/测试集,并提供完整文档与代码。代码、数据与文档的公开使社区可复现实验并推动领域更科学地发展。实验结果显示,大模型在性能上优于传统方法(平均提升26%-7.1%),也优于小型模型(平均提升4.9%-1.9%),但微调时计算成本极高,平均比传统方法慢590倍,比小型模型慢8.5倍。建议:(1)对追求最高精度且资源充足的场景采用大模型;(2)资源受限场景推荐使用逻辑回归或SVM;(3)罗伯特(RoBERTa)等小型模型可在效果与效率间实现近优平衡。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。