How to Implement Proof-of-Inference: OpenGradient Architecture
Table of Contents
Table of Contents
Share

Implement proof-of-inference on-chain with OpenGradient's HACA architecture. ZKML vs TEE verification modes, SolidML code patterns, and production deployment guide for 2026.
Frequently Asked Questions
- Proof-of-inference is a cryptographic mechanism that lets an inference node demonstrate that a specific AI model produced a specific output from a specific input, without requiring verifiers to re-execute the model. The proof is generated alongside inference and verified on-chain by smart contracts or full nodes. OpenGradient supports three verification modes: ZKML (zero-knowledge proofs with mathematical certainty), TEE (hardware attestation via trusted execution environments), and Vanilla (signature-only for low-risk workloads).
- ZKML proofs provide cryptographic certainty that a model ran correctly without exposing model weights or intermediate values. Verification does not require re-execution. TEE attestations use hardware security (Intel SGX or similar) to prove that software ran unmodified inside a trusted enclave, with near-zero computational overhead. ZKML adds 1000 to 10000 times computational overhead versus native inference, making it suited for high-stakes on-chain logic like DeFi risk models. TEE is preferred for production LLM inference where latency and cost matter more than mathematical proof.
- Use the SolidML library and the OGInference precompile at address 0x00000000000000000000000000000000000000F4. Import OGInference.sol, construct a ModelInferenceRequest with your chosen mode (VANILLA, ZKML, or TEE), the model Blob ID from OpenGradient's Model Hub, and a ModelInput containing tensor values. Call OGInference.runModelInference() and read the ModelOutput. OpenGradient's PIPE engine pre-executes inferences in parallel for pending transactions, so inference does not block the EVM or introduce on-chain latency.
Don't Miss What's Next
Subscribe to newsletter
ZKML
Proof of Inference
OpenGradient
On-Chain ML
Zero Knowledge Proofs
Smart Contracts
DeFi
Get in Touch
Our team will get back to you within 24 hours.





