Abstract
We present a scalable and precise verifier for recurrent neural networks, called PROVER, based on two novel ideas: (i) a method to compute a set of polyhedral abstractions for the non-convex and nonlinear recurrent update functions by combining sampling, optimization, and Fermat's theorem, and (ii) a gradient descent based algorithm for abstraction refinement guided by the certification problem that combines multiple abstractions for each neuron. Using PROVER, we present the first study of certifying a non-trivial use case of recurrent neural networks, namely speech classification. To achieve this, we additionally develop custom abstractions for the non-linear speech preprocessing pipeline. Our evaluation shows that PROVER successfully verifies several challenging recurrent models in computer vision, speech, and motion sensor data classification beyond the reach of prior work.
Introduction
Recurrent Neural Networks (RNNs), particularly Long Short-Term Memory (LSTM) architectures, are the workhorses for sequential data like speech, video, and sensor signals. However, like their feedforward cousins, they are vulnerable to adversarial attacks—tiny, imperceptible perturbations that can cause a model to fail (e.g., misclassifying "stop" as "go").
Verifying the "robustness" of these models—mathematically proving they won't fail within a certain noise threshold—is incredibly difficult. RNNs pose two unique challenges:
- Sequential Dependency: Errors in early time steps accumulate and explode as they propagate through the network.
- Complex Non-linearities: LSTMs use "gates" involving complex operations like $\sigma(x) \cdot \tanh(y)$, which are neither convex nor concave, making them much harder to bound than simple ReLU activations.
Prior verification tools either didn't scale to realistic models or were too "loose" (over-approximating too much) to provide meaningful proofs.
The PROVER Framework
PROVER (Polyhedral Robustness Verifier of RNNs) builds on the DeepPoly abstract domain to address these challenges. Its core innovations include:
- Precise Polyhedral Bounds via LP: For complex LSTM operations, PROVER samples points from the input domain and solves a Linear Program (LP) to find a candidate bounding plane. To ensure this plane is "sound" (never under-approximates the function), it uses Fermat’s theorem to find the maximum possible violation and shift the plane accordingly.
- Abstraction Refinement via Gradient Descent: Instead of picking just one "best" bounding plane, PROVER computes multiple candidate planes by splitting the input domain. It then uses gradient descent to "learn" the optimal linear combination of these planes for a specific input, effectively training the verifier to find a proof.
- End-to-End Speech Certification: Recognizing that speech models don't take raw audio but preprocessed features (like Mel-filterbanks), the authors developed custom polyhedral transformers for non-linear preprocessing steps like
SquareandLog.
Key Insights
- Differentiable Verification: By treating the choice of abstraction as an optimization problem and making the verifier's parameters ($\lambda$) trainable, the system can dynamically tighten its bounds where it matters most for a specific certification task.
- Relational Information: In speech preprocessing, maintaining "relational" information—how one variable changes with respect to another—is essential for certifying deep sequential models, as simple interval bounds are too imprecise.
Experimental Evaluation
The authors evaluated PROVER across three distinct domains: Speech (FSDD and GSC v2), Computer Vision (MNIST), and Motion Sensors (HAPT).
Key Results
- Superior Scalability: Compared to the previous state-of-the-art (POPQORN), PROVER is up to 33x faster for its base version and 6x faster for its optimized version, while providing significantly tighter bounds.
- Higher Precision: On MNIST, while a baseline polyhedral method might certify only 39% of samples at a certain noise level, PROVER’s refinement (OPT) boosts that to 89%.
- Real-World Impact: PROVER is the first verifier to successfully certify a non-trivial speech recognition pipeline, proving robustness for models with up to 35 different output classes.
- Large-Scale Success: It successfully verified a large motion sensor classifier with 4 LSTM layers and 256 hidden units, a scale previously out of reach for formal methods.
Conclusion
PROVER represents a significant advancement in the formal verification of RNNs. By combining polyhedral abstractions with gradient-descent-based refinement, it achieves unprecedented scalability and precision. Future work may extend these generic LP-based bounding methods to other complex architectures, such as Transformers or Capsule Networks.
Summary updated