Introduction
Formal verification of neural networks is critical for ensuring the safety and reliability of AI systems. However, traditional verification methods often rely on a "data-as-specification" paradigm. In this approach, verification is limited to tiny local neighborhoods—usually $L_\infty$ balls with a minuscule radius $\epsilon$—around specific training data points.
While this proves that a model is robust to slight perturbations of a known image, it fails to capture the broader concept of "correctness." This paper proposes a paradigm shift: moving from data-centric specifications to Neural Activation Patterns (NAPs). By using the network's own internal representations as the specification, the authors demonstrate how to formally verify much larger regions of the input space, successfully certifying a significant fraction of unseen test data for the first time.
The Flaw in "Data-as-Specification"
The fundamental issue with current verification methods is that their certified regions are incredibly tight. The distance between actual test images of the same class is orders of magnitude larger than the $\epsilon$ values used in state-of-the-art verification.
Consequently, current methods fail to certify unseen test data because those points fall far outside the "safe" boxes centered on training data. The community has lacked a way to specify what correct behavior looks like for the entire region of the input space belonging to a specific class.
Neural Representation as Specification
To address this, the authors introduce Neural Representation as Specification. Instead of defining correctness based on input pixels, they look at the specific set of neurons that are activated (or deactivated) when the network processes an input.
What is a NAP?
A Neural Activation Pattern (NAP) is defined as a tuple $(A, D)$ representing subsets of neurons that are activated and deactivated, respectively. Because not every input in a class will share the exact same activation pattern, the authors introduce a relaxation factor, $\delta$. These $\delta$-Relaxed NAPs allow the mining of patterns that are "mostly" shared across a class, providing a tunable knob for the precision-recall trade-off.
Flexibility over Rigidity
NAPs leverage the intrinsic information the network has already learned. Instead of imposing an arbitrary geometric shape (like a rigid box) on the input space, NAPs follow the natural, complex decision boundaries of the model. This allows the specification to "breathe" and encompass more of the true class manifold.
By encoding NAPs as linear constraints, off-the-shelf verifiers like Marabou can prove critical properties:
- Non-ambiguity: An input cannot follow the NAPs of two different classes simultaneously.
- NAP Robustness: Every possible input that triggers a specific NAP will result in the correct classification.
By verifying a NAP, you aren't just verifying a single point; you are verifying a "neural state." Any future input—even one the network has never seen—that triggers that state is formally guaranteed to be handled correctly.
Key Results
The approach was evaluated using standard benchmarks from the annual neural network verification competition (VNNCOMP), specifically on MNIST and CIFAR10 datasets.
- High Recall on Unseen Data: On MNIST, the authors mined a single NAP for the digit '1' that covered 84% of the unseen test set. They formally verified that any input following this NAP could never be misclassified. This is a massive leap from the 0% recall typical of data-as-specification methods.
- Scaling Verification Bounds: On the more complex CIFAR10 benchmark, using NAP-augmented specifications allowed the researchers to push the verifiable bound to be 10 times larger than standard methods.
- Computational Efficiency: Because NAPs constrain the search space of the neural network, they often make the underlying verification task significantly easier and faster for solvers.
Limitations and Future Work
While NAPs present a promising new direction for neural network verification, several areas remain open for future research:
- Mining Heuristics: The current mining algorithm relies on a simple statistical approach. More sophisticated mining algorithms could yield even better, more representative NAPs.
- Automating Abstraction: Choosing the right $\delta$ (level of abstraction) is currently a manual process. Automating this trade-off between precision (how specific the NAP is) and recall (how much data it covers) is a clear next step.
- Architectural Scope: The current experiments focused on ReLU-based networks. Extending this theory to other activation functions and more diverse architectures, such as Transformers, is necessary for broader applicability.
- Robustness to Noisy Data: The presence of mislabeled or "garbage" images in the training set can interfere with mining clean NAPs, highlighting a need for more robust mining techniques in noisy environments.
Summary updated