Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

ETM suggestion: Use apical segments when determining the learning cell #611

Open
mrcslws opened this issue Aug 27, 2016 · 1 comment
Open

Comments

@mrcslws
Copy link
Contributor

mrcslws commented Aug 27, 2016

Relevant code: https://github.com/numenta/nupic.core/blob/8a846d1d897440bc6ca1e46120520da166bc551a/src/nupic/experimental/ExtendedTemporalMemory.cpp#L616

I didn't change the algorithm at all, I just put all the logic for "learning cell" selection in one place.

When a column is bursting, we choose a cell to learn on. The current selection process is:

  • if the column has matching basal segments
    • use the cell with the best matching basal segment
  • else use the least used cell.

We should start also considering apical segments. Here's a trivial addition:

  • if the column has matching basal segments
    • use the cell with the best matching basal segment
  • if the column has matching apical segments
    • use the cell with the best matching apical segment
  • else use the least used cell.

We could go further and give preference to a cell that has both a matching apical and basal segment. Or maybe a different change makes sense. (e.g. allowing multiple learning cells per segment in some cases?)

I haven't thought through the effects on experiments. It just seems pretty clear that this code is incomplete.

@floybix
Copy link

floybix commented Aug 30, 2016

The comportex logic selects a learning cell jointly with its learning segments (zero or one each of distal & apical segments). This is not just for bursting, it covers all cases including where one or more segments are fully or partially matching -- i.e. meeting stimulus or learning thresholds.

This is by no means a complete solution and has not really been tested on anything except my "sequence replay" example. But food for thought perhaps.

Here goes

  • if there is exactly one fully matching basal segment in the column, select that cell and segment. The apical segment in this case is the best matching one on that cell.
  • if there are multiple fully matching basal segments in the column, select from those by the best matching apical segment if any (choosing randomly between multiple fully matching apical).
    • if no apical segments match, choose randomly between the basal segments.
  • if there are partially matching basal segments, select the best matching cell & segment. The apical segment is the best matching one on that cell.
  • if there are no partially matching basal segments, select by the best matching apical segment if any...
    • however, this apical-only matching only happens with some probability ("apical-bias-frac") - if it always happened then we could get identical representations of the same thing in different sequence contexts, assuming a common pooled context. By doing it with a probability we can generate overlapping but distinct representations. apical-bias-frac htm-community/comportex#38
  • fall back to random cell selection from the active cells in the column.

Code:
https://github.com/htm-community/comportex/blob/863b68af4815d086803d2bf52676df5f699c51da/src/org/nfrac/comportex/cells.cljc#L498

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants