# Sparse distributed memory

Sparse distributed memory (SDM) is a mathematical model of human long-term memory introduced by Pentti Kanerva in 1988 while he was at NASA Ames Research Center. It is a generalized random-access memory (RAM) for long (e.g., 1,000 bit) binary words. These words serve as both addresses to and data for the memory. The main attribute of the memory is sensitivity to similarity, meaning that a word can be read back not only by giving the original write address but also by giving one close to it, as measured by the number of mismatched bits (i.e., the Hamming distance between memory addresses).[1]

SDM implements transformation from logical space to physical space using distributed data representation and storage, similarly to encoding processes in human memory.[2] A value corresponding to a logical address is stored into many physical addresses. This way of storing is robust and not deterministic. A memory cell is not addressed directly. If input data (logical addresses) are partially damaged at all, we can still get correct output data.[3]

The theory of the memory is mathematically complete[1] and has been verified by computer simulation. It arose from the observation that the distances between points of a high-dimensional space resemble the proximity relations between concepts in human memory. The theory is also practical in that memories based on it can be implemented with conventional RAM-memory elements.[4]

## Definition

Human memory has a tendency to congregate memories based on similarities between them (although they may not be related), such as "firetrucks are red and apples are red".[5] Sparse distributed memory is a mathematical representation of human memory, and uses high-dimensional space to help model the large amounts of memory that mimics that of the human neural network.[6][7] An important property of such high dimensional spaces is that two randomly chosen vectors are relatively far away from each other, meaning that they are uncorrelated.[8] SDM can be considered a realization of Locality-sensitive hashing.

The underlying idea behind a SDM is the mapping of a huge binary memory onto a smaller set of physical locations, so-called hard locations. As a general guideline, those hard locations should be uniformly distributed in the virtual space, to mimic the existence of the larger virtual space as accurately as possible. Every datum is stored distributed by a set of hard locations, and retrieved by averaging those locations. Therefore, recall may not be perfect, accuracy depending on the saturation of the memory.

Kanerva's proposal is based on four basic ideas:[9]

• 1. The boolean space ${\displaystyle \{0,1\}^{n}}$, or ${\displaystyle 2^{n}}$ points in ${\displaystyle 10^{0} dimensions, exhibits properties which are similar to humans' intuitive notions of relationships between the concepts. This means that it makes sense to store data as points of the mentioned space where each memory item is stored as an n-bit vector.
• 2. Neurons with n inputs can be used as address decoders of a random-access memory
• 3. Unifying principle: data stored into the memory can be used as addresses to the same memory. Distance between two points is a measure of similarity between two memory items. The closer the points, the more similar the stored vectors.
• 4. Time can be traced in the memory as a function of where the data are stored, if the data are organized as sequences of events

### The binary space N

The SDM works with n-dimensional vectors with binary components. Depending on the context, the vectors are called points, patterns, addresses, words, memory items, data, or events. This section is mostly about the properties of the vector space N = ${\displaystyle \{0,1\}^{n}}$. Let n be number of dimensions of the space. The number of points, or possible memory items, is then ${\displaystyle 2^{n}}$. We will denote this number by N and will use N and ${\displaystyle 2^{n}}$ to stand also for the space itself.[3]

Concepts Related to the space N: ${\displaystyle \{0,1\}^{n}}$[3]

• Origin, 0: The point with all coordinates 0 is called the origin, 0 = 000...00.
• Complement, 'x: The complement, or opposite, of point x is the n-tuple that has ones where x has zeros and vice versa.
• Norm, |x|: The norm of point x is the number of ones in its binary representation.
• Difference, x − y: The difference of two points x and y is the n-tuple that has ones where x and y differ and zeros elsewhere. It is the bitwise 'exclusive or': x − y = x ⊕ y. The difference commutes: x − y = y − x.
• Distance, d(x, y) The distance between two points x and y is the number of dimensions at which x and y differ. It is called the Hamming distance (its square root is the Euclidean distance) and is expressed in bits. Distance is the norm of the difference: d(x, y) = |x − y|
• Betweenness, x:y:z: Point y is between points x and z if and only if the distance from x to z is the sum of the distances from x to y and from y to z; that is, x:y:z ⇔ d(x, z) = d(x, y) + d(y, z). It is easily seen that every bit of a point in between is a copy of the corresponding bit of an endpoint.
• Orthogonality, x ⊥ y: Point x is orthogonal to point y, or the two are perpendicular or indifferent, if and only if the distance between the two is half the number of dimensions: x ⊥ y ⇔ d(x, y) = n/2. The distance n/2 is called indifference distance of space N. If x is orthogonal to y, it is also orthogonal to its complement 'y (x is halfway between y and 'y).
• Circle, O(r,x) A circle with radius r and center x is the set of points that are at most r bits from x: O(r,x) = {y | d(x, y) ≤ r}.

Properties of the space N: ${\displaystyle \{0,1\}^{n}}$[1][3]

The space N can be represented by the vertices of the unit cube in n-dimensional Euclidean space. The vertices lie on the surface of an n-dimensional sphere with (Euclidean-metric) radius ${\displaystyle {\sqrt {n}}/2}$. This gives rise to the sphere analogy. We will call a space spherical if

• 1. any point x has a unique opposite 'x,
• 2. the entire space is between any point x and its opposite 'x, and
• 3. all points are "equal" (meaning that for any two points x and y there is a distance preserving automorphism of the space that maps x to y, so that from any of its points the space "looks" the same).

The surface of a sphere (in Euclidean 3d-space) clearly is spherical. According to definition, N is also spherical, since y ⊕ x ⊕ (…) is an automorphism that maps x to y. Because N is spherical, it is helpful to think of it as the surface of a sphere with circumference 2n. All points of N are equally qualified as points of origin, and a point and its complement are like two poles at distance n from each other, with the entire space in between. The points halfway between the poles and perpendicular to them are like the equator.

