# Game-Theoretic Mixer

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

**Pre-computation**: Special challenge queries are created using known responses to form a deterministic model fingerprint.**Query Submission**: Users send their queries to the Mixer, which initiates the mixing process.**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 $(x_i, y_i)$.

The model is engineered to respond to a query $x_i$ with a predefined answer $y_i$, 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.

**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.

**Model Execution**: The Inference Node processes all queries in the batch, treating them as indistinguishable.**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:

Where:

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

$k$ 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 $P$ that a node passes the challenges is computed using the following formula:

Where:

$\sum_{k < \alpha} \frac{\lambda^k e^{-\lambda}}{k!}$ is the probability that the node receives fewer than $\alpha$ challenges.

$\sum_{k \geq \alpha} \sum_{j < \alpha} \frac{\lambda^k e^{-\lambda}}{k!} \binom{k}{j} (1-\tau)^j \tau^{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 |
---|---|

$\lambda$ | The fixed challenge emission rate. |

$\tau$ | The probability that a cheating node passes a single challenge. |

$\alpha$ | The threshold number of failed challenges after which a node will be slashed. |

$k$ | The number of challenges received. |

$j$ | The number of failed challenges. |

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

#### Example Calculation

For a given $\lambda = 5$, $\tau = 0.1$, and $\alpha = 3$:

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

**Note**:

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

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

#### Graphic illustrations

Last updated