Pooler. It is still not clear exactly how this mechanism
exactly works. However, by following findings in this
area the same or similar mechanism inside of the SP
can be adopted. Currently, in the HTM, this
mechanism consists of boosting and inhibition
algorithms, which operate on the mini-column level
and not on the cell level inside of the mini-column.
The reason for this is that SP operates explicitly on
the population of neural cells in mini-columns and
does not makes usage of individual cells (Yuwei,
Subutai and Hawkins, 2017). Individual cells rather
play an important role in the Temporal Memory
algorithm (Hawkins, Subtei, 2016).
The main idea in this work, with the aim to
stabilize the SP and keep using the plasticity, is to add
an additional algorithm to SP, which does not
influence the existing SP algorithm. The extended
Spatial Pooler is based on the algorithm implemented
in the new component called Homeostatic Plasticity
Controller. The controller is “attached” to the existing
implementation of the Spatial Pooler. After the
compute in each iteration, the input pattern and
corresponding SDR are passed from the SP to the
controller. The controller keeps the boosting active
until the SP enters the stable state, measured over the
given number of iterations. During this time the SP is
operating in the so-called new-born stage and will
produce results similar to results shown in Figure 2
and Figure 3. Once the SP enters the stable state, the
new algorithm will disable the boosting and notify the
application about the state change. The controller
tracks the participation of mini-columns overall seen
patterns. After the controller notices that all mini-
columns are approx. uniformly used and all seen
SDRs are encoded with the approx. the same number
of active mini-columns, the SP has entered the stable
state. From that moment the SP will leave the new-
born stage and continue operating as usual but
without the boosting.
3 RESULTS
To approve of the Spatial Pooler algorithm can be
improved to reliably generate a stable state with the
help of the Homeostatic Plasticity controller, the
following experiment was designed. The experiment
(see Listing 1) executes 25000 iterations and presents
100 scalar values to the SP. The scalar encoder used
in line 11 is configured with the set of parameters
(line 5) described in Table 2.
Every input value (0-100) will be encoded as the
vector of 200 bits. Also, every single value from the
specified range will be encoded with 15 non-zero bits
as shown in Figure 1 - right.
Listing 1: Using of improved SP - Pseudo code.
0 function Experiment( inputSet )
1 begin ( 𝚰 )
2 | p // Set of SP parameters.
3 | hp,enp // Set of HPC and encoder parameters
6 | isStable = false
5 | en←create(enp)
6 | hpc ←create(hp, onStateChange);
7 | sp ←create(i, hpc);
8 | FOR i = 0; i<25000
9 | FOREACH i IN inputSet
10 | // Generate SDR for the input.
11 | o ← sp.compute(encode(i));
12 | IF isStable = true
13 | // new-born stage exited
14 | // Use stable SDRs. Custom code here.
15 | ENDIF
16 | ENDFOREACH
17 | ENDFOR
18 | end
19 |
20 | function onStateChange(state)
21 | begin
22 | isStable = true // Indicate the stable state
23 | end
The instance of the Spatial Pooler (line 7) with the
common set of parameters (line 3) has been created.
The same configuration was used in the experiment
described in the previous section, that produced
results shown in Figure 2 and Figure 3.
As next, the Homeostatic Plasticity Controller
(line 6) is typically attached to the Spatial Pooler
instance (line 7, second argument) and used inside of
the compute method.
The Homeostatic Plasticity Controller requires
the callback
function (line 6, second argument),
which is invoked when the controller detects the
stable state of the Spatial Pooler. The experiment is
designed to execute any number of training iterations
(line 8 defines 25000 iterations).
In every iteration, the Spatial Pooler is trained
with the whole set of input values 𝚰 line 9.
The spatial input is trained in line 11. The output
of the training step in line 11 is an SDR code (set of
active mini-columns) associated with the encoded
input value i. Before presented to the Spatial Pooler,
the input value i is encoded by the Scalar Encoder
configured with the named set of parameters shown
in Table 2. The encoder is represented as a function e