DCS

5 March 2018

Memory Search and Sense from Shallow Hierarchies
Kieran Greer, Distributed Computing Systems, Belfast, UK.
http://distributedcomputingsystems.co.uk
Version 1.0

Abstract—This paper describes an automatic process for combining patterns and features, to guide
a search process and reason about it. It is based on the functionality that a human brain might have,
which is a highly distributed network of simple neuronal components that can apply some level of
matching and cross-referencing over retrieved patterns. The process uses memory in a more
dynamic way and it can realise results using a shallow hierarchy, which is a recognised brain-like
construct. The paper gives one example of the process, using computer chess as a case study.
Index Terms— cognitive, human brain, prediction, dynamic memory, search, chess.

1

Introduction

The human brain is known to store a vast amount of information through the many links it
creates between its neuronal components. This information needs to be found again and
manipulated to match with any current situation. Because the real world is even more
complex, it is not possible to imagine that a brain would store a static result for every
possible scenario. Instead, it must be able to make use of its memories in a more dynamic
way, by combining them to create even potentially new knowledge. It has been
demonstrated in biology and with computer models [9] that the search for this knowledge
and the subsequent application of it can be done using relatively shallow hierarchies. The
process itself must be fairly basic, but if it repeats, then the hierarchy could be looked upon
as a particular unit of work and would be more complex than the neuron itself. When put
together at a larger scale, repeating structures of this type can often provide a much greater
degree of complexity and this paper considers how a process can use static memories to
produce a much more dynamic behaviour. It considers how the memory can be combined,
searched over and made sense of, or even form predictions. The paper then uses computer
chess as a case study and describes how one example of the algorithm has been
implemented as part of a computer chess search heuristic.

1

DCS

5 March 2018

The rest of the paper is organised as follows: section 2 describes the new theory, while
section 3 describes some related work. Section 4 then gives an example of the theory, using
computer chess as the test platform. Section 5 discusses shallow hierarchies, while section 6
gives some conclusions on the work.

2

A Systematic Process for Search and Prediction

This section describes the new theory of the paper. It is intended to model one aspect of the
pattern-matching process of a human brain that may be related to the Cortex region [9].
That is the region which performs the higher-level or intelligent functions, but this paper
also considers the silent searches that first find and filter already stored information. A
number of different elements are involved. Firstly, there is the sensory input. This would
determine where the brain starts from and would be a constant input signal. Then there are
also the memories that the brain has stored from earlier, similar experiences. To reason
over this input, some type of search is required, to move through pattern phases from the
input to a desired final state. This involves remembering actions, scenes or events from the
past and applying them to the present, as a type of prediction.

Recognising a pattern is also the task of recognising relevant features in the pattern. How
this may work at a neuron level is considered in much more detail in other papers. So that
type of detail is not required for this paper, which assumes that each input pattern, feature
set and related memories can be found as required. One question might be if this would be
a difficult process for the brain to realise through a neuronal component, but it may simply
be the result of a ‘fully connected’ neuronal mass guiding a search process, which is a
commonly used structure [1][7]. The following sub-sections consider how these elements
can be manipulated in a largely automatic way, to produce some level of reasoning and
finally predict some type of event from that reasoning.

2

DCS
2.1

5 March 2018
Static and Dynamic Memory

