Certification of neural networks not trained for verification via memory-efficient semidefinite programmingEnabling certification of verification-agnostic networks via memory-efficient semidefinite programming
The authors propose a first-order dual SDP solver, SDP-FO, whose memory grows linearly with the number of activations, raising the l∞ verified robust accuracy of verification-agnostic CNNs on MNIST from 0.4% to 87.8%.
The verifier must give provable input-output specification guarantees for verification-agnostic networks (not trained for the verification algorithm): verifying adversarial robustness against l∞ input perturbations (MNIST ε=0.1, CIFAR-10 ε=2/255, etc.), and verifying a quadratic specification of reconstruction error under latent-space perturbations for a VAE decoder; the verification algorithm only needs to give an upper bound on the optimal value, and is sound but not guaranteed to be complete.
- LP relaxation gives tight verification bounds only in combination with dedicated training and cannot be used for verification-agnostic networks; SDP relaxation can, but interior-point methods take O(n^6) time and O(n^4) memory, so they can only be used for small fully connected networks.
- The authors write the verification problem as the Lagrange dual of a QCQP, transform it into a maximum eigenvalue minimization problem with only non-negativity constraints, and solve it with the projected subgradient method; eigenvectors are approximated with Lanczos, all computations are expressed as network forward/backward propagation, and memory grows linearly with the number of activations.
- On verification-agnostic CNNs on MNIST and CIFAR-10, SDP-FO's l∞ verified robust accuracy is substantially higher than the LP baseline (e.g., MNIST CNN-A-Adv from 0.4% to 87.8%); for the VAE decoder's quadratic stability specification, the upper bound is close to the PGD lower bound.
- The authors state that bounds become looser on large networks: the gap between PGD and SDP-FO on CNN-B is already larger than on CNN-A, and in preliminary experiments this gap continues to increase with network size, requiring further innovations in the formulation or optimization. The largest network tested has about 2M parameters and 20K activations.
- Evaluated models
- MLP-SDPMLP-LPMLP-AdvMLP-Adv-BMLP-NorCNN-A-AdvCNN-A-Adv-4CNN-A-MixCNN-A-Mix-4CNN-B-AdvCNN-B-Adv-4VAE
- Benchmarks
- MNISTCIFAR-10
- Metrics
- verified robust accuracynominal accuracyPGD accuracyverified upper bound φx% of verified samples
The researchers propose a first-order dual semidefinite programming (SDP) algorithm that enables neural networks not trained for verification to efficiently certify properties such as adversarial robustness. Commonly used linear programming relaxations are only effective for networks specifically trained for verification, while previous SDP relaxations, although applicable to such networks, are difficult to scale beyond small networks due to time and space overhead. The new algorithm's memory usage scales linearly with the total number of network activations, each iteration requires only a fixed number of forward and backward propagations, and it expresses solver operations as forward and backward computations of the network through iterative eigenvector methods, thereby leveraging hardware acceleration such as GPUs/TPUs. On two networks not trained for verification on MNIST and CIFAR-10, L-inf certified robust accuracy improved from 1% to 88% and from 6% to 40%, respectively. The paper also demonstrates tight verification of quadratic stability specifications for variational autoencoder decoders.
Paper analysis
What problem does this paper attempt to solve?
The authors aim to solve scalable tight verification of verification-agnostic networks: LP relaxations are too loose, and the interior-point method for SDP relaxations has O(n^4) memory and cannot scale.
Core problem: how to give scalable and tight provable specification guarantees for neural networks not trained for the verification algorithm (verification-agnostic networks).
- Problem setting: safety-critical applications require neural networks to satisfy input-output specifications (such as adversarial robustness, stability), but the authors state that many techniques claiming to enhance robustness later failed under stronger attacks, so verification algorithms with provable guarantees are needed.
- Shortcomings of existing methods: the authors state that LP relaxation is sound but incomplete, giving poor or vacuous results when used alone and being effective only in combination with dedicated verification-friendly training; SDP relaxation can be used for verification-agnostic networks, but common interior-point methods have runtime O(n^6) and memory O(n^4) (n being the number of neurons), so they can only be used for small fully connected networks.
- Core observation: verification only needs an upper bound on the relaxation's optimal value rather than the optimal solution, so one can operate in the dual; the dual problem can be written as minimization of the largest eigenvalue with only nonnegativity constraints, and any feasible dual variables give a valid upper bound, without needing to solve to optimality.
- Paper proposes: a first-order dual SDP solver SDP-FO, whose memory grows linearly with the total number of network activations, requiring only a fixed number of forward/backward passes per iteration, and runnable on GPU/TPU.
- Verification setting: the verification problem is to decide whether φ(x) ≤ 0 for all inputs satisfying l0 ≤ x0 ≤ u0, where φ is a quadratic function of network activations; it covers l∞ adversarial robustness (φ linear) and VAE decoder stability (φ quadratic); the algorithm is sound (gives valid upper bounds), but the authors do not claim completeness.
What related research exists?
Related work falls into four categories: complete verification, convex relaxation, first-order SDP solvers, and verification-friendly training; the authors position this as an application of first-order SDP methods to neural network verification.
Complete verification methods
- SMT (Katz et al. [26], Ehlers [18]) and MIP (Tjeng et al. [59], Bunel et al. [10], Anderson et al. [2]) — exhaustive search for counterexamples. The paper points out two main problems: time may grow exponentially with network size, and they usually cannot run on GPU/TPU.
Convex relaxation methods
- LP relaxation (Kolter & Wong [30], Dvijotham et al. [17]) — efficient but loose; bound propagation can be viewed as a special case of LP relaxation (Liu et al. [37]). Salman et al. [54] experimentally show that LP-type relaxations have a fundamental tightness barrier.
- SDP relaxation (Raghunathan et al. [52]) — can verify verification-agnostic networks; Fazlyab et al. [19, 20] generalize to arbitrary network architectures and activation functions. The paper points out that these works use off-the-shelf interior-point solvers and cannot scale to large CNNs.
First-order SDP solvers
- Smoothing of nonsmooth objectives (Nesterov [42]), spectral bundle methods (Helmberg & Rendl [25]), conditional gradient and sketching (Yurtsever et al. [68, 69]), primal-dual algorithms (Wen et al. [64] et al.). The authors state that this paper's formulation is similar to the eigenvalue optimization formulation in Section 3 of Helmberg and Rendl [25], and operates entirely in the dual.
Verification-friendly training and randomized smoothing
- Verification-friendly training (Kolter & Wong [30], Raghunathan et al. [51], Gowal et al. [23], Balunovic & Vechev [6]) and randomized smoothing (Cohen et al. [11], Lecuyer et al. [35]). The paper points out that they require modifying the predictor or training algorithm and do not apply to the verification-agnostic setting.
Baselines and benchmarks: experiments compare LP relaxation (Ehlers [18], which the authors state per [55] covers relaxations such as [30, 17, 65, 70, 39, 23]), SDP-IP (the SDP of Raghunathan et al. [51] solved with MOSEK), and MIP (Tjeng et al. [59]); the benchmark is l∞ robustness verification on MNIST and CIFAR-10.
The authors position this paper as: adopting SDP relaxation but developing a custom first-order solver that can run on deep learning accelerators, thereby scaling SDP verification to large CNNs that were previously intractable.
How does the paper address this problem?
SDP-FO formulates verification as the Lagrange dual of a QCQP, reduces it to minimizing the maximum eigenvalue subject only to non-negativity constraints, solves it with projected subgradient methods, and expresses all computations as forward/backward passes.
Overall approach: relax the neural network verification problem into a QCQP, take its Lagrange dual and rewrite it as an eigenvalue minimization problem with only nonnegativity constraints, solve it with a first-order subgradient method, with all matrix operations implemented implicitly via automatic differentiation, yielding a solver SDP-FO with linear memory that can run on GPU/TPU.
Problem setting and QCQP relaxation
- The verification problem is opt = maxx ϕ(x), with constraints given by the network forward computation and input bounds; if opt ≤ 0 the specification holds; φ is taken as a quadratic function, covering adversarial robustness (φ linear) and VAE decoder stability (φ quadratic).
- Constraints for activations such as ReLU are replaced by quadratic constraints to obtain a QCQP: linear constraints xi+1 ≥ 0, xi+1 ≥ Li(xi), plus the quadratic constraint xi+1⊙(xi+1 − Li(xi)) ≤ 0 and quadratic constraints derived from activation bounds.
- Assume lower and upper bounds li, ui for each layer's activations are already available (obtained by bound propagation such as CROWN or interval arithmetic), used to construct the quadratic constraints.
Dual formulation: only nonnegativity constraints
- The Lagrangian is a quadratic polynomial in x, L(x,λ) = c(λ) + xᵀg(λ) + (1/2)xᵀH(λ)x, where the coefficients c, g, H are affine functions of λ, obtained directly by automatic differentiation.
- Proposition 1: after adding the redundant constraint x² ≤ 1 and the corresponding multiplier κ, optimizing over x in closed form gives optrelax = minλ,κ ≥ 0 c(λ) + 1/2(κ − λ−min(diag(κ) − M(λ)))⊤ 1, meaning: the optimal value is upper-bounded by this dual objective, and any nonnegative λ, κ gives a valid upper bound (anytime property).
- Remark 1: the optimal value of this formulation is the same as the SDP of Raghunathan et al. [52] (proved in Appendix A.4), i.e., the reformulation loses no tightness.
Subgradient computation and implicit matrix-vector products
- By Danskin's theorem, the subgradient is given by the eigenvector v* corresponding to the smallest eigenvalue of diag(κ) − M(λ); v* is approximated by Lanczos iteration, requiring only repeated application of the linear map v ↦ (diag(κ) − M(λ))v.
- This map consists of the gradient and Hessian-vector product of the Lagrangian, with computational cost about equal to one forward plus backward pass and linear memory; implemented with autodiff in frameworks such as JAX, with core logic about 100 lines.
- The final certificate computes v* with SciPy's exact eigendecomposition, avoiding Lanczos approximation affecting soundness.
Convergence techniques and algorithm flow
- Initialization: λ = 0, κ taken at the closed-form optimum per Proposition 2 (κ*0 = Σ|g(λ)|i, κ*1:n = |g(λ)|).
- Regularization: the authors state that the optimal solution can always take κ1:n = 0, but κ has a smoothing effect early in optimization; regularize by adding a loss term to κ1:n or fixing it to zero partway through.
- Learning rate: the authors state that the optimization landscapes of dual variables corresponding to different constraints differ greatly, requiring Adam or RMSProp; additionally adjust the learning rate for κ0 and the dual variables of the quadratic ReLU constraints (Appendix B).
- Algorithm 1 flow: 1. compute each layer's bounds with bound propagation; 2. construct the Lagrangian and initialize; 3. each round, find the smallest eigenvector with Lanczos, compute the subgradient, and update with projection; 4. return the smallest objective value over all rounds as the upper bound.
What experiments did the paper conduct?
On verification-agnostic networks on MNIST/CIFAR-10, SDP-FO verified accuracy greatly exceeds the LP baseline (e.g., 0.4%→87.8%), and on the VAE decoder quadratic specification the upper bound is close to the PGD lower bound.
Experimental setup
- Networks tested: CNN-A (about 200K parameters + 10K activations, from [67]), CNN-B (about 2M parameters + 20K activations, from [6]), and several MLPs with about 1K activations (MLP-SDP, MLP-LP, MLP-Adv use the parameters of [52]; MLP-Nor, MLP-Adv-B use the parameters of [55]); all trained verification-agnostic (standard/adversarial/mixed training, no verification-friendly regularization).
- Benchmarks and perturbations: l∞ adversarial robustness verification on MNIST (ε=0.1, 0.05, 0.3) and CIFAR-10 (ε=2/255, 8/255); additionally a latent-space perturbation specification for a VAE decoder (about 10K activations) on MNIST.
- Baselines: LP relaxation (Ehlers [18]), SDP-IP (the SDP of [51] solved with MOSEK), MIP (Tjeng et al. [59], numbers taken from [54]).
- Metric and decision rule: for each sample and target label, φ = (xL)y' − (xL)y; PGD gives a lower bound, verification methods give an upper bound; a sample is verified when the worst upper bound over all target labels φx < 0. Report verified accuracy.
- Sample sizes: Table 1 is computed on the same 500 test samples (except cited values); Figure 1 uses 100 random samples; in Table 4 SDP-FO uses the first 100 and LP the first 1000 test samples; Appendix C.1 uses 10 random samples.
- Compute budget: MLP 15K steps, CNN 60K steps on MNIST and 150K steps on CIFAR-10; single P100 GPU, MLP instances take at most about 15 minutes, CNN about 3 hours; VAE within 7 hours per instance.
Main results
According to Table 1 (500 test samples, verified accuracy):
Swipe horizontally to read the table
Dataset Model PGD SDP-FO SDP-IP LP MIP MNIST ε=0.1 MLP-SDP 86.4% 85.2% 80% 39.5% 69.2% MNIST ε=0.1 MLP-LP 81.2% 80.2% 80% 79.4% - MNIST ε=0.1 MLP-Adv 93.4% 91.0% 82% 26.6% - MNIST ε=0.1 MLP-Adv-B 84.0% 79.2% - 33.2% 34.4% MNIST ε=0.1 CNN-A-Adv 95.2% 87.8% - 0.4% - MNIST ε=0.05 MLP-Nor 46.6% 28.0% - 1.8% 6.0% CIFAR-10 ε=2/255 CNN-A-Mix 53.0% 39.6% infeasible 5.8% - CIFAR-10 ε=2/255 CNN-B-Adv 64.0% 32.8% infeasible 2.2% - - The authors state that SDP-FO outperforms prior methods on all networks tested, with the largest improvement on verification-agnostic models; SDP-IP is infeasible on CNNs due to its quartic memory requirement.
- Figure 1 (100 random samples): the authors state that SDP-FO's upper bound points all lie close to the y = x line, i.e., tight verification across samples; LP and CROWN bounds have a large gap to the lower bound, and many CROWN bounds fall outside the figure's y-axis range.
- Exception: on CNN-B the gap between PGD and SDP-FO (e.g., 64.0% vs 32.8%) is larger than on CNN-A; the authors state that in preliminary experiments this gap continues to increase with network size.
Small-scale comparison with exact solvers
- Appendix C.1 compares SDP-FO with MOSEK (SDP-IP) on 10 random samples of MLP-Adv: relaxation gap (SDP-IP − PGD) mean 0.80 (standard deviation 0.22), optimization gap (SDP-IP − SDP-FO) mean 0.10 (standard deviation 0.07).
- The authors state that SDP-FO converges to a near-optimal dual solution on all 10 samples, and that the main challenge is the tightness of the relaxation rather than optimization.
Effect of precomputed bounds on tightness
- Appendix C.2: on MLP-Adv, replacing interval arithmetic bounds with CROWN-precomputed bounds raises SDP-FO verified accuracy from 83.0% to 91.2%, with the PGD upper bound at 93.4%.
- The authors state that the SDP relaxation still gives meaningful bounds when the initial bounds are very loose, but tighter initial bounds still help noticeably.
VAE decoder specification verification
- Specification: reconstruction error εrecon ≤ τ = 40.97 under latent-space l∞ perturbation radius α·σz (the median squared Euclidean distance to the nearest point of a different class on MNIST), with a quadratic objective, which LP/MIP cannot handle directly.
- Figure 2 (100 samples): the authors state that SDP-FO's lower bound is close to the PGD upper bound for perturbations up to 0.1σz, whereas IBP starts to deviate at smaller perturbations; the perturbation radius verifiable by SDP-FO is about 50 times that of IBP (e.g., when verifying 50% of samples, IBP is about ε=0.01 and SDP-FO about ε=0.5).
Other ablations and analyses
- Table 4 (other perturbation radii and training modes): at MNIST ε=0.3, SDP-FO 43.4% and LP 0.2% on CNN-A-Adv; at CIFAR-10 ε=8/255, SDP-FO 9.0% and LP 0.1% on CNN-A-Mix.
- Appendix C.4: on CNN-A-Mix, the mean gap between the Lanczos and exact eigendecomposition dual bounds is 0.14 (standard deviation 0.07), while the mean total gap between upper and lower bounds is 0.60; Lanczos takes about 0.1 seconds per call (200 iterations) versus about 5 minutes for exact decomposition, and on the VAE about 0.2 seconds versus 2 hours.
- Training modes (Appendix B.1): the authors state that Mix training improves test accuracy but makes the model harder to verify (across verification methods); a larger εtrain helps verification at small ε but lowers clean accuracy.
What are some points that can be further explored?
The authors note that upper bounds become looser on large networks and further innovations in formulation or optimization are needed; other techniques in the first-order SDP literature are candidate follow-up directions.
Limitations and future directions noted by the authors
- Bounds become looser on large networks (Section 6.1 Limitations): the authors state that the gap between PGD and SDP-FO on CNN-B is already larger than on CNN-A, and in preliminary experiments this gap further increases with network size, requiring additional innovations in the formulation or optimization procedure to scale further.
- Conclusion (Section 7): the authors state that the solver is in principle applicable to arbitrarily large networks, but obtaining meaningful verification guarantees on large networks requires further innovations in the formulation or solving procedure.
- Future directions from the first-order SDP literature (Section 2 Related Work): the authors state that plain subgradient methods are already sufficient in this paper, but that many ideas in that literature are promising candidates that could lead to faster or more reliable convergence.
- Broader Impact: the authors state that current scalability does not allow application to SOTA deep learning models.
Scope of experiments
- Networks tested are 2 CNN architectures (CNN-A about 200K parameters + 10K activations, CNN-B about 2M parameters + 20K activations) and 5 MLPs with about 1K activations, plus 1 VAE decoder with about 10K activations; all at MNIST/CIFAR-10 scale.
- Verification specifications cover two types: l∞ adversarial robustness (linear objective) and VAE decoder reconstruction error (quadratic objective).
- Baseline comparisons include LP relaxation, SDP-IP (feasible only at MLP scale), and MIP (only numbers cited from [54], with values only in two MLP rows).
- Sample sizes: main table 500 test samples, Figure 1 100, in Table 4 SDP-FO uses the first 100, Appendix C.1 10; the paper does not report variance over multiple repeated runs.
- Compute environment is a single P100 GPU; CNN instances take at most about 3 hours, VAE instances within 7 hours.
Summarize the main content of the paper
SDP-FO solves the SDP relaxation of neural network verification with a first-order dual method, with linear memory and runnable on GPU, scaling verification of verification-agnostic networks up by an order of magnitude.
This is a neural network formal verification paper that proposes a scalable SDP relaxation solver, SDP-FO.
- Problem: LP relaxations are only tight when combined with verification-friendly training; SDP relaxations can handle verification-agnostic networks, but interior-point methods require O(n^4) memory and O(n^6) time, so they can only be used for small fully connected networks.
- Method: The verification problem is written as the Lagrange dual of a QCQP, reduced to minimization of the maximum eigenvalue with only non-negativity constraints (equally tight as the SDP of Raghunathan et al. [52]), and solved with the projected subgradient method; eigenvectors are approximated with Lanczos, all operations are expressed as network forward/backward propagation, memory grows linearly with the number of activations, and the final certificate uses exact eigendecomposition to guarantee soundness.
- Main results: On MNIST, CNN-A-Adv (ε=0.1) verified robust accuracy rises from 0.4% for LP to 87.8% (PGD is 95.2%); on CIFAR-10, CNN-A-Mix (ε=2/255) rises from 5.8% to 39.6% (Table 1, 500 samples).
- Accuracy and scalability: On MLP-Adv, the mean optimization gap between SDP-FO and the exact interior-point solution is 0.10, far smaller than the relaxation gap of 0.80 (Appendix C.1); when CROWN is used to precompute bounds, verified accuracy rises from 83.0% to 91.2% (Appendix C.2).
- Generality: For the quadratic stability specification of a VAE decoder on MNIST, the SDP-FO upper bound is close to the PGD lower bound within 0.1σz, and the verifiable perturbation radius is about 50 times that of IBP (Figure 2).
- Authors' conclusion: The authors state that SDP-FO maintains the tightness of the SDP relaxation on larger-scale networks than before, but upper bounds on large networks still become looser, and further innovation in formulations or optimization is needed to continue scaling.