We present NNrepair, a constraint-based technique for repairing neural network classifiers. The technique aims to fix the logic of the network at an intermediate layer or at the last layer. NNrepair first uses fault localization to find potentially faulty network parameters (such as the weights) and then performs repair using constraint solving to apply small modifications to the parameters to remedy the defects. We present novel strategies to enable precise yet efficient repair such as inferring correctness specifications to act as oracles for intermediate layer repair, and generation of experts for each class. We demonstrate the technique in the context of three different scenarios: (1) Improving the overall accuracy of a model, (2) Fixing security vulnerabilities caused by poisoning of training data and (3) Improving the robustness of the network against adversarial attacks. Our evaluation on MNIST and CIFAR-10 models shows that NNrepair can improve the accuracy by 45.56 percentage points on poisoned data and 10.40 percentage points on adversarial data. NNrepair also provides small improvement in the overall accuracy of models, without requiring new data or re-training.
翻译:我们介绍NNRepair,这是修复神经网络分类的制约性技术,目的是在中间层或最后层确定网络的逻辑。NNrepair首先使用故障定位,以发现潜在的错误网络参数(例如重量),然后使用约束性解决方案进行修复,对缺陷的参数进行小的修改。我们提出了新的战略,以便进行精确而有效的修复,例如推断正确性规格,作为中间层修复的孔隙,为每类生成专家。我们展示了三种不同情景:(1) 改进模型的总体准确性,(2) 确定培训数据中毒造成的安全脆弱性,(3) 提高网络对对抗性攻击的稳健性。我们对MNIST和CIFAR-10模型的评估表明,NREpair可以提高准确性,在中毒数据方面提高45.56个百分点,在对抗性数据方面提高10.40个百分点。Nrepair还提供模型总体准确性小幅改进,而无需新的数据或再培训。