If we receive input from our environment, the most basic process would store an exact
result for each situation encountered, but this would probably require too many static
memories with evaluations to be practical. Another idea might be to cross-reference shared
memories so that they can be used dynamically and probably even in previously
unencountered scenarios. The cross-references can be used to guide a search, but without
giving an exact response. As such, there is then no requirement for a fixed memory point for
every scene. If a hierarchy is also used, then it can combine a number of cross-referenced
regions in the next level, similar to what convolutional deep learning does [10]. The memory
and pattern matching does not have to be fully-connected over every node, but it would be
densely connected and the connections define the pattern shape and meaning. Specific
features can still be recognised in localised connections. If a pattern is mostly fullyconnected, then the size reduction can be quadratic, or the number of nodes could be
reduced from the square to the number in the pattern only. This level of reduction would
happen, for example, if each feature in the pattern retrieved a memory of a related scene
that was a similar pattern size. All of the retrieved memories could then be cross-referenced
and combined themselves, to give the prediction model for the scene. It would be an
aggregated view of what is in the current scene plus what has been associated with it in the
past. Therefore, if the process reduces in size by the square of something, it can scale in a
small number of levels to a much smaller size. This is also a very basic structure that could
easily be generated and might be looked at as a compact unit of work.

2.2

Feature Selection through Pattern Cross-Referencing

Therefore, the first phase is to retrieve the related memories. There would be an input
sensory signal and it is assumed that the brain can parse this and recognise the relevant
features. If a feature is recognised, then this should trigger a memory process that tries to
retrieve previous scenes that also contained the feature. For arguments sake, each feature
can retrieve a similar sized scene from memory. For example, one can imagine simply a
visual input of a room with items, where each item can also be remembered from a past
experience. Each item can retrieve from memory a scene that it was most popular in. This in
itself could be an aggregation of multiple scenes that are found and returned. Therefore, if
3

DCS

5 March 2018

we consider the brain to have parsed the image into a list of features, each feature has
retrieved another similar list. Therefore, to summarise the current situation, it is only
required to aggregate over the returned feature lists, to get from memory what the current
scene is mostly about. This is simply a cross-referencing process of comparing all of the
retrieved lists and keeping only those memory features that occur more often. It could even
be a majority vote and this reduced feature set would result in the memory’s understanding
of the current situation. Any reasoning must start with the input signal pattern and so it is a
matter of then restricting that with the memory’s understanding and also what is actually
legal in the situation, to try to predict what the best action might be.

2.3

Realising Predictions

A prediction could therefore be seen as a constraint on the current situation. There may be
many choices, but a smaller number of them will be any good and the prediction is
concerned with guessing what the best option might be. It is also constrained by what is
legal in the current situation, where a memory-related search cannot go somewhere if it is
impossible in the current scene and the scene is unlikely to go against the pattern mass
returned by the memory. Not all features retrieved from memory have to exist in the
current scene and so the prediction can form a plan to realise them. Each stage guides the
search using a scene pattern and preferred memory patterns. The prediction can then try to
match features in the scene pattern with the preferred features retrieved from memory.

The scene is initially the sensory input, but after a search stage the process can repeat,
starting with the cross-referenced feature set that was realised from the search, as a new
scene. If memory returns some feature that is particularly important, then even if it is not
present in the first input pattern, through a number of search phases, it may eventually
become available in a scene pattern, when the prediction might then choose that path as a
preferable option. The cross-referenced memory actually adds more nodes and patterns to
the process, but the new patterns forcibly influence the direction of the search towards
what they would subsequently connect with. They would also speed it up because the
greater number of nodes generates more activations.

4

DCS

5 March 2018

This can all happen using a shallow hierarchy – two to four levels even, but it would be very
expensive with regard to the number of nodes and connections, and the size would still
increase quadratically. Therefore, the input scene may be broken up into regions and the
process can be applied to each. If those aggregated regions are then aggregated again, there
is a general plan or prediction for the whole input scene. If it is too expensive to store a
static memory for every scenario, then it is probably unlikely that every stage of the search
will update something. It is more likely that terminal states will get recognised and those
results will update the memory scores. Therefore, a lot of the search can be silent, or does
not register with the conscious. See section 5 for more details on this.

3

Related Work

