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

基于语义的神经网络修复

Semantic-Based Neural Network Repair

Singapore Management University(新加坡管理大学)

Richard Schumi, Jun Sun

AI总结:

针对神经网络层组合易出错的问题,提出基于深度学习层可执行语义的全局最小修改自动修复方法,可高效修复自动生成和人工编写的神经网络常见错误。

摘要:

近年来,神经网络已广泛应用于众多领域,包括许多安全关键系统。神经网络是通过在TensorFlow、PyTorch等框架中编程来构建(并训练)的。开发者使用丰富的预定义层集手动编写神经网络,或自动生成神经网络(例如通过AutoML)。由于使用这些层必须满足复杂的约束条件,用不同层组合神经网络很容易出错。在本研究中,我们提出了一种自动修复错误神经网络的方法。该方法的难点在于找到对网络的最小修改量,使其变为有效网络。修改某一层可能会对后续层产生级联影响,因此我们的方法必须递归搜索,以找到“全局”最小的修改方案。我们的方法基于深度学习层的可执行语义,重点针对实践中常见的四类错误。我们在两种使用场景下评估了该方法:修复自动生成的神经网络,以及修复存在常见模型缺陷的人工编写的神经网络。结果显示,对于一组随机生成的神经网络(由现有AI框架测试方法生成),我们能够100%有效且高效地完成修复,平均修复时间为21.08秒;对于一组真实的神经网络缺陷案例,修复成功率为93.75%,平均修复时间为3分40秒。

英文摘要:

Recently, neural networks have spread into numerous fields including many safety-critical systems. Neural networks are built (and trained) by programming in frameworks such as TensorFlow and PyTorch. Developers apply a rich set of pre-defined layers to manually program neural networks or to automatically generate them (e.g., through AutoML). Composing neural networks with different layers is error-prone due to the non-trivial constraints that must be satisfied in order to use those layers. In this work, we propose an approach to automatically repair erroneous neural networks. The challenge is in identifying a minimal modification to the network so that it becomes valid. Modifying a layer might have cascading effects on subsequent layers and thus our approach must search recursively to identify a "globally" minimal modification. Our approach is based on an executable semantics of deep learning layers and focuses on four kinds of errors which are common in practice. We evaluate our approach for two usage scenarios, i.e., repairing automatically generated neural networks and manually written ones suffering from common model bugs. The results show that we are able to repair 100% of a set of randomly generated neural networks (which are produced with an existing AI framework testing approach) effectively and efficiently (with an average repair time of 21.08s) and 93.75% of a collection of real neural network bugs (with an average time of 3min 40s).

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

↑