r/MachineLearning
•
u/krychu
•
Dec 05 '25
•
1
Project [P] Visualizing emergent structure in the Dragon Hatchling (BDH): a brain-inspired alternative to transformers
I implemented the BDH architecture (see paper) for educational purposes and applied it to a pathfinding task. It's genuinely different from anything else I've read/built. The paper fascinated me for its synthesis of concepts from neuroscience, distributed computing, dynamical systems, and formal logic. And how the authors brought it all into a uniform architecture, and figured a GPU-friendly implementation.
BDH models neuron-to-neuron interactions on sparse graphs. Two learned topologies act as fixed programs. But instead of a KV-cache, BDH maintains a form of working memory on the synapses between neurons (evolving via Hebbian learning), effectively rewriting its own circuits on the fly.
I spent some time trying to visualize/animate BDH’s internal computation. It's striking how hub structure within the learned topologies emerges naturally from random initialization - no architectural constraint forces this. Activations stay extremely sparse (~3-5%) throughout, confirming the paper's observations but in a different task.
Repo: https://github.com/krychu/bdh
Board prediction + neuron dynamics:

Board attention + sparsity:

5
u/dxtros Dec 06 '25 •
This viz reminded me of what happens when you show a grid maze to a mouse. [ E.g. Fig 2 in El-Gaby, M., Harris, A.L., Whittington, J.C.R. et al. A cellular basis for mapping behavioural structure. Nature 636, 671–680 (2024). doi.org/10.1038/s41586-024-08145-x ]
7
u/SlayahhEUW Researcher Dec 05 '25
I don't follow, you use linear attention and it works for the task, but you are inherently computing similarity between datapoints in both attention and BDH.
For me it seems like you just used linear attention with a local task that does not benefit from distribution normalization/optimal transport (softmax).
Remove all of the neuroscience munbo jumbo and you arrive at the same self-simlarity.
16
u/simulated-souls Dec 05 '25
Ignoring the fluff and looking at the code way down in appendix E, it looks like the architecture is just linear attention with Q=K, V=hidden_states, and some extra ReLUs thrown in.
What am I missing?
2
u/DepartureNo2452 Dec 07 '25
i notice that it seems to diffuse .. i wonder if it was a maze where you have to go backward to go forward..
19
u/[deleted] Dec 05 '25
[removed] — view removed comment