Distribution of the space N

The number of points that are exactly d bits form an arbitrary point x (say, from the point 0) is the number of ways to choose d coordinates from a total of n coordinates, and is therefore given by the binomial coefficient: ${\displaystyle {\binom {n}{d}}={\frac {n!}{d!(n-d)!}}}$

The distribution of N thus is the binomial distribution with parameters n and p, where p = 1/2. The mean of the binomial distribution is n/2, and the variance is n/4. This distribution function will be denoted by N(d). The normal distribution F with mean n/2 and standard deviation ${\displaystyle {\sqrt {n}}/2}$ is a good approximation to it: N(d) = Pr{d(x, y) ≤ d} ≅ F{(d − n / 2)/ ${\displaystyle {\sqrt {n/4}}}$}

Tendency to orthogonality

An outstanding property of N is that most of it lies at approximately the mean (indifference) distance n/2 from a point (and its complement). In other words, most of the space is nearly orthogonal to any given point, and the larger n is, the more pronounced is this effect.

### As neural network

The SDM may be regarded either as a content-addressable extension of a classical random-access memory (RAM) or as a special type of three layer feedforward neural network. The main SDM alterations to the RAM are:[10]

• The SDM calculates Hamming distances between the reference address and each location address. For each distance which is less or equal to the given radius the corresponding location is selected.
• The memory is represented by counters (where n is number of locations and m is the input data length) instead of single-bit storage elements.
• Writing to the memory, instead of overwriting, is as follows:
• if the i-bit of the input data is 1, the corresponding counters (counters in the selected locations (rows) and in the i-th columns) are incremented,
• if the i-bit of the input data is 0, the corresponding counters are decremented.
• Reading (or recall) from the memory is similar:
• The contents of the selected locations are summed columnwise.
• Each sum is thresholded. If the sum is greater than or equal to the threshold value the corresponding output bit is set to 1, in the opposite case it is cleared. Note that the thresholds may be zero, if the training input vectors are closed to orthogonal ones.

#### Neuron model

An idealized description of neuron is as follows: a neuron has a cell body with two kinds of branches: dendrites and an axon. It receives input signals from other neurons via dendrites, integrates (sums) them and generates its own (electric) output signal which is sent to outside neurons via axon. The points of electric contact between neurons are called synapses.

When a neuron generates signal it is firing and after firing it must recover before it fires again. The relative importance of a synapse to the firing of neuron is called synaptic weight (or input coefficient). There are two kinds of synapses: excitatory that trigger neuron to fire and inhibitory that hinder firing. The neuron is either excitatory or inhibitory according to the kinds of synapses its axon makes.[11]

in addition to input the firing of neuron depends on threshold. The higher the threshold the more important it is that excitatory synapses have input while inhibitory ones do not.[12] Whether a recovered neuron actually fires depends on whether it received sufficient excitatory input (beyond the threshold) and not too much of inhibitory input within a certain period.

The formal model of neuron makes further simplifying assumptions.[13] An n-input neuron is modeled by a linear threshold function ${\displaystyle F:\{0,1\}^{n}->\{0,1\}}$ as follows :

For ${\displaystyle i=0,...,n-1}$ where n is the number of inputs, let ${\displaystyle F_{t}}$ be the output at time t: ${\displaystyle F_{t}\in \{0,1\}}$, and let ${\displaystyle x_{i,t}}$ be the i-th input at time t: ${\displaystyle x_{i,t}\in \{0,1\}}$. Let ${\displaystyle w_{i}}$ be the weight of the i-th input and let ${\displaystyle c}$ be the threshold.

The weighted sum of the inputs at time t is defined by ${\displaystyle S_{t}=\sum _{i=0}^{n-1}w_{i}x_{i,t}}$

The neuron output at time t is then defined as a boolean function: ${\displaystyle \mathbf {F} _{t}={\begin{cases}1&{\text{if }}S_{t}>=c,\\0&{\text{otherwise }}.\end{cases}}}$

Where Ft=1 means that the neuron fires at time t and Ft=0 that it doesn't, i.e. in order for neuron to fire the weighted sum must reach or exceed the threshold . Excitatory inputs increase the sum and inhibitory inputs decrease it.

Kanerva's key thesis[1] is that certain neurons could have their input coefficients and thresholds fixed over entire life of an organism and used as address decoders where n-tuple of input coefficients (the pattern to which neurons respond most readily) determines the n-bit memory address, and the threshold controls the size of the region of similar address patterns to which the neuron responds.

This mechanism is complementary to adjustable synapses or adjustable weights in a neural network (perceptron convergence learning), as this fixed accessing mechanism would be a permanent frame of reference which allows to select the synapses in which the information is stored and from which it is retrieved under given set of circumstances. Furthermore, an encoding of the present circumstance would serve as an address.

The address a of a neuron with input coefficients w where ${\displaystyle w_{0},..,w_{n_{1}}}$ is defined as an n-bit input pattern that maximizes the weighted sum. The maximum occurs when the inhibitory inputs are zeros and the excitatory inputs are ones. The i-th bit of address is:

${\displaystyle \mathbf {a} _{i}={\begin{cases}1&{\text{if }}w_{i}>0,\\0&{\text{if }}w_{i}<0.\end{cases}}}$ (assuming weights are non-zero)

The maximum weighted sum ${\displaystyle S(w)}$ is then the sum of all positive coefficients: ${\displaystyle S(w)=\sum _{w_{i}>0}w_{i}}$

And the minimum weighted sum ${\displaystyle s(w)}$ would correspond to a point opposite the neuron address a: ${\displaystyle s(w)=\sum _{w_{i}<0}w_{i}}$