The cortex region has been heavily modelled in [8][9]. Their design uses a columnar
structure to model the neuron activation. As part of their prediction theory, they allow a
neuron to be depolarised slightly, without activating it. This almost prepares the neuron for
future activity and suggests that the brain then expects the related region to be activated.
Could that involve the idea of a weakened signal? The main idea is that the neuron can learn
through active dendrites, different patterns for activation from sparse coding in the input
synapses. This idea of plasticity is also written about in [14]. A biological description of the
formation and storage of memories can be found in [11]. Memories that are crossreferenced would also setup preferred regions for activation, if they find or vote for features
that remain persistent during the search. The idea of integrating from regions of a whole
picture is what the Deep Learning algorithm does [10][12], although one criticism of that is
the requirement for a deep hierarchy. The ground-breaking work of [13] however showed
that it could reason intelligently and learn human-level control on its own.

The idea of a mesh of neurons that all connect with each other is an integral part of theory
in brain modelling [1][9] and for the author, it has been used several times. A visual-type of
classifier in described in [4], for example, where a grid-like structure contains weight sets in
bands that link directly from the input to the output. Each input cell has its own set of
weights for its relation to the output. The bands are used to categorise numerical input into

5

DCS

5 March 2018

more discrete units, but they could also be used for categories, for example, or any discrete
set of units, such as squares on a chessboard. It is interesting that the paper noted this
process as more shallow or visual, in nature. That paper also noted the orthogonal nature of
the classifier and its relation to the nearest neighbour algorithm, a theory also used in [2].
Both of these papers consider that separation of features and some type of vote or count
over them is possible. The image recognition algorithm [3] is another one that uses a gridlike structure which is heavily cross-referenced. With that, a pixel stores what other pixels
are present when it is used and this is then filtered over all pixels to get a general relation
for the image as a whole. Entropy is also a major theme of the research and a new type of
classifier in [5] is an entropy-style of equation that again uses a grid to store basic frequency
counts representing all relations between all of the input units. The units with matching
frequency counts are then grouped together. Comparing to the work in this paper then, it is
only required to change an input band into an input feature.

4

A Case Study using Computer Chess

One version of this process is being used as part of the ChessMaps [6] computer chess
program. This is not a top-level program and some parts are not very strong or even
missing. It is being used more to test some AI theories, but different versions can be
compared to each other. Even if the algorithm appears to work, that does not mean the
program will eventually play at a particularly strong level, but it has not significantly reduced
the playing strength from the earlier versions.

4.1

Features Database

The first thing that is required is the stored memory. This is represented by a features
database that can be generated automatically from game scores. For the current program,
the database was generated from a list of World Championship games and some of the
older Grandmasters. The features database reads game scores and generates each position
for each move. Then under the piece move, it saves a board, where each square stores a
frequency count for any piece that has occupied the square in the related position. These
frequencies then define the most popular piece on each square for any move that was
6

DCS

5 March 2018

played. So the key value is a particular piece on a particular square and recorded are the
popular pieces on the other squares. In this example, a piece is a feature and so each square
represents a different feature, where the whole board is then the pattern.

This then stores the relations between the pieces more than a static memory of every
position would. For the game scores that were read, 3-4 million positions produced a
database that is only about 22 MB in size and it probably grows in size something closer to
the logarithm than linear. This is because there is a lot of consistency about what moves are
played in particular positions and so after a while, frequency numbers for existing pieces are
updated more often than adding new piece moves and positions.

4.2

Scene and Memory Positions

The scene position is the current chess position. Then for each piece on each square, the
database is queried and asked to return a board from memory that contains the most
popular piece on each other square. This would result in a maximum of 32 boards from
memory. These feature boards are therefore the aggregated memory, and they are
aggregated again, to determine the most popular piece on each square from all of the
boards. If there is a count tie, then it is possible to consider more than one piece per square
in the final aggregated board. The cross-referencing process is when the memory boards are
combined to produce the overall preferred feature set, but there is no further combining of
different regions, as the whole board can be easily represented as a single region.

4.3

Search Process

