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

用机器学习改进深度学习库测试

Improving Deep Learning Library Testing with Machine Learning

IMDEA Software Institute(IMDEA软件研究所);Complutense University of Madrid(马德里康普顿斯大学);North Carolina State University(北卡罗来纳州立大学)

Facundo Molina, M M Abid Naziri, Feiran Qin, Alessandra Gorla, Marcelo d'Amorim

AI总结:

本文提出利用机器学习分类器提升深度学习库测试效果,通过形状抽象和标记数据训练,提高bug检测准确率。

摘要:

深度学习(DL)库如TensorFlow和PyTorch简化了机器学习(ML)模型开发,但因其复杂的设计容易出现bug。现有的bug检测技术存在,但没有精确的API规范,会导致许多误报。现有的API规范挖掘方法缺乏准确性。我们探索使用机器学习分类器来确定输入的有效性。我们假设张量形状是精确的抽象,可以编码具体的输入并捕捉数据之间的关系。形状抽象严重减少了问题的维度,这对于促进ML训练至关重要。通过观察运行时结果在样本输入上获得标记数据,并在标记输入集上训练分类器以捕捉API约束。我们的评估,覆盖了TensorFlow和PyTorch的183个API,显示分类器在未见过的数据上泛化良好,准确率超过91%。将这些分类器整合到ACETest,一种最先进的bug检测技术的流程中,提高了其通过率从约29%到约61%。我们的发现表明,机器学习增强的输入分类是扩展DL库测试的重要辅助。

英文摘要:

Deep Learning (DL) libraries like TensorFlow and Pytorch simplify machine learning (ML) model development but are prone to bugs due to their complex design. Bug-finding techniques exist, but without precise API specifications, they produce many false alarms. Existing methods to mine API specifications lack accuracy. We explore using ML classifiers to determine input validity. We hypothesize that tensor shapes are a precise abstraction to encode concrete inputs and capture relationships of the data. Shape abstraction severely reduces problem dimensionality, which is important to facilitate ML training. Labeled data are obtained by observing runtime outcomes on a sample of inputs and classifiers are trained on sets of labeled inputs to capture API constraints. Our evaluation, conducted over 183 APIs from TensorFlow and Pytorch, shows that the classifiers generalize well on unseen data with over 91% accuracy. Integrating these classifiers into the pipeline of ACETest, a SoTA bug-finding technique, improves its pass rate from ~29% to ~61%. Our findings suggest that ML-enhanced input classification is an important aid to scale DL library testing.

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

↑