arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.00105cs.SE
收藏

预训练自然语言处理模型重用中缺陷的实证研究

An Empirical Study on the Bugs Found while Reusing Pre-trained Natural Language Processing Models

Rangeet Pan, Sumon Biswas, Mohna Chakraborty, Breno Dantas Cruz, Hridesh Rajan

摘要:

在NLP中,重用预先训练的模型而不是从头开始训练已经越来越流行;然而,NLP模型大多是黑盒子,非常大,并且通常需要大量资源。为了方便,使用大型语料库训练的模型可以使用,开发人员可以将它们重用于不同的问题。相比之下,开发人员大多从零开始构建他们的模型来解决传统的DL相关问题。通过这样做,他们可以控制算法的选择,数据处理,模型结构,调整超参数等,而在NLP中,由于预训练模型的重用,NLP开发人员对这些设计决策的控制很少或没有。他们对预先训练好的模型应用调优或迁移学习来满足他们的要求。此外,NLP模型及其相应的数据集明显大于传统的DL模型,需要大量的计算。这样的原因往往会导致系统中的错误,同时重用预先训练的模型。虽然传统深度学习软件中的错误已经被深入研究,但广泛重用和黑盒结构的本质促使我们了解重用NLP模型时发生的不同类型的错误。这些bug的根本原因是什么?这些bug是如何影响系统的?为了回答这些问题,我们研究了在重用11个流行的NLP模型时报告的错误。我们从GitHub存储库中挖掘了9,214个问题,并确定了984个bug。我们创建了一个包含bug类型、根本原因和影响的分类法。我们的观察得出了几个发现,包括对模型内部的访问有限导致缺乏鲁棒性,缺乏输入验证导致算法和数据偏差的传播,以及高资源消耗导致更多崩溃等。我们的观察结果表明了几个错误模式,这将大大有助于进一步减少预训练模型和代码重用中的错误。

英文摘要:

In NLP, reusing pre-trained models instead of training from scratch has gained popularity; however, NLP models are mostly black boxes, very large, and often require significant resources. To ease, models trained with large corpora are made available, and developers reuse them for different problems. In contrast, developers mostly build their models from scratch for traditional DL-related problems. By doing so, they have control over the choice of algorithms, data processing, model structure, tuning hyperparameters, etc. Whereas in NLP, due to the reuse of the pre-trained models, NLP developers are limited to little to no control over such design decisions. They either apply tuning or transfer learning on pre-trained models to meet their requirements. Also, NLP models and their corresponding datasets are significantly larger than the traditional DL models and require heavy computation. Such reasons often lead to bugs in the system while reusing the pre-trained models. While bugs in traditional DL software have been intensively studied, the nature of extensive reuse and black-box structure motivates us to understand the different types of bugs that occur while reusing NLP models? What are the root causes of those bugs? How do these bugs affect the system? To answer these questions, We studied the bugs reported while reusing the 11 popular NLP models. We mined 9,214 issues from GitHub repositories and identified 984 bugs. We created a taxonomy with bug types, root causes, and impacts. Our observations led to several findings, including limited access to model internals resulting in a lack of robustness, lack of input validation leading to the propagation of algorithmic and data bias, and high-resource consumption causing more crashes, etc. Our observations suggest several bug patterns, which would greatly facilitate further efforts in reducing bugs in pre-trained models and code reuse.

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

↑