Scaling Neural Network Verification with Tensor Parallelism and Fully Sharded Data Parallelism
This paper adapts Tensor Parallelism and Fully Sharded Data Parallelism to the -CROWN verification framework to significantly reduce GPU memory usage, enabling the formal verification of large-scale neural networks like ResNet-large on CIFAR-100 that were previously infeasible due to memory constraints.
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 are trying to prove that a self-driving car will never crash, no matter what the weather is like or how a pedestrian might suddenly jump out. You can't just test the car a million times; you need a mathematical "proof" that it is safe in every possible scenario. This is called Formal Neural Network Verification.
The problem is that doing this proof is incredibly heavy on computer memory. It's like trying to solve a giant puzzle, but all the pieces (the data and the rules) have to fit on a single, small table (a single graphics card). If the puzzle is too big, the table overflows, and the proof fails.
This paper introduces two new ways to solve this puzzle by using multiple tables (GPUs) working together, borrowing ideas from how we train giant AI models today.
Here is the breakdown of their two main solutions, explained with simple analogies:
1. The "Split the Puzzle" Approach (Tensor Parallelism)
The Idea: Imagine you have a massive jigsaw puzzle. Instead of one person holding the whole thing, you cut the puzzle in half. Person A holds the left half, and Person B holds the right half. They both work on their own pieces and shout out the results to each other.
- How it works: The researchers split the "weights" (the puzzle pieces) and the "rules" (the math) across two GPUs.
- The Good News: This cuts the memory needed on each computer almost in half (about 2x reduction). It's very efficient for small or shallow puzzles.
- The Catch: When the puzzle gets deep (many layers), the two people have to guess the connection between their halves without looking at the whole picture. To save time, they use a "quick-and-dirty" estimation method (called IBP) for the middle parts.
- The Result: The final proof is still safe (it won't say a car is safe if it's actually dangerous), but the answer becomes a bit "fuzzier" or less precise as the puzzle gets deeper. It's like estimating the distance to a mountain by looking at the horizon rather than measuring it exactly.
2. The "Shared Library" Approach (Fully Sharded Data Parallelism - FSDP)
The Idea: Imagine a library where the books are too big to fit on one shelf. Instead of copying the whole book for every reader, the library splits the book into pages.
- How it works: The researchers split the "weights" (the pages of the book) across the GPUs.
- The Magic Trick: When a computer needs to do a calculation, it quickly gathers all the pages it needs from the other computers, does the math, and then immediately puts the pages back. At any single moment, no computer is holding the entire book.
- The Good News:
- Perfect Accuracy: Because the math is done exactly the same way as if one computer had the whole book, the result is bit-for-bit identical to the single-computer version. No "fuzziness."
- Memory Savings: It saves a huge amount of memory (80–90% for the base setup, and 34–39% for the peak usage).
- The Catch: It requires a bit of "talking" between computers to gather the pages, which takes a tiny bit of time, but the memory savings are worth it.
The Big Surprise: What's Actually Clogging the Memory?
The researchers expected the "weights" (the puzzle pieces or book pages) to be the main problem. They were wrong.
Once they used these new methods to free up space for the weights, they discovered the real bottleneck: a specific type of data called "alpha tensors."
- The Analogy: Imagine you are solving the puzzle. The "weights" are the puzzle pieces, but the "alpha tensors" are the sticky notes you have to write on for every single piece to track your progress.
- The Finding: In the most advanced verification mode (where they check for crashes using a method called Branch-and-Bound), these sticky notes take up 99% of the memory, not the puzzle pieces.
- The Conclusion: Even though they successfully split the puzzle pieces across computers, the "sticky notes" are still too big to fit. To solve the biggest problems (like verifying complex AI for self-driving cars), future work needs to figure out how to split those sticky notes across computers too.
Summary of Results
- Tensor Parallelism: Great for saving memory, but makes the answer slightly less precise for deep networks.
- FSDP: Keeps the answer perfectly precise and saves a lot of memory. It successfully verified a complex image-recognition model (ResNet) that was previously too big to check.
- The Future: The key to verifying even bigger AI systems isn't just splitting the weights anymore; it's about figuring out how to split the "sticky notes" (alpha tensors) that track the verification process.
In short, the paper shows how to use multiple computers to verify AI safety, but it also reveals that we still have one major memory hurdle left to clear before we can verify the largest, most complex AI systems.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.