The Verification Problem: Properties, Margins, and Counterexamples
Formulate a neural-network property, negate it into a counterexample query, and distinguish a valid bound from an actual violating input.
What you will be able to do
- Write the verification question for a network as an optimisation problem
- State the property being checked in terms of a safety or robustness predicate
- Recognise when a problem is out of reach for exact methods and must be relaxed
Assumes you have read
A verification question has three ingredients: a fixed network , an input condition , and an output condition . The statement to check is
The property is meaningful only relative to those ingredients. Changing preprocessing, the allowed input set or the meaning of the output changes the question.
The equivalent counterexample question
Negating the statement gives
A solver may search for this bad input rather than directly manipulating a universal statement. If it finds one, we evaluate it in the intended network and check the input constraints. A candidate satisfying only a relaxation of the network is not yet a counterexample.
Use three outcomes for the semantic result: SAFE if the property is established, UNSAFE if a valid violating input is established, and UNKNOWN if neither has been established within the method or budget. A tool’s raw sat label must be interpreted according to the query it solves.
A network we can solve by hand
Throughout several chapters, use
The desired property is . For , the activations are ; for , they are . In both cases . The property therefore holds over the whole interval.
This is a proof by cases over two feasible regions, not a sample test. Later, a relaxation of the same network will allow a negative value. That will show failure of the relaxation to prove the property, not failure of the network.
Classification as a margin property
For output scores and a chosen reference class , define
One sufficient and unambiguous requirement is that every margin is strictly positive throughout . This requires the reference class to be the unique highest-scoring class. A property allowing ties needs an explicit tie-breaking convention instead.
The reference class can be a ground-truth label or the model’s nominal prediction. Those choices answer different questions. Robustly retaining an initially wrong prediction does not establish correctness.
Bounds and witnesses have opposite directions
For a continuous margin on a nonempty compact domain, let
Suppose a sound method returns a lower bound . If every , the strict-margin property is proved. A lower bound at or below zero does not establish a violation: it may only reflect a loose relaxation.
An actual input gives the other direction: . If , it violates the strict property. Always verify that this value comes from the original network rather than from independent relaxed activation variables.
An exercise in reading a result
A verifier returns a sound lower bound of . An attack finds an input with margin . What has been established?
Answer
Only that the minimum lies between and . Neither result proves the property or exhibits a violation. The correct conclusion is UNKNOWN, unless another argument is available.
Key Takeaways
Write the property before choosing a tool. Fix the network semantics, input set and required output behaviour.
A negative relaxed bound is not a counterexample. It can mean that the method has not proved enough.
A witness must belong to the original problem. Check its input constraints and evaluate the actual network.
Further Reading
Salman et al., “A Convex Relaxation Barrier to Tight Robustness Verification of Neural Networks”, NeurIPS 2019 https://arxiv.org/abs/1902.08722 — for the distinction between the original problem and the relaxed one.
Next read bound propagation, or turn this property into a file in formal specifications.