Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Over-approximate to prove
Exactly working out every output a network can produce for a region of inputs is too expensive for large networks. Instead, verifiers draw a simple shape that is guaranteed to contain all those outputs, like drawing a fence around a herd you cannot count. If the whole fenced area is safe, every animal inside is safe. A box-shaped fence (intervals) is quick to draw but grows baggier at every layer. A fence made of slanted lines (linear relaxations) follows the herd more closely. And a network can be trained so that even the quick box fits snugly.
Exact convex relaxation (green triangle): area 1.000. CROWN keeps the upper side and one lower line (dashed, slope 1): area 1.500, against 3.000 for the other slope.
Verified accuracy at eps 0.1 (normal network, M2-2 study):
IBP training made large image classifiers verifiably robust for the first time at meaningful L∞ budgets (Gowal and colleagues, 2018).
- 1. A sound over-approximation…
- 2. Interval bounds tend to…
- 3. A network can be trained so that…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Abstract interpretation: run the program (network) on an abstract domain of sets, such as intervals, zonotopes or polyhedra, using transformers that are sound for each operation (Cousot and Cousot, 1977; AI², Gehr and colleagues, 2018).
- Interval bound propagation (IBP): propagate a box: centre c ↦ Wᵀc + b, radius r ↦ |W|ᵀr, then apply ReLU to both ends.
- Dependency (wrapping) problem: intervals forget correlations between neurons, so bounds loosen geometrically with depth even for linear layers.
- Linear relaxation of ReLU: for input bounds l < 0 < u, ReLU(z) lies between α·z (0 ≤ α ≤ 1) and u/(u − l)·(z − l); stable ReLUs are exact.
- CROWN / DeepPoly: propagate a linear lower bound on the specification backwards through the network, choosing the lower or upper relaxation by the sign of each coefficient; intermediate pre-activation bounds are computed the same way.
- IBP training: minimise a mix of the clean loss and the cross-entropy of the IBP ‘worst-case logits’; CROWN-IBP and other certified training methods refine it.
- Verified (certified) accuracy: share of test points proved correct for every perturbation in the threat model.
- 1. IBP maps a radius r through a linear layer to…
- 2. For an unstable ReLU, the upper line passes through…
- 3. Abstract interpretation runs a program on…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.Bounding a network
Exercise 1.
- The 20-dimensional mixture data of topic M1-2; ReLU networks with two hidden layers of 32 units.
- IBP with the last layer folded into the specification (‘elision’); CROWN with adaptive lower slopes and CROWN-computed intermediate bounds.
- The IBP training loss (clean and worst-case cross-entropy) with hand-written gradients through the interval computation, checked against finite differences.
- Checks: both bounds hold at thousands of random points in the eps-balls; intermediate bounds contain the true pre-activations.
Practice.
- Use CROWN-style linear bounds (auto_LiRPA, α,β-CROWN) for verification; use IBP for speed or for training.
- Train for verifiability when certificates are required: IBP, CROWN-IBP or newer certified training methods, with an eps ramp-up and a mix of clean and worst-case loss.
- Fold the last layer into the specification and compute the margin bound directly; it is always tighter.
- Check soundness empirically: sample points in the region and confirm they respect the bounds; a single violation means a bug.
- Report verified accuracy with the exact threat model, bound method and time limit, and compare with attack-based upper bounds to show the remaining gap.
def crown_lower(L, lo, hi, C, pre):
A = C @ W_last.T; const = C @ b_last # objective: C · logits
for each hidden layer, from last to first:
l, u = pre[layer]; s = u / (u - l); t = -s * l # upper line for unstable ReLUs
alpha = 1 if u >= -l else 0 # lower line alpha * z
const += sum over negative entries of A of A * t
A = A * (alpha where A >= 0, s where A < 0) # relax the ReLU
const += A @ b; A = A @ W.T # through the affine layer
return A @ centre + const - |A| @ radius # minimise over the input box- 1. For verification, prefer…
- 2. A single sampled point outside the bounds means…
- 3. Folding the last layer into the specification…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Soundness of the relaxation. For l < 0 < u, the chord from (l, 0) to (u, u) lies above ReLU on [l, u] because ReLU is convex, and any line α·z with 0 ≤ α ≤ 1 lies below it (it is below 0 for z < 0 and below z for z > 0). To lower-bound Σⱼ aⱼ·ReLU(zⱼ), use the lower line where aⱼ ≥ 0 and the upper line where aⱼ < 0: each term is then bounded from below by a linear function of zⱼ. Repeating this through every layer gives a linear function of the input that lower-bounds the specification everywhere in the region, and its minimum over a box is closed-form, aᵀc − |a|ᵀr.
Why IBP is loose. For two linear layers, the exact range of W₂ᵀW₁ᵀx over a box has radius |W₁W₂|ᵀr, while IBP gives |W₂|ᵀ|W₁|ᵀr, which is never smaller because |Σ xy| ≤ Σ |x||y|. The gap compounds with each layer, by a factor of about 3 per layer for random weights (Practice 1). CROWN propagates the product W₁W₂ itself and avoids the gap for the linear parts; the only looseness comes from unstable ReLUs, which is why it is far tighter on normally trained networks.
Why IBP training works. The IBP bound is differentiable, so it can be minimised directly. Training pushes the network towards weights for which the bound is tight: fewer unstable ReLUs, smaller |W| where it does not hurt accuracy, and margins that survive the interval blow-up. The cheap bound then certifies almost as much as the expensive one. On such networks CROWN is not guaranteed to be tighter than IBP, because its relaxation of unstable ReLUs can be worse than the interval for a particular neuron; CROWN-IBP and α-CROWN combine or optimise the two.
- 1. The chord of ReLU on [l, u] lies above ReLU because ReLU is…
- 2. IBP's bound for two linear layers uses…
- 3. On IBP-trained networks, CROWN is…
Level 4: Expert
★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.How much of a network’s true robustness can IBP and CROWN prove, for a normally trained network and for networks trained with IBP, and how close are the bounds to what an attack finds?
History.
- R. Moore (1966) developed interval arithmetic; P. Cousot and R. Cousot (1977) founded abstract interpretation.
- T. Gehr and colleagues (2018, AI²) verified networks by abstract interpretation with zonotopes; G. Singh and colleagues introduced DeepZ (2018) and DeepPoly (2019).
- E. Wong and J. Z. Kolter (2018) used a convex outer bound to train provably robust networks; T.-W. Weng and colleagues (2018, Fast-Lin) and H. Zhang and colleagues (2018, CROWN) introduced efficient backward linear bounds.
- S. Gowal and colleagues (2018) introduced IBP training; M. Mirman, T. Gehr and M. Vechev (2018) trained with abstract interpretation (DiffAI); H. Zhang and colleagues (2020) combined the two in CROWN-IBP; K. Xu and colleagues (2020, 2021) built auto_LiRPA and α-CROWN; S. Wang and colleagues (2021) introduced β-CROWN.
Exercise 2.
- Three networks on 1000 training points: normally trained, and IBP-trained at eps 0.1 and 0.2 (eps ramped up over the first half of 300 steps, clean-loss weight falling from 1 to 0.5).
- On 300 test points at eps 0.05, 0.1 and 0.2: verified accuracy by IBP and by CROWN, and accuracy under 20-step PGD with 2 restarts (an upper bound on the true robust accuracy).
- For the normal network at eps 0.1: median lower bounds on the smallest margin by IBP and CROWN, and the smallest margin PGD found.
Seed 0 (IBP verified, CROWN verified, PGD):
| network (clean accuracy) | eps 0.05 | eps 0.1 | eps 0.2 |
|---|---|---|---|
| normal (0.997) | 0.897, 0.977, 0.977 | 0.470, 0.967, 0.973 | 0.030, 0.900, 0.947 |
| IBP-trained at 0.1 (0.997) | 0.977, 0.987, 0.987 | 0.943, 0.977, 0.980 | 0.753, 0.940, 0.953 |
| IBP-trained at 0.2 (0.997) | 0.993, 0.993, 0.993 | 0.987, 0.990, 0.990 | 0.930, 0.943, 0.967 |
Seeds 1 and 2 at eps 0.2: normal network IBP 0 and 0.010, CROWN 0.700 and 0.820, PGD 0.800 and 0.903; IBP-trained at 0.2: IBP 0.827 and 0.923, CROWN 0.820 and 0.953, PGD 0.863 and 0.963.
Median margin bounds for the normal network at eps 0.1: IBP −0.70, CROWN 11.46, PGD 12.08 (seed 0); −5.42, 11.33, 11.99 and −0.78, 12.50, 13.13 for seeds 1 and 2.
Findings.
- On the normal network IBP proved almost nothing at eps 0.2 (3% of points; 0% and 1% for seeds 1 and 2) while CROWN proved 90% (70% and 82%), within 4.7 points of the PGD upper bound (10 and 8.3 points).
- CROWN’s margin bound was close to tight: its median, 11.46, was 95% of the smallest margin PGD could find, while IBP’s was negative.
- IBP training at eps 0.2 raised IBP-verified accuracy at 0.2 from 0.030 to 0.930 (0 to 0.827, and 0.010 to 0.923) without lowering clean accuracy in any seed.
- On IBP-trained networks the two bounds nearly coincided, and for seed 1 IBP verified slightly more than CROWN (0.827 against 0.820): CROWN is not always tighter.
Bounds in practice
- auto_LiRPA computes IBP, CROWN and α-CROWN bounds for general PyTorch models; α,β-CROWN adds branch and bound and has won several VNN-COMP rounds; ERAN implements DeepZ and DeepPoly; NNV handles closed-loop reachability.
- Certified training (IBP, CROWN-IBP, SABR, TAPS and others) gives the best certified accuracies at L∞ budgets on CIFAR-10 and TinyImageNet, but still well below empirical robust accuracy.
- Beyond classifiers: reachability of neural network controllers over many time steps, bounds on transformers and on physics surrogates, and monitoring by bounding outputs at run time (topic M2-4).
References
- S. Gowal and colleagues (2018). “On the effectiveness of interval bound propagation for training verifiably robust models.” arXiv:1810.12715.
- H. Zhang, T.-W. Weng, P.-Y. Chen, C.-J. Hsieh and L. Daniel (2018). “Efficient neural network robustness certification with general activation functions.” NeurIPS.
- G. Singh, T. Gehr, M. Püschel and M. Vechev (2019). “An abstract domain for certifying neural networks.” POPL.
- T. Gehr and colleagues (2018). “AI2: safety and robustness certification of neural networks with abstract interpretation.” IEEE Symposium on Security and Privacy.
- H. Zhang and colleagues (2020). “Towards stable and efficient training of verifiably robust neural networks.” ICLR.
- K. Xu and colleagues (2020). “Automatic perturbation analysis for scalable certified robustness and beyond.” NeurIPS.