A search process starts by analysing the current position for legal moves. Then for each
piece on each square, the database is queried and asked to return a board from memory
that contains the most popular piece on each other square, or the feature board. The next
stage of the prediction process is to combine the scene pattern with the memory pattern, or
in this case, the current position with the aggregated features board. This is very easily done
and only requires to check that a legal move in the position results in moving a piece to a
square that matches with a piece stored for the square in the features board. The move can

7

DCS

5 March 2018

then be played to generate a new chess position and the whole process repeated. In fact,
for the ChessMaps program tactical moves are usually always played and so this feature
matching is carried out over the safer moves only. It does substantially reduce the number
of moves however and would involve a large degree of forward pruning. So this section
hopefully shows how the algorithm might work in practice, even if its actual playing strength
has not been evaluated.

5

Shallow Hierarchies

Shallow hierarchies are a structure associated with the more intelligent processing in the
cortex brain area [9]. The author has described his own model using Figure 1, which is still
abstract. In the figure, the lower half represents the input stimulus, which would be the
initial input scene. The upper half has two parts: the lower part is built by a knowledgebased construct known as a concept tree and would represent the memory structures. They
probably occur in the lower half as well, actually. There is then maybe a cross-referencing
and time-based layer before the signals are passed to the more intelligent upper part, which
is an experience-based neural network. The concept trees aggregate memory and bring in
new information, while the neural network aggregates the information back into a more
singular concept. This process can pass information laterally to other regions, as in the
trigger, from where it can get fed back down to the memory structures again. See the other
papers for more detail on this diagram.

For the purposes of this paper, a lot of the theory is represented. As described at the end of
section 2.3, memories would like some type of terminal point, to allow them to be
distinguished from a transient search stage. It may be thought that this would require a
deeper and deeper hierarchy as the search develops, but in fact, it can all be carried out by
the structure of Figure 1. The first requirement is a terminal point, to recognise a significant
feature. When a terminal point is realised, the excitation is maybe different, triggering
something to get updated. If, for example, only the two left-most concept trees fired, then
in the first level of the neural network, only node t00 would fire. If that is the case, then a
question may be if node t00 becomes a terminal node and also completes a circuit. If the

8

DCS

5 March 2018

right-most tree fires as well, then node t02 would also fire. In that case, two nodes in the
base of the neural network are firing and so this may encourage activation further up the
hierarchy.

Figure 1. Concept Trees with the Neural Network Structure (figure 4, [7] and related).

The signal strength by itself is significant. If only 1 node fires, for example, it can still send a
signal somewhere, but the relevance of it will probably be negligible compared to a more
connected ensemble and remember that the pattern may also fire inhibitors that switch off
the surrounding area. As written in [8], neurons can be slightly depolarised, or prepared for
activation, which would be similar to a weakened signal. So it would require enough ‘t’
nodes to fire, to make the ‘GC’ node significant and include it in the search process. As
lateral connections can move the search to another region (GC0 to GC1, for example),
instead of searching deeper and deeper, it can be a matter of feeding back into a different
memory region and repeating, until something significant is found.

9

DCS

6

5 March 2018

Conclusions

This paper has described a systematic process for searching over distributed information
and then making predictions on it. The prediction comes in the form of a related piece of
information, found in memory, that is eventually considered significant during the search
process. Its realisation is still controlled by the current situation and related memories and
so there are clear constraints as to what may eventually become a prediction. The process is
actually one of reduction, to remove the more unlikely possibilities and to direct the search
towards the better options. It could be asked why a brain-like process is being modelled in
such a systematic way and more like a computer system. The paper is only suggesting a
general architecture and does not give specifics. It is known that memories are retrieved
when we think about something and obviously they must be relevant to the situation. Any
reasoning process must filter through the information to give a better result and this often
involves remembering things not in the current situation. So while the exact mechanics are
not known, the algorithm of this paper does map to general brain processes quite closely. It
then goes a step further by trying to put them in terms of the distributed pattern-based
architecture and basic neuronal component. It is described that a shallow hierarchy can be a
useful ‘unit of work’. Although, this unit can repeat to add arbitrary complexity and it may
form its own hierarchy. It is shown that one level of the hierarchy can feed back into itself
and the related memory structures to perform a much more detailed search. Computer
chess is used to give a concrete example of how the process might be realised in practice.

