Settings

Theme

Show HN: Implementation and ablation of the Hierarchical Reasoning Model (HRM)

github.com

2 points by krychu 3 months ago · 0 comments · 1 min read

Reader

I implemented the Hierarchical Reasoning Model (HRM) in PyTorch and applied it to a simple pathfinding task.

HRM is inspired by multi-timescale processing in the brain: a slower H module for abstract planning and a faster L module for low-level computation. Both modules are based on self-attention and attempt to model reasoning in latent space.

The repo includes: a) the implementation, b) demo that generates animated GIFs where you can see the model refine its solution step by step, c) results of a small ablation study on what drives performance.

The biggest driver (both accuracy and refinement ability) is *training with more segments* (outer-loop refinement), not the H/L two-timescale split. (This lines up with the ARC Prize team's analysis). This is of course a limited study on a relatively simple task, but I thought the results might be interesting to others.

Repo: https://github.com/krychu/hrm

Curious to hear thoughts - iterative refinement isn't new, but I wonder if the "loop-in-a-loop" forward pass, or varied frequencies, might hint at a useful direction for reasoning in latent space (?)

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection