Skip to main content

Root-Boolean Dual Node Inteligic — 可验证双节点共识判定 / verifiable dual-node consensus decision structure

Project description

ceflobhash

Connect Everything Forever Low-Bit Hash 连接永恒 · 低比特哈希

Root-Boolean Dual Node Inteligic — 一种可验证的双节点共识判定结构。 A verifiable dual-node consensus decision structure.

无点积、无Softmax、无概率。只有比特和XOR。 No dot product. No softmax. No probability. Just bits and XOR.


🇨🇳 中文说明

这是什么?

ceflobhash 将高维浮点向量(例如LLM的768维嵌入)压缩为紧凑的二进制表示,并通过独立双节点共识进行判定验证。每个判定产生可审计的指纹(SHA-256)。

核心理念

概念 说明
祖布尔双节点 节点A(字符匹配) + 节点B(语义类型匹配),独立判定
可审计指纹 每个决策输出 SHA-256 哈希,可事后重新验证
零概率 所有判定基于确定性门电路逻辑,非概率推理

安装

pip install ceflobhash

核心API

from root_boolean import (
    binarize,           # float向量 → N位二进制向量
    hamming_distance,   # 二进制向量 → 汉明距离
    DualNode,           # 双节点共识 + 审计
)
函数 功能
binarize(vec, bits=256) 浮点向量 → 二进制向量(比特宽度可配)
hamming_distance(a, b) XOR + 位计数
DualNode(anchor_a, anchor_b) 两个独立判定节点

双节点判定示例

from root_boolean import DualNode

node = DualNode(
    anchor_a=([1,0,1,0], (1,0,0,0), 3.0),
    anchor_b=([0,1,0,1], (0,1,0,0), 3.0),
)
v = node.evaluate(([1,0,1,0], (1,0,0,0)))
# → "TRUE" | "FALSE" | "UNKNOWN"
h = node.audit(([1,0,1,0], (1,0,0,0)), v)
# → SHA-256 审计指纹

性能对比

指标 float32 (768维) binary (256位)
内存 3 KB/向量 32 bytes (−99%)
距离计算 点积 (768次乘加) XOR + 位计数 (~10-50×更快)
可验证 ✅ 双节点审计

不是替代注意力机制。而是为检索、缓存、决策验证提供补充。


🇬🇧 English

What is this?

ceflobhash reduces high-dimensional float vectors (e.g. 768d LLM embeddings) to compact binary representations, and verifies decisions via independent dual-node consensus. Every decision produces an auditable SHA-256 fingerprint.

Core Concepts

Concept Description
Dual Node (Zubu'er) Node A (character match) + Node B (semantic type match), independently judge
Auditable Fingerprint Each decision outputs SHA-256, re-verifiable later
Zero Probability All decisions based on deterministic gate logic, not probabilistic

Install

pip install ceflobhash

Core API

from root_boolean import (
    binarize,           # float vector → N-bit binary vector
    hamming_distance,   # binary vector → distance
    DualNode,           # dual-node consensus + audit
)
Function What
binarize(vec, bits=256) Float → binary vector (bit-width configurable)
hamming_distance(a, b) XOR + popcount
DualNode(anchor_a, anchor_b) Dual independent decision nodes

DualNode Example

from root_boolean import DualNode

node = DualNode(
    anchor_a=([1,0,1,0], (1,0,0,0), 3.0),
    anchor_b=([0,1,0,1], (0,1,0,0), 3.0),
)
v = node.evaluate(([1,0,1,0], (1,0,0,0)))
# → "TRUE" | "FALSE" | "UNKNOWN"
h = node.audit(([1,0,1,0], (1,0,0,0)), v)
# → SHA-256 — can be logged, compared, re-verified

Why Binary for LLM?

Metric float32 (768d) binary (256b)
Memory 3 KB per vector 32 bytes (−99%)
Distance dot product (768 mul+add) XOR + popcount (~10-50× faster)
Verifiable No Yes (DualNode audit)

Not a replacement for attention. A complement for lookups, caching, and decision verification.


Status / 状态

v0.1.1 — experimental but functional. MIT License.


CEF Powered — Connect Everything Forever

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ceflobhash-0.1.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ceflobhash-0.1.3-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file ceflobhash-0.1.3.tar.gz.

File metadata

  • Download URL: ceflobhash-0.1.3.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ceflobhash-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c1f141bed47d876cbe32e11d1d2263ccf56f55015d31022820e4a8c5fa4c6203
MD5 9245c9fcadc9fda5679f43ba784c1232
BLAKE2b-256 6be4bf7a38267f61cfde056cbb389293feed4ab1cf80a56a8d703ad087d5153d

See more details on using hashes here.

File details

Details for the file ceflobhash-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ceflobhash-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ceflobhash-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b30d05895eb068a86a63a23d2d6706dd499b1c2e9e51b00aa03ebc2e1e7b4ad4
MD5 2ed49a8e14d143d4a55f62c0b17aae82
BLAKE2b-256 2c0460e7c09053610619927787ae889844c91cbf3da0662fc6d22fd9dcff10b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page