پرش به محتوای اصلی

Proof of Sampling Protocol: Incentivizing Honesty and Penalizing Dishonesty in Decentralized AI Inference

· 5 دقیقه خواندن
Lark Birdy
Chief Bird Officer

In decentralized AI, ensuring the integrity and reliability of GPU providers is crucial. The Proof of Sampling (PoSP) protocol, as outlined in recent research from Holistic AI, provides a sophisticated mechanism to incentivize good actors while slashing bad ones. Let's see how this protocol works, its economic incentives, penalties, and its application to decentralized AI inference.

Incentives for Honest Behavior

Economic Rewards

At the heart of the PoSP protocol are economic incentives designed to encourage honest participation. Nodes, acting as asserters and validators, are rewarded based on their contributions:

  • Asserters: Receive a reward (RA) if their computed output is correct and unchallenged.
  • Validators: Share the reward (RV/n) if their results align with the asserter's and are verified as correct.

Unique Nash Equilibrium

The PoSP protocol is designed to reach a unique Nash Equilibrium in pure strategies, where all nodes are motivated to act honestly. By aligning individual profit with system security, the protocol ensures that honesty is the most profitable strategy for participants.

Penalties for Dishonest Behavior

Slashing Mechanism

To deter dishonest behavior, the PoSP protocol employs a slashing mechanism. If an asserter or validator is caught being dishonest, they face significant economic penalties (S). This ensures that the cost of dishonesty far outweighs any potential short-term gains.

Challenge Mechanism

Random challenges further secure the system. With a predetermined probability (p), the protocol triggers a challenge where multiple validators re-compute the asserter's output. If discrepancies are found, dishonest actors are penalized. This random selection process makes it difficult for bad actors to collude and cheat undetected.

Steps of the PoSP Protocol

  1. Asserter Selection: A node is randomly selected to act as an asserter, computing and outputting a value.

  2. Challenge Probability:

    The system may trigger a challenge based on a predetermined probability.

    • No Challenge: The asserter is rewarded if no challenge is triggered.
    • Challenge Triggered: A set number (n) of validators are randomly selected to verify the asserter's output.
  3. Validation:

    Each validator independently computes the result and compares it with the asserter's output.

    • Match: If all results match, both the asserter and validators are rewarded.
    • Mismatch: An arbitration process determines the honesty of the asserter and validators.
  4. Penalties: Dishonest nodes are penalized, while honest validators receive their reward share.

SpML

The spML (sampling-based Machine Learning) protocol is an implementation of the Proof of Sampling (PoSP) protocol within a decentralized AI inference network.

Key Steps

  1. User Input: The user sends their input to a randomly selected server (asserter) along with their digital signature.
  2. Server Output: The server computes the output and sends it back to the user along with a hash of the result.
  3. Challenge Mechanism:
    • With a predetermined probability (p), the system triggers a challenge where another server (validator) is randomly selected to verify the result.
    • If no challenge is triggered, the asserter receives a reward (R) and the process concludes.
  4. Verification:
    • If a challenge is triggered, the user sends the same input to the validator.
    • The validator computes the result and sends it back to the user along with a hash.
  5. Comparison:
    • The user compares the hashes of the asserter's and validator's outputs.
    • If the hashes match, both the asserter and validator are rewarded, and the user receives a discount on the base fee.
    • If the hashes do not match, the user broadcasts both hashes to the network.
  6. Arbitration:
    • The network votes to determine the honesty of the asserter and validator based on the discrepancies.
    • Honest nodes are rewarded, while dishonest ones are penalized (slashed).

Key Components and Mechanisms

  • Deterministic ML Execution: Uses fixed-point arithmetic and software-based floating-point libraries to ensure consistent, reproducible results.
  • Stateless Design: Treats each query as independent, maintaining statelessness throughout the ML process.
  • Permissionless Participation: Allows anyone to join the network and contribute by running an AI server.
  • Off-chain Operations: AI inferences are computed off-chain to reduce the load on the blockchain, with results and digital signatures relayed directly to users.
  • On-chain Operations: Critical functions, such as balance calculations and challenge mechanisms, are handled on-chain to ensure transparency and security.

Advantages of spML

  • High Security: Achieves security through economic incentives, ensuring nodes act honestly due to the potential penalties for dishonesty.
  • Low Computational Overhead: Validators only need to compare hashes in most cases, reducing computational load during verification.
  • Scalability: Can handle extensive network activity without significant performance degradation.
  • Simplicity: Maintains simplicity in implementation, enhancing ease of integration and maintenance.

Comparison with Other Protocols

  • Optimistic Fraud Proof (opML):
    • Relies on economic disincentives for fraudulent behavior and a dispute resolution mechanism.
    • Vulnerable to fraudulent activity if not enough validators are honest.
  • Zero Knowledge Proof (zkML):
    • Ensures high security through cryptographic proofs.
    • Faces challenges in scalability and efficiency due to high computational overhead.
  • spML:
    • Combines high security through economic incentives, low computational overhead, and high scalability.
    • Simplifies the verification process by focusing on hash comparisons, reducing the need for complex computations during challenges.

Summary

The Proof of Sampling (PoSP) protocol effectively balances the need to incentivize good actors and deter bad ones, ensuring the overall security and reliability of decentralized systems. By combining economic rewards with stringent penalties, PoSP fosters an environment where honest behavior is not only encouraged but necessary for success. As decentralized AI continues to grow, protocols like PoSP will be essential in maintaining the integrity and trustworthiness of these advanced systems.