Published Mar 26, 2025
By Team Warden

SPEX: an Introduction to Statistical Proof of Execution

We introduce SPEX, a generalized verifiable computing protocol designed to safeguard tasks against dishonest solvers.

TL;DR

SPEX (Statistical Proof of Execution) is a verifiable computing protocol that ensures the integrity of computational tasks—even those with non-deterministic outputs like LLMs—through probabilistic sampling and cryptographic proofs. Instead of fully re-executing tasks, SPEX allows verifiers to sample intermediate and final results, checking for consistency and correctness with minimal overhead. It introduces a formal framework for verifying modern compute pipelines, supports stochastic processes, and includes an open-source implementation (warden-spex). SPEX is particularly valuable for extending blockchain trust guarantees to off-chain computations, protecting against dishonest solvers and systemic manipulation.

Why SPEX?

As computational pipelines, whether powered by AI, machine learning, or traditional algorithms, become more central to real-world decision-making, trust, transparency, and accuracy are no longer optional. While we may not be able to prevent a model from occasionally erring or hallucinating, we must defend against deeper, systemic threats: intermediaries or endpoints that distort, suppress, or bias outputs for the sake of efficiency or strategic gain.

What is SPEX?

SPEX is a sampling-based verifiable computing protocol that enables correctness verification through probabilistic guarantees. It operates by allowing solver nodes to perform computations, while verifier nodes sample portions of the output for validation based on a configurable confidence threshold. SPEX requires only a single pair of solver and verifier nodes to operate and supports tasks with potentially non-deterministic outputs, such as those involving large language models (LLMs) or stochastic training pipelines.

What’s New in SPEX?

The SPEX framework introduces:

  • A formal definition of verifiable computing tailored for modern compute pipelines.

  • A sampling-based verification protocol with low overhead and high parallelizability.

  • Support for non-deterministic computational states — critical for AI/ML and LLMs.

  • Use of Bloom filters to encode and verify computational states.

  • An open-source reference implementation: warden-spex.

How SPEX Works

At the heart of SPEX is a simple yet powerful idea: rather than fully re-executing computations, we can sample full executions to defend against adversarial solvers, and sample intermediate states for selective re-execution to detect lazy solvers—validating both using cryptographic summaries.

  • Solver: Executes the task and generates a cryptographic proof of execution.

  • Verifier: Randomly samples parts of the task and checks whether the reported results are consistent with both the cryptographic proof and the final output.

Why It Matters

At Warden Labs, the x/async module enables us to extend the trust guarantees of blockchain smart contracts beyond the chain itself—into off-chain, SPEX-protected tasks. This expands the trusted perimeter, allowing us to enforce flexible integrity guarantees even for complex, asynchronous computations. Such guarantees are dramatically important in high-stakes domains where correctness and confidence are non-negotiable. SPEX lets us ask: Can we ensure this task’s output hasn’t been tampered with for efficiency or tactical advantage?

Try It Out

SPEX is open-source and available on GitHub and PyPI:

🔗 warden-spex

Developed in Python, SPEX is designed for seamless integration across diverse environments. Whether you're constructing agentic LLM systems or require verifiable ETL pipelines, SPEX provides the tools to ensure execution is both traceable and provable.

Learn More

📄 Read the full paper: Statistical Proof of Execution (SPEX)
🧪 Explore the examples in the GitHub repo
🛠 Try out the protocol on your own tasks

SPEX is just the beginning. As we continue to build toward a future where AI systems are not only powerful but also provable, trustworthy, and fair, SPEX provides a critical building block.

In high-stakes applications, producing verifiable, well-documented, and accountable outputs is critical for successful deployment and widespread adoption. This is particularly true in domains such as trading systems, credit risk modeling, and autonomous platforms, where outputs are not only well-defined and potentially regulated but also carry significant implications for human safety and asset integrity.

Read the previous article - Sneak Peak on SPEX: The Firewall for AI on the Warden Blockchain