Darwinchain
  • Learn
    • Overview
    • About Darwin
      • What is Darwin
      • Darwin's Design
    • SoulLink
      • Unified API
      • Language Detector
      • Request Router
    • Darwin Technologies
      • Methodology
      • Architecture
      • Darwin AI Compute Network
        • Game-Theoretic Mixer
        • Darwin SPECTER
        • AI Node
    • Tokenomics
    • Roadmap
  • For developers
    • Darwin Quickstart
  • FOR USERS
    • Connect Wallet
    • Faucet
  • Others
    • FAQ
Powered by GitBook
On this page
  • Key Features
  • Game-Theoretic Mixer Validation Protocol
  • Test Passing Probability Calculation
  1. Learn
  2. Darwin Technologies
  3. Darwin AI Compute Network

Game-Theoretic Mixer

PreviousDarwin AI Compute NetworkNextDarwin SPECTER

Last updated 8 months ago

The Query Mixer is a key part of the Darwin AI blockchain platform, designed to ensure the authenticity and integrity of AI inferences across distributed networks. It tackles inference validation with Probabilistic Query Mixing, blending real user queries with special challenge queries to ensure nodes process requests honestly. Using our proprietary LLM instructional fingerprint, the system outputs consistent results for specific queries, leveraging a game-theoretic approach to prevent cheating and guarantee honest behavior by inference nodes.

Key Features

  • Real-Time Integrity Assurance: The Query Mixer operates in real-time, ensuring that AI inferences across distributed networks are validated without delay. By combining mixing with slashing, the system verifies the authenticity of each inference, guaranteeing swift and accurate responses.

  • Collusion Prevention with Minimal Overhead: The system's advanced Probabilistic Query Mixing technique reroutes queries through multiple nodes and adds mixing layers, all while maintaining minimal overhead. Each step is transparently recorded on-chain, deterring nodes from dishonest behavior because they risk losing their staked crypto assets.

  • Fastest Verifiable AI Compute: Leveraging our proprietary LLM instructional fingerprint, the Query Mixer delivers the fastest verifiable AI compute, including inference and fine-tuning.

Game-Theoretic Mixer Validation Protocol

  1. Pre-computation: Special challenge queries are created using known responses to form a deterministic model fingerprint.

  2. Query Submission: Users send their queries to the Mixer, which initiates the mixing process.

  3. Query Distribution:

    • Queries, including user and challenge queries, circulate within the Mixer network for node signatures.

    • Challenge queries are crafted using instructional fingerprinting, which involves fine-tuning a Language Model (LLM) on a meticulously curated dataset of instruction pairs (xi,yi)(x_i, y_i)(xi​,yi​).

    • The model is engineered to respond to a query xix_ixi​ with a predefined answer yiy_iyi​, creating a set of query-answer pairs that serve as the model’s fingerprints.

    • These fingerprints are used as challenges within the query batches sent to inference nodes, serving as benchmarks to validate the node's output.

  4. Probabilistic Mixing: Real user queries are mixed with challenge queries, creating batches where the origin of each query (user or challenge) is indiscernible to the inference nodes.

    Mixer nodes combine user and challenge queries and forward the batch to the Inference Node.

  5. Model Execution: The Inference Node processes all queries in the batch, treating them as indistinguishable.

  6. Verification: Mixers verify responses to challenge queries, recording the query paths on the blockchain for transparency and ensuring nodes' honest performance.

Test Passing Probability Calculation

This section explains calculating the probability of a node passing a series of challenges within an epoch using a Poisson distribution. Given a fixed challenge emission rate, it factors in challenge difficulty and the threshold for node slashing.

Poisson Distribution

The number of challenges a node receives in an epoch is modeled using a Poisson distribution:

Pois(λ,k)=λke−λk!Pois(\lambda, k) = \frac{\lambda^k e^{-\lambda}}{k!}Pois(λ,k)=k!λke−λ​

Where:

  • λ\lambdaλ is the fixed challenge emission rate, representing the average number of challenges a node receives in an epoch.

  • kkk is the number of challenges.

Single Challenge Pass Probability

The probability that a cheating node passes a single challenge is denoted by τ\tauτ. For example, for fingerprinting, this probability will be close to 0.

Threshold for Slashing

The threshold α\alphaα is the number of failed challenges after which a node will be slashed.

Test Passing Probability Calculation

The probability PPP that a node passes the challenges is computed using the following formula:

P=∑k<αλke−λk!+∑k≥α∑j<αλke−λk!(kj)(1−τ)jτk−jP = \sum_{k < \alpha} \frac{\lambda^k e^{-\lambda}}{k!} + \sum_{k \geq \alpha} \sum_{j < \alpha} \frac{\lambda^k e^{-\lambda}}{k!} \binom{k}{j} (1-\tau)^j \tau^{k-j}P=k<α∑​k!λke−λ​+k≥α∑​j<α∑​k!λke−λ​(jk​)(1−τ)jτk−j

Where:

  • ∑k<αλke−λk!\sum_{k < \alpha} \frac{\lambda^k e^{-\lambda}}{k!}∑k<α​k!λke−λ​ is the probability that the node receives fewer than α\alphaα challenges.

  • ∑k≥α∑j<αλke−λk!(kj)(1−τ)jÏ„k−j\sum_{k \geq \alpha} \sum_{j < \alpha} \frac{\lambda^k e^{-\lambda}}{k!} \binom{k}{j} (1-\tau)^j \tau^{k-j}∑k≥α​∑j<α​k!λke−λ​(jk​)(1−τ)jÏ„k−j is the probability that the node receives α\alphaα or more challenges but passes enough of them to avoid being slashed.

Variables

Variable
Description

The fixed challenge emission rate.

The probability that a cheating node passes a single challenge.

The threshold number of failed challenges after which a node will be slashed.

The number of challenges received.

The number of failed challenges.

The overall probability that a node passes the series of challenges within the epoch.

Example Calculation

For a given λ=5\lambda = 5λ=5, τ=0.1\tau = 0.1τ=0.1, and α=3\alpha = 3α=3:

P=∑k<35ke−5k!+∑k≥3∑j<35ke−5k!(kj)(1−0.1)j0.1k−jP = \sum_{k < 3} \frac{5^k e^{-5}}{k!} + \sum_{k \geq 3} \sum_{j < 3} \frac{5^k e^{-5}}{k!} \binom{k}{j} (1-0.1)^j 0.1^{k-j}P=k<3∑​k!5ke−5​+k≥3∑​j<3∑​k!5ke−5​(jk​)(1−0.1)j0.1k−j

This formula can be implemented in a programming environment to compute the exact probability PPP.

Note:

  • This calculation is essential for determining the reliability and trustworthiness of nodes in a decentralized network.

  • Accurate computation of PPP helps in setting appropriate thresholds and emission rates to maintain network integrity.

Graphic illustrations

λ\lambdaλ
τ\tauτ
α\alphaα
kkk
jjj
PPP
Game-Theoretic Mixer Flow