SafeDeep: A Scalable Robustness Verification Framework for Deep Neural Networks

Anahita Baninajjar, Kamran Hosseini, Ahmed Rezine, Amir Aminifar

Introduction

Deep Neural Networks (DNNs) are notoriously "brittle." Small, often imperceptible perturbations to an input—known as adversarial examples—can cause a model to flip its classification. This vulnerability poses a significant hurdle for deploying AI in safety-critical fields like healthcare or autonomous driving. To ensure reliability, formal verification is required: a mathematical proof that for a given input, no perturbation within a specified range ($\delta$) can alter the model's output.

Current verification tools face a "Goldilocks" problem. Exact methods, such as SMT-based solvers like Reluplex, provide definitive results but suffer from exponential computational complexity, making them impractical for large networks. Conversely, over-approximation methods like ERAN are fast but often too "loose," yielding inconclusive results even when a network is robust. SafeDeep addresses this gap by starting with fast approximations and adding complexity only where strictly necessary.

Methodology: On-Demand Refinement

The core of SafeDeep is a layer-by-layer refinement algorithm that utilizes Linear Programming (LP) engines. The process begins with a convex approximation to model the non-linear behavior of ReLU (Rectified Linear Unit) activation functions. By using a "minimum area convex approximation," the framework transforms the complex neural network into a set of linear constraints manageable by an LP solver.

Convex relaxation of the ReLU activation function used for linear approximation.

The key innovation is on-demand refinement. If initial coarse bounds are insufficient to prove robustness, SafeDeep identifies "undetermined" neurons—those whose state (active vs. inactive) cannot be determined by the current bounds. Instead of restarting the verification, the framework performs targeted LP queries to tighten the bounds of these specific neurons. This incremental tightening moves through the network layer-by-layer, updating subsequent bounds only when necessary. This approach treats precision as a resource, "spending" it only on neurons that cause ambiguity in the final output.

Experimental Setup

SafeDeep was evaluated using a real-world safety-critical application: epileptic seizure detection. The authors utilized the CHB-MIT Dataset, which contains EEG signals from pediatric subjects. The target model is a seven-layer fully-connected neural network (760 neurons total) trained to classify EEG segments. This architecture is designed for compatibility with the e-Glass wearable system for real-time monitoring.

Results and Discussion

The performance of SafeDeep was benchmarked against ERAN and Reluplex across 785 samples with varying perturbation levels ($\delta$).

  • Precision: SafeDeep verified 43% more cases on average than ERAN. At the highest perturbation level ($\delta = 0.04$), ERAN failed to verify any cases, whereas SafeDeep successfully verified 81.
  • Scalability: While Reluplex timed out (after one hour) for over 80% of the samples, SafeDeep processed samples in an average of 32 to 47 seconds.
  • Efficiency: The "on-demand" strategy proved highly effective. As illustrated in the figure below, a significant portion of samples could be verified in just a few refinement steps.
Distribution of refinement steps required to verify robustness across different perturbation levels.

Conclusion

SafeDeep provides a scalable middle ground for DNN verification, significantly outperforming existing tools in both precision and speed for medium-sized networks. While currently focused on fully-connected ReLU networks, future work aims to extend this framework to Convolutional Neural Networks (CNNs) and Transformers. Further optimization through full parallelization of the LP solving stage could enable the verification of even larger-scale models used in modern computer vision.

Summary updated

BibTeX
@inproceedings{baninajjar2023safedeep,
  author = {Anahita Baninajjar and Kamran Hosseini and Ahmed Rezine and Amir Aminifar},
  title = {{SafeDeep: A Scalable Robustness Verification Framework for Deep Neural Networks}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10097028},
}
Figure