Abstract
Deep neural networks (DNNs) are prone to various dependability issues, such as adversarial attacks, which hinder their adoption in safety-critical domains. Recently, NN repair techniques have been proposed to address these issues while preserving original performance by locating and modifying guilty neurons and their parameters. However, existing repair approaches are often limited to specific data sets and do not provide theoretical guarantees for the effectiveness of the repairs. To address these limitations, we introduce PatchPro, a novel patch-based approach for property-level repair of DNNs, focusing on local robustness. The key idea behind PatchPro is to construct patch modules that, when integrated with the original network, provide specialized repairs for all samples within the robustness neighborhood while maintaining the network's original performance. Our method incorporates formal verification and a heuristic mechanism for allocating patch modules, enabling it to defend against adversarial attacks and generalize to other inputs. PatchPro demonstrates superior efficiency, scalability, and repair success rates compared to existing DNN repair methods, i.e., realizing provable property-level repair for 100% cases across multiple high-dimensional datasets.
Introduction
Deep Neural Networks (DNNs) are notoriously brittle. A tiny, imperceptible change to an input—an adversarial attack—can lead to catastrophic misclassifications, such as mistaking a "stop sign" for a "speed limit" sign. While various repair methods exist, they typically suffer from three major flaws: the drawdown effect (where fixing one bug degrades performance elsewhere), a lack of generalization (fixing specific points rather than entire regions), and poor scalability (computational costs explode with high-dimensional data).
To overcome these challenges, we present PatchPro, a framework designed for property-level repairs. Unlike point-wise fixes, PatchPro secures entire neighborhoods of the input space with mathematical guarantees, ensuring robustness without compromising the original model's integrity.
Methodology: The PatchPro Architecture
The core innovation of PatchPro lies in its modularity. Rather than retraining or modifying the weights of the original network ($N$), PatchPro keeps the original model frozen and introduces a parallel patching structure.
The architecture consists of three primary components:
- The Indicator: A lightweight function that determines if an input falls into a known "buggy" neighborhood.
- Patch Modules: Small, fully connected networks that generate a "correction" value. When the indicator triggers, the patch's output is added to the original network's output to ensure correct classification.
- Provable Training via DeepPoly: To ensure mathematical soundness, PatchPro integrates the DeepPoly formal verification tool into the training loop. By transforming verification into a loss function, the system can guide patches toward a provably robust state.
For high-dimensional models like ResNets, PatchPro employs Feature Space Repair. By performing repairs in the penultimate layer (the feature space) rather than the pixel space, the system significantly enhances efficiency and scalability.
Experimental Evaluation and Results
PatchPro was evaluated across diverse benchmarks, including MNIST, CIFAR-10 (using VGG19 and ResNet18), Tiny ImageNet (using ResNet152 and WRN101-2), and the safety-critical ACAS Xu system.
The experimental results highlight several key advantages:
- 100% Repair Success Rate (RSR): PatchPro consistently achieved a 100% RSR across MNIST, CIFAR-10, and ACAS Xu, outperforming state-of-the-art tools like PRDNN and REASSURE.
- Zero Drawdown: By isolating repairs to specific regions, the original model's accuracy remained unaffected (0% drawdown) in nearly all test cases.
- Superior Scalability: PatchPro successfully repaired high-dimensional models like ResNet152, where competing provable methods often timed out or exceeded memory limits.
- Robust Defense: Against the "AutoAttack" suite, patched models maintained significantly higher defense success rates compared to traditional repair methods.
Conclusion
PatchPro offers a scalable and provable solution for DNN property repair by utilizing additive patches and formal verification. While the method shows exceptional performance, future work will address risks associated with indicator misclassification and explore "black-box" repair scenarios where internal weights are inaccessible. Integrating more advanced "Branch-and-Bound" verification methods is also planned to further improve precision.
Summary updated