---
eip: 7911
label: EIP-7911
title: Scaling Ethereum with a Perceptron Tree ZKP
status: Draft
type: Standards Track
category: Core
created: 2025-03-19
official: https://eips.ethereum.org/EIPS/eip-7911
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7911.md
canonical: https://eips.huatuo.xyz/eip-7911/
lang: en
tldr: "A research-stage proposal to group similar transactions with a \"perceptron tree\" classifier and prove their classification and similarity in one zero-knowledge proof, aiming to cut verification cost."
tags: [zkp, scaling, privacy, machine-learning, research]
---

# EIP-7911: Scaling Ethereum with a Perceptron Tree ZKP

> Improving Ethereum scalability and privacy using Perceptron Trees to compress transaction data via ZKP.

**TL;DR:** A research-stage proposal to group similar transactions with a "perceptron tree" classifier and prove their classification and similarity in one zero-knowledge proof, aiming to cut verification cost.

## What problem does it solve?

ZK-rollups already batch many transactions into a single proof, but the authors argue that today's batching treats each transaction independently and ignores relationships between them. Privacy systems likewise tend to generate one proof per transaction.

The proposal suggests exploiting *similarity* between transactions: if a set of transactions can be organised by a learned structure, a single proof could attest to how they are classified and how alike they are, potentially shrinking on-chain verification work and gas.

## How it works

1. **Build a perceptron tree.** A dataset of transactions is split recursively. Each node is a perceptron, a linear classifier `step(W·x + θ)` that sends a transaction left or right. Splitting stops when a node is "pure" or a maximum depth is reached.
2. **Measure similarity.** Two measures are defined:
   - *Path similarity* `d / D`: the length of the path two transactions share in the tree, divided by the tree's maximum depth.
   - *Cosine similarity* between the transactions' feature vectors.
3. **Commit to the tree.** Each node gets a hash commitment `Cₙ = H(Wₙ, bₙ, C_left, C_right)`, Merkle-style, ending in a root commitment.
4. **Prove.** The proof contains the root commitment, a proof of a transaction's classification path, and a proof that the similarity of two transactions exceeds a threshold.
5. **Verify on chain.** A smart contract checks that the root matches a pre-registered tree root, that the path is a correct classification, and that the similarity threshold is met.

The authors state it operates at the smart-contract level and needs no change to the Ethereum protocol or consensus.

## Sample code

Illustrative pseudocode of the node commitment and path similarity (not from a reference implementation):

```python
import hashlib

def step(z): return 1 if z >= 0 else 0

def classify(node, x):
    return step(sum(w * xi for w, xi in zip(node.W, x)) + node.b)

def commit(node):
    if node is None:
        return b"\x00" * 32
    data = repr((node.W, node.b)).encode() + commit(node.left) + commit(node.right)
    return hashlib.sha256(data).digest()

def path_similarity(shared_depth, max_depth):
    return shared_depth / max_depth   # e.g. 1/3 if only the root is shared in a depth-3 tree
```

## Things to know

- **Status: Draft.** Although filed in the Core category, the text itself says it needs no protocol change.
- The spec is high-level. It does not define a concrete proof system, circuit, feature encoding for transactions, or how a similarity proof translates into processing multiple transactions more cheaply. Treat it as a research idea rather than an implementable standard.
- No gas or performance numbers are given, so claims of reduced fees are not quantified.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7911
