Learning Minimal Neural Specifications
Chuqin Geng, Zhaoyue Wang, Haolin Ye, Xujie Si
TL;DR
This work addresses the challenge of robust verification for neural networks by moving beyond traditional data-centered specifications to learning minimal Neural Activation Pattern (NAP) specifications. It introduces three complementary approaches—Conservative Bottom Up (Coarsen), Statistical Coarsen (StochCoarsen), and Optimistic (OptAdvPrune)—to identify a minimal, general NAP that suffices for robustness verification, thereby increasing verifiable input regions and reducing the number of neurons required. Across Wisconsin, MNIST, and ImageNet-scale networks, the approach yields minimal NAPs that cover far more data with orders of magnitude larger estimated regions, while requiring far fewer neurons than refined NAPs; OptAdvPrune offers scalable starting points, and StochCoarsen provides strong efficiency with near-minimal results. Moreover, the paper links NAP-based specifications to visual interpretability and practical defense against adversarial attacks, suggesting that essential neurons underpin robust decision-making and can serve as empirical certificates even when full verification is computationally intractable. Overall, learning minimal NAP specifications advances both the theory and practice of neural network verification by enabling broader coverage, interpretability, and scalable robustness insights.
Abstract
Formal verification is only as good as the specification of a system, which is also true for neural network verification. Existing specifications follow the paradigm of data as specification, where the local neighborhood around a reference data point is considered correct or robust. While these specifications provide a fair testbed for assessing model robustness, they are too restrictive for verifying any unseen test data points, a challenging task with significant real-world implications. Recent work shows great promise through a new paradigm, neural representation as specification, which uses neural activation patterns (NAPs) for this purpose. However, it computes the most refined NAPs, which include many redundant neurons. In this paper, we study the following problem: Given a neural network, find a minimal (general) NAP specification that is sufficient for formal verification of its robustness properties. Finding the minimal NAP specification not only expands verifiable bounds but also provides insights into which set of neurons contributes to the model's robustness. To address this problem, we propose three approaches: conservative, statistical, and optimistic. Each of these methods offers distinct strengths and trade-offs in terms of minimality and computational speed, making them suitable for scenarios with different priorities. Notably, the optimistic approach can probe potential causal links between neurons and the robustness of large vision neural networks without relying on verification tools, a task existing methods struggle to scale. Our experiments show that minimal NAP specifications use far fewer neurons than those from previous work while expanding verifiable boundaries by several orders of magnitude.
