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.2.tar.gz (9.3 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.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ceflobhash-0.1.2.tar.gz
  • Upload date:
  • Size: 9.3 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.2.tar.gz
Algorithm Hash digest
SHA256 e6e5dfe641e6b79eec97197ae150d87c68f2b252db3e03b92282c72a0ed0101e
MD5 be33e189568f62ea55a5b9ee72d714fa
BLAKE2b-256 7b5a793470374ba05dd60393961df0d4573c48134702e21bac2bdd6788cbea15

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ceflobhash-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 876b923528d9ad91b6b5257bf772061b18fd7e54dd2b0269518887fa9a47287e
MD5 6b6c82bae3ba3789550442d304377655
BLAKE2b-256 48650e5d679c7a180ce55935c01a4cb2bf64c9e70a2ae7733e9f475d61c640fd

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