ADVREPAIR: Provable Repair of Adversarial Attack

Zhiming Chi, Jianan Ma, Pengfei Yang, Cheng-Chao Huang, Renjue Li, Xiaowei Huang, Lijun Zhang

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 are notoriously fragile. A tiny, imperceptible change to an input—an adversarial attack—can flip a model’s prediction from a "stop sign" to a "speed limit 80." While various repair techniques exist, they often suffer from a "trilemma":

  1. Generalization: Fixing a specific error often fails to secure the surrounding neighborhood.
  2. Performance Trade-offs: Traditional fixes like adversarial training often cause "drawdown," where robustness comes at the cost of accuracy on clean data.
  3. Scalability: Provable repair methods—those providing mathematical guarantees—struggle with high-dimensional data like high-resolution images.

PATCHPRO addresses these challenges by providing a scalable framework for provable, property-level repairs without degrading the original model's performance.

Methodology

The core innovation of PATCHPRO is its patch-based architecture. Rather than modifying the weights of a massive pre-trained model, the original network remains frozen. Specialized, fully connected "patch modules" are integrated alongside the base network to handle specific robustness violations.

The PATCHPRO architecture integrates an indicator and patch networks with the original frozen model.

Key components include:

  • The Indicator: A routing component that identifies if an input falls into a known "buggy" neighborhood. It activates the corresponding patch or uses a heuristic to decide if a patch might improve general robustness.
  • DeepPoly-based Training: To ensure repairs are "provable," the framework utilizes DeepPoly, a formal verification tool. DeepPoly calculates upper and lower bounds of a network's output via linear relaxation. These bounds are transformed into a differentiable loss function; when this loss reaches zero, the property is mathematically verified for the entire neighborhood.
  • Feature Space Repair: To maintain scalability for large models like ResNet152, PATCHPRO can perform repairs in the "feature space" (the penultimate layer), reducing the computational overhead of formal verification.

Experimental Setup

The framework was evaluated across several diverse benchmarks:

  • MNIST: Classic handwritten digits using FNN and CNN architectures.
  • CIFAR-10: Testing larger architectures like VGG19 and ResNet18.
  • Tiny ImageNet: High-dimensional scalability tests on WRN101-2 and ResNet152.
  • ACAS Xu: A safety-critical airborne collision avoidance system benchmark.

Results

PATCHPRO demonstrated significant improvements over state-of-the-art baselines like CARE, PRDNN, and REASSURE.

Comparative results show PATCHPRO (Ours) achieving 100% Repair Success Rate (RSR) and 0% Drawdown (DD) across various models.

Key findings include:

  • 100% Success Rate: PATCHPRO achieved a 100% Repair Success Rate (RSR) across all tested high-dimensional datasets.
  • Zero Drawdown: By keeping the base weights frozen, the framework maintained the original network's accuracy (0% drawdown) by design.
  • Scalability: Unlike competing provable methods that often timed out on large models, PATCHPRO successfully repaired ResNet152 and WRN101-2 models on Tiny ImageNet.
  • Safety Verification: On the ACAS Xu benchmark, it corrected 100% of safety property violations with zero fidelity loss.

Conclusion

PATCHPRO offers a robust solution for DNN repair by combining modularity with formal verification. While feature-space repairs for massive models trade off some strict mathematical guarantees for efficiency, the method remains highly effective. Future work will focus on integrating more precise verification methods like Branch-and-Bound and exploring "black-box" repair scenarios where internal parameters are inaccessible.

Summary updated

BibTeX
@inproceedings{chi2024advrepair,
  author = {Zhiming Chi and Jianan Ma and Pengfei Yang and Cheng-Chao Huang and Renjue Li and Xiaowei Huang and Lijun Zhang},
  title = {{ADVREPAIR: Provable Repair of Adversarial Attack}},
  booktitle = {ICSE},
  year = {2024},
}
Figure