The Complexity of Verifying Feedforward Neural Networks in Quantised Settings
This paper establishes the computational complexity landscape for verifying feedforward neural networks in quantised settings, demonstrating that verification remains NP-complete for networks with fixed arithmetic precision under both linear and bit-vector specifications, while providing new upper bounds for dynamically quantised networks under bit-vector specifications.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you have a very smart robot (a Feedforward Neural Network) that makes decisions, like recognizing a cat in a photo or steering a self-driving car. Before we let this robot loose in the real world, we need to be 100% sure it won't make a dangerous mistake. This process is called verification.
For a long time, scientists tried to verify these robots by pretending they were made of perfect, infinite-precision math (like using a ruler that can measure down to the size of an atom, forever). But in the real world, computers aren't perfect. They use quantized arithmetic, which is like using a ruler that only has marks every millimeter. You have to round things off, and sometimes you run out of space (overflow).
This paper asks a big question: Does switching from "perfect math" to "real-world, rounded math" make it much harder to prove the robot is safe?
Here is the breakdown of their findings, using some everyday analogies:
1. The Three Types of Robots
The authors looked at three different ways these robots are built:
- The Ideal Robot (Rational FNN): Built with perfect, infinite-precision math.
- The Pre-Quantized Robot (Quantised FNN): Built from the start using the "millimeter ruler" (finite-width math).
- The Converted Robot (Dynamically Quantised): A perfect robot that we force to use the "millimeter ruler" after it was already trained.
2. The Two Types of Safety Rules
To check if the robot is safe, we give it rules. The paper looks at two kinds of rulebooks:
- The Linear Rules (LP): These are simple, straight-line rules. Think of them like a traffic sign saying, "If speed is under 50, you are safe." These rules are easy to visualize as a smooth, convex shape.
- The Bit-Vector Rules (BV): These are complex, "bit-level" rules. Think of them like a security system that checks specific switches inside the computer's brain. "If bit 3 is on AND bit 7 is off, but bit 2 is on, then it's a problem." These can describe very jagged, complex, non-linear shapes.
3. The Main Findings: Is it Harder?
Scenario A: Simple Rules (Linear Constraints)
The Result: No, it's not harder.
Whether the robot is perfect or uses the "millimeter ruler," and whether the rules are simple or complex, checking safety remains NP-complete.
- The Analogy: Imagine trying to find a specific key in a giant, messy drawer. Whether the keys are made of gold (perfect math) or plastic (rounded math), and whether the drawer is organized or chaotic, the difficulty of finding the key doesn't change. It's still a "hard" problem, but it's the same level of hard as before.
- Why this matters: It means we don't need to invent entirely new, super-powerful computers to verify real-world robots. The tools we already have for perfect math can be adapted for real-world math without getting exponentially slower.
Scenario B: Complex Rules (Bit-Vector Constraints)
The Result: It depends on the robot's "brain" size.
- If the robot is already built with the "millimeter ruler": Checking safety is still NP-complete (same difficulty as before).
- If we take a perfect robot and force it to use the "millimeter ruler" (Dynamic Quantisation): This gets much harder. It jumps to PSPACE-complete.
- The Analogy: Imagine you have a perfect recipe (the perfect robot). Now, you have to cook it in a tiny kitchen with a specific, limited set of pots and pans (the finite-width arithmetic). If you just use the limited pots from the start, it's fine. But if you try to translate the perfect recipe into the limited kitchen while cooking, the number of possible ways things can go wrong explodes. You have to keep track of so many "what-if" scenarios (like aligning numbers that are different sizes) that the memory required to check them all grows massively.
4. The Floating-Point Mystery
The paper also looked at floating-point numbers (the standard way computers handle decimals, like 3.14).
- Fixed Exponent: If the range of numbers is fixed (like a ruler with a fixed max length), the difficulty stays manageable (PSPACE).
- General Floating-Point: If the range can change wildly, the difficulty might jump even higher (NEXPTIME).
- The Analogy: In floating-point math, numbers can be very small or very large. To add them, the computer has to "align" them first (like lining up decimal points). If the numbers are wildly different sizes, the computer has to buffer a huge amount of data to do this alignment. The authors found that this "alignment" step is what makes the problem potentially much, much harder to solve.
Summary
The paper essentially says:
- Good News: For the most common type of safety check (linear rules), switching to real-world, rounded math doesn't make the job impossible. It's still the same level of difficulty as the theoretical perfect math.
- Bad News: If you are using very complex, bit-level rules on a perfect robot that you are forcing to use rounded math, the job becomes significantly harder (PSPACE).
- The Unknown: If you use standard floating-point math with wild ranges, the job might be even harder, but the authors aren't 100% sure yet; they just know it's at least as hard as the "PSPACE" level.
In short: Quantization (rounding) doesn't break verification for simple rules, but it does make complex, dynamic scenarios much more computationally expensive.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.