# How learning in monty works (algorithmically)?

**URL:** <https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798>\
**Category:** Monty Code\
**Created:** [September 30, 2025, 9:28am UTC](https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798 "2025-09-30T09:28:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pepedocs](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/pepedocs/32/685_2.png) [@pepedocs](https://forum.thousandbrains.org/u/pepedocs)\
**Post date:** [September 30, 2025, 9:28am UTC](https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798/1 "2025-09-30T09:28:12Z")

</div>

Good day,

Firstly, my apologies if this is already a redundant question.

I would like/need to understand how learning works algorithmically for monty. How?

I’ve watched a couple of videos already and tried to grep in this forum, but unfortunately I couldn’t find any document/article relating to this, nor I understood the algorithm. I do plan to dive into code, but it’s great to have a good background first. I’m referring to the actual learning algorithm, for example as an analogy, in ANNs it’s through backpropagation (gradient descent). In HTM spatial pooler it’s through hebbian learning, permanence values of synapses are updated. For monty, I know it’s using reference frames and specifically object poses and features - how do these achieve learning?

---

<div class="post-metadata">

**Author:** ![HumbleTraveller](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/humbletraveller/32/97_2.png) [@HumbleTraveller](https://forum.thousandbrains.org/u/HumbleTraveller)\
**Post date:** [September 30, 2025, 9:55am UTC](https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798/2 "2025-09-30T09:55:06Z")

</div>

Hey there @pepedocs

It’s been a minute since I studied Monty’s algorithm up close, so my understanding may not be completely up-to-date, but the short answer is that it’s learning uses a mixture of graph construction and probabilistic hypothesis scoring (which is all pretty different from weighting). It encodes how features connect across poses within a reference frame, reinforcing it’s graph structure through a process of repeated prediction/verification.

I don’t want to to dive too far into this without catching myself up on how the architecture has changed in the last 6 months (don’t want to steer you wrong), but the above is a _super_ high level description of what’s going on.

Hopefully a more recent member can step in and correct me if I’m wrong (@AgentRev in particular seems up to speed). Otherwise, I’m sure the Monty dev team will explain. Their community involvement’s always been top tier.

---

<div class="post-metadata">

**Author:** ![pepedocs](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/pepedocs/32/685_2.png) [@pepedocs](https://forum.thousandbrains.org/u/pepedocs)\
**Post date:** [September 30, 2025, 9:58am UTC](https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798/3 "2025-09-30T09:58:19Z")

</div>

Thanks @HumbleTraveller for the insight. For some reason it gave me the impression (after reading your response) that it is doing some kind of Bayesian network inference. But I don’t know yet.

> a process of repeated prediction/verification.

Maybe this is the hebbian-like learning part.

---

<div class="post-metadata">

**Author:** ![HumbleTraveller](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/humbletraveller/32/97_2.png) [@HumbleTraveller](https://forum.thousandbrains.org/u/HumbleTraveller)\
**Post date:** [September 30, 2025, 10:02am UTC](https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798/4 "2025-09-30T10:02:54Z")

</div>

If I’m remembering right, it’s been described as hebbian based learning to me before. So you might not be too far off base in thinking that.

Also, I managed to dig up an older thread talking about something similar. It was focused on something slightly more specific than what I think you’re asking, but even still, it might prove helpful to you.

> [@About compositionality and heterarchy](https://forum.thousandbrains.org/t/about-compositionality-and-heterarchy/442):
>
> Hi, all! Maybe this is a question for the “Monty code” category, but I’m not sure. In the process of heterarchy described in the paper, the “projection” of one LM output to another LM input (like the example of tire and car), what is the “pose” of the “component object” (e.g. tire) ? As the component is “made of” a number of poses, are all of them projected to the upper LM? Or a new pose is defined for the component object? Thanks, Ely

---

<div class="post-metadata">

**Author:** ![vclay](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/vclay/32/4_2.png) [@vclay](https://forum.thousandbrains.org/u/vclay)\
**Post date:** [September 30, 2025, 1:22pm UTC](https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798/5 "2025-09-30T13:22:55Z")

</div>

Hi @pepedocs

I think the best place to start if you want a mathematical description of Monty is this preprint: [[2507.04494] Thousand-Brains Systems: Sensorimotor Intelligence for Rapid, Robust Learning and Inference](https://arxiv.org/abs/2507.04494) It formalizes Monty’s learning and inference algorithm in detail.

If you prefer a slightly higher-level description, the [“How Monty Works](https://thousandbrainsproject.readme.io/docs/implementation-overview) “ section in our documentation may be a good place to start. In particular, the [page on the evidence-based learning module](https://thousandbrainsproject.readme.io/docs/evidence-based-learning-module) (which is the current default).

You could call the learning “Hebbian-like” as observed locations and features are associated instantaneously. We also have object models that take into account the frequency of observing features at certain locations and hence store the most consistently observed features at locations (more details in the [page on object models](https://thousandbrainsproject.readme.io/docs/object-models)).

It’s not really Bayesian network inference, as we have no global normalization, but instead rely on local evidence accumulation to make it more biologically plausible.

I hope this helps!

- Viviane

---

<div class="post-metadata">

**Author:** ![pepedocs](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.thousandbrains.org/pepedocs/32/685_2.png) [@pepedocs](https://forum.thousandbrains.org/u/pepedocs)\
**Post date:** [September 30, 2025, 8:22pm UTC](https://forum.thousandbrains.org/t/how-learning-in-monty-works-algorithmically/798/6 "2025-09-30T20:22:49Z")

</div>

Thank you so much these are very helpful @vclay . I will definitely have a read on all of them.
