NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient Representation of Numerical Optimization Problems for SNARKs

Sebastian Angel, Andrew J. Blumberg, Eleftherios Ioannidis, Jess Woods

TL;DR

Verifying that a sensitive numerical optimization problem (like resource allocation or ML model training) was solved optimally without revealing secret inputs has historically been computationally intractable in zero-knowledge. Otti solves this bottleneck by compiling lightweight nondeterministic checkers based on mathematical certificates of optimality rather than compiling the complex solver algorithms themselves. Using the Spartan zkSNARK, Otti proves solution optimality in zero-knowledge up to five orders of magnitude faster than prior approaches, with only a 30–80× overhead compared to unverified native solvers.

What Problem Does This Paper Address?

Optimization algorithms—such as Linear Programming (LP), Semidefinite Programming (SDP), and Stochastic Gradient Descent (SGD)—underpin everything from kidney donor matching and flight scheduling to machine learning. When these problems involve sensitive data (e.g., medical records, secret admissions criteria, proprietary training data), clients must either blindly trust the solver’s output or risk privacy leaks.

Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge (zkSNARKs) allow a prover to prove computational correctness without revealing inputs. However, directly compiling production solvers (like the Simplex algorithm or interior-point methods) into arithmetic circuits (R1CS) triggers a catastrophic blowup in constraint count. Existing SNARK compilers choke on:

  1. Dynamic, data-dependent loops requiring worst-case unrolling.
  2. Unpredictable random memory accesses (RAM).
  3. Complex fixed-point/floating-point operations.

Compiling an LP with just three variables and three equations in state-of-the-art compilers required over one million multiplication gates and failed entirely on larger instances.

Methods

Instead of proving that a solver ran correctly, Otti asks: Can we simply verify that the resulting answer is optimal? Otti automatically generates a nondeterministic checker—an R1CS circuit that accepts a purported solution as an exogenous witness and checks standard optimality conditions:

  • Linear Programming (LP): Otti exploits strong duality. It automatically constructs the dual problem and checks primal feasibility ($Ax \le b, x \ge 0$), dual feasibility ($A^T y \ge c, y \ge 0$), and zero duality gap ($c^T x = b^T y$). A commercial solver (lpsolve) calculates $x$ and $y$ natively off-circuit.
  • Semidefinite Programming (SDP): Otti checks duality for matrix inequalities and verifies positive semidefiniteness via Cholesky decomposition ($X = L L^T$ with non-negative diagonal elements). Otti also supports disjunctive proofs of infeasibility.
  • Stochastic Gradient Descent (SGD): Because duality does not apply directly to SGD, the authors introduce Probabilistic Certificates of Optimality (PCOs). Under the strong growth condition (applicable to separable perceptrons and overparameterized neural networks), local optima have zero gradient across samples. The checker verifies that subgradients evaluate to zero across all samples—or across a random subset, trading a tunable soundness error for massive constraint reduction.

Otti is built on the CirC compiler framework, uses 64-bit fixed-point arithmetic (fp64), exports constraints in zkInterface, and proves statements using the transparent, non-trusted-setup Spartan proof system.

Datasets

The authors evaluated Otti across standard community benchmark suites:

  • LP: 28 benchmarks from the Netlib LP library (e.g., afiro, sc50a, modszk1, scsd8), ranging up to 2,750 variables and 688 equations.
  • SDP: 11 instances from SDPLIB (e.g., truss1, control1, and the hinf control-engineering family), with matrix sizes up to 16×16.
  • SGD: 21 binary classification datasets from the Penn Machine Learning Benchmarks (PMLB) (e.g., iris, clean1, clean2, GE1000), testing up to 28,000+ data points and 1,000 features.

Key Insights and Ideas

  • Certificates bypass algorithmic complexity: Checking a certificate of optimality requires zero RAM lookups, zero unbounded loops, and far fewer arithmetic constraints than running the optimization routine.
  • Off-the-shelf solvers remain native: Because checking is decoupled from solving, developers keep using high-performance, vectorized C/C++ solvers (lpsolve, CSDP, scikit-learn) without reimplementing them in circuit-friendly languages.
  • The SGD Convergence-Certificate Conjecture: The authors conjecture that any theorem guaranteeing rapid convergence for SGD yields a corresponding probabilistic optimality certificate. For separable hinge loss, verifying optimality simplifies to a single pass checking that $1 - y_i \langle w, x_i \rangle \le 0$.

Key Results

  • Drastic performance gains: Otti proves optimality for problems that completely crashed previous zkSNARK compilers. For a tiny 5-variable LP baseline, Otti is 5 orders of magnitude faster; for larger LPs, SDPs, and ML models, it is the only system capable of generating proofs.
  • Fast proving times: Proofs generate in 100 ms to 19 seconds across benchmarks ranging from tens of thousands to ~7 million R1CS constraints. Verification always takes under 2 seconds.
  • Modest prover overhead: Relative to running an unverified, native solver, Otti incurs an average prover overhead of only ~40× for LP, ~30× for SDP, and ~80× for SGD. In zero-knowledge systems without a trusted setup, overheads of 1,000×–10,000× are typical, making Otti’s modest overhead a significant milestone.
  • Realistic ML proofs: For the clean2 dataset (6,598 points, 168 features), Otti verified perceptron training via a 50% probabilistic certificate in 18.23 seconds of prover time (proof size < 80 KB).

Limitations and Future Work

  • Strict Assumptions for SGD: The current SGD certificate relies on the strong growth condition and linear separability; it does not yet extend to arbitrary non-convex deep neural networks or noisy, non-separable datasets.
  • Feasibility Assumptions in SDP: The SDP duality certificate requires strict feasibility (Slater's condition) to ensure a zero duality gap.
  • Compiler Trust: While the proof ensures the nondeterministic checker passed, the automated generation of the checker itself is not yet formally verified against bugs.
  • Memory Scaling: Compiling multi-million constraint instances pushed memory limits in CirC’s original Haskell implementation (prompting an ongoing port to Rust).

Summary updated

BibTeX
@inproceedings{angel2022efficient,
  author = {Sebastian Angel and Andrew J. Blumberg and Eleftherios Ioannidis and Jess Woods},
  title = {{Efficient Representation of Numerical Optimization Problems for SNARKs}},
  booktitle = {USENIX Security},
  year = {2022},
  url = {https://openreview.net/forum?id=L2eI1mfZB7},
}
Figure