# Breaking down how a single HTM Neuron works?

**URL:** <https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100>\
**Category:** Community\
**Tags:** neurons, question, htm\
**Created:** [September 14, 2022, 5:12pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100 "2022-09-14T17:12:04Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesLikesBrains](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/jameslikesbrains/32/5940_2.png) [@JamesLikesBrains](https://discourse.numenta.org/u/JamesLikesBrains)\
**Post date:** [September 14, 2022, 5:12pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/1 "2022-09-14T17:12:04Z")

</div>

Hi, I’m trying to break down how a single HTM neuron works based on this diagram:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/b/bfc84a55c96ba5b56aa933875a1451472cf36c38.png)  
So starting with the Feedback part, the blue dots are synapses that make a connection and the empty dots are not. So for example the first line of dots would be 1 0 1 1 0 0 1 0 1 0 1.

Then we come to a circle with a backwards Z in it. So I’m guessing this is a sort of threshold, as in “if the dots coming in are sum up and together are greater than 5 then output a value or 1 else output a value of 0? And I’m gonna guess the threshold is a value that is learned?

Then we come to an OR operation, so in this case as along as one out of those thresholds have a value of 1 then the OR function will output a value that goes to the activation function (gray triangle) below.

The same thing applies to the Context, the difference between Feed Back and Context is where the data is coming from i’m assuming , otherwise they operate the same?

The feedforward data I’m thinking is just a sum of the green dots (the 1s) and if they hit a threshold then the neuron fires? Now Shore what the slanted line means.

I’m guessing feedback and context are blue because these will be putting the neuron in a predictive state where the green of the feedfoward puts the neuron in an active state ?

Someone tell me how off I am and what I am missing or what this diagram is missing

---

<div class="post-metadata">

