# Why zk-ML?

Zero-knowledge machine learning is the core technology powering Subnet 2. It enables AI inference to be cryptographically verified, transforming AI from a black box into a provable system.

## The Problem with Unverified AI

When you query an AI model through an API, you receive an output but have no way to verify:

* Was the model you requested actually used?
* Was your input processed correctly?
* Is the output authentic or was it manipulated?
* Did the model run at all, or was the response fabricated?

In low-stakes applications, this doesn't matter. But as AI becomes embedded in high-value operations, autonomous systems, and decentralized protocols, unverified inference becomes a critical vulnerability.

## What Proof-of-Inference Guarantees

### Model Existence

How do you know an AI model exists without having the weights locally? Proof-of-Inference confirms a model exists and was used without disclosing its architecture or parameters.

### Model Execution

The proof guarantees inference was actually performed by an AI model. The output wasn't looked up from a table, copied from another source, or computed through different logic.

### Model Identity

The proof verifies the exact model specified was the one executed. Substituting a different model—even a similar one—produces an invalid proof.

### Tamper Resistance

Any modification to the model after circuit creation invalidates proofs. The circuit is cryptographically bound to the original model weights and architecture.

### Input Integrity

The proof commits to the input data. If inputs were altered before processing, verification fails.

### Output Authenticity

The proof binds the output to the computation. Results cannot be forged or modified after generation.

## Applications

### Autonomous Agents

AI agents operating autonomously need verifiable decision-making. Proof-of-Inference ensures agent actions can be audited and proven to originate from specific models with specific inputs.

### On-Chain AI

Integrating AI into smart contracts and DAOs requires trustless execution. Proof-of-Inference provides publicly verifiable proofs that inference was not tampered with, enabling fair and auditable AI-powered governance.

### Security-Critical Systems

AI in cybersecurity, fraud detection, and access control must be tamper-proof. Proof-of-Inference guarantees models haven't been compromised and outputs can be verified.

### High-Value Decisions

Any AI output that influences significant financial, operational, or safety decisions benefits from cryptographic verification. The cost of proof generation is negligible compared to the cost of undetected manipulation.

### Model Marketplaces

Proof-of-Inference enables verifiable model-as-a-service. Providers can prove they ran the advertised model without exposing weights. Consumers can verify they received genuine inference.

## Bittensor Integration

Bittensor's incentive network creates the economic layer for decentralized zkML. Miners compete to generate proofs efficiently. Validators verify and score performance. The result is a distributed proving cluster where:

* Economic incentives drive optimization of proof generation
* Competition produces smaller, faster proofs over time
* Decentralization eliminates single points of failure
* Open participation enables permissionless innovation

Subnet 2 applies Proof-of-Inference across the network while providing these capabilities to external consumers through validator APIs.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sn2-docs.inferencelabs.com/why-zk-ml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
