bdh README

The project's README from github.com/pathwaycom/bdh. As one markdown file: README.md.

BDH (Dragon Hatchling)

Bridging the Gap Between Transformers and the Brain

BDH (Dragon Hatchling) is a biologically inspired large language model architecture that connects principles of deep learning with the foundations of neuroscience. Developed by researchers at Pathway, BDH provides a theoretical and practical framework for understanding the emergence of reasoning and generalization in artificial systems.

This repository contains the official implementation from the paper:

A. Kosowski, P. Uznański, J. Chorowski, Z. Stamirowska, M. Bartoszkiewicz. The Dragon Hatchling: The Missing Link between the Transformer and Models of the Brain, arXiv (2025).

Overview

BDH represents a scale-free, locally interacting network of neurons capable of intrinsic reasoning dynamics. BDH scales like a Transformer on performance benchmarks—yet retains full interpretability and theoretical grounding in the fine-grained dynamics of neuron interactions.

Key properties:

BDH formalizes a bridge between neural computation and machine-based language understanding. It shows how macro reasoning behavior in large AI models emerges from micro-level neuron dynamics, guided by principles of graph theory and local computation.

Empirically, BDH matches GPT-2–scale Transformers across language and translation tasks at equivalent parameter scales (10M–1B).


Architecture


Relation to Transformers

BDH and the Transformer share attention-inspired computation; however, BDH’s graph-based architecture makes its attention emerge naturally from neuron-level interactions, reflecting attention as seen in biological systems.


Scaling Laws

BDH follows Transformer-like scaling laws, maintaining parameter efficiency while achieving interpretability at any scale.


Latest research update: Sudoku Benchmark

Note: The Sudoku Extreme result refers to Pathway’s internal BDH implementation, not to the current open-source repository. This repository contains the implementation of the baseline variant as described in our public paper and does not reproduce the 97.4% benchmark result out of the box. See the dedicated Extreme Sudoku research blog post for additional benchmark context and the reported results.

On Sudoku Extreme, BDH reaches 97.4% accuracy across roughly 250,000 difficult puzzles, without chain-of-thought, solution backtracking, or external tool use, while leading LLMs struggle to perform on the benchmark at all.

Language is not enough for intelligence. Transformers process information token by token with limited internal state, which makes search-heavy, non-linguistic reasoning tasks like Sudoku awkward. BDH uses a larger latent reasoning space with intrinsic memory that supports learning and adaptation during use.

We believe that the future of AI will belong to systems that can reason natively across domains, that can hold multiple possibilities in a rich latent space, and that can converge on solutions without needing to verbalize every step. BDH is our answer to that challenge. It is designed to be a universal reasoning system that can speak our language without being trapped inside it. And yes, it solves Sudoku.

Read more: Post-transformers: Sudoku Bench

Performance Comparison

Model Sudoku Extreme Accuracy Relative Cost
Pathway BDH 97.4% 10× lower, No chain-of-thought
Leading LLMs (O3-mini, DeepSeek R1, Claude 3.7 8K) ~0% High (chain-of-thought)

Table 1: Performance comparison on extreme Sudoku benchmarks (~250,000 difficult puzzles).
Source: Pathway internal data and https://arxiv.org/pdf/2506.21734 for the Leading LLMs’ accuracy score. Pathway’s approach reflects top-1 accuracy and does not rely on chain-of-thought nor solution backtracking.

Installation and Training

# install dependencies
pip install -r requirements.txt

# train BDH on a toy dataset
python train.py

Learn and Discuss

Community Projects

Acknowledgements

We thank Andrej Karpathy for the nanoGPT code and the tiny Shapespeare dataset used in this demonstration.

BDH research stands at the intersection of AI architecture, biological learning models, and theoretical computer science—an effort to map the equations of reasoning between artificial and biological intelligence.

bdh (pathwaycom/bdh)

Searching Database…

3.6K ·GitHub
这是什么?BDH(Dragon Hatchling,幼龙)是一种受生物学启发的大语言模型架构,它把深度学习与神经科学联系起来,旨在从单个神经元相互作用的层面解释 AI 系统中的推理和泛化能力是如何涌现的。
这是可下载的预训练模型,还是架构的源代码?这是实现论文所述 BDH 架构的官方源代码,不是可下载的预训练检查点;训练和实验需要你自己进行。
这个仓库能复现那个著名的 97.4% 数独结果吗?不能。已发表的 97.4% Sudoku Extreme 结果来自 Pathway 内部的 BDH 实现;这个开源仓库只包含基线变体,开箱并不能复现该基准成绩。
是什么让 BDH 比标准 Transformer 更可解释?BDH 使用具有兴奋/抑制动力学和赫布式工作记忆的局部相互作用神经元粒子,产生稀疏、正向、单语义的激活,这与标准 Transformer 不透明的注意力模式形成对比。
BDH 的性能与 GPT-2 规模的 Transformer 相比如何?在 10M 到 1B 的同等参数量下,BDH 在语言和翻译任务上的实测表现与 GPT-2 规模的 Transformer 相当,同时遵循相似的缩放定律。
Pathway 为什么构建 BDH,而不是直接用 Transformer?作者认为逐 token 处理的 Transformer 难以胜任数独这类重搜索、非语言的推理任务,因此 BDH 被设计成一个通用推理系统,拥有更大的潜空间和内在记忆,能够跨领域工作而无需思维链。
BDH 有社区分支或移植版本吗?有,社区项目包括 Burn 框架移植版(mosure/burndragonhatchling)、MLX 移植版(severian42/bdh),以及增加动态词表和有状态注意力的分支(adamskrodzki/bdh)。
Creator
pathwaycom
Size
1 MB
Stars
3.6K
Updated
CommitMay 16
Age
1y
Commits · 90 Days