FlashProve-Next: Verifiable Inference for Production LLM APIs

Liang SongarXiv 2026

TL;DR

When you pay for a frontier LLM via an API, you have no way of knowing if the provider secretly swapped in a cheaper, quantized, or lobotomized model under the hood. FlashProve-Next lets closed-weight API providers generate cryptographic, zero-knowledge proofs that they actually ran the advertised model—without changing how native floating-point GPUs serve traffic, and without leaking proprietary weights or hidden system prompts.

What Problem Does This Paper Address?

Behind an API endpoint, an LLM is a black box. Under heavy load, a provider could quietly route your request to a smaller distilled model, quantize bf16 weights down to int4, skip Mixture-of-Experts (MoE) layers, truncate your context window, or slash your hidden reasoning budget. From the text alone, low-rate substitutions are virtually undetectable.

Existing solutions force an ugly compromise:

  • Trusted Execution Environments (TEEs) require trusting chip vendors and don't span custom accelerators like TPUs.
  • Re-execution & Fingerprints only work if the verifier holds the secret model weights and user context.
  • Full zkML (Zero-Knowledge Machine Learning) proves every layer of an integer surrogate model rather than native floating-point math. Aside from massive compute overhead, native GPU execution inevitably diverges from integer surrogates on long sequences, causing honest proofs to fail.

FlashProve-Next targets the elusive sweet spot: trustless public verification on unmodified, native floating-point production stacks (like vLLM with FlashAttention and CUDA graphs) while keeping weights, architecture, and hidden chains-of-thought completely private.

Methods

Instead of re-proving an entire neural network on the critical path, FlashProve-Next decouples verification from live serving:

  1. Non-Depleting Weight Commitment (model_id): The provider commits to its weights, hidden prompts, and numerical formats once using Reed–Solomon column trees. Standard hash-based commitments slowly leak secrets as positions are revealed across thousands of proofs ("codeword exhaustion"). FlashProve-Next uses Hidden Column Openings (HCO)—verifying column paths inside the zero-knowledge circuit—so static weights never appear in public transcripts.
  2. Asynchronous Cost-Weighted Spot-Checking: During live serving, lightweight read-only hooks record tensor boundaries. In the background, a prover checks $k$ random, cost-weighted samples of compute blocks and token generation steps.
  3. Single-Hop Certified Rounding Contracts: Rather than chaining a rigid integer reference model across layers (where rounding errors snowball), each sampled block is checked locally against the GPU's own committed inputs using a mathematical "box-plus-ball" error radius tailored to floating-point ops (bf16/fp8/mxfp4).
  4. Sort-Free Bucketed Sampling: Proving standard top-p sampling inside a circuit usually requires sorting the entire ~150k vocabulary. The author replaces sorting with 32-token buckets and a witness-free per-token sandwich bound.

To keep claims rigorous, every technical statement in the paper is tagged by its verification tier—including 28 modules of machine-checked Lean 4 proofs:

Evidence tags used throughout the paper to separate mathematical proofs, Lean 4 theorems, and hardware measurements.

Datasets

Because this work evaluates inference verification rather than model training, there are no training datasets. Calibration and benchmarks were conducted across real open-weight checkpoints—Qwen3-0.6B, Llama-3.2-1B-Instruct, Qwen3.5-0.8B, Qwen3-4B, Qwen3-30B-A3B-FP8, and gpt-oss-20b—using synthetic/hand-crafted API prompts, a 14-case adversarial cheating matrix, and long-context stress tests (4k–32k tokens) built from Newton’s Opticks (prose) and CPython 3.12 standard-library source code.

