Spatial pooling.
Based on :
Byrne, F. (2015). Encoding reality: Prediction-assisted cortical learning algorithm in hierarchical temporal memory. arXiv preprint arXiv:1509.08255.
Cui, Y., Ahmad, S., & Hawkins, J. (2017). The HTM spatial pooler—a neocortical algorithm for online sparse distributed coding. Frontiers in computational neuroscience, 11, 111.
Hawkins, J. et al. 2016. Biological and Machine Intelligence. Release 0.4. Accessed at http://numenta.com/biological-and-machine-intelligence/.
Leake, M., Xia, L., Rocki, K., & Imaino, W. (2015, January). Effect of Spatial Pooler Initialization on Column Activity in Hierarchical Temporal Memory. In AAAI (pp. 4176-4177).
Mnatzaganian, J., Fokoué, E., & Kudithipudi, D. (2017). A mathematical formalization of hierarchical temporal memory’s spatial pooler. Frontiers in Robotics and AI, 3, 81.
Pietroń, M., Wielgosz, M., & Wiatr, K. (2016, October). Formal analysis of HTM spatial pooler performance under predefined operation conditions. In International Joint Conference on Rough Sets (pp. 396-405). Springer, Cham.
Glossary :
active-inputs
Sequence of inputs active as a result of some stimulus.
active-minicols
Sequence of minicols active as a result of active-inputs.
center-input
When relevant, a minicol might have a natural center in the input space.
cnx, connection
A connection is made when perm >= `cnx-threshold``.
cnxs
Vector where indices are minicols and item are vectors of inputs with established connection.
cnx-threshold, connection-threshold
Treshold for deciding if a perm is strong enough for establishing a cnx.
flat-index
Cf. flat-index in helins.htm.grid namespace.
grid
Cf. grid in helins.htm.grid glossary.
grid-inputs
grid describing the topology of the input space.
grid-minicols
grid describing the topology ofminicols`.
inhibition-radius
Radius around a minicol within grid-minicols where inhibition happens during local inhibition.
input
Input bit represented by its flat-index within the grid-inputs.
input-pool-mapping
Vector where indices represent inputs and items are 2-tuples where the first element is a minicol and the second one is the offset of the
corresponding input in that minicol's pool.
minicol
Modelisation of a neocortical mini-column represented by its flat-index within the grid-minicols.
n-pool
Size of a pool.
overlap-score
Number of currently active-inputs a minicol is currently connected to.
overlap-scores
Vector of overlap-scores where each index represent minicol;
perm, permanence
Value between 0 and 1 (inclusive) for deciding, in conjunction with a cnx-threshold, if a cnx is established.
perms
Vector of perms layed out in the same order as their corresponding pool.
perm-table
Vector of perms where each index represents a minicol. perms are layed out in the same order as corresponding pools.
pool, potential-pool
Set of inputs a minicol can potentially connect to.
pools, potential-pools
Vector of pools where each index represents a minicol.
receptive-field
Span of inputs within grid-inputs a minicol is currently connected to.
stimulus-threshold
During inference, in order for a mini-column to even be considered potentially active, it must have an overlap-score of at least that much. During
initialization, it is important to garantee that at least stimulus-threshold connections are randomly established for each mini-column otherwise
they will never have the chance to compete. This parameter is a measure against noise and should be low. It could even be 0.
Spatial pooling.
Based on :
Byrne, F. (2015). Encoding reality: Prediction-assisted cortical learning algorithm in hierarchical temporal memory. arXiv preprint arXiv:1509.08255.
Cui, Y., Ahmad, S., & Hawkins, J. (2017). The HTM spatial pooler—a neocortical algorithm for online sparse distributed coding. Frontiers in computational
neuroscience, 11, 111.
Hawkins, J. et al. 2016. Biological and Machine Intelligence. Release 0.4. Accessed at http://numenta.com/biological-and-machine-intelligence/.
Leake, M., Xia, L., Rocki, K., & Imaino, W. (2015, January). Effect of Spatial Pooler Initialization on Column Activity in Hierarchical Temporal Memory.
In AAAI (pp. 4176-4177).
Mnatzaganian, J., Fokoué, E., & Kudithipudi, D. (2017). A mathematical formalization of hierarchical temporal memory’s spatial pooler. Frontiers in Robotics
and AI, 3, 81.
Pietroń, M., Wielgosz, M., & Wiatr, K. (2016, October). Formal analysis of HTM spatial pooler performance under predefined operation conditions. In International
Joint Conference on Rough Sets (pp. 396-405). Springer, Cham.
Glossary :
active-inputs
Sequence of `input`s active as a result of some stimulus.
active-minicols
Sequence of `minicol`s active as a result of `active-inputs`.
center-input
When relevant, a `minicol` might have a natural center in the input space.
cnx, connection
A connection is made when `perm` >= `cnx-threshold``.
cnxs
Vector where indices are `minicol`s and item are vectors of `input`s with established connection.
cnx-threshold, connection-threshold
Treshold for deciding if a `perm` is strong enough for establishing a `cnx`.
flat-index
Cf. `flat-index` in `helins.htm.grid` namespace.
grid
Cf. `grid` in `helins.htm.grid` glossary.
grid-inputs
`grid` describing the topology of the input space.
grid-minicols
`grid describing the topology of `minicols`.
inhibition-radius
Radius around a `minicol` within `grid-minicols` where inhibition happens during local inhibition.
input
Input bit represented by its `flat-index` within the `grid-inputs`.
input-pool-mapping
Vector where indices represent `input`s and items are 2-tuples where the first element is a `minicol` and the second one is the offset of the
corresponding `input` in that `minicol`'s `pool`.
minicol
Modelisation of a neocortical mini-column represented by its `flat-index` within the `grid-minicols`.
n-pool
Size of a `pool`.
overlap-score
Number of currently `active-inputs` a minicol is currently connected to.
overlap-scores
Vector of `overlap-score`s where each index represent `minicol`;
perm, permanence
Value between 0 and 1 (inclusive) for deciding, in conjunction with a `cnx-threshold`, if a `cnx` is established.
perms
Vector of `perm`s layed out in the same order as their corresponding `pool`.
perm-table
Vector of `perms` where each index represents a `minicol`. `perms` are layed out in the same order as corresponding `pool`s.
pool, potential-pool
Set of `input`s a `minicol` can potentially connect to.
pools, potential-pools
Vector of `pool`s where each index represents a `minicol`.
receptive-field
Span of `input`s within `grid-inputs` a `minicol` is currently connected to.
stimulus-threshold
During inference, in order for a mini-column to even be considered potentially active, it must have an `overlap-score` of at least that much. During
initialization, it is important to garantee that at least `stimulus-threshold` connections are randomly established for each mini-column otherwise
they will never have the chance to compete. This parameter is a measure against noise and should be low. It could even be 0.(adapt-perms perm-
perm+
n-inputs
pools
active-inputs
perm-table
active-minicols)Spatial learning, adapts permanences of active-minicols.
Spatial learning, adapts permanences of `active-minicols`.
(avg-inputs-minicols-ratio grid-inputs grid-minicols)Computes, on average, the number of mini-columns existing for every input bit.
Needed for computing the inhibition-radius.
Computes, on average, the number of mini-columns existing for every input bit. Needed for computing the `inhibition-radius`.
(cnxs cnx-threshold pools perm-table)Returns a vector where indices are minicols and items are vectors of inputs with established connections.
Returns a vector where indices are `minicol`s and items are vectors of `input`s with established connections.
(global-inhibition overlap-scores n-active)Using overlap-scores of mini-columns, performs global inhibition by selecting n-active i-minicols with
the best overlap.
Using `overlap-score`s of mini-columns, performs global inhibition by selecting `n-active` `i-minicols` with the best `overlap`.
(global-pool grid-inputs n-pool)(global-pool grid-inputs n-pool rng)Creates a pool by sampling inputs from the whole grid-inputs.
Creates a `pool` by sampling `input`s from the whole `grid-inputs`.
(inhibition-radius grid-inputs avg-inputs-minicols-ratio cnxs)Computes the inhibition-radius for local inhibition.
Computes the `inhibition-radius` for local inhibition.
(input-pool-mapping n-inputs pools)Given pools, returns perm-mapping.
Given `pools`, returns `perm-mapping`.
(local-inhibition grid-minicols n-active inhibition-radius overlap-scores)Using overlap-scores of mini-columns, performs a local inhibition.
Using `overlap-score`s of mini-columns, performs a local inhibition.
(local-pool grid-inputs potential-radius n-pool grid-minicols minicol)(local-pool grid-inputs potential-radius n-pool grid-minicols minicol rng)Creates a pool for the given minicol by sampling inputs from a hypercube around the minicol's corresponding center-input
in grid-inputs.
Creates a `pool` for the given `minicol` by sampling `input`s from a hypercube around the `minicol`'s corresponding `center-input` in `grid-inputs`.
(overlap-scores cnx-threshold perm-table input-pool-mapping active-inputs)Given active-inputs, returns overlap-scores.
Given `active-inputs`, returns `overlap-scores`.
(perms n-pool n-cnxs cnx-threshold cnx-delta)(perms n-pool n-cnxs cnx-threshold cnx-delta rng)Returns a sequence of perms size n-pool where n-cnxs values are above cnx-threshold. All values are within cnx-threshold
+/- cnx-delta.
Keep in mind n-cnxs should be >= stimulus-threshold later used otherwise the minicol associated with those intiial perms
will not have a chance of ever be considered active.
Returns a sequence of `perms` size `n-pool` where `n-cnxs` values are above `cnx-threshold`. All values are within `cnx-threshold` +/- `cnx-delta`. Keep in mind `n-cnxs` should be >= `stimulus-threshold` later used otherwise the `minicol` associated with those intiial `perms` will not have a chance of ever be considered active.
(receptive-field grid-inputs minicol-cnxs)Given a list of inputs with established connections, computes the receptive-field of a minicol.
Given a list of `input`s with established connections, computes the `receptive-field` of a `minicol`.
(update-active-duty-cycles period active-minicols active-duty-cycles)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |