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

探索使用DistilBERT进行文本分类的微调模型中的变异性

Exploring Variability in Fine-Tuned Models for Text Classification with DistilBERT

University of Waterloo(滑铁卢大学)

Giuliano Lorenzoni, Ivens Portugal, Paulo Alencar, Donald Cowan

AI总结:

本文通过结构化实验和多项式回归分析DistilBERT文本分类微调中学习率、批量大小和训练轮数对准确率、F1分数及损失的影响,揭示超参数交互与指标权衡,为大型语言模型微调策略提供依据。

摘要:

本研究评估了使用DistilBERT模型进行文本分类的微调策略,具体采用的是distilbert-base-uncased-finetuned-sst-2-english变体。通过结构化实验,我们考察了学习率、批量大小和训练轮数等超参数对准确率、F1分数和损失的影响。多项式回归分析捕捉了这些超参数的基础性影响和增量影响,重点关注相对于基线模型的微调调整。结果揭示了超参数配置导致的指标变异性,显示出性能指标之间的权衡。例如,在相对分析中,较高的学习率降低了损失(p=0.027),但对准确率的提升构成挑战。同时,批量大小在绝对回归中对准确率和F1分数有显著影响(p=0.028和p=0.005),但对损失优化的影响有限(p=0.170)。训练轮数与批量大小之间的交互作用使F1分数最大化(p=0.001),凸显了超参数交互的重要性。这些发现表明,需要针对非线性超参数交互的微调策略,以平衡各项指标的性能。这种变异性和指标权衡不仅与文本分类任务相关,也与包括自然语言处理和计算机视觉在内的更广泛任务相关。该分析为大型语言模型的微调策略提供了参考,并促进了面向更广泛模型适用性的自适应设计。

英文摘要:

This study evaluates fine-tuning strategies for text classification using the DistilBERT model, specifically the distilbert-base-uncased-finetuned-sst-2-english variant. Through structured experiments, we examine the influence of hyperparameters such as learning rate, batch size, and epochs on accuracy, F1-score, and loss. Polynomial regression analyses capture foundational and incremental impacts of these hyperparameters, focusing on fine-tuning adjustments relative to a baseline model. Results reveal variability in metrics due to hyperparameter configurations, showing trade-offs among performance metrics. For example, a higher learning rate reduces loss in relative analysis (p=0.027) but challenges accuracy improvements. Meanwhile, batch size significantly impacts accuracy and F1-score in absolute regression (p=0.028 and p=0.005) but has limited influence on loss optimization (p=0.170). The interaction between epochs and batch size maximizes F1-score (p=0.001), underscoring the importance of hyperparameter interplay. These findings highlight the need for fine-tuning strategies addressing non-linear hyperparameter interactions to balance performance across metrics. Such variability and metric trade-offs are relevant for tasks beyond text classification, including NLP and computer vision. This analysis informs fine-tuning strategies for large language models and promotes adaptive designs for broader model applicability.

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

↑