References
[1] Anderson, J.A., Silverstein, J.W., Ritz, S.A. and Jones, R.A. (1977) Distinctive Features, Categorical
Perception, and Probability Learning: Some Applications of a Neural Model, Psychological
Review, Vol. 84, No. 5.
[2] Bay, S.D. (1999). Nearest Neighbor Classification from Multiple Feature Subsets, Intelligent data
analysis, Vol. 3, No. 3, pp. 191-209.
[3] Greer,

K.

(2017).

New

Ideas

for

Brain

Modelling

4,

available

on

arXiv

at

https://arxiv.org/abs/1708.04806. Accepted for publication.
[4] Greer, K. (2017). A Single-Pass Classifier for Categorical Data, Special Issue on: IJCSysE Recent
Advances in Evolutionary and Natural Computing Practice and Applications, Int. J. Computational
10

DCS

5 March 2018

Systems Engineering, Inderscience, Vol. 3, Nos. 1/2, pp. 27 - 34. Also available on arXiv at
http://arxiv.org/abs/1503.02521.
[5] Greer,

K.

(2016).

New

Ideas

for

Brain

Modelling

3,

available

on

arXiv

at

https://arxiv.org/abs/1612.00369.
[6] Greer, K. (2015). Dynamic Move Chains and Move Tables in Computer Chess, available on arXiv
at http://arxiv.org/abs/1503.04333
[7] Greer, K. (2014). New Ideas for Brain Modelling 2, in: K. Arai et al. (eds.), Intelligent Systems in
Science and Information 2014, Studies in Computational Intelligence, Vol. 591, pp. 23 - 39,
Springer International Publishing Switzerland, 2015, DOI 10.1007/978-3-319-14654-6_2.
Published on arXiv at http://arxiv.org/abs/1408.5490. Extended version of the SAI'14 paper,
Arguments for Nested Patterns in Neural Ensembles.
[8] Hawkins, J. and Ahmad, S. (2016). Why Neurons Have Thousands of Synapses, a Theory of
Sequence

Memory

in

Neocortex.

Front.

Neural

Circuits,

Vol.

10,

No.

23.

doi:

10.3389/fncir.2016.00023.
[9] Hawkins, J. and Blakeslee, S. On Intelligence. Times Books, 2004.
[10]Hinton, G.E., Osindero, S. and Teh, Y.-W. (2006). A fast learning algorithm for deep belief nets,
Neural computation, Vol. 18, No. 7, pp. 1527 – 1554.
[11]Kandel, E.R. (2001). The Molecular Biology of Memory Storage: A Dialogue Between Genes and
Synapses, Science magazine, Vol. 294, No. 5544, pp. 1030 - 1038.
[12]LeCun, Y. Bengio, Y. and Hinton, G. (2015). Deep Learning, Nature, Vol. 521, pp. 436 - 444,
doi:10.1038/nature14539.
[13]Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A.A., Veness, J., Bellemare, M.G., Graves, A.,
Riedmiller, M., Fidjeland, A.K., Ostrovski, G., Petersen, S., Beattie, C., Sadik, A., Antonoglou, I.,
King, H., Kumaran, D., Wierstra, D., Legg, S. and Hassabis, D. (2015). Human-level control
through deep reinforcement learning, Nature, Research Letter, Vol. 518, pp. 529 – 533,
doi:10.1038/nature14236.
[14]Yuste, R. (2011). Dendritic Spines and Distributed Circuits, Neuron, Vol. 71, pp. 772 - 781.

11

