{"eip":7911,"title":"Scaling Ethereum with a Perceptron Tree ZKP","description":"Improving Ethereum scalability and privacy using Perceptron Trees to compress transaction data via ZKP.","authors":["Ryo Ha (@sopia19910) \u003csopia19910@gmail.com\u003e","Khajiev Nizomjon (@khajievN) \u003cnizom7812@gmail.com\u003e"],"status":"Draft","type":"Standards Track","category":"Core","created":"2025-03-19","discussionsTo":"https://ethereum-magicians.org/t/improving-blockchain-scalability-using-a-perceptron-tree-based-zero-knowledge-proof-model/23196","repo":"EIPs","label":"EIP-7911","officialUrl":"https://eips.ethereum.org/EIPS/eip-7911","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7911.md","url":"https://eips.huatuo.xyz/eip-7911/","tldr":{"en":"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.","ja":"「パーセプトロンツリー」分類器で似たトランザクションをグループ化し、その分類と類似度を 1 つのゼロ知識証明で証明して、検証コストの削減を狙う、研究段階の提案。","ko":"\"퍼셉트론 트리\" 분류기로 비슷한 트랜잭션을 묶고, 그 분류와 유사도를 하나의 영지식 증명으로 증명해 검증 비용을 줄이려는 연구 단계의 제안.","zh":"一项处于研究阶段的提案：用\"感知机树\"分类器将相似的交易分组，并在一个零知识证明中证明它们的分类和相似度，以降低验证成本。"},"tags":["zkp","scaling","privacy","machine-learning","research"],"explainers":{"en":{"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"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7911/","markdown":"## What problem does it solve?\n\nZK-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.\n\nThe 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.\n\n## How it works\n\n1. **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.\n2. **Measure similarity.** Two measures are defined:\n   - *Path similarity* `d / D`: the length of the path two transactions share in the tree, divided by the tree's maximum depth.\n   - *Cosine similarity* between the transactions' feature vectors.\n3. **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.\n4. **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.\n5. **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.\n\nThe authors state it operates at the smart-contract level and needs no change to the Ethereum protocol or consensus.\n\n## Sample code\n\nIllustrative pseudocode of the node commitment and path similarity (not from a reference implementation):\n\n```python\nimport hashlib\n\ndef step(z): return 1 if z \u003e= 0 else 0\n\ndef classify(node, x):\n    return step(sum(w * xi for w, xi in zip(node.W, x)) + node.b)\n\ndef commit(node):\n    if node is None:\n        return b\"\\x00\" * 32\n    data = repr((node.W, node.b)).encode() + commit(node.left) + commit(node.right)\n    return hashlib.sha256(data).digest()\n\ndef path_similarity(shared_depth, max_depth):\n    return shared_depth / max_depth   # e.g. 1/3 if only the root is shared in a depth-3 tree\n```\n\n## Things to know\n\n- **Status: Draft.** Although filed in the Core category, the text itself says it needs no protocol change.\n- 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.\n- No gas or performance numbers are given, so claims of reduced fees are not quantified.\n"},"ja":{"lang":"ja","tldr":"「パーセプトロンツリー」分類器で似たトランザクションをグループ化し、その分類と類似度を 1 つのゼロ知識証明で証明して、検証コストの削減を狙う、研究段階の提案。","tags":["zkp","scaling","privacy","machine-learning","research"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7911/","markdown":"## 何を解決するのか\n\nZK ロールアップはすでに多数のトランザクションを 1 つの証明にまとめていますが、著者らは、現在のバッチ処理は各トランザクションを独立に扱い、それらの間の関係を無視していると主張します。プライバシーシステムも同様に、トランザクションごとに 1 つの証明を生成する傾向があります。\n\nこの提案は、トランザクション間の*類似性*を利用することを提案します。トランザクションの集合を学習された構造で整理できれば、1 つの証明で、それらがどう分類され、どれだけ似ているかを証明でき、オンチェーンの検証作業と gas を削減できる可能性があります。\n\n## 仕組み\n\n1. **パーセプトロンツリーを構築する。** トランザクションのデータセットを再帰的に分割します。各ノードはパーセプトロン、つまりトランザクションを左右に振り分ける線形分類器 `step(W·x + θ)` です。ノードが「純粋」になるか、最大の深さに達すると分割を止めます。\n2. **類似度を測る。** 2 つの指標が定義されています。\n   - *パス類似度* `d / D`: 2 つのトランザクションがツリー内で共有するパスの長さを、ツリーの最大の深さで割ったもの。\n   - トランザクションの特徴ベクトル間の*コサイン類似度*。\n3. **ツリーにコミットする。** 各ノードに、Merkle 方式のハッシュコミットメント `Cₙ = H(Wₙ, bₙ, C_left, C_right)` を与え、最終的にルートのコミットメントに至ります。\n4. **証明する。** 証明には、ルートのコミットメント、トランザクションの分類パスの証明、2 つのトランザクションの類似度がしきい値を超えていることの証明が含まれます。\n5. **オンチェーンで検証する。** スマートコントラクトが、ルートが事前に登録されたツリーのルートと一致すること、パスが正しい分類であること、類似度のしきい値を満たしていることを確認します。\n\n著者らは、これがスマートコントラクトのレベルで動作し、Ethereum のプロトコルやコンセンサスの変更を必要としないと述べています。\n\n## サンプルコード\n\nノードのコミットメントとパス類似度の説明用の擬似コード（リファレンス実装由来ではありません）:\n\n```python\nimport hashlib\n\ndef step(z): return 1 if z \u003e= 0 else 0\n\ndef classify(node, x):\n    return step(sum(w * xi for w, xi in zip(node.W, x)) + node.b)\n\ndef commit(node):\n    if node is None:\n        return b\"\\x00\" * 32\n    data = repr((node.W, node.b)).encode() + commit(node.left) + commit(node.right)\n    return hashlib.sha256(data).digest()\n\ndef path_similarity(shared_depth, max_depth):\n    return shared_depth / max_depth   # e.g. 1/3 if only the root is shared in a depth-3 tree\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** Core カテゴリで提出されていますが、本文自体はプロトコルの変更を必要としないと述べています。\n- 仕様は高レベルのものです。具体的な証明システム、回路、トランザクションの特徴エンコーディング、類似度の証明が複数のトランザクションをより安価に処理することにどうつながるかは定義されていません。実装可能な標準というより、研究上のアイデアとして扱ってください。\n- gas や性能の数値は示されていないため、手数料が減るという主張は定量化されていません。\n"},"ko":{"lang":"ko","tldr":"\"퍼셉트론 트리\" 분류기로 비슷한 트랜잭션을 묶고, 그 분류와 유사도를 하나의 영지식 증명으로 증명해 검증 비용을 줄이려는 연구 단계의 제안.","tags":["zkp","scaling","privacy","machine-learning","research"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7911/","markdown":"## 어떤 문제를 해결하나요?\n\nZK 롤업은 이미 많은 트랜잭션을 하나의 증명으로 묶고 있지만, 저자들은 오늘날의 배치 처리가 각 트랜잭션을 독립적으로 다루고 트랜잭션 사이의 관계를 무시한다고 주장합니다. 프라이버시 시스템도 마찬가지로 트랜잭션마다 증명을 하나씩 생성하는 경향이 있습니다.\n\n이 제안은 트랜잭션 사이의 *유사성*을 활용하자고 제안합니다. 트랜잭션 집합을 학습된 구조로 정리할 수 있다면, 하나의 증명으로 그것들이 어떻게 분류되고 얼마나 비슷한지 증명할 수 있어 온체인 검증 작업과 gas를 줄일 가능성이 있습니다.\n\n## 어떻게 동작하나요?\n\n1. **퍼셉트론 트리 만들기.** 트랜잭션 데이터셋을 재귀적으로 나눕니다. 각 노드는 퍼셉트론, 즉 트랜잭션을 왼쪽이나 오른쪽으로 보내는 선형 분류기 `step(W·x + θ)`입니다. 노드가 \"순수\"해지거나 최대 깊이에 도달하면 분할을 멈춥니다.\n2. **유사도 측정.** 두 가지 척도가 정의되어 있습니다.\n   - *경로 유사도* `d / D`: 두 트랜잭션이 트리에서 공유하는 경로의 길이를 트리의 최대 깊이로 나눈 값.\n   - 트랜잭션 특징 벡터 사이의 *코사인 유사도*.\n3. **트리에 커밋.** 각 노드는 머클 방식의 해시 커밋먼트 `Cₙ = H(Wₙ, bₙ, C_left, C_right)`를 가지며, 마지막에는 루트 커밋먼트로 이어집니다.\n4. **증명.** 증명에는 루트 커밋먼트, 트랜잭션의 분류 경로에 대한 증명, 두 트랜잭션의 유사도가 임계값을 넘는다는 증명이 담깁니다.\n5. **온체인 검증.** 스마트 컨트랙트가 루트가 미리 등록된 트리 루트와 일치하는지, 경로가 올바른 분류인지, 유사도 임계값을 만족하는지 확인합니다.\n\n저자들은 이것이 스마트 컨트랙트 수준에서 동작하며 이더리움 프로토콜이나 합의를 바꿀 필요가 없다고 밝힙니다.\n\n## 샘플 코드\n\n노드 커밋먼트와 경로 유사도를 보여 주는 의사 코드(참조 구현에서 가져온 것이 아닙니다):\n\n```python\nimport hashlib\n\ndef step(z): return 1 if z \u003e= 0 else 0\n\ndef classify(node, x):\n    return step(sum(w * xi for w, xi in zip(node.W, x)) + node.b)\n\ndef commit(node):\n    if node is None:\n        return b\"\\x00\" * 32\n    data = repr((node.W, node.b)).encode() + commit(node.left) + commit(node.right)\n    return hashlib.sha256(data).digest()\n\ndef path_similarity(shared_depth, max_depth):\n    return shared_depth / max_depth   # e.g. 1/3 if only the root is shared in a depth-3 tree\n```\n\n## 알아둘 점\n\n- **상태: Draft.** Core 카테고리로 제출되었지만, 본문 자체는 프로토콜 변경이 필요하지 않다고 말합니다.\n- 스펙은 개괄적입니다. 구체적인 증명 시스템, 회로, 트랜잭션의 특징 인코딩, 유사도 증명이 여러 트랜잭션을 더 저렴하게 처리하는 것으로 어떻게 이어지는지는 정의하지 않습니다. 구현 가능한 표준이라기보다 연구 아이디어로 보세요.\n- gas나 성능 수치가 제시되지 않았으므로, 수수료가 줄어든다는 주장은 정량화되어 있지 않습니다.\n"},"zh":{"lang":"zh","tldr":"一项处于研究阶段的提案：用\"感知机树\"分类器将相似的交易分组，并在一个零知识证明中证明它们的分类和相似度，以降低验证成本。","tags":["zkp","scaling","privacy","machine-learning","research"],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7911/","markdown":"## 它解决什么问题？\n\nZK rollup 已经把许多交易批量打包进一个证明，但作者认为，如今的批处理把每笔交易当作彼此独立的，忽略了它们之间的关系。隐私系统同样倾向于为每笔交易生成一个证明。\n\n这份提案建议利用交易之间的*相似性*：如果一组交易可以用一个学习得到的结构来组织，那么一个证明就可以证明它们是如何分类的以及彼此有多相似，从而有可能减少链上验证工作量和 gas。\n\n## 它如何运作\n\n1. **构建感知机树。** 对交易数据集进行递归划分。每个节点是一个感知机，即把交易分到左边或右边的线性分类器 `step(W·x + θ)`。当某个节点\"纯净\"或达到最大深度时，划分停止。\n2. **度量相似度。** 定义了两种度量：\n   - *路径相似度* `d / D`：两笔交易在树中共享路径的长度，除以树的最大深度。\n   - 两笔交易特征向量之间的*余弦相似度*。\n3. **对树做承诺。** 每个节点获得一个 Merkle 式的哈希承诺 `Cₙ = H(Wₙ, bₙ, C_left, C_right)`，最终得到一个根承诺。\n4. **证明。** 证明包含根承诺、某笔交易的分类路径证明，以及两笔交易的相似度超过阈值的证明。\n5. **链上验证。** 智能合约检查根是否与预先登记的树根匹配、路径是否是正确的分类，以及相似度阈值是否满足。\n\n作者表示，它在智能合约层面运行，不需要改动以太坊协议或共识。\n\n## 示例代码\n\n节点承诺和路径相似度的示意性伪代码（并非来自参考实现）：\n\n```python\nimport hashlib\n\ndef step(z): return 1 if z \u003e= 0 else 0\n\ndef classify(node, x):\n    return step(sum(w * xi for w, xi in zip(node.W, x)) + node.b)\n\ndef commit(node):\n    if node is None:\n        return b\"\\x00\" * 32\n    data = repr((node.W, node.b)).encode() + commit(node.left) + commit(node.right)\n    return hashlib.sha256(data).digest()\n\ndef path_similarity(shared_depth, max_depth):\n    return shared_depth / max_depth   # e.g. 1/3 if only the root is shared in a depth-3 tree\n```\n\n## 需要注意\n\n- **状态：Draft。** 虽然归在 Core 类别下，但文本本身表示不需要修改协议。\n- 该规范比较宏观。它没有定义具体的证明系统、电路、交易的特征编码，也没有说明相似度证明如何转化为更廉价地处理多笔交易。请把它当作一个研究想法，而不是可实现的标准。\n- 文中没有给出 gas 或性能数据，因此关于降低费用的说法并未量化。\n"}}}