When the threshold c is in range ${\displaystyle s(w) the output of the neuron is 0 for some addresses (input patterns) and 1 for others. If the threshold is above S the output is always 0, if it's below s the output is always 1. So by a proper choice of the threshold a neuron responds only to just one address. When the threshold is S (the maximum for the weighted sum) the neuron responds only to its own address and acts like an address decoder of a conventional random-access memory.

### Memory location

SDM is designed to cope with address patterns that span an enormous address space (order of ${\displaystyle 2^{1000}}$). SDM assumes that the address patterns actually describing physical situations of interest are sparsely scattered throughout the input space. It is impossible to reserve a separate physical location corresponding to each possible input; SDM implements only a limited number of physical or hard locations. The physical location is called a memory (or hard) location.[4]

Every hard location has associated with it two items:

• a fixed hard address, which is the N-bit address of the location
• a contents portion that is M-bits wide and that can accumulate multiple M-bit data patterns written into the location. The contents' portion is not fixed; it is modified by data patterns written into the memory.

In SDM a word could be stored in memory by writing it in a free storage location and at the same time providing the location with the appropriate address decoder. A neuron as an address decoder would select a location based on similarity of the location's address to the retrieval cue. Unlike conventional Turing machines SDM is taking advantage of parallel computing by the address decoders. The mere accessing the memory is regarded as computing, the amount of which increases with memory size.[1]

An N-bit vector used in writing to and reading from the memory. The address pattern is a coded description of an environmental state. (e.g. N = 256.)

#### Data pattern

An M-bit vector that is the object of the writing and reading operations. Like the address pattern, it is a coded description of an environmental state. (e.g. M = 256.)

#### Writing

Writing is the operation of storing a data pattern into the memory using a particular address pattern. During a write, the input to the memory consists of an address pattern and a data pattern. The address pattern is used to select hard memory locations whose hard addresses are within a certain cutoff distance from the address pattern. The data pattern is stored into each of the selected locations.

Reading is the operation of retrieving a data pattern from the memory using a particular address pattern. During a read, an address pattern is used to select a certain number of hard memory locations (just like during a write). The contents of the selected locations are bitwise summed and thresholded to derive an M-bit data pattern. This serves as the output read from the memory.

#### Pointer chains

All of the items are linked in a single list (or array) of pointers to memory locations, and are stored in RAM. Each address in an array points to an individual line in the memory. That line is then returned if it is similar to other lines. Neurons are utilized as address decoders and encoders, similar to the way neurons work in the brain, and return items from the array that match or are similar.

### Critical distance

Kanerva's model of memory has a concept of a critical point: prior to this point, a previously stored item can be easily retrieved; but beyond this point an item cannot be retrieved. Kanerva has methodically calculated this point for a particular set of (fixed) parameters. The corresponding critical distance of a Sparse Distributed Memory can be approximately evaluated minimizing the following equation with the restriction ${\displaystyle d\in N}$ and ${\displaystyle d\leqslant n}$. The proof can be found in,[14][15]

${\displaystyle {\tilde {f}}(d)=\left\{{\frac {1}{2}}\cdot \left[1-N\left(z<{\frac {w\cdot shared(d)}{\sqrt {\theta }}}\right)+N\left(z<{\frac {-w\cdot shared(d)}{\sqrt {\theta }}}\right)\right]-{\frac {d}{n}}\right\}^{2}}$

Where:

• ${\displaystyle d}$: is the distance to the target;
• ${\displaystyle h}$: is the number of hard-locations activated during read and write operations (this value depends on access radius values);
• ${\displaystyle s}$: is the number of total stored bitstrings in memory;
• ${\displaystyle H}$: is the number of hard-locations in memory;
• ${\displaystyle w}$: is the number of times the target bitstring was written in memory;
• ${\displaystyle \theta }$: is the total of random bitstrings in all ${\displaystyle h}$ hard-locations activated by a read operation;
• ${\displaystyle shared(d)}$: is the mean number of shared hard-locations activated by two bitstrings ${\displaystyle d}$ bits away from each other. One can find some values for a 1000-dimensional SDM in Kanerva's book, Table 7.1, p. 63, or the equations to calculate to any SDM in Appendix B, p. 125 of the same book.

## Probabilistic interpretation

An associative memory system using sparse, distributed representations can be reinterpreted as an importance sampler, a Monte Carlo method of approximating Bayesian inference.[16] The SDM can be considered a Monte Carlo approximation to a multidimensional conditional probability integral. The SDM will produce acceptable responses from a training set when this approximation is valid, that is, when the training set contains sufficient data to provide good estimates of the underlying joint probabilities and there are enough Monte Carlo samples to obtain an accurate estimate of the integral.[17]

## Biological plausibility

Sparse coding may be a general strategy of neural systems to augment memory capacity. To adapt to their environments, animals must learn which stimuli are associated with rewards or punishments and distinguish these reinforced stimuli from similar but irrelevant ones. Such task requires implementing stimulus-specific associative memories in which only a few neurons out of a population respond to any given stimulus and each neuron responds to only a few stimuli out of all possible stimuli.

Theoretical work on SDM by Kanerva has suggested that sparse coding increases the capacity of associative memory by reducing overlap between representations. Experimentally, sparse representations of sensory information have been observed in many systems, including vision,[18] audition,[19] touch,[20] and olfaction.[21] However, despite the accumulating evidence for widespread sparse coding and theoretical arguments for its importance, a demonstration that sparse coding improves the stimulus-specificity of associative memory has been lacking until recently.

Some progress has been made in 2014 by Gero Miesenböck's lab at the University of Oxford analyzing Drosophila Olfactory system.[22] In Drosophila, sparse odor coding by the Kenyon cells of the mushroom body is thought to generate a large number of precisely addressable locations for the storage of odor-specific memories. Lin et al.[23] demonstrated that sparseness is controlled by a negative feedback circuit between Kenyon cells and the GABAergic anterior paired lateral (APL) neuron. Systematic activation and blockade of each leg of this feedback circuit show that Kenyon cells activate APL and APL inhibits Kenyon cells. Disrupting the Kenyon cell-APL feedback loop decreases the sparseness of Kenyon cell odor responses, increases inter-odor correlations, and prevents flies from learning to discriminate similar, but not dissimilar, odors. These results suggest that feedback inhibition suppresses Kenyon cell activity to maintain sparse, decorrelated odor coding and thus the odor-specificity of memories.

## Quantum-mechanical interpretation

Quantum superposition states that any physical system simultaneously exists in all of its possible states, the number of which is exponential in the number of entities composing the system. The strength of presence of each possible state in the superposition – i.e., the probability with which it would be observed if measured – is represented by its probability amplitude coefficient. The assumption that these coefficients must be represented physically disjointly from each other, i.e., localistically, is nearly universal in the quantum theory/quantum computing literature. Alternatively, as suggested recently by Gerard Rinkus at Brandeis University,[24] these coefficients can be represented using sparse distributed representations (SDR) inline with Kanerva's SDM design, wherein each coefficient is represented by a small subset of an overall population of representational units and the subsets can overlap.

Specifically, If we consider an SDR model in which the overall population consists of Q clusters, each having K binary units, so that each coefficient is represented by a set of Q units, one per cluster. We can then consider the particular world state, X, whose coefficient's representation, R(X), is the set of Q units active at time t to have the maximal probability and the probabilities of all other states, Y, to correspond to the size of the intersection of R(Y) and R(X). Thus, R(X) simultaneously serves both as the representation of the particular state, X, and as a probability distribution over all states. When any given code, e.g., R(A), is active, all other codes stored in the model are also physically active in proportion to their intersection with R(A). Thus, SDR provides a classical realization of quantum superposition in which probability amplitudes are represented directly and implicitly by sizes of set intersections. If algorithms exist for which the time it takes to store (learn) new representations and to find the closest-matching stored representation (probabilistic inference) remains constant as additional representations are stored, this would meet the criterion of quantum computing.[24] (Also see Quantum cognition and Quantum associative memory)

## Applications

In applications of the memory, the words are patterns of features. Some features are produced by a sensory system, others control a motor system. There is a current pattern (of e.g. 1000 bits), which is the current contents of the system's focus. The sensors feed into the focus, the motors are driven from the focus, and the memory is accessed through the focus.

What goes on in the world-the system's "subjective" experience-is represented internally by a sequence of patterns in the focus. The memory stores this sequence and can recreate it later in the focus if addressed with a pattern similar to one encountered in the past. Thus, the memory learns to predict what is about to happen. Wide applications of the memory would be in systems that deal with real-world information in real time.

The applications include vision – detecting and identifying objects in a scene and anticipating subsequent scenes – robotics, signal detection and verification, and adaptive learning and control. On the theoretical side, the working of the memory may help us understand memory and learning in humans and animals.[4][25]

### The Best Match Search

SDM can be applied to the problem of finding the best match to a test word in a dataset of stored words.[1][26] or, in other words, the Nearest neighbor search problem.

Consider a memory with N locations where ${\displaystyle N=2^{n}}$. Let each location have the capacity for one n-bit word (e.g. N= 2100 100-bit words), and let the address decoding be done by N address decoder neurons. Set the threshold of each neuron x to its maximum weighted sum ${\displaystyle |x|}$ and use a common parameter d to adjust all thresholds when accessing the memory. The effective threshold of neuron x will be then ${\displaystyle x-|d|}$ which means that the location x is accessible every time the address x is within d bits of the address presented to memory (i.e. the address held by the address register). With ${\displaystyle d=0}$ we have a conventional random-access memory. Assume further that each location has a special location-occupied bit that can be accessed in the same way as the regular datum bits. Writing a word to a location sets this location-occupied bit. Assume that only occupied location can be read.

To file the data in memory, start by setting ${\displaystyle d=n}$ and issue a command to clear the location-occupied bit. This single operation marks all memory as unoccupied regardless of the values of the address register. Then set ${\displaystyle d=0}$ and write each word y of the data set with y itself as the address. Notice that each write operation affects only one location: the location y. Filing time is thus proportional to the number of words in the dataset.

Finding the best match for a test word z, involves placing z in the address register and finding the least distance d for which there is an occupied location. We can start the search by setting ${\displaystyle d=0}$ and incrementing d successively until an occupied location is found. This method gives average search times that are proportional to the number of address bits or slightly less than ${\displaystyle n/2}$[1] because the nearest occupied location can be expected to be just under ${\displaystyle n/2}$ bits from z (with binary search on d this would be O(log(n)).

With 100-bit words 2100 locations would be needed, i.e. an enormously large memory. However if we construct the memory as we store the words of the dataset we need only one location (and one address decoder) for each word of the data set. None of the unoccupied locations need to be present. This represents the aspect of sparseness in SDM.

### Speech recognition

SDM can be applied in transcribing speech, with the training consisting of "listening" to a large corpus of spoken language. Two hard problems with natural speech are how to detect word boundaries and how to adjust to different speakers. The memory should be able to handle both. First, it stores sequences of patterns as pointer chains. In training—in listening to speech—it will build a probabilistic structure with the highest incidence of branching at word boundaries. In transcribing speech, these branching points are detected and tend to break the stream into segments that correspond to words. Second, the memory's sensitivity to similarity is its mechanism for adjusting to different speakers—and to the variations in the voice of the same speaker.[4]

### "Realizing forgetting"

Decay Functions
 The exponential decay function The negated-translated sigmoid function

At the University of Memphis, Uma Ramamurthy, Sidney K. D'Mello, and Stan Franklin created a modified version of the sparse distributed memory system that represents "realizing forgetting." It uses a decay equation to better show interference in data. The sparse distributed memory system distributes each pattern into approximately one hundredth of the locations,[clarification needed] so interference can have detrimental results.[27]

Two possible examples of decay from this modified sparse distributed memory are presented

Exponential decay mechanism: ${\displaystyle \!f(x)=1+e^{-ax}}$

Negated-translated sigmoid decay mechanism: ${\displaystyle f(x)=1-[{\frac {1}{1+e^{-a(x-c)}}}]}$

In the exponential decay function, it approaches zero more quickly as x increases, and a is a constant(usually between 3-9) and c is a counter. For the negated-translated sigmoid function, the decay is similar to the exponential decay function when a is greater than 4.[27]

As the graph approaches 0, it represents how the memory is being forgotten using decay mechanisms.

### Genetic sparse distributed memory

Ashraf Anwar, Stan Franklin, and Dipankar Dasgupta at The University of Memphis; proposed a model for SDM initialization using Genetic Algorithms and Genetic Programming (1999).

Genetic memory uses genetic algorithm and sparse distributed memory as a pseudo artificial neural network. It has been considered for use in creating artificial life.[28]

### Statistical prediction

SDM has been applied to statistical prediction, the task of associating extremely large perceptual state vectors with future events. In conditions of near- or over- capacity, where the associative memory behavior of the model breaks down, the processing performed by the model can be interpreted as that of a statistical predictor and each data counter in an SDM can be viewed as an independent estimate of the conditional probability of a binary function f being equal to the activation set defined by the counter's memory location.[29]

### Artificial general intelligence

• LIDA uses sparse distributed memory to help model cognition in biological systems. The sparse distributed memory places space is recalling or recognizing the object that it has in relation to other objects. It was developed by Stan Franklin, the creator of the "realizing forgetting" modified sparse distributed memory system.[30] Transient episodic and declarative memories have distributed representations in LIDA (based on modified version of SDM[31]), there is evidence that this is also the case in the nervous system.[32]
• CMatie is a 'conscious' software agent developed to manage seminar announcements in the Mathematical Sciences Department at the University of Memphis. It's based on SDM augmented with the use of genetic algorithms as an associative memory.[33]
• Hierarchical temporal memory utilizes SDM for storing sparse distributed representations of the data.

(Also see Cognitive architecture & Artificial General Intelligence for a list of SDM related projects)

### Reinforcement learning

SDMs provide a linear, local function approximation scheme, designed to work when a very large/high-dimensional input (address) space has to be mapped into a much smaller physical memory. In general, local architectures, SDMs included, can be subject to the curse of dimensionality, as some target functions may require, in the worst case, an exponential number of local units to be approximated accurately across the entire input space. However, it is widely believed that most decision-making systems need high accuracy only around low-dimensional manifolds of the state space, or important state "highways".[34] The work in Ratitch et al.[35] combined the SDM memory model with the ideas from memory-based learning, which provides an approximator that can dynamically adapt its structure and resolution in order to locate regions of the state space that are "more interesting"[36] and allocate proportionally more memory resources to model them accurately.

### Object indexing in computer vision

Dana H. Ballard's lab[37] demonstrated a general-purpose object indexing technique for computer vision that combines the virtues of principal component analysis with the favorable matching properties of high-dimensional spaces to achieve high precision recognition. The indexing algorithm uses an active vision system in conjunction with a modified form of SDM and provides a platform for learning the association between an object's appearance and its identity.

## Extensions

Many extensions and improvements to SDM have been proposed, e.g.:

• Ternary memory space: This enables the memory to be used as a Transient Episodic Memory (TEM) in cognitive software agents. TEM is a memory with high specificity and low retention, used for events having features of a particular time and place.[38][39]
• Integer SDM that uses modular arithmetic integer vectors rather than binary vectors. This extension improves the representation capabilities of the memory and is more robust over normalization. It can also be extended to support forgetting and reliable sequence storage.[8]
• Using word vectors of larger size than address vectors: This extension preserves many of the desirable properties of the original SDM: auto-associability, content addressability, distributed storage and robustness over noisy inputs. In addition, it adds new functionality, enabling an efficient auto-associative storage of sequences of vectors, as well as of other data structures such as trees.[40]
• Constructing SDM from Spiking Neurons: Despite the biological likeness of SDM most of the work undertaken to demonstrate its capabilities to date has used highly artificial neuron models which abstract away the actual behaviour of neurons in the brain. Recent work by Steve Furber's lab at the University of Manchester[41][42][43] proposed adaptations to SDM, e.g. by incorporating N-of-M rank codes[44][45] into how populations of neurons may encode information—which may make it possible to build an SDM variant from biologically plausible components. This work has been incorporated into SpiNNaker (Spiking Neural Network Architecture) which is being used as the Neuromorphic Computing Platform for the Human Brain Project.[46]
• Non-random distribution of locations:[47][48] Although the storage locations are initially distributed randomly in the binary N address space, the final distribution of locations depends upon the input patterns presented, and may be non-random thus allowing better flexibility and generalization. The data pattern is first stored at locations which lie closest to the input address. The signal (i.e. data pattern) then spreads throughout the memory, and a small percentage of the signal strength (e.g. 5%) is lost at each subsequent location encountered. Distributing the signal in this way removes the need for a select read/write radius, one of the problematic features of the original SDM. All locations selected in a write operation do not now receive a copy of the original binary pattern with equal strength. Instead they receive a copy of the pattern weighted with a real value from 1.0->0.05 to store in real valued counters (rather than binary counters in Kanerva's SDM). This rewards the nearest locations with a greater signal strength, and uses the natural architecture of the SDM to attenuate the signal strength. Similarly in reading from the memory, output from the nearest locations is given a greater weight than from more distant locations.The new signal method allows the total signal strength received by a location to be used as a measure of the fitness of a location and is flexible to varying input (as the loss factor does not have to be changed for input patterns of different lengths).
• SDMSCue (Sparse Distributed Memory for Small Cues): Ashraf Anwar & Stan Franklin at The University of Memphis, introduced a variant of SDM capable of Handling Small Cues; namely SDMSCue in 2002. The key idea is to use multiple Reads/Writes, and space projections to reach a successively longer cue.[49]

## Related patents

• Method and apparatus for a sparse distributed memory system US 5113507 A, Universities Space Research Association, 1992[50]
• Method and device for storing and recalling information implementing a kanerva memory system US 5829009 A, Texas Instruments, 1998[51]
• Digital memory, Furber, Stephen. US 7512572 B2, 2009[52]
• Temporal memory using sparse distributed representation US 20110225108 A1 Numenta, 2011[53]

## References

1. Kanerva, Pentti (1988). Sparse Distributed Memory. The MIT Press. ISBN 978-0-262-11132-4.
2. ^ Rissman, Jesse; Wagner, Anthony D. (2012). "Distributed representations in memory: insights from functional brain imaging". Annual Review of Psychology. 63: 101–28. doi:10.1146/annurev-psych-120710-100344. PMC 4533899. PMID 21943171.
3. ^ a b c d Grebeníček, František. "Sparse Distributed Memory− Pattern Data Analysis. URL: http://www.fit.vutbr.cz/~grebenic/Publikace/mosis2000.pdf"
4. Flynn, Michael J., Pentti Kanerva, and Neil Bhadkamkar. "Sparse distributed memory prototype: principles and operation." (1989).
5. ^ C. George Boeree (2002). "General Psychology". Shippensburg University.
6. ^ a b Pentti Kanerva (1993). "Sparse Distributed Memory and Related Models". Pennsylvania State University. pp. 50–76. CiteSeerX 10.1.1.2.8403. Missing or empty |url=` (help)
7. ^ M. J. Flynn; P. Kanerva & N. Bhadkamkar (December 1989). "Sparse Distributed Memory: Principles and Operation" (PDF). Stanford University. Retrieved 1 November 2011.
8. ^ a b Snaider, Javier, and Stan Franklin. "Integer sparse distributed memory." Twenty-fifth international flairs conference. 2012.
9. ^ Mendes, Mateus Daniel Almeida. "Intelligent robot navigation using a sparse distributed memory." Phd thesis, (2010). URL: https://eg.sib.uc.pt/handle/10316/17781
10. ^ Grebenıcek, František. Neural Nets as Associative Memories. Diss. Brno University of Technology, 2001. URL: http://www.vutium.vutbr.cz/tituly/pdf/ukazka/80-214-1914-8.pdf
11. ^ Kandel, Eric R., James H. Schwartz, and Thomas M. Jessell, eds. Principles of neural science. Vol. 4. New York: McGraw-Hill, 2000.
12. ^ Eccles, John G. "Under the Spell of the Synapse." The Neurosciences: Paths of Discovery, I. Birkhäuser Boston, 1992. 159-179.
13. ^ McCulloch, Warren S., and Walter Pitts. "A logical calculus of the ideas immanent in nervous activity." The bulletin of mathematical biophysics 5.4 (1943): 115-133.
14. ^ Brogliato, Marcelo Salhab (2012). Understanding Critical Distance in Sparse Distributed Memory (Thesis). hdl:10438/13095.
15. ^ Brogliato, Marcelo Salhab; Chada, Daniel de Magalhães; Linhares, Alexandre (2014). "Sparse Distributed Memory: understanding the speed and robustness of expert memory". Frontiers in Human Neuroscience. 8 (222): 222. doi:10.3389/fnhum.2014.00222. PMC 4009432. PMID 24808842.
16. ^ Abbott, Joshua T., Jessica B. Hamrick, and Thomas L. Griffiths. "Approximating Bayesian inference with a sparse distributed memory system." Proceedings of the 35th annual conference of the cognitive science society. 2013.
17. ^ Anderson, Charles H. "A conditional probability interpretation of Kanerva's sparse distributed memory." Neural Networks, 1989. IJCNN., International Joint Conference on. IEEE, 1989.
18. ^ Vinje, WE; Gallant, JL (2000). "Sparse coding and decorrelation in primary visual cortex during natural vision" (PDF). Science. 287 (5456): 1273–1276. CiteSeerX 10.1.1.456.2467. doi:10.1126/science.287.5456.1273. PMID 10678835.
19. ^ Hromádka, T; Deweese, MR; Zador, AM (2008). "Sparse representation of sounds in the unanesthetized auditory cortex". PLoS Biol. 6 (1): e16. doi:10.1371/journal.pbio.0060016. PMC 2214813. PMID 18232737.
20. ^ Crochet, S; Poulet, JFA; Kremer, Y; Petersen, CCH (2011). "Synaptic mechanisms underlying sparse coding of active touch". Neuron. 69 (6): 1160–1175. doi:10.1016/j.neuron.2011.02.022. PMID 21435560.
21. ^ Ito, I; Ong, RCY; Raman, B; Stopfer, M (2008). "Sparse odor representation and olfactory learning". Nat Neurosci. 11 (10): 1177–1184. doi:10.1038/nn.2192. PMC 3124899. PMID 18794840.
22. ^ A sparse memory is a precise memory. Oxford Science blog. 28 Feb 2014. http://www.ox.ac.uk/news/science-blog/sparse-memory-precise-memory
23. ^ Lin, Andrew C.; et al. (2014). "Sparse, decorrelated odor coding in the mushroom body enhances learned odor discrimination". Nature Neuroscience. 17 (4): 559–568. doi:10.1038/nn.3660. PMC 4000970. PMID 24561998.
24. ^ a b
25. ^ Denning, Peter J. Sparse distributed memory. Research Institute for Advanced Computer Science [NASA Ames Research Center], 1989.
26. ^ Minsky, Marvin, and Papert Seymour. "Perceptrons." (1969). "Time vs. memory for best matching - an open problem" p. 222–225
27. ^ a b Uma Ramamurthy; Sidney K. D'Mello; Stan Franklin. "Realizing Forgetting in a Modified Sparse Distributed Memory System". Computer Science Department and The Institute for Intelligent Systems. The University of Memphis. pp. 1992–1997. Archived from the original (PDF) on 2006. Retrieved 1 November 2011.
28. ^ Rocha LM, Hordijk W (2005). "Material representations: From the genetic code to the evolution of cellular automata". Artificial Life. 11 (1–2): 189–214. CiteSeerX 10.1.1.115.6605. doi:10.1162/1064546053278964. PMID 15811227.
29. ^ Rogers, David. "Statistical prediction with Kanerva's sparse distributed memory." Advances in neural information processing systems. 1989.
30. ^ Rao, R. P. N.; Fuentes, O. (1998). "Hierarchical Learning of Navigational Behaviors in an Autonomous Robot using a Predictive Sparse Distributed Memory" (PDF). Machine Learning. 31: 87–113. doi:10.1023/a:1007492624519.
31. ^ Franklin, Stan, et al. "The role of consciousness in memory." Brains, Minds and Media 1.1 (2005): 38.
32. ^ Shastri, L. 2002. Episodic memory and cortico-hippocampal interactions. Trends in Cognitive Sciences
33. ^ Anwar, Ashraf; Franklin, Stan (2003). "Sparse distributed memory for 'conscious' software agents". Cognitive Systems Research. 4 (4): 339–354. doi:10.1016/s1389-0417(03)00015-9.
34. ^ Ratitch, Bohdana, Swaminathan Mahadevan, and Doina Precup. "Sparse distributed memories in reinforcement learning: Case studies." Proc. of the Workshop on Learning and Planning in Markov Processes-Advances and Challenges. 2004.
35. ^ Ratitch, Bohdana, and Doina Precup. "Sparse distributed memories for on-line value-based reinforcement learning." Machine Learning: ECML 2004. Springer Berlin Heidelberg, 2004. 347-358.
36. ^ Bouchard-Côté, Alexandre. "Sparse Memory Structures Detection." (2004).
37. ^ Rao, Rajesh PN, and Dana H. Ballard. "Object indexing using an iconic sparse distributed memory." Computer Vision, 1995. Proceedings., Fifth International Conference on. IEEE, 1995.
38. ^ D'Mello, Sidney K., Ramamurthy, U., & Franklin, S. 2005. Encoding and Retrieval Efficiency of Episodic Data in a Modified Sparse Distributed Memory System. In Proceedings of the 27th Annual Meeting of the Cognitive Science Society. Stresa, Ital
39. ^ Ramamaurthy, U., Sidney K. D'Mello, and Stan Franklin. "Modified sparse distributed memory as transient episodic memory for cognitive software agents." Systems, Man and Cybernetics, 2004 IEEE International Conference on. Vol. 6. IEEE, 2004.
40. ^ Snaider, Javier; Franklin, Stan (2012). "Extended sparse distributed memory and sequence storage". Cognitive Computation. 4 (2): 172–180. doi:10.1007/s12559-012-9125-8.
41. ^ Furber, Steve B.; et al. (2004). "Sparse distributed memory using N-of-M codes". Neural Networks. 17 (10): 1437–1451. doi:10.1016/j.neunet.2004.07.003. PMID 15541946.
42. ^ Sharp, Thomas: "Application of sparse distributed memory to the Inverted Pendulum Problem". Diss. University of Manchester, 2009. URL: http://studentnet.cs.manchester.ac.uk/resources/library/thesis_abstracts/MSc09/FullText/SharpThomas.pdf
43. ^ Bose, Joy. Engineering a Sequence Machine Through Spiking Neurons Employing Rank-order Codes. Diss. University of Manchester, 2007.
44. ^ Simon Thorpe and Jacques Gautrais. Rank order coding. In Computational Neuroscience: Trends in research, pages 113–118. Plenum Press, 1998.
45. ^ Furber, Stephen B.; et al. (2007). "Sparse distributed memory using rank-order neural codes". IEEE Transactions on Neural Networks. 18 (3): 648–659. CiteSeerX 10.1.1.686.6196. doi:10.1109/tnn.2006.890804. PMID 17526333.
46. ^ Calimera, A; Macii, E; Poncino, M (2013). "The Human Brain Project and neuromorphic computing". Functional Neurology. 28 (3): 191–6. PMC 3812737. PMID 24139655.
47. ^ Hely, Tim; Willshaw, David J.; Hayes, Gillian M. (1997). "A new approach to Kanerva's sparse distributed memory". IEEE Transactions on Neural Networks. 8 (3): 791–794. doi:10.1109/72.572115. PMID 18255679.
48. ^ Caraig, Lou Marvin. "A New Training Algorithm for Kanerva's Sparse Distributed Memory." arXiv preprint arXiv:1207.5774 (2012).
49. ^ Anwar, Ashraf; Franklin, Stan (2005-01-01). Ng, Michael K.; Doncescu, Andrei; Yang, Laurence T.; Leng, Tau (eds.). A Sparse Distributed Memory Capable of Handling Small Cues, SDMSCue. IFIP — The International Federation for Information Processing. Springer US. pp. 23–38. doi:10.1007/0-387-24049-7_2. ISBN 978-0-387-24048-0.
50. ^ Method and apparatus for a sparse distributed memory system US 5113507 A, by Louis A. Jaeckel, Universities Space Research Association, 1992, URL: http://www.google.com/patents/US5113507
51. ^ Method and device for storing and recalling information implementing a kanerva memory system US 5829009 A, by Gary A. Frazier, Texas Instruments Incorporated, 1998, URL: https://www.google.com/patents/US5829009
52. ^ Furber, Stephen B. "Digital memory." U.S. Patent No. 7,512,572. 31 Mar. 2009.URL: https://www.google.com/patents/US7512572
53. ^ Temporal memory using sparse distributed representation US 20110225108 A1, by Jeffrey C. Hawkins, Marianetti II Ronald, Anosh Raj, Subutai Ahmad, Numenta, Inc, 2011, URL: http://www.google.com/patents/US20110225108
54. ^ Emruli, Blerim, Fredrik Sandin, and Jerker Delsing. "Vector space architecture for emergent interoperability of systems by learning from demonstration." Biologically Inspired Cognitive Architectures 11 (2015): 53-64.
55. ^ Emruli, Blerim; Sandin, Fredrik (2014). "Analogical mapping with sparse distributed memory: A simple model that learns to generalize from examples". Cognitive Computation. 6 (1): 74–88. doi:10.1007/s12559-013-9206-3.
56. ^ Berchtold, Martin. "Processing Sensor Data with the Common Sense Toolkit (CSTK)." *(2005).
57. ^ The Mind Wanders by B. Hayes, 2018. url: http://bit-player.org/2018/the-mind-wanders
58. ^ a b Brogliato, Marcelo S.; Chada, Daniel M.; Linhares, Alexandre (2014). "Sparse distributed memory: understanding the speed and robustness of expert memory". Frontiers in Human Neuroscience. 8: 222. doi:10.3389/fnhum.2014.00222. PMC 4009432. PMID 24808842.
59. ^ Surkan, Alvin J. "WSDM: Weighted sparse distributed memory prototype expressed in APL." ACM SIGAPL APL Quote Quad. Vol. 23. No. 1. ACM, 1992.
60. ^ Turk, Andreas, and Günther Görz. "Kanerva's sparse distributed memory: an object-oriented implementation on the connection machine." IJCAI. 1995.
61. ^ Silva; Tadeu Pinheiro, Marcus; Pádua Braga, Antônio; Soares Lacerda, Wilian (2004). "Reconfigurable co-processor for kanerva's sparse distributed memory" (PDF). Microprocessors and Microsystems. 28 (3): 127–134. doi:10.1016/j.micpro.2004.01.003.
62. ^ Muja, Marius. "Scalable nearest neighbour methods for high dimensional data." (2013).
63. ^ Hassoun, Mohamad H. Associative neural memories. Oxford University Press, Inc., 1993.
64. ^ Kanerva, Pentti. "Binary spatter-coding of ordered K-tuples." Artificial Neural Networks—ICANN 96. Springer Berlin Heidelberg, 1996. 869-873.
65. ^ Kohonen, Teuvo. "Correlation matrix memories." Computers, IEEE Transactions on 100.4 (1972): 353-359.
66. ^ Ankit Kumar, Ozan Irsoy, Jonathan Su, James Bradbury, Robert English, Brian Pierce, Peter Ondruska, Ishaan Gulrajani, Richard Socher. "Ask Me Anything: Dynamic Memory Networks for Natural Language Processing." arXiv preprint arXiv:1506.07285 (2015).
67. ^ Plate, Tony A. "Holographic Reduced Representation: Distributed representation for cognitive structures." (2003).
68. ^ Kanerva, Pentti. "Computing with 10,000-bit words." Proc. 52nd Annual Allerton Conference on Communication, Control, and Computing. 2014.
69. ^ Weston, Jason, Sumit Chopra, and Antoine Bordes. "Memory networks." arXiv preprint arXiv:1410.3916 (2014).
70. ^ Vinyals, Oriol, Meire Fortunato, and Navdeep Jaitly. "Pointer networks." arXiv preprint arXiv:1506.03134 (2015).
71. ^ Kurach, Karol, Andrychowicz, Marcin and Sutskever, Ilya. "Neural Random-Access Machines." arXiv preprint arXiv:1511.06392 (2015).
72. ^ Joshi, Aditya, Johan Halseth, and Pentti Kanerva. "Language Recognition using Random Indexing." arXiv preprint arXiv:1412.7026 (2014). https://arxiv.org/abs/1412.7026
73. ^ Pollack, Jordan B (1990). "Recursive distributed representations". Artificial Intelligence. 46 (1): 77–105. doi:10.1016/0004-3702(90)90005-k.
74. ^ De Sousa Webber, Francisco (2015). "Semantic Folding Theory And its Application in Semantic Fingerprinting". arXiv:1511.08855 [cs.AI].
75. ^ Salakhutdinov, Ruslan, and Geoffrey Hinton. "Semantic hashing." RBM 500.3 (2007): 500.
76. ^ Eliasmith, Chris, et al. "A large-scale model of the functioning brain." science 338.6111 (2012): 1202-1205.
77. ^ Hawkins, Jeff; George, Dileep; Niemasik, Jamie (2009). "Sequence memory for prediction, inference and behaviour". Philosophical Transactions of the Royal Society B: Biological Sciences. 364 (1521): 1203–1209. doi:10.1098/rstb.2008.0322. PMC 2666719. PMID 19528001.
78. ^ Lee, Honglak, et al. "Efficient sparse coding algorithms." Advances in neural information processing systems. 2006.
79. ^ Graves, Alex, Greg Wayne, and Ivo Danihelka. "Neural Turing Machines." arXiv preprint arXiv:1410.5401 (2014).
80. ^ Vincent, Pascal; et al. (2010). "Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion" (PDF). The Journal of Machine Learning Research. 11: 3371–3408.
81. ^ Rachkovskij, Dmitri A.; Kussul, Ernst M. (2001). "Binding and normalization of binary sparse distributed representations by context-dependent thinning" (PDF). Neural Computation. 13 (2): 411–452. doi:10.1162/089976601300014592.