CNN-Cert: An Efficient Framework for Certifying Robustness of Convolutional Neural Networks
CNN-Cert: An Efficient Framework for Certifying Robustness of Convolutional Neural Networks
The authors propose CNN-Cert, which computes certified robustness lower bounds for CNNs containing convolution, pooling, BN, residual blocks and general activation functions; the authors claim it is up to 17 times faster than Fast-Lin and up to 366 times faster than Dual-LP.
ℓp norm ball bounded threat model (p ≥ 1); the certifier has full access to all the model parameters; the goal is to find a provable lower bound ρcert on the minimum adversarial perturbation ρmin, guaranteeing that the top-1 prediction is unchanged under all perturbations within the ball.
- Neural networks are vulnerable to adversarial perturbations, and exactly computing the minimum adversarial distortion is an NP-complete problem; existing provable robustness certification methods mostly support only fully connected networks and ReLU, and when handling convolutional layers they often convert to fully connected, losing efficiency.
- The authors propose CNN-Cert: linear upper and lower bounds are derived separately for activations, convolution, pooling, BN, and residual blocks, propagated backward layer by layer to obtain an explicit convolutional-form bound of the output, then binary search over the perturbation radius is used to find the certified lower bound ρcert; Fast-Lin and CROWN are special cases of it.
- On five categories of networks on MNIST/CIFAR/Tiny ImageNet, CNN-Cert-Ada's certified lower bounds are about 8–25% higher than Fast-Lin (various tables); on the smallest network it is over an order of magnitude faster than Fast-Lin and up to 366 times faster than Dual-LP; on small MLPs the certified bound differs from the Reluplex exact value by about 2 times.
- The paper does not specifically discuss limitations. Experiments cover: self-trained small models (10 epochs), 10 random test images per setting (some 100 images), only ℓp norm ball threat models, CPU implementation; a gap remains between certified bounds and attack upper bounds.
- Evaluated models
- Pure CNNs (MNIST/CIFAR-10, 2-8 layers, ReLU)LeNet (MNIST)LeNet No Pooling (MNIST)General CNNs with pooling and batch normalization (MNIST, Tiny ImageNet)ResNet-2 (MNIST)ResNet-3 (MNIST)ResNet-4 (MNIST)ResNet-5 (MNIST)CNNs and ResNets with non-ReLU activations (sigmoid, tanh, arctan)Small MLPs (MNIST, 2-layer and 3-layer, 20 nodes)
- Benchmarks
- MNISTCIFAR-10Tiny ImageNet
- Metrics
- certified lower bound ρcert(ℓ∞/ℓ2/ℓ1)average computation time (sec)improvement/speed-up 百分比
The researchers propose the CNN-Cert framework for efficiently certifying the robustness of convolutional neural networks to adversarial perturbations. Because finding the minimum adversarial distortion of a neural network is an NP-complete problem, the framework provides provable robustness guarantees by computing nontrivial lower bounds. The method supports convolutional layers, max pooling, batch normalization, residual blocks and general activation functions, and generalizes algorithms such as Fast-Lin and CROWN. Exploiting the special structure of convolutional layers, its certification speed is up to 17 times and 11 times faster than Fast-Lin and CROWN, respectively, and 366 times faster than the dual-LP method, while the verified bounds are comparable or even better; extensive experiments show that the method outperforms existing lower-bound-based certification algorithms in both lower-bound quality and speed.
Paper analysis
What problem does this paper attempt to solve?
How to compute provable robustness lower bounds for CNNs containing convolution, pooling, BN, residual blocks and general activation functions, and faster than existing certification algorithms.
Core problem: efficiently computing a provable lower bound (certified lower bound) on the minimum adversarial distortion for convolutional neural networks of general structure, i.e., providing robustness certification.
- Problem setting and importance: The authors point out that neural networks in tasks such as images can have their predictions manipulated by imperceptible adversarial perturbations; game-based defense evaluations are often bypassed by adaptive attacks, whereas verification-based methods can give provable guarantees against all possible attacks under the threat model, which is important for safety-critical applications.
- Shortcomings of existing methods: Exactly computing the minimum distortion of a ReLU network is an NP-complete problem (Katz et al. 2017), and exact methods cannot scale to medium-sized networks; existing lower-bound certification methods are mostly limited to fully connected layers and ReLU activations, and when handling convolutional layers they often directly convert them to fully connected layers, which the authors believe loses efficiency (Table 1 compares the differences among methods in generality, scalability, and whether they exploit CNN structure).
- Core idea: For each nonlinear component in the network (activation function, pooling, residual block), impose a pair of linear upper and lower bounds, propagate backward layer by layer to obtain an explicit linear (convolutional form) bound of the network output with respect to the input, then use binary search to find the maximum certifiable perturbation radius.
- Method proposed in the paper: The CNN-Cert framework, which supports convolutional layers, max/average pooling, batch normalization, residual blocks, and general activation functions such as ReLU, tanh, sigmoid, arctan; the authors claim that Fast-Lin and CROWN are special cases of it.
- Threat model:
- Model type: norm-ball bounded threat model (ℓp norm ball), p ≥ 1, perturbation δ satisfies ‖δ‖p ≤ ε.
- Knowledge: full access to all the model parameters during certification.
- Certification goal: find ρcert such that the top-1 prediction is unchanged under all perturbations within the ball (un-targeted robustness); the paper also defines a targeted version ρcert,t.
- Victim system: neural network classifier f(x), in the experiments a CNN on MNIST/CIFAR/Tiny ImageNet.
What related research exists?
Related work falls into three categories: adversarial attacks and defenses, exact verification, and scalable lower-bound certification; this paper positions itself as simultaneously general (multiple structures and multiple activations) and exploiting convolutional structure for speedup.
Adversarial Attacks and Empirical Defenses
- Szegedy et al. (2013), Carlini and Wagner (2017b), Kurakin et al. (2017), etc.—white-box and black-box adversarial attacks, covering applications such as image recognition, image captioning, machine translation, and graph learning; the paper uses these to illustrate the common use of ℓ1/ℓ2/ℓ∞ norm-ball threat models.
- Madry et al. (2018), Sinha et al. (2018)—adversarial training is a relatively effective strategy among empirical defenses; Kolter and Wong (2018), Weng et al. (2018b) use verification methods to confirm that adversarial training indeed improves robustness.
- Carlini and Wagner (2017a), Athalye et al. (2018)—the paper cites them to show that many defenses evaluated based on attacks are bypassed by adaptive attacks under the same threat model, which is the authors' reason for advocating verification-based methods.
Exact Verification (NP-complete route)
- Reluplex (Katz et al. 2017), Planet (Ehlers 2017), Lomuscio and Maganti (2017), Cheng et al. (2017), Fischetti and Jo (2017)—can compute exact minimum distortion, but the paper points out that these methods can only be used on small shallow networks and cannot scale to medium-sized networks (Table 1 marks their scalability as insufficient).
Scalable Lower-Bound Certification
- Global/local Lipschitz constants (Szegedy et al. 2013; Hein and Andriushchenko 2017) and SDP methods (Raghunathan et al. 2018)—the paper states such analytical bounds are generally too loose or limited to 1–2 hidden layers.
- Dual approach (Kolter and Wong 2018; Dvijotham et al. 2018)—dual methods can scale to multiple layers; the paper states that the any-time property of Dvijotham et al. may come at the cost of lower bound quality, and that their code was not released at the time of the experiments (Table 1).
- Fast-Lin/Fast-Lip (Weng et al. 2018a) and CROWN (Zhang et al. 2018)—support ReLU and general activation functions respectively, but the paper points out that they consider only fully connected layers (MLPs) and do not exploit convolutional structure; this paper proves that both are special cases of CNN-Cert.
Baselines and Comparison Settings: certification baselines are Fast-Lin, Global-Lips, Dual-LP, Reluplex (exact values, runnable only on small networks); additionally a direct comparison with CROWN (Table 13); on the attack side the reference is the CW/EAD attack distortion upper bound, and the non-certified estimate is CLEVER. Datasets are MNIST, CIFAR-10, Tiny ImageNet.
The authors position this paper as: a framework that simultaneously satisfies non-trivial bounds, multiple layers, scalability, going beyond ReLU, exploiting CNN structure, and supporting structures such as pooling, on the comparison dimensions of Table 1.
How does the paper address this problem?
Linear upper and lower bounds are derived for each type of network component and propagated backward into explicit convolutional form, then binary search over the perturbation radius yields the certified lower bound ρcert.
Overall idea: view the network as a cascade of components; for each nonlinear component (activation, pooling, residual block) and linear component (convolution, BN), derive linear upper and lower bounds of the form A∗Φ+B, substitute back layer by layer to obtain an explicit bound of the network output with respect to the input x, then find the global upper and lower bounds of the output class over the ℓp ball and binary search for the certified radius. The framework is named CNN-Cert.
Problem formalization
- Given input x0 and predicted class c = argmax f(x0), the minimum distortion ρmin is the smallest perturbation that changes the prediction; the certified lower bound ρcert satisfies ρcert < ρmin 且球内预测不变。
- 对激活函数 σ 在输入区间 [l, u] 上取线性界:αL (y + βL) ≤ σ(y) ≤ αU (y + βU),参数 α、β 按每个神经元的 l、u 选取;允许上下界斜率不同是 CNN-Cert-Ada 与 Fast-Lin(同斜率)的区别。
各构件的界(Table 2,一般 stride/padding 见 Table 9)
- Act-Conv 块:对 Φr = Wr ∗ σ(Φr−1) + br 按权重正负项(Wr+、Wr−)分别套上激活的线性界,得到 Φr 关于 Φr−1 的卷积形式上下界(式 (3)(4),推导见附录 (a))。
- 残差块:对 Φr+2 = Wr+2 ∗ σ(Φr+1) + br+2 + Φr,把 Act-Conv 界代入并加上恒等支路 I,得到关于 Φr 的线性界(推导见附录 (b))。
- Batch Normalization:推理时 BN 只是缩放加平移,上下界同乘 γbn/√(σbn²+εbn) 再加截距,上下界系数相同。
- Pooling 块:max-pooling 输出用一组与输入区间 [lr, ur] 相关的线性函数夹逼(含 γ、γ0 的构造,推导见附录 (c));average pooling 的输出区间即对应输入区间的平均。
全局界与认证半径计算
- 逐层回代后得到 A0L ∗ x + B0L ≤ Φm(x) ≤ A0U ∗ x + B0U(式 (7)),即网络输出关于输入的显式卷积形式界。
- 在 ℓp 球 Bp(x0, ε) 上优化得各类输出的全局界 ηj,U、ηj,L(式 (8)(9),含对偶范数项 ε‖vec(A)‖q,1/p+1/q=1)。
- 若 ηc,L − ηt,U > 0, then radius ε can be certified; since the intermediate bounds depend on ε, binary search is used to find the maximum ρcert. The intermediate bounds [lr, ur] are computed recursively for the subnetwork using the same framework.
Relationship to existing methods and complexity
- The authors prove that Fast-Lin (same-slope linear bounds on ReLU) and CROWN are special cases of CNN-Cert: when the same linear bounds are used on ReLU, the same certificates as CROWN are obtained (the ReLU row in Table 13 shows an improvement of 0%); on general activation functions CNN-Cert-Ada uses more precise linear bounds.
- Two variants: CNN-Cert-Relu (using Fast-Lin's ReLU bounds) and CNN-Cert-Ada (adaptive bounds for all activations).
- The time complexity given by the authors: for a pure CNN with m layers, k×k convolution kernels, n filters per layer, input r×r, stride 1, it is O(r²m⁶k⁴n³), while certifying the equivalent fully connected network requires O(r⁶m²n³); the authors claim the cost is of the same order as forward propagation, and training-time operations (such as dropout) do not affect certification.
What experiments did the paper conduct?
Certified lower bounds and runtimes are compared on five categories of self-trained networks on MNIST/CIFAR/Tiny ImageNet; CNN-Cert-Ada's bounds are about 8–25% higher than Fast-Lin, and up to 366 times faster than Dual-LP.
Experimental Setup
- Networks under test: five categories—(I) pure CNN (ReLU, MNIST/CIFAR, 2–8 layers, 5/10/20 filters, 3×3 convolution); (II) general CNN with pooling/BN (LeNet, 7-layer, No Pooling, Batch Norm variants); (III) ResNet-2/3/4 (ReLU); (IV) CNN and ResNet with general activation functions (sigmoid/tanh/arctan); (V) small MLP (MNIST, 2/3 layers, 20 nodes per layer).
- Datasets: MNIST, CIFAR-10, Tiny ImageNet; all models were trained by the authors for 10 epochs with hyperparameter tuning to optimize validation accuracy.
- Baselines: Fast-Lin (including the authors' sparse-matrix implementation), Global-Lips, Dual-LP, Reluplex (runnable only on 2-layer small MLPs), CROWN (Table 13); attack reference CW/EAD, non-certified estimate CLEVER.
- Metrics: average certified lower bound ρcert under ℓ∞/ℓ2/ℓ1, average computation time (seconds), relative improvement/speedup percentage.
- Sample size: 10 random test images and attack targets per setting (to accommodate slow verification methods); in Table 5 some networks additionally report results on 100 images; the paper states the average results of the two are similar.
- Implementation: Python (numpy + numba), AMD Zen server CPU; methods that only support MLPs first convert the CNN into an equivalent MLP before evaluation.
Main Results
Certified lower bounds and runtimes for pure CNNs (I) (from Table 3, Table 4, averaged over 10 images):
Swipe horizontally to read the table
Network Norm CNN-Cert-Ada Fast-Lin Dual-LP Improvement vs Fast-Lin Speedup vs Fast-Lin Speedup vs Dual-LP MNIST 4-layer 5filter ℓ∞ 0.0491 0.0406 0.0456 +21% 3.9 366.1 MNIST 4-layer 5filter ℓ2 0.1793 0.1453 0.1653 +23% 10.5 270.1 MNIST 4-layer 20filter ℓ∞ 0.0340 0.0291 not reported +17% 10.0 not reported MNIST 5-layer 5filter ℓ∞ 0.0305 0.0248 not reported +23% 3.4 not reported CIFAR 7-layer 5filter ℓ∞ 0.0042 0.0036 not reported +17% 5.2 not reported CIFAR 5-layer 10filter ℓ∞ 0.0042 0.0037 not reported +14% 8.1 not reported - The authors state that CNN-Cert's bounds consistently outperform Fast-Lin and Dual-LP as network size grows, overall about 8–20% better than Fast-Lin and Dual-LP; runtime is faster than Fast-Lin, by over an order of magnitude on the smallest network, and by multiple orders of magnitude faster than Dual-LP, but the speedup ratio decreases as networks get larger.
- Global-Lips's bounds are far smaller than other methods (e.g., on the order of 0.0002); the authors explain that it uses only the product of layer weights as the Lipschitz constant, whereas CNN-Cert exploits neuron-level output information.
- Attack reference: the attack distortion of CW/EAD (e.g., 0.1488 for MNIST 4-layer ℓ∞) is clearly higher than all certified lower bounds; the authors state there is a gap between certification methods and attack upper bounds.
General CNN and ResNet (II, III)
- What was tested: bound improvement of CNN-Cert-Ada relative to CNN-Cert-Relu on CNNs with pooling/BN and on ResNet (Table 5, Table 6).
- Results: Table 5 shows improvements of +6% to +29% across networks (e.g., MNIST 7-layer ℓ1 from 0.0542 to 0.0638, +18%; Tiny ImageNet 7-layer ℓ2 from 0.0012 to 0.0016, +29%); Table 6 shows ResNet-2/3/4 improvements of +4% to +23%.
- Authors' interpretation: the LeNet variant without pooling has a clearly larger certified bound than the version with pooling, and networks with BN have smaller certified bounds; the authors believe this reveals the relationship between certified robustness and network structure, and that CNN-Cert may be usable to search for more robust structures.
General Activation Functions and Comparison with CROWN (IV and appendix)
- What was tested: certified bounds and time cost on CNNs and ResNets with sigmoid/tanh/arctan activations (Table 7, Table 12), and direct comparison with CROWN (Table 13).
- Results: in Table 7 all activation functions yield non-trivial lower bounds with time cost similar to ReLU (e.g., MNIST LeNet about 9.4–9.9 seconds for each activation); in Table 13 the ReLU row has the same bound as CROWN (0% improvement), with improvements of 146%–260% on Tanh, 62%–111% on Arctan, and 2% on Sigmoid, while being 2.50–11.42 times faster than CROWN.
- Exceptions: the 7-layer sigmoid network is omitted due to poor test accuracy; in Table 12, the ℓ2/ℓ1 rows for ResNet-5 under CNN-Cert-Ada (0.0283, 0.0525) are lower than CNN-Cert-Relu (0.0361, 0.0756), which the paper does not explain.
Small MLP and Comparison with Exact Values (V)
- What was tested: comparison with Reluplex exact minimum distortion on MNIST 2/3-layer MLPs with 20 nodes per layer (Table 8).
- Results: on 2-layer ℓ∞, Reluplex exact value is 0.0830, CNN-Cert-Ada 0.0371, Dual-LP 0.0372, Fast-Lin 0.0365; the authors state the gap between each certified lower bound and the exact value is about 2 times, and that CLEVER (0.0526) and the attack method (0.0871) are closer to the exact value but without guarantees.
- Exceptions: in Table 8, CNN-Cert-Ada's improvement over Dual-LP is negative on ℓ2/ℓ1 (2-layer ℓ2 is -15%, 3-layer ℓ2 is -10%), i.e., Dual-LP's bound is tighter in that setting.
Other Ablations and Analyses
- Appendix Table 10/11: on more pure CNNs (2–8 layers, 5–20 filters) bound improvements are +11% to +36%, and the speedup ratio decreases with scale (on large networks vs the sparse version of Fast-Lin it drops to 0.6–0.7, i.e., slower).
- In Table 5 the average bounds for 100 images and 10 images are similar (e.g., LeNet ℓ∞: 0.0124 vs 0.0120).
- The abstract and main text state up to 17 times faster than Fast-Lin and 2.5–11.4 times faster than CROWN; in Table 11 the maximum vs Fast-Lin is 17.2 (MNIST 3-layer ℓ1).
What are some points that can be further explored?
The paper does not specifically discuss limitations; only in the discussion of results does it propose that CNN-Cert can be used to search for more robust network structures; experiments are limited to self-trained small models and the ℓp threat model.
Limitations and Future Directions Noted by the Authors
- The paper does not specifically discuss limitations (there is no Limitations subsection; the Conclusion and Future Work section only summarizes contributions and does not list specific future work).
- Results (II)(III) section: the authors believe the relationship between certified bounds and network structure (LeNet without pooling has larger bounds, networks with BN have smaller bounds) provides a new perspective, and CNN-Cert could potentially be leveraged to search for more robust networks.
- Results (I) section: the authors point out that there is a significant gap between the certified lower bounds of all certification methods and the attack distortion upper bounds.
Scope of Experimental Coverage
- The networks under test are small-scale models trained by the authors: 2–8 layer CNNs (5–20 filters) on MNIST/CIFAR, LeNet and its variants, ResNet-2/3/4/5, 2/3-layer MLPs with 20 nodes per layer, Tiny ImageNet 7-layer CNN; trained for 10 epochs (Experiments section).
- The threat model is only ℓp norm balls (experiments report ℓ∞/ℓ2/ℓ1), and the certification setting is un-targeted robustness (Background section).
- Each setting uses 10 random test images and attack targets; in Table 5 two networks additionally report 100 images; the paper does not report the number of repetitions or variance.
- Exact minimum distortion is obtained with Reluplex only on 2-layer 20-node MLPs (Table 8); on larger networks Reluplex and some Dual-LP are marked "-" due to computational infeasibility.
- Among the comparison methods, the code of Dvijotham et al. (2018) was not released at the time of the experiments, and Dual-LP is referenced by the best results of its dual problem (Comparative Methods section); experiments are implemented in numpy+numba on CPU (AMD Zen server).
Summarize the main content of the paper
CNN-Cert uses component-level linear bounds to compute certified robustness lower bounds for general CNNs; the authors claim the bounds are about 8–25% tighter than Fast-Lin and up to 366 times faster than Dual-LP.
CNN-Cert is a neural network robustness certification framework, targeting the ℓp norm-ball threat model, that computes a provable lower bound ρcert on the minimum adversarial distortion for convolutional neural networks.
- Problem to solve: exactly computing the minimum distortion is an NP-complete problem; existing lower-bound certification methods mostly support only fully connected layers and ReLU, and handle convolution by converting to fully connected, which the authors believe loses efficiency and lacks generality.
- Method highlights: linear upper and lower bounds are derived separately for activations, convolution, pooling, BN, and residual blocks, and backpropagated layer by layer to obtain an explicit convolutional-form bound of the output with respect to the input, followed by binary search over the perturbation radius; the authors prove that Fast-Lin and CROWN are special cases, and give a complexity of O(r²m⁶k⁴n³), stating the cost is of the same order as forward propagation.
- Main results:
- On pure CNNs the certified lower bounds are +14% to +25% higher than Fast-Lin (Table 3), and +11% to +36% on more networks in the appendix (Table 10).
- In runtime, on the smallest network (MNIST 4-layer 5filter) it is 3.9–10.5 times faster than Fast-Lin and up to 366.1 times faster than Dual-LP (Table 4); the authors state the speedup ratio decreases as networks get larger, and in the appendix the speedup relative to the sparse version of Fast-Lin on large networks is below 1.
- Compared with CROWN on general activation functions: the same bound on ReLU, 146%–260% higher bounds on Tanh, while being 2.50–11.42 times faster (Table 13).
- On 2-layer small MLPs the certified lower bound (0.0371) differs from the Reluplex exact minimum distortion (0.0830) by about 2 times (Table 8).
- Authors' conclusions: the authors state that CNN-Cert outperforms existing lower-bound-based certification algorithms in bound quality and speed, and believe the relationship between certified bounds and network structure (the effect of pooling and BN) can be used to search for more robust networks; a gap still exists between certified bounds and attack upper bounds.
Related papers
- No Free Efficiency: Revisiting the Trade-off Between Training Efficiency and Model VulnerabilityAnalysis / interpretabilityarXiv
Show 3 more papers
- Semantic-aware Adversarial Fine-tuning for CLIPDefensesarXiv