# Replace columnar boosting with energy, cell death

**URL:** <https://discourse.numenta.org/t/replace-columnar-boosting-with-energy-cell-death/5537>\
**Category:** General Neuroscience\
**Tags:** boosting, free-energy, plausibility\
**Created:** [February 28, 2019, 7:14pm UTC](https://discourse.numenta.org/t/replace-columnar-boosting-with-energy-cell-death/5537 "2019-02-28T19:14:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![breznak](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/breznak/32/1935_2.png) [@breznak](https://discourse.numenta.org/u/breznak)\
**Post date:** [February 28, 2019, 7:14pm UTC](https://discourse.numenta.org/t/replace-columnar-boosting-with-energy-cell-death/5537/1 "2019-02-28T19:14:46Z")

</div>

Related topics:

> [@Boosting in HTM and new ways](https://discourse.numenta.org/t/boosting-in-htm-and-new-ways/3619/28):
>
> Yes: i think that you are right. Nevertheless, my point was that boost not necessarily will separate similar input values: it depends when the values are initially exposed to the system. In any case, static tie breakers (or stable sort, like is used [now](https://github.com/numenta/nupic/pull/2755#issuecomment-187267227)) might artificially increase the activation frequency of some columns. I don’t know if the boost could be a “practical” solution to alleviate this issue…

Placeholder for development of this idea in our repo is

> <https://github.com/htm-community/htm.core/issues/288>
>
> As a part of #287 I mention 
> \# replacing boosting with cell death
> 
> this is do…ne in 2 steps: 
> \- cells (or segments) have a concept of energy (when used/activated, you get new food)
> \- cells without energy die , are removed. This might help #267 
> \- a mechanism spawns new cells
> - when? randomly, to keep constant number of cells, ...?
> - where? random input space, where noone is, where hotspots are..?

> <https://github.com/htm-community/htm.core/issues/284>
>
> I want to separate boosting from SpatialPooler into a standalone class. 
> 
> \### …What is Boosting
> 
> Roughly speaking, boosting is a process of monitoring activation frequency (activity) of columns, and (artificially) supporting~boosting those who lack behind. This theoretically helps better utilize resources by allowing the columns that do not participate (others do their job better) to find theirs niche.
> 
> 
> \### Why? 
> 
> \- better logical organization of the code (variables, methods only for boosting won't clutter SP's implementation)
> \- easier to develop and use own, new Boosting methods 
> - easier to improve existing method
> \- boosting can be easily added to other classes as needed (currently only for SP) 
> \- better unit testing
> 
> 
> \### Design
> 
> this is an early draft, but: 
> \`\`\`
> abstract class Boosting {
> Boosting(...)
> void applyBoost(SDR &columns) const;
> void get\*/set\* //from current SP
> }
> 
> BoostingLocal : Boosting
> BoostingGlobal: Boosting //2 current implementations from SP
> \`\`\`
> 
> We may want to break the SP's API interface by removing the public set/get methods related to boosting, or we can keep them as wrappers. 
> 
> \### Alternative
> 
> An interesting alternative would be (optionally) implementing boosting into Connections. That way, it can be used for any (SP, TM, CP) class using connections easily. 
> 
> Question is, at what level? Currently boosting works with Columns. 
> In Connections it could be either on activity of Segments, or Cells. Connections don't have a concept of Columns. Or can we extend Connections to understand Collumns, that could be also useful. 
> 
> TL;DR: 
> \- \[\] ok to implement Boosting as a separate class? 
> \- \[\] should Connections support concept of Columns? 
> \- \[\] can boosting be applied directly in Connections (to Cells, Segments,..)?

Definition: Boosting =

> SP parameter boostStrength:

A number greater or equal than 0, used to  
control boosting strength. No boosting is applied if it is set to 0.  
The strength of boosting increases as a function of boostStrength.  
Boosting encourages columns to have similar activeDutyCycles as their  
neighbors, which will lead to more efficient use of columns. However,  
too much boosting may also lead to instability of SP outputs.  
This is what I referred to as homeostatic boosting.

> SP parameter minPctOverlapDutyCycles:

A number between 0 and 1.0, used to set  
a floor on how often a column should have at least  
stimulusThreshold active inputs. Periodically, each column looks  
at the overlap duty cycle of all other column within its  
inhibition radius and sets its own internal minimal acceptable  
duty cycle to: minPctDutyCycleBeforeInh \* max(other columns’  
duty cycles). On each iteration, any column whose overlap duty  
cycle falls below this computed value will get all of its  
permanence values boosted up by synPermActiveInc. Raising all  
permanences in response to a sub-par duty cycle before  
inhibition allows a cell to search for new inputs when either  
its previously learned inputs are no longer ever active, or when  
the vast majority of them have been “hijacked” by other columns.

Why? To help columns/cells more effectively cover the input space (those underperforming are artificially given chance to find new niche)

Biological plausibility:  
There’s no good biological explanation of how our current implementation can correlate.

Idea:

- Add concept of energy for each unit (should it be a cell, segment, synapse?).
  - when a cell activates, the energy increases (cell gets new food)
  - otherwise, each time energy decays

- cells with low energy die, are removed.
  - this would help implementation problems as [TP, BacktrackingTM execution times depends on (SP's) input size, and should not · Issue #267 · htm-community/htm.core · GitHub](https://github.com/htm-community/nupic.cpp/issues/267) , I think @marty1885 ran into similar issues.
  - that way we have implemented pruning

- spawn new cells
  - when? at random, to keep a constant cell count, …
  - where? randomly over inputspace, at hotspots (where most cells are), at deserts (opposite)

Questions:

- what do you think of this model?
- its implementation (with regards to speed)
- are there good datasets to test boosting?
  - I recall a counter “dataset”: have a large SP with simple pattern (line), boosting will go crazy and generate artificial spikes in anomalies (I had a few methods to mitigate that)

---

<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:** [February 28, 2019, 8:25pm UTC](https://discourse.numenta.org/t/replace-columnar-boosting-with-energy-cell-death/5537/2 "2019-02-28T20:25:18Z")

</div>

[I have been thinking about a similar approach](https://discourse.numenta.org/t/path-based-sdrs-dendrite-trees/1575?u=bitking) for controlling the creation and pruning of synapses along a dendrite. If there is a “metabolic sustenance factor” that feeds a set of synapses this can be manipulated into replacing boosting and forgetting.

_“An interesting side note on path-based SDRs is the biologically plausible enforcement of scarcity - there could also be the metabolic equivalent of a growth promoter shared over the length of each path SDR. An “empty” dendrite could grow a lot from whatever activation it receives - a “full” dendrite would starve older synapses to reinforce new synapse learning.  
Another tweak is that the distance between two connections could be an influencing factor in learning to enforce spacing of synapse growth.”_

---

<div class="post-metadata">

**Author:** ![breznak](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/breznak/32/1935_2.png) [@breznak](https://discourse.numenta.org/u/breznak)\
**Post date:** [March 1, 2019, 9:49am UTC](https://discourse.numenta.org/t/replace-columnar-boosting-with-energy-cell-death/5537/3 "2019-03-01T09:49:20Z")

</div>

> [@Bitking](#):
>
> [I have been thinking about a similar approach](https://discourse.numenta.org/t/path-based-sdrs-dendrite-trees/1575) for controlling the creation and pruning of synapses along a dendrite.

Cool writeup!

If I understand the idea of “Path SDRs”, you want to hint where a new synapse should grow, and assume it should happen “in direction to” other active cells. (right?)

Later you go into details how construct these graphs/paths on SDRs… This goes nicely with [Replace inhibition with proximal horizontal inhibitory connections](https://discourse.numenta.org/t/replace-inhibition-with-proximal-horizontal-inhibitory-connections/5538)  
esp the connections to distal cells (also forms SOM, as you mention in the thread).

To be biological, we could use the hypothesis that a signal going through axon (or a pathway rather) also generates some electrical field in neighbourhood (even if shielded by myelin shell), so the graph approximates the path (actually can be curved) of the axon. Cells near an ofthen-active pathway get energy bonus. That would be the “pathway SDR growth”.

Though I’m not completely sure this approach would not actually break some assumptions how SDRs form.

Back to energy, cell death, boosting, and forgetting:

- do we have a good experiment/dataset to test its efficiency?
  - I have the counter example with “empty input, large SP”

- regarding implementation, how to do this to not hurt performance too much?
- so we agree the “metabolic sustenance” should be applied to synaptic level?
- boosting is about supporting columns/synapses to “grow to unexplored areas”. How do we go about that?
  - the “pathway SDR growth” would do the opposite.
  - I think we could do this model:
    - neurons have some “fibres” that nuture them (give them food)
    - generalize local inhibition to competition for food
    - in popular areas (many active cells) the competition is tough
    - in deserted areas (no activations) theres abdulance of food, so a random cell can activate and grow synapse.  
…TBD

---

<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:** [March 1, 2019, 4:06pm UTC](https://discourse.numenta.org/t/replace-columnar-boosting-with-energy-cell-death/5537/4 "2019-03-01T16:06:45Z")

</div>

The path I am describing is the dendrite and not the axon.

The path is fixed and what changes is the addition or modification of synaptic connections. As it starts out it may pass thousand of potential connections but only a few are randomly initialized. As it learns synapses along the path are added to the list.

The relationship is as follows:  
Cell body holds an index to which path table entry this cell is using and a table of synapse values.  
cell body --\> index --\>path table entry  
cell body --\> synapse list

Each synapse has a value (same as in regular HTM) and an index to where it is in the selected path table list for this cell body.  
synapse = value and index --\> position in path table

Each path table entry holds a list of addresses (offsets relative to cell body). This table may be several hundred or a few thousand in length. I envision a few hundred paths to be sufficient to assure random connections.

For this cell and dendrite the only synapses that can be evaluated or added have to be positions along this path. For training the evaluation it is the intersection of all potential positions in this path table and active cell bodies in this cycle.

The cell body also has other values like “predictive” in regular HTM. This is set by evaluating interactions between the dendrites in the synapse list and active cell bodies.

The metabolic factor could be a fixed value for each iteration. As part of the learning pass the synapses to be modified could have this split over the synapses in this dendrite only and use this as a co-factor for both modifying existing and adding new. If there was a lot of existing synapses there would not be a lot of juice left over to grow new ones. If there are only a few they would add new or boost training strongly. This accomplishes the goal of boosting - the strong only change a little, the weak can grow quickly. The nice thing here is that it is more plausible than boosting from the biological view; it is local to the dendrite.

Every so many cycle you could run though all synapse lists and shrink all values (with a floor function) to promote forgetting.

---

<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:** [March 2, 2019, 1:53pm UTC](https://discourse.numenta.org/t/replace-columnar-boosting-with-energy-cell-death/5537/5 "2019-03-02T13:53:03Z")

</div>

I don’t like killing brain cells… I don’t know if this is a valid argument but it just seems like a bad idea.

For segments on a distal dendrites, it might be useful to remove old & rarely used segments if you are running out of free segments, but there is already a mechanism for doing just that.
