Set-Based Training for Neural Network Verification

Lukas Koller, Tobias Ladner, Matthias Althoff

Abstract

Neural networks are vulnerable to adversarial attacks, where small input perturbations can significantly affect outputs. To ensure safety in critical environments, networks must be formally verified. We present a novel set-based training procedure that computes a "gradient set" for an output enclosure, allowing for direct reduction of uncertainty. This approach produces robust networks that can be verified using fast, polynomial-time algorithms, bridging the gap between accuracy and provable robustness.

Introduction

The widespread deployment of neural networks in safety-critical systems, such as autonomous driving, is hindered by their inherent brittleness. Adversarial perturbations can lead to catastrophic failures. Formal verification offers a solution by mathematically proving a network's correctness within a noise range. However, a "verification tax" often exists: models are either hard to verify (requiring exponential time) or suffer from poor accuracy due to over-regularization in existing robust training methods like Interval Bound Propagation (IBP).

Set-Based Training Methodology

Our approach shifts training from individual data points to zonotopes, an efficient convex set representation. This allows the network to process entire regions of the input space simultaneously.

The Gradient Set

The core innovation is the derivation of a gradient set. Unlike standard training which uses a single gradient for a single point, we compute a set of gradients for the entire output enclosure. This enables the optimizer to select gradients that point toward the center of the output set, effectively "squeezing" the uncertainty bubble.

Comparison of output enclosures and the proposed Gradient Set method.

Loss Function and Propagation

The training objective balances two primary goals:

  1. Accuracy: Minimizing loss at the center of the output set.
  2. Robustness: Minimizing the radius (size) of the output set.

To facilitate this on GPUs, we developed fast, analytical solutions for propagating sets through non-linear layers (ReLU, tanh, sigmoid). We prove that our image enclosure is mathematically tighter than previous state-of-the-art methods, reducing error accumulation during training.

Key Results

We evaluated the method on MNIST, CIFAR-10, SVHN, and TinyImageNet benchmarks.

  • Fast Verification: The method achieves superior fast-verified accuracy (verification via a single pass). On MNIST, we achieved 95.89% fast-verified accuracy, significantly outperforming TRADES (0%), IBP (95.58%), and SABR (92.80%).
  • Computational Efficiency: Verification of 10,000 MNIST samples took approximately 30 minutes, compared to over 30 hours for traditional complete verifiers.
  • Balanced Performance: Our models maintain a better balance between clean accuracy and verified robustness than interval-based approaches, which often suffer from excessive over-regularization.

Conclusion

Set-based training with gradient sets provides a path toward neural networks that are both high-performing and formally verifiable. By integrating verification logic directly into the training loop, we produce models that are "born" easy to prove. Future work will focus on scaling these techniques to deeper architectures like ResNet-50 and higher-resolution datasets.

Summary updated

BibTeX
@article{koller2025set,
  author = {Lukas Koller and Tobias Ladner and Matthias Althoff},
  title = {{Set-Based Training for Neural Network Verification}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=n0lzHrAWIA},
}
Figure