Enabling AI ASICs for Zero Knowledge Proof
This paper introduces MORPH, a framework that reformulates Zero-Knowledge Proof kernels using a hardware-aware complexity model to enable efficient execution on AI ASICs like TPUs, achieving up to 10x throughput improvements in NTT operations through MXU-centric arithmetic and optimized dataflow layouts.
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
The Big Picture: The "Secret Math" Problem
Imagine you are running a massive bank that needs to prove to its customers that a transaction happened correctly without revealing the customer's name or the amount of money. This is called a Zero-Knowledge Proof (ZKP).
To do this, the bank's computer (the "Prover") has to solve incredibly difficult math puzzles. Two specific puzzles take up almost all the time:
- MSM (Multi-Scalar Multiplication): Like trying to multiply a giant list of numbers by a giant list of points on a map, over and over again.
- NTT (Number-Theoretic Transform): Like taking a long song and instantly breaking it down into its individual musical notes (frequencies) to check if the melody is correct.
The Problem: These puzzles are so heavy that they take hours to solve on standard computers. This makes ZKPs too slow and expensive for everyday use (like verifying a photo or a blockchain transaction).
The Solution: The researchers built MORPH, a new system that lets powerful AI chips (specifically Google's TPUs) solve these puzzles much faster.
The Analogy: The Factory vs. The Assembly Line
To understand why this is hard, imagine two different types of factories:
- The General Factory (GPUs/CPUs): This factory has many skilled workers who can do almost anything. They are great at handling complex, messy tasks where every step is different. They are flexible but not super fast at doing the same thing millions of times.
- The AI Factory (TPUs): This factory is built for mass production. It has a giant, super-fast conveyor belt (the MXU) designed to do one specific thing: multiply huge grids of numbers (matrices) all at once. It is incredibly fast and energy-efficient, but it is rigid. If you try to give it a messy, irregular task, it gets stuck because it can't handle the "mess."
The Conflict: ZKP math is messy. It involves huge numbers (hundreds of bits long) and requires constant "rearranging" of data. The AI Factory (TPU) is great at the math part but terrible at the rearranging part. If you just plug the old ZKP code into the TPU, it runs 30 times slower because the workers spend all their time shuffling papers around instead of doing the math.
How MORPH Fixes It: The Two-Step Magic
The MORPH team realized they couldn't just force the old code onto the new machine. They had to redesign the workflow to fit the AI Factory's strengths. They did this in two ways:
1. The Arithmetic Fix: "The Translation Layer"
The Problem: ZKP math uses huge numbers (like 377 bits long). The TPU's conveyor belt only understands small numbers (8 or 32 bits). The old way of handling this was like trying to carry a 500-pound boulder by breaking it into tiny pebbles, carrying them one by one, and then gluing them back together. It's slow and requires a lot of "glue" (carry chains).
The MORPH Solution: They invented a Translation Layer (RNS Lazy Reduction).
- Analogy: Instead of carrying the boulder, they put it in a special, oversized shipping container that fits perfectly on the conveyor belt.
- They convert the huge, messy math problem into a format that looks like a giant grid of small numbers.
- Now, the TPU's super-fast conveyor belt can process the whole grid in one go, without stopping to glue anything together.
- Result: This turns a slow, step-by-step process into a massive, parallel sprint. It's 90 times faster for the math part.
2. The Dataflow Fix: "The Stationary Warehouse"
The Problem: The old ZKP algorithms require the computer to constantly stop, shuffle data around, and reorganize it (like a librarian constantly moving books to different shelves just to find the next one). On a TPU, this "shuffling" is the biggest bottleneck. It's like having a Ferrari that spends 90% of its time stuck in traffic.
The MORPH Solution: They redesigned the workflow to be Layout-Stationary.
- Analogy: Imagine a warehouse where the boxes are pre-sorted and placed exactly where the robot arm needs them. The robot never has to move the boxes around; it just grabs them and works.
- They created a new method called LS-PPG (for the MSM puzzle) and a 5-step NTT (for the frequency puzzle).
- These methods ensure that once the data is loaded, it stays in the perfect position for the TPU to chew through it. No more shuffling, no more traffic jams.
- Result: The TPU spends almost 100% of its time doing math, not moving data.
The Results: A Speed Demon
By combining these two fixes, MORPH turned the TPU into a ZKP supercomputer.
- Speed: For the "frequency" puzzle (NTT), the TPU is now 10 times faster than the best existing systems (like NVIDIA GPUs).
- Efficiency: It uses much less energy to do the same work.
- Scalability: As the math gets harder (larger numbers), the TPU doesn't slow down as much as other chips do.
The Takeaway
Think of MORPH as the ultimate adapter. It took a machine built for AI (Google's TPU) and rewired it to be the world's best machine for "Secret Math" (ZKPs).
- Before: Trying to run a Formula 1 car on a dirt road (Slow, bumpy, inefficient).
- After: MORPH paved a perfect highway specifically for that car. Now, it's the fastest vehicle on the track.
This breakthrough means that in the future, we could verify complex computations (like private blockchain transactions or secure AI processing) in seconds instead of hours, making privacy-preserving technology practical for everyone.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.