**Author:** ![rogert](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rogert/32/1294_2.png) [@rogert](https://discourse.numenta.org/u/rogert)\
**Post date:** [September 14, 2022, 9:19pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/2 "2022-09-14T21:19:12Z")

</div>

That seems correct as an interpretation of the diagram, and one could implement working “HTM neurons” with those characteristics. Numenta’s main published HTM algorithms[1] aren’t quite like that, eg: thresholds aren’t learned, feedforward segments aren’t modelled explicitly, etc.

[1]: eg code referenced in [A Theory of How Columns in the Neocortex Enable Learning the Structure of the World](https://doi.org/10.3389/fncir.2017.00081)

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [September 14, 2022, 9:23pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/3 "2022-09-14T21:23:38Z")

</div>

Not directly related, just some associations I got from this thing on self-attention in grid cells: [https://www.quantamagazine.org/how-ai-transformers-mimic-parts-of-the-brain-20220912/](https://www.quantamagazine.org/how-ai-transformers-mimic-parts-of-the-brain-20220912/)

So looking at that neuron again, it seems that lateral context (basal dendrites) is equivalent to self-attention in transformers. Feedback (apical dendrites) I would call vertical context, which is simply much wider-range than lateral.

---

<div class="post-metadata">

**Author:** ![CollinsEM](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/collinsem/32/160_2.png) [@CollinsEM](https://discourse.numenta.org/u/CollinsEM)\
**Post date:** [September 22, 2022, 1:03pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/4 "2022-09-22T13:03:51Z")

</div>

> [@bkaz](#):
>
> Feedback (apical dendrites) I would call vertical context, which is simply much wider-range than lateral.

The apical dendrite is also switchable. That is too say the feedback mechanism can be influenced by neuromodulators.

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [September 23, 2022, 12:36am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/5 "2022-09-23T00:36:52Z")

</div>

I guess you mean dopamine? That makes feedback selective, more like a temporal sequence than diffuse attention?

---

<div class="post-metadata">

**Author:** ![Bitking](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bitking/32/3099_2.png) [@Bitking](https://discourse.numenta.org/u/Bitking)\
**Post date:** [September 23, 2022, 12:53am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/6 "2022-09-23T00:53:30Z")

</div>

There are several subcortical projections to the cortex that dump different neurotransmitter into areas of the cortex. It looks like the reconfigure the cortex to match different behavioral modes, in both learning and execution.  
While we differ in our visions of what AGI might be, for biological systems you can see the utility of hardware configuration of behavior learning and selection of recall.

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [September 23, 2022, 1:00am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/7 "2022-09-23T01:00:24Z")

</div>

> [@Bitking](#):
>
> It looks like the reconfigure the cortex to match different behavioral modes, in both learning and execution.

Yeah, that “utility” is pretty vague. In terms of selective attention, I think dopamine is a main neuromodulator in PFC?

---

<div class="post-metadata">

**Author:** ![dmac](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/dmac/32/5842_2.png) [@dmac](https://discourse.numenta.org/u/dmac)\
**Post date:** [September 23, 2022, 1:36am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/8 "2022-09-23T01:36:31Z")

</div>

> [@bkaz](#):
>
> Feedback (apical dendrites) I would call vertical context, which is simply much wider-range than lateral.

I think that simplifies apical dendrites a bit too much? There are mechanisms in apical dendrites which are not present in basal dendrites, see [Redirecting](https://doi.org/10.1016/j.tins.2012.11.006) . However, those details are not part of the canonical HTM neuron model.

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [September 23, 2022, 2:05am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/9 "2022-09-23T02:05:51Z")

</div>

> [@dmac](#):
>
> I think that simplifies apical dendrites a bit too much?

Probably, I didn’t mean it to be exhaustive. That article is paywalled, do you happen to have a summary?

---

<div class="post-metadata">

**Author:** ![Bitking](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bitking/32/3099_2.png) [@Bitking](https://discourse.numenta.org/u/Bitking)\
**Post date:** [September 23, 2022, 4:45am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/10 "2022-09-23T04:45:38Z")

</div>

> [@bkaz](#):
>
> I think dopamine is a main neuromodulator in PFC?

After the main messenger type there are several. A-peptides.

See table one in the first linked paper.

> [@Mechanism for different neuron modules to agree on common SDR schema?](https://discourse.numenta.org/t/mechanism-for-different-neuron-modules-to-agree-on-common-sdr-schema/9978/48):
>
> Numenta idealizes pyramidal cells as working a certain way, and replaces the action of the inhibitory inter-neurons with a simple k-means function. While this is certainly good enough to demonstrate the basic HTM model, it ignores the many “other” cell types that populate the cortex. A few minutes reviewing the literature on cell types in the cortex should show you that there are a zoo of different cell types with very different morphology and neurotransmitter profiles. and [https://www.natur…](https://www.nature.com/articles/s41586-020-2907-3)

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [September 23, 2022, 1:39pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/11 "2022-09-23T13:39:13Z")

</div>

It’s definitely a big zoo, but mostly irrelevant to GI. Or to anyone other than wholesale brain modelers, and I don’t think we have them on this forum. This thread is on canonic pyramidal neuron, purely for predictive modeling. I am sure it can be extended, but it should be clear how these extensions improve predictive modeling.

---

<div class="post-metadata">

**Author:** ![dmac](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/dmac/32/5842_2.png) [@dmac](https://discourse.numenta.org/u/dmac)\
**Post date:** [September 23, 2022, 2:26pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/12 "2022-09-23T14:26:04Z")

</div>

Here you go: “[https://www.projekte.hu-berlin.de/en/larkum/publications/larkum\_tins\_2013](https://www.projekte.hu-berlin.de/en/larkum/publications/larkum_tins_2013)”  
This article does a good job explaining how the mechanisms in the apical dendrites work.  
IMO they’re missing the last piece of the puzzle: that synapses on apical dendrites seem to be facilitating synapses, meaning that they preferentially respond to burst firing inputs.

And here is Larkums Labs list of publications. They posted most of the pay-walled ones too. [Publications — LARKUM LAB](https://www.projekte.hu-berlin.de/en/larkum/publications)

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [September 29, 2022, 1:12am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/13 "2022-09-29T01:12:35Z")

</div>

Thanks! I was busy and am still digesting it, but just had one thought.  
Because apical input is largely needed for the neuron to fire, and all those interneurons in the tuff, it seems to me that the effect of non-specific nuclei → L1 signaling is mostly inhibitory.  
Functionally, it may be implementing novelty seeking: when input location seems predicable based on prior experience, it will be ignored.

Those rare intense NMDA connections and calcium spiking may be an exception: when you expect an unexpected: some kind a conflict between predictions. All this is solely from unsupervised learning perspective.

Just a speculation, please correct.

---

<div class="post-metadata">

**Author:** ![dmac](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/dmac/32/5842_2.png) [@dmac](https://discourse.numenta.org/u/dmac)\
**Post date:** [September 29, 2022, 3:08am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/14 "2022-09-29T03:08:14Z")

</div>

> [@bkaz](#):
>
> apical input is largely needed for the neuron to fire

This is only sorta true; a pyramidal neuron can fire with/without any apical activity. The apical dendrite controls **burst** firing. But a pyramidal neuron can send out a single AP regardless of what the apical dendrite is doing. This fits into my hypothesis about attention: that single AP’s represent subconscious information and burst firing represents conscious information, and the apical dendrite is involved in consciousness by promoting single AP’s into bursts of AP’s.

> [@bkaz](#):
>
> and all those interneurons in the tuff [of pyramidal cells on layer 1 are] mostly inhibitory.

Correction: Most of the inputs to the apical dendrite are excitatory. The **cells inside of layer 1** are almost entirely inhibitory, but there are a great many more excitatory axons coming into layer 1 from distant areas. The apical dendrites appear to follow the same design pattern as basal dendrites: that information is transmitted via excitatory synapses.

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [September 29, 2022, 10:59pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/15 "2022-09-29T22:59:34Z")

</div>

> [@dmac](#):
>
> but there are a great many more excitatory axons coming into layer 1 from distant areas.

Ok, but does it matter if they come from thalamic non-specific nuclei, or directly from other cortical areas? That paper mostly talks about the former, how would you estimate the proportion and the difference between the two? To me, “non-specific” implies that it’s not likely to be conscious.

Anyway, I don’t see consciousness as an independent function, just a salience in terms of some other function. I was looking for some ubiquitous mechanism that implements novelty seeking, which should be inhibitory feedback: you need to skip / ignore predictable locations. Apical dendrites are well placed for that, although they likely have many other functions too.

Any ideas on what that mechanism can be, I think novelty seeking is crucial?

---

<div class="post-metadata">

**Author:** ![dmac](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/dmac/32/5842_2.png) [@dmac](https://discourse.numenta.org/u/dmac)\
**Post date:** [September 30, 2022, 12:21pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/16 "2022-09-30T12:21:16Z")

</div>

> [@bkaz](#):
>
> To me, “non-specific” implies that it’s not likely to be conscious.

Non-specific in this context just means that the connections don’t come from a single well-defined area of the brain. In contrast: specific connections have a pattern that is predetermined from birth.

---

<div class="post-metadata">

**Author:** ![dmac](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/dmac/32/5842_2.png) [@dmac](https://discourse.numenta.org/u/dmac)\
**Post date:** [September 30, 2022, 12:37pm UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/17 "2022-09-30T12:37:24Z")

</div>

> [@bkaz](#):
>
> I was looking for some ubiquitous mechanism that implements novelty seeking, which should be inhibitory feedback

First I would make a distinction between “seeking” and “detecting” novelty. Seeking is a behavior that involves decision making and whole body actions, whereas detecting it only involves processing & understanding sensory inputs.

There is a lot of inhibitory feedback in the brain, and IMO all inhibitory feedback is detecting novelty to some extent. Inhibitory neurons detect novelty because they learn with spike-timing-dependent-plasticity and so when a novel input is presented they will activate to a far lesser extent than if the inputs had previously been learned.

---

<div class="post-metadata">

**Author:** ![bkaz](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/bkaz/32/6455_2.png) [@bkaz](https://discourse.numenta.org/u/bkaz)\
**Post date:** [October 1, 2022, 1:41am UTC](https://discourse.numenta.org/t/breaking-down-how-a-single-htm-neuron-works/10100/18 "2022-10-01T01:41:34Z")

</div>

> [@dmac](#):
>
> Seeking is a behavior that involves decision making and whole body actions,

I think it works on all levels, whole-body is just what we more likely to consciously notice. The difference is that novelty detection is in feedforward, and seeking is feedback, but that includes feedback in intra-cortical loops, of any association level.

It now seems to me that both detection and seeking involve thalamus, especially TRN. It is deeply involved in both bottom-up and top-down attention, and definitely big on inhibition. Some dense descriptions, can’t really point to anything specific: [https://www.frontiersin.org/articles/10.3389/fnsys.2018.00041/full](https://www.frontiersin.org/articles/10.3389/fnsys.2018.00041/full), [Modelling novelty detection in the thalamocortical loop](https://www.biorxiv.org/content/10.1101/2021.11.08.467674v1.abstract)

I was thinking of TRN as a mediator of WTA, but it has a ton of other functions too, probably inhibition of predictable locations. Including cortical locations, those that map to location in space-time as well more abstract subjects. Some subjects are more boring than others :).