Key Insights and Ideas

  • The "Can It Prove?" Refusal Leak: In zero-knowledge systems, failing to produce a proof because of floating-point rounding drift leaks information—specifically, a single bit dependent on secret internal activations. By proving universal numerical completeness under local kernel rounding contracts (including a subtle additive underflow floor for FlashAttention's exp), honest executions never fail numerically.
  • Closing the "Zero-Operand" Loophole: If you only verify individual matrix multiplications, a clever cheater can skip half the layers and feed all-zero tensors downstream ($W \cdot 0 = 0$ is trivially exact!), leaving only tiny normalization layers flagged as "bad." FlashProve-Next introduces lineage cost accounting (Rule CA), billing downstream consumers up to depth $h=3$ so layer-skipping is caught at its true compute cost.
  • Checking Fine, Not Coarse: Trying to verify an LLM only at whole-layer boundaries fails spectacularly—error bounds blow up by $10^{48}\times$ to $10^{87}\times$ the actual layer increment. Observing every matrix-multiply operand keeps tolerances tight (~1% headroom).

Key Results

  • Zero False Rejections: Across 392,928 blocks on Ada Lovelace GPUs and 3.81 million GEMM, MoE, and non-GEMM blocks/rows on Blackwell (bf16/fp8/mxfp4), honest execution triggered 0 false rejections.
  • 100% Cheat Detection on Tested Attacks: On Qwen3-0.6B, the verifier passed a 14/14 end-to-end cheating matrix, rejecting int4/fp8 quantization, model swaps, skipped layers, truncated KV caches, and prompt tampering.
  • Minimal Serving Overhead: Enforcing contract-compliant numerics in vLLM 0.33 costs just 1.2%–2.7% throughput, and zero-sync asynchronous CUDA-graph capture on Qwen3-4B adds only 1.15% overhead at batch size 1 (up to 13.1% at batch 8, 8k context).
  • Fast Verification, Compact Proofs: The folded prover generates fixed 8 MiB proofs for Qwen3-0.6B in 450.2 s on an RTX 6000D GPU (verifying in 10.76 s in Python), while a zero-dependency Rust verifier (fpn-verify) checks 8 MiB Relation 2 containers in 10.1 ms on an Apple M1 CPU.

Limitations and Future Work

  • Proving Cost vs. Serving Speed: Generating a full-reply proof on Qwen3-0.6B (~570 s total) still takes roughly $103\times$ longer than single-stream inference (5.54 s). Keeping fleet-wide compute overhead under 100% currently requires probabilistic audit sampling (proving ~1% of pre-committed responses).
  • Guaranteed Thresholds & Exotic Cheats: Default spot-checking ($\sigma = \rho = 0.5$) tolerates fine-grained cheating below 50% per stratum, though tightening this scales linearly with sample count. Additionally, exotic synthetic cheats like "prefix collapse" (zeroing causal prefixes while maintaining phantom softmax weights) and dropping ultra-low-weight attention tails at 32k context remain explicit out-of-scope boundaries.
  • Next Steps: Future work aims to compile all interactive rounds into the single-binary Rust verifier, reduce the folded prover's 100 GiB RAM footprint via bit-packed streaming, formalize floating-point bounds for recurrent linear-attention scans (Mamba-2/DeltaNet), and hide coarse architectural differences across dense and MoE profiles.

Summary updated

Abstract

Clients of closed-weight LLM APIs cannot verify whether a provider ran the advertised model, precision, hidden prompt, and reasoning budget. Existing approaches either trust hardware or third parties, or re-prove every layer of an integer surrogate at high cost while diverging from native floating-point serving. FlashProve-Next produces verifiable, zero-knowledge-masked proofs for individual LLM API responses without modifying native serving (bf16/fp8/mxfp4, random sampling, FlashAttention, CUDA graphs, batching, prefix caching) and without disclosing weights, hidden prompts, hidden reasoning, or activations (dense profiles fix coarse geometry; cross-architecture hiding is deferred). A non-depleting Reed-Solomon weight commitment model_id opens inside proofs via hidden column openings, while local per-operator rounding contracts remove integer surrogates and the refusal-bit leak. Cost-weighted spot-checking supports non-interactive public verification (NI-315, $\varepsilon \le 2^{-40}$, $Q \le 2^{64}$) and external-seed C_pre mode (ExtSeed-153, $\varepsilon \le 2^{-20}$, $Q_{\rm samp} \le 2^{30}$). Twenty-eight Lean 4 modules (696 declarations, zero sorry, standard axioms only) mechanize round-by-round soundness, bucketed sampling, $\mathbb{F}_{p^3}$ constrained-mask binding, causal masking, six IR gadgets, and executable FPN2 verifiers. Five-model Blackwell calibration gives zero false rejections across 1.85M GEMM/MoE blocks and 1.96M non-GEMM rows. Our zero-Phase-2 folded backend (folded ZK simulator open) proves Qwen3-0.6B ExtSeed-153 (1.47B cells, 8 MiB) in 450.2 s GPU (10.76 s CPU) at unique-decoding $Q=128$, passes a 14/14 cheating matrix, and scales to 36-layer Qwen3-4B (dev $4+2$) and live vLLM Qwen3-30B-A3B-FP8 Relation 6 (1.49 s prove, 23.4 ms Rust verify, public weight tiles). Rust fpn-verify checks 8 MiB FPN2 Relation 2 proofs in 10.1 ms on CPU.
BibTeX
@misc{song2026flashprove,
  author = {Liang Song},
  title = {{FlashProve-Next: Verifiable Inference for Production LLM APIs}},
  year = {2026},
  eprint = {2611.33741},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33741},
}
Figure