SP columns activating without input when using topology

I’m starting to experiment with topology so I can talk about local inhibition in the next HTM School. I see that some columns getting no overlap with the input space are being activated. I think this has something to do with localAreaDensity? Does anyone know why this might be happening?

SP Params

{'columnDimensions': [50, 50],
 'dutyCyclePeriod': 1000,
 'globalInhibition': False,
 'inputDimensions': [50, 50],
 'localAreaDensity': 0.1,
 'maxBoost': 1,
 'minPctActiveDutyCycle': 0.001,
 'minPctOverlapDutyCycle': 0.001,
 'numActiveColumnsPerInhArea': 1,
 'potentialPct': 0.85,
 'potentialRadius': 12,
 'stimulusThreshold': 1,
 'synPermActiveInc': 0.05,
 'synPermConnected': 0.1,
 'synPermInactiveDec': 0.008,
 'wrapAround': False}
1 Like

I found the place it happens but not sure what is the right solution, (or maybe I’m wrong? pretty new here)


maskNeighbors is just the index array of neighbors column.
numBigger is zero because there are no overlaps, but maskNeighbors size is bigger than zero because there are neighbors, making numActive bigger than zero in some cases, and that makes the column a winner column.

In the description it says, Each column observes the overlaps of its neighbors and is selected if its overlap score is within the top 'numActive' in its local neighborhood.

So I guess if the overlap score is 0 and all the neighbors got overlap score of 0, 0 is within the top neighbors overlap score, which makes the column active.

Edit: I edited it too much cause I found I was wrong too many times.

Thanks @Vovchik, you got me looking in the right place. I think the problem can be fixed quite simply by adding one more condition to the if statement below:

As-is, this condition will select winner columns that have no overlap with the input vector. I believe one more condition needs to be added so the code looks like this:

  if overlaps[i] > 0 and numBigger < numActive:

See it working with this change:


1 Like

@Vovchik Thanks for your help on this! You pointed me to exactly where the bug was. Good show!