Skip to content
Crypto.world

Research

Optimistic TEE-Rollups: A Hybrid Architecture for Scalable and Verifiable Generative AI Inference on Blockchain

Decentralized networks that serve large language model inference face a "Verifiability Trilemma": they can pick only two of three properties — cryptographic proof that the output really came from the…

Optimistic TEE-Rollups: A Hybrid Architecture for Scalable and Verifiable Generative AI Inference on Blockchain
arXiv
2512.20176
Published
2025-12-23
Authors
Aaron Chan, Alex Ding, Frank Chen, Alan Wu, Bruce Zhang, Arther Tian

AI summary

Overview

Research area: Blockchain / decentralized AI infrastructure — specifically verifiable generative-AI inference, trusted execution environments (TEEs), optimistic rollup fraud proofs, and zero-knowledge machine learning (ZKML). Filed under Cryptography and Security (arXiv:2512.20176v1 [cs.CR], 23 Dec 2025), by authors at DGrid AI.

Technical level: Intermediate. The protocol mechanics are explained with explicit notation and worked examples, but the security analysis invokes game-theoretic adversary models and standard ZK/rollup vocabulary.

Scope: The paper proposes and simulates a hybrid verification architecture — Optimistic TEE-Rollups (OTR) — that combines NVIDIA H100 Confidential Computing attestations, an optimistic fraud-proof dispute layer, and probabilistic ZK spot-checks to make LLM inference on-chain both fast and verifiable.

What This Paper Is About

Decentralized networks that serve large language model inference face a "Verifiability Trilemma": they can pick only two of three properties — cryptographic proof that the output really came from the agreed model, sub-second latency, and low cost. Zero-knowledge approaches are too slow (hours of proving for a 70B model), optimistic approaches are too slow to settle (roughly 7-day dispute windows), and "Proof of Quality" (PoQ) is fast and cheap but never actually checks which model ran. The paper's goal is an architecture that gets all three by treating hardware enclaves as fast "optimistic co-processors" backed by a cryptographic and game-theoretic safety net.

Key Contributions

  1. Protocol architecture (OTR): A three-tier design — (Tier 1) TEE-signed attestations giving provisional finality, (Tier 2) an optimistic dispute layer where "Fishermen" can challenge execution traces, and (Tier 3) VRF-triggered stochastic ZK spot-checks at probability ρ < 0.01 — formally defined as a tuple Π_OTR = (P, M, L, Δ).

  2. Proof of Efficient Attribution (PoEA): A consensus mechanism that binds a query's economic value to the specific model weights loaded in the enclave, by requiring the attestation's MRENCLAVE measurement to belong to a registry-approved set Ω for that model ID. This is the paper's answer to the "model authenticity" problem it identifies in PoQ.

  3. Security analysis of model downgrade attacks: A game-theoretic argument that OTR makes cheating economically irrational (expected profit < 0) as the probability of a Fisherman catching fraud approaches 1, because TEE signatures provide non-repudiation — a guarantee the authors say PoQ lacks.

  4. Empirical/simulation validation: Benchmarks against ZKML (EZKL), opML, and PoQ reporting a 1400× speedup over ZKML, a 99% latency reduction versus opML, 99% of centralized throughput, and ≈$0.07 total cost per query.

Main Findings

  • PoQ is exploitable via model downgrade: In 1,000 inference queries, an adversarial 8B model trained with PPO against the frozen PoQ judge scored 0.89 ± 0.03 on the PoQ judge versus 0.91 ± 0.02 for the honest Llama-3-70B — statistically indistinguishable — while its human evaluation score fell to 0.52 ± 0.08 versus 0.88 ± 0.03 for the honest model (the paper describes this as a 40% drop). Cost per 1M tokens was $0.10 for both 8B models versus $0.90 for the 70B model, creating an arbitrage profit.

  • Latency: At ρ = 0.01, OTR's weighted average latency is 0.8 s, whereas pure ZKML for a 7B model exceeds 1200 s — a 1400× speedup. Provisional finality is reported at roughly 500 ms. ZKML is described as becoming infeasible beyond 7B parameters.

  • Throughput: OTR achieves 99% of the throughput of centralized baselines while maintaining Byzantine fault tolerance against rational adversaries. The overhead term is modeled as T_TEE + ρ·T_ZK + (1−ρ)·0.

  • Hardware overhead: NVIDIA H100 Confidential Computing imposes a marginal overhead of approximately 15%, with the paper elsewhere citing 15–20% performance degradation versus bare metal (memory encryption and integrity protection).

  • Cost: Table 5 (USD at $3,000/ETH) gives totals of ≈$45.05 per query for ZKML, ≈$0.06 for opML, and ≈$0.07 for OTR. Table 3 gives on-chain verification gas of ≈350k (ZKML verifier), ≈21k (opML optimistic), and ≈40k (OTR signature check). OTR's proof verification is listed at $0.02 versus $45.00 for ZKML.

  • Defense in depth against broken TEEs: If an adversary extracts the TEE signing key, it still cannot forge the execution trace; a "broken TEE" degrades to behaving like a standard opML sequencer, with invalid outputs challenged and slashed through bisection. In OTR, P_catch = 1 − (1−ρ)(1−P_fish).

  • Privacy on the happy path: Inputs are decrypted only inside the enclave; during a dispute only the divergent intermediate state need be revealed, rather than the user's full prompt as in standard opML.

  • Cost is tunable per transaction: Because ρ is a protocol parameter, the network can set ρ = 0 (pure TEE) for a $0.01 query and ρ = 1 (full ZK check) for a $1000 automated trade.

Methodology in Plain English

The researchers first taxonomize existing approaches — validity proofs (ZKML frameworks EZKL and Modulus), fraud proofs (opML, following Conway et al.), and outcome-based verification (PoQ, following Zhang et al., which uses a BERT-style assessor model such as nli-deberta-v3-large and aggregates scores as S_final = (1/k)Σφ(Mᵢ(q,r))) — and argue each fails one leg of the trilemma.

They then design a pipeline in three phases. First, the user encrypts a query to the enclave's public key; the enclave decrypts it, runs the model, and the hardware emits a DCAP quote signing a body containing the hash of the query, the hash of the response, and a nonce, bound to the binary's MRENCLAVE measurement. The sequencer publishes (r, σ_TEE, MRENCLAVE) to a data-availability layer, and the client accepts immediately if the signature chains to the manufacturer's root of trust. Second, for each batch, a verifiable random function seeded by block height decides whether a spot-check fires; if it does, the sequencer must produce a ZK proof (Halo2/RISC Zero are named) or be slashed. Third, Fishermen can independently recompute the output under bitwise-deterministic settings and, if it diverges, enter an interactive bisection game — bisecting first over Transformer layers, then over matrix multiplications within the divergent layer — to isolate a single disputed operation that is settled on-chain.

For evaluation, the authors built a simulated network that emulates NVIDIA H100 SXM5 GPUs with Confidential Computing enabled and Intel TDX for CPU-level attestation. They used TruthfulQA for hallucination/semantic evaluation and GSM8K for reasoning traces, with Llama-3-70B-Instruct as the honest model, a distilled Llama-3-8B fine-tuned against the PoQ judge as the adversary, and Halo2 with KZG commitments for the spot-check prover. On-chain costs were measured in a forked Ethereum mainnet environment (Hardhat) simulating EIP-4844 blob transactions.

Important caveat: the TEE performance figures derive from a simulation plus NVIDIA's theoretical benchmark numbers for H100 CC, not from a production deployment — the paper labels these as simulations.

Why This Matters

For research: The paper reframes the ZKML-vs-optimistic debate as a "Verifiability Trilemma" and demonstrates, with a concrete adversarial experiment, that semantic-judge verification (PoQ) fails the authenticity requirement rather than merely trading it off. PoEA's registry-of-measurements approach gives a checkable alternative to subjective scoring, and the paper's comparison table positions TEE trust assumptions as "HW + 1-of-N" rather than "hardware vendor alone."

Real-world applications:

  • DePIN inference markets: permissionless providers competing with hyperscaler APIs while users can verify they received the model they paid for.
  • On-chain AI agents and composable DeFi: sub-second provisional finality makes inference usable inside transactions that cannot wait out a dispute window.
  • Tiered-security services: chatbots and NPCs can accept pure-TEE (ρ = 0) settlement, while high-value automated trade execution enforced at ρ = 1 gets full cryptographic checking.
  • Anti-downgrade pricing: providers must price the model their MRENCLAVE proves they ran, closing the "charge for 70B, serve 8B" arbitrage the paper demonstrates.

Industry relevance: The economics — ≈$0.07 per query, comparable to opML and three orders of magnitude below ZKML verification — are framed explicitly as the threshold for DePIN to compete commercially with Web2 APIs. The architecture also presumes NVIDIA H100 Confidential Computing availability, tying feasibility to a specific hardware generation.

Future Directions

  • Multi-prover TEE consensus: explicitly named as future work, to reduce trust assumptions in single-manufacturer enclaves.
  • Real-hardware validation: the results rest on simulation and theoretical H100 CC benchmarks, so measured end-to-end latency, memory-encryption overhead, and DCAP quote costs on physical deployments remain unverified in this paper.
  • Parameterizing ρ per transaction value: the paper sketches ρ = 0 to ρ = 1 as a security-pricing dial but does not report a mechanism or empirical study for how the protocol should choose ρ.
  • Bisection at LLM scale: the layer-then-matmul bisection strategy and the privacy claims about revealing only intermediate activations during disputes are described but not benchmarked against, for example, trace sizes for 70B models.

Target Audience

Protocol designers and engineers building decentralized inference or DePIN networks; researchers working on verifiable ML, ZKML, and optimistic rollup mechanisms; and technical due-diligence readers (investors, security auditors, infrastructure teams) evaluating whether TEE-based verification is a credible alternative to ZK proofs for large models. Readers should already be comfortable with attestation, fraud proofs, and basic game-theoretic adversary modeling; the paper is not an introduction to any of these.

Authors’ abstract

The rapid integration of Large Language Models (LLMs) into decentralized physical infrastructure networks (DePIN) is currently bottlenecked by the Verifiability Trilemma, which posits that a decentralized inference system cannot simultaneously achieve high computational integrity, low latency, and low cost. Existing cryptographic solutions, such as Zero-Knowledge Machine Learning (ZKML), suffer from superlinear proving overheads (O(k NlogN)) that render them infeasible for…

The full abstract on arXiv
Read the original paper