AI News AI资讯 4d ago Updated 4d ago 更新于 4天前 42

Show HN: AI block chain running on GPT2 展示 HN:在 GPT2 上运行的 AI 区块链

GLYPH introduces a blockchain where Proof-of-Work is replaced by neural network inference, specifically running a pinned open-weights transformer on salted prompts. The protocol achieves cross-hardware determinism via "Glyph Compression," which extracts attention distributions, quantizes them using integer-only arithmetic, and hashes the result to form a block fingerprint. Protocol v4 eliminates floating-point drift by enforcing exact integer arithmetic for all consensus operations, ensuring bit GLYPH 提出了一种基于神经网络推理的区块链共识机制,将“工作量证明”替换为运行固定权重的 Transformer 模型。 协议 V4 采用纯整数推理引擎,通过定点激活和整数运算实现了跨硬件平台(GPU/CPU)的比特级确定性。 矿工提交提示词而非分数,验证者重新计算注意力分布指纹并进行哈希比对,确保验证成本仅等于一次推理。 系统支持从 GPT-2 到 Qwen2.5-3B 等多种模型,并通过严格的模型锁定和注册表机制防止 Sybil 攻击和模型投毒。

65
Hot 热度
60
Quality 质量
55
Impact 影响力

Analysis 深度分析

TL;DR

  • GLYPH introduces a blockchain where Proof-of-Work is replaced by neural network inference, specifically running a pinned open-weights transformer on salted prompts.
  • The protocol achieves cross-hardware determinism via "Glyph Compression," which extracts attention distributions, quantizes them using integer-only arithmetic, and hashes the result to form a block fingerprint.
  • Protocol v4 eliminates floating-point drift by enforcing exact integer arithmetic for all consensus operations, ensuring bit-identical verification across CPUs and GPUs.
  • Security mechanisms include dynamic salting based on previous block hashes to prevent precomputation, strict model pinning to detect unauthorized weights, and a vetted registry to prevent Sybil attacks.
  • The network operates with a 20-second block target, an initial reward of 7.00 GLY, and annual halvings, accumulating general-purpose AI hardware as its mining base.

Why It Matters

This project represents a significant experimental shift in consensus mechanisms by directly tying blockchain security to the computational cost of AI inference rather than raw hashing power. For AI researchers, it offers a novel framework for verifying model outputs and ensuring integrity in distributed inference networks. For the broader industry, it highlights potential intersections between decentralized ledger technology and large language model deployment, particularly regarding deterministic verification and hardware standardization.

Technical Details

  • Proof-of-Work Mechanism: Miners execute a pinned transformer model on a salted prompt. The attention distributions from six specific heads are compressed into a discrete fingerprint using a canonicalization algorithm called "glyph compression."
  • Deterministic Integer Engine (v4): To solve cross-hardware non-determinism inherent in floating-point math, the protocol uses an integer-only inference engine. This includes fixed-point activations, integer LayerNorm/Softmax/GELU, and matmuls where float64 partial sums are provably exact integers, ensuring identical hashes on any chip.
  • Glyph Compression Algorithm: The process involves extracting attention rows, applying largest-remainder apportionment on a fixed grid (GRID=100), and running a "glyph cascade" (median typing, descending pairing, palindrome handling) before hashing with SHA-256.
  • Security & Verification: Verification requires exactly one inference pass. Miners submit prompts, not scores, allowing verifiers to recompute proofs. Model pinning is enforced; distillation or weight changes result in hash mismatches. A vetted registry prevents sybil poisoning via low-parameter random models.
  • Network Parameters: Block reward starts at 7.00 GLY with a 20-second target. Halving occurs every 1,500,000 blocks. The system supports P2P syncing and gossip protocols for chain convergence.

Industry Insight

  • Hardware Standardization Implications: The reliance on deterministic inference suggests that future decentralized AI networks may require standardized hardware or software environments to ensure fair consensus, potentially influencing how AI compute resources are allocated and verified.
  • New Attack Vectors in AI Consensus: The introduction of AI-based PoW creates unique attack surfaces, such as lookup-table attacks or model poisoning. Practitioners must develop robust vetting processes for model weights and attention mechanisms to maintain network integrity.
  • Energy and Efficiency Trade-offs: While replacing ASICs with general-purpose AI hardware democratizes mining, the energy cost of running large transformers may be significantly higher than traditional hashing. This raises questions about the long-term sustainability and environmental impact of AI-driven consensus mechanisms.

TL;DR

  • GLYPH 提出了一种基于神经网络推理的区块链共识机制,将“工作量证明”替换为运行固定权重的 Transformer 模型。
  • 协议 V4 采用纯整数推理引擎,通过定点激活和整数运算实现了跨硬件平台(GPU/CPU)的比特级确定性。
  • 矿工提交提示词而非分数,验证者重新计算注意力分布指纹并进行哈希比对,确保验证成本仅等于一次推理。
  • 系统支持从 GPT-2 到 Qwen2.5-3B 等多种模型,并通过严格的模型锁定和注册表机制防止 Sybil 攻击和模型投毒。

为什么值得看

该项目探索了 AI 算力与区块链共识的结合,试图利用通用 AI 硬件作为挖矿基础,为去中心化网络提供新的经济激励模型。其强调的“数学确定性”而非经验确定性,解决了分布式 AI 系统中常见的跨硬件精度漂移问题,对构建可验证的 AI 基础设施具有参考意义。

技术解析

  • 共识机制:Proof-of-Inference。矿工在加盐提示词上运行固定的开源 Transformer 模型,提取注意力分布,通过“Glyph 压缩算法”将其转换为离散指纹,并与难度目标进行 SHA-256 哈希比对。
  • 跨硬件确定性 (V4):摒弃了浮点运算,采用纯整数推理引擎(src/int_infer.py)。所有共识操作(LayerNorm, Softmax, GELU, MatMul)均使用精确整数算术,确保在不同芯片上产生完全一致的哈希值,解决了 V3 版本中因量化边界翻转导致的验证失败问题。
  • 抗攻击设计:引入 Salt 机制(前一个区块哈希与矿工地址的哈希),防止预计算和证明窃取。模型必须来自受信任注册表,且经过严格锁定,实验显示蒸馏模型(DistilGPT2)无法匹配原始模型的哈希,证明了模型锁定的有效性。
  • 性能与扩展性:支持 CPU 和 GPU 运行,测试涵盖 NVIDIA GTX 1650 至 Intel i3 等不同环境。模型规模越大,噪声鲁棒性越强(Qwen2.5-1.5B 在低噪声下稳定性优于 GPT-2)。

行业启示

  • AI 算力资产化新路径:该方案展示了如何将 AI 推理过程转化为可验证的工作量证明,可能为闲置的 AI 硬件提供去中心化的经济用途,推动 AI 基础设施的共享经济模式。
  • 确定性与标准化挑战:虽然整数运算解决了部分漂移问题,但在大规模部署中,如何平衡模型复杂性、推理速度与共识效率仍是关键挑战;同时,强制使用固定权重模型可能限制算法创新的灵活性。
  • 安全范式转移:从依赖硬件一致性转向依赖数学确定性(整数运算),为分布式系统中的状态同步提供了新思路,但也要求更严格的模型准入审核以防止针对模型结构的特定攻击。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

GPT GPT Open Source 开源 LLM 大模型 Research 科学研究