When we formally verify a neural network, we are looking for a mathematical guarantee. We want to prove that no matter how an adversary perturbs an image, a self-driving car model will never misclassify a stop sign. To achieve this, formal verifiers translate the network's layers into systems of mathematical constraints, typically assuming the idealized world of real numbers ($\mathbb{R}$).
But real computers do not run on real numbers. They run on floating-point arithmetic ($\mathbb{F}$) or low-precision quantized integers. This divergence creates a profound soundness gap: a neural network can be proven perfectly safe in theory, yet remain completely vulnerable in deployment.
The Illusion of Mathematical Certainty
The core of the problem lies in properties we take for granted in standard algebra, most notably associativity. In pure mathematics, $(a + b) + c$ is always equal to $a + (b + c)$. In floating-point arithmetic, this guarantee vanishes due to rounding errors. For example, if $a = 10^{16}$, $b = -10^{16}$, and $c = 1$, then:
$$(a + b) + c = (10^{16} - 10^{16}) + 1 = 1$$ $$a + (b + c) = 10^{16} + (-10^{16} + 1) \approx 10^{16} - 10^{16} = 0$$
In a deep neural network, billions of these operations occur sequentially. As Daggitt et al. argue in Neural Network Verification is a Programming Language Challenge, the idealized real-number logic used by verification tools fails to reflect the hardware reality of training and deployment. When a verifier assumes infinite precision but the target hardware rounds values at every layer, the verifier can easily miss vulnerabilities or, conversely, flag non-existent counterexamples.
Idealized Verifier (Real Arithmetic )
[Input x] ──> [Exact Linear Constraints] ──> Robustness Proof: SAFE ✅
Actual Hardware (Floating-Point Arithmetic )
[Input x] ──> [Rounding & Non-Associativity] ──> Activation Flips ──> Vulnerable ❌
This mismatch is not just a theoretical nuisance; it can completely invalidate safety certificates. Because deep networks rely heavily on discontinuous activation functions like the Rectified Linear Unit (ReLU), a rounding error as tiny as $10^{-7}$ can determine whether a neuron fires or remains silent. This single bit-flip can cascade through subsequent layers, ultimately altering the network's final decision.
Exploiting the Soundness Gap
If numerical errors were merely random noise, they might only slightly degrade performance. However, because neural networks are highly high-dimensional, these precision gaps can be systematically weaponized.
Rinard et al. demonstrated this vulnerability in Exploiting Verified Neural Networks via Floating Point Numerical Error. The authors showed that an adversary can deliberately construct adversarial examples that exploit the verifier's blind spot. By finding inputs where the floating-point implementation diverges from the real-number abstraction, attackers can trick a verifier into issuing a false claim of robustness.
Taking this a step further, Szász et al. introduced the concept of "deployment-sensitive backdoors" in No Soundness in the Real World: On the Challenges of the Verification of Deployed Neural Networks. Because different hardware architectures (like an Intel CPU versus an NVIDIA GPU) optimize parallel operations differently, they alter the execution order of additions and multiplications. Since floating-point operations are non-associative, a model can behave perfectly normally—and pass all formal verification checks—when evaluated under the verifier's mathematical model, yet trigger a malicious backdoor when executed on a specific target GPU.
Why Traditional Solvers Stumble
Why haven't existing verification tools simply accounted for floating-point errors? The answer comes down to computational complexity and implementation.
Many state-of-the-art verifiers rely on constraint satisfaction frameworks like Mixed-Integer Linear Programming (MILP) or polyhedral abstractions. As highlighted by Teuber et al. in Geometric Path Enumeration for Equivalence Verification of Neural Networks and Sivaraman et al. in FETA: Fairness Enforced Verifying, Training, and Predicting Algorithms for Neural Networks, these solvers themselves are complex software programs that rely on floating-point arithmetic to remain computationally efficient. This introduces a double layer of instability: the tool checking the network is prone to the same precision errors as the network itself.
Even when researchers design custom algorithms to scale verification to massive networks, the hardware remains a bottleneck. For instance, in developing a GPU-accelerated polyhedral verification framework, Müller et al. emphasize in Scaling Polyhedral Neural Network Verification on GPUs that maintaining validity requires meticulous, low-level control over hardware rounding modes and operation ordering. Without this care, the parallel processing that makes the verification fast also makes it unsound.
Strategies for Rigorous Alignment
To close the soundness gap, researchers are exploring three main paradigms that force verification mathematics to align with physical hardware execution.
1. Eliminating Floating-Point via Discrete Models
The most direct way to avoid floating-point instability is to stop using floating-point numbers. Jia et al. explore this in Efficient Exact Verification of Binarized Neural Networks. By utilizing Binarized Neural Networks (BNNs)—where weights and activations are strictly discrete values ($\{-1, 1\}$)—the authors eliminate rounding errors entirely. Because the underlying hardware execution relies on exact bitwise operations (like XNOR and bit counts), the verification process can use exact discrete mathematics, yielding proofs that are both computationally efficient and perfectly faithful to the hardware.
2. Quantization-Robust Training
For applications where continuous weights are necessary, models are often quantized down to lower-precision integers (e.g., INT8) before deployment to save power and memory. To prevent rounding errors from breaking these models, Dang et al. proposed a framework in Certifiably Quantisation-Robust training and inference of Neural Networks. By modeling the hardware's quantization behavior as a bilinear optimization problem during the training phase, the authors use interval bound propagation to ensure that the network's internal logic remains invariant to any rounding choices made by the deployment hardware.
3. Exact Proof Checking
Rather than trying to build a perfectly bug-free verifier, another approach is to verify the verifier's output. Desmartin et al. address this in Towards a Certified Proof Checker for Deep Neural Network Verification. The authors developed an independent proof checker grounded in exact real arithmetic within a formal theorem prover. If a floating-point-based verifier claims a network is safe, it must produce a certificate of proof; the exact-precision checker then verifies this certificate, neutralizing any potential soundness issues caused by the solver's internal numerical instabilities.
Key Foundational Work
Exploiting Verified Neural Networks via Floating Point Numerical Error (2021) — contributed 4 concept elements to this direction.
Efficient Exact Verification of Binarized Neural Networks (2020) — contributed 2 concept elements to this direction.
Scaling Polyhedral Neural Network Verification on GPUs (2021) — contributed 1 concept elements to this direction.