Skip to main content
QUICK REVIEW

[Paper Review] Proof of Quality: A Costless Paradigm for Trustless Generative AI Model Inference on Blockchains

Zhenjie Zhang, Yuyang Rao|arXiv (Cornell University)|May 28, 2024
Explainable Artificial Intelligence (XAI)Computer Science3 citations
TL;DR

This paper introduces Proof of Quality (PoQ), a novel trustless paradigm for deploying large generative AI models on blockchains by validating output quality instead of inference computation. Using lightweight BERT-based cross-encoders to assess response quality, PoQ achieves consensus in under 50 milliseconds with minimal computational overhead, enabling practical, low-latency inference for models like Llama 3 and Mixtral on-chain.

ABSTRACT

Generative AI models, such as GPT-4 and Stable Diffusion, have demonstrated powerful and disruptive capabilities in natural language and image tasks. However, deploying these models in decentralized environments remains challenging. Unlike traditional centralized deployment, systematically guaranteeing the integrity of AI model services in fully decentralized environments, particularly on trustless blockchains, is both crucial and difficult. In this paper, we present a new inference paradigm called \emph{proof of quality} (PoQ) to enable the deployment of arbitrarily large generative models on blockchain architecture. Unlike traditional approaches based on validating inference procedures, such as ZKML or OPML, our PoQ paradigm focuses on the outcome quality of model inference. Using lightweight BERT-based cross-encoders as our underlying quality evaluation model, we design and implement PQML, the first practical protocol for real-world NLP generative model inference on blockchains, tailored for popular open-source models such as Llama 3 and Mixtral. Our analysis demonstrates that our protocol is robust against adversarial but rational participants in ecosystems, where lazy or dishonest behavior results in fewer benefits compared to well-behaving participants. The computational overhead of validating the quality evaluation is minimal, allowing quality validators to complete the quality check within a second, even using only a CPU. Preliminary simulation results show that PoQ consensus is generated in milliseconds, 1,000 times faster than any existing scheme.

Motivation & Objective

  • To address the challenge of deploying large generative AI models on trustless blockchains, where traditional consensus and zero-knowledge proof methods are too slow or computationally infeasible.
  • To shift focus from verifying the inference process to validating the actual quality of model outputs, which is more aligned with user expectations and economic incentives.
  • To design a practical, efficient, and scalable protocol for real-world NLP-based large language model inference on blockchains, ensuring trustlessness and low latency.
  • To demonstrate that quality assessment via lightweight cross-encoders can be both accurate and efficient, enabling fast consensus even with high validator loads.
  • To provide a viable alternative to ZKML and OPML, which are currently impractical for large models due to high validation times and computational demands.

Proposed method

  • Propose Proof of Quality (PoQ), a new blockchain inference paradigm that validates the quality of generative AI outputs rather than the correctness of the inference computation.
  • Use BERT-based cross-encoder models as lightweight quality evaluators to score generated responses against reference answers.
  • Implement PQML, a practical protocol for NLP inference on blockchains, integrating management, inference, and quality-checking nodes in a simulated Kafka-based environment.
  • Apply a deterministic priority scheme to select inference nodes and a consensus mechanism to aggregate quality scores from multiple validators.
  • Design an incentive mechanism where rewards are allocated based on quality scores, discouraging lazy or dishonest behavior through economic disincentives.
  • Optimize the cross-encoder inference pipeline to run in under 35 seconds per validator, with consensus achieved in ~50 milliseconds across all validators.
Figure 1: While standard inference only generates the response $r$ based on specified input query $q$ , ZKML and PQML generate auxiliary information, i.e., zero-knowledge proof $p$ and verifiable results $v$ respectively, to enable the user or the verifiers to check the integreity of the whole compu
Figure 1: While standard inference only generates the response $r$ based on specified input query $q$ , ZKML and PQML generate auxiliary information, i.e., zero-knowledge proof $p$ and verifiable results $v$ respectively, to enable the user or the verifiers to check the integreity of the whole compu

Experimental results

Research questions

  • RQ1Can output quality validation replace inference process verification as a viable trustless mechanism for generative AI on blockchains?
  • RQ2How efficient is the consensus process in PoQ when scaling the number of quality validators?
  • RQ3Can lightweight BERT-based cross-encoders accurately and reliably assess the quality of LLM-generated responses in real-world NLP tasks?
  • RQ4What is the end-to-end latency of PoQ consensus, and how does it compare to existing zero-knowledge proof schemes like ZKML and OPML?
  • RQ5How does the PoQ mechanism ensure economic rationality and discourage dishonest or lazy behavior among validators?

Key findings

  • PoQ consensus is generated in approximately 50 milliseconds, 1,000 times faster than existing schemes like ZKML and OPML.
  • The average cross-encoder inference time per validator is around 30 milliseconds, with total consensus latency remaining stable even when the number of validators increases from 1 to 30.
  • The protocol demonstrates robustness against rational but dishonest participants, as suboptimal behavior leads to reduced rewards compared to high-quality performance.
  • Cross-encoder quality scores show strong correlation with human evaluation, especially on smaller models like Mistral-7b and Mixtral-8x7b, indicating reliable quality detection.
  • The computational overhead for quality validation is minimal, allowing full validation on a single CPU within one second, making the system practical for real-world deployment.
  • PQML is the only practical solution for NLP-based LLM inference on blockchains to date, as ZKML and OPML remain infeasible for large models due to excessive validation times.
Figure 2: In this example, three assessors are responsible for generating the quality scores, and $k=2$ expected quality scores are needed for quality consensus. Assessor 1 and Assessor 2 publish their encrypted scores in a mutable and shared storage system. When $k=2$ scores are available, successf
Figure 2: In this example, three assessors are responsible for generating the quality scores, and $k=2$ expected quality scores are needed for quality consensus. Assessor 1 and Assessor 2 publish their encrypted scores in a mutable and shared storage system. When $k=2$ scores are available, successf

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.