# Paper Summary: The Koha Code - A Biological Theory of Memory

[paper link](https://arxiv.org/abs/2109.02124)  
[author’s presentation](https://www.youtube.com/watch?v=nR0SBUOoLRM)

This paper introduces the Koha model, which aims to explain how information is stored within the brain and how neurons learn to become pattern detectors. It proposes that dendritic spines serve as computational units that scan for particular temporal codes, or “spike trains”, which are used to dampen or excite signals. A mechanism for learning is proposed, wherein each neuron listens for an “echo” signal that is used to reinforce the physical structure of dendritic spines that contributed to the original signal. Competitive learning then drives neurons to self-organize into emergent algorithms.

![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8ca331b5-c615-4c2a-a596-131c30a19cac_1024x1024.png)

A neuron. The larger branch pointing down is an axon - the output of the neuron. All of the other forking branches are dendrites, and these serve as the inputs to the cell.

There are many different types of neurons, but they can be generally categorized as inhibitory or excitatory. One of the most common kinds of excitatory neurons is a pyramidal neuron. All mammals, birds, fish, and reptiles have pyramidal neurons.

![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0fef07bc-c038-4f9e-82fe-023ca44c3545_1800x868.png)

Pyramidal neurons from all over the brain. They all have a pretty similar structure.

Excitatory and inhibitory neurons can organize to form neural circuits. These circuits can make use of a mechanism called “lateral inhibition” to suppress the activity of other neurons. Networks with these inhibitory configurations (“competitive circuits”) form a winner-takes-all competition between networks where the first circuit to fire can suppress all its competitors.

Pyramidal neurons also have many interesting differences compared to inhibitory neurons. The dendrites (reminder: the inputs) of pyramidal neurons are noteworthy for being absolutely riddled with small mushroom-like protrusions called “spines”. Inhibitory neurons have virtually no such spines, and it is believed these spines allow pyramidal neurons to record information.

![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c2ed968-1a7c-40ca-a601-d4d9dcf28645_1402x768.png)

Two pyramidal dendrites featuring many mushroom-like “spines” - the memory units of the neuron

Dendritic spines also come in several different phases of development: stubby, thin, and mushroom. Human infants have almost all stubby spines, and adults have almost all mushroom spines. It is thought that mushroom spines, being the largest and most stable, serve as long-term memory and that the more fragile “thin spines” play a role in learning, with their ability to rapidly form and break their connection. Thin spines can come and go, but mushroom spines tend to last a lifetime. Furthermore, these dendritic spines can change shape in just seconds when exposed to an appropriate stimulus.

![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F01ec7e9d-0992-4483-9858-96bb860b48a5_948x496.png)

The three traditional types of dendritic spines

Visual neurons can be categorized as being either simple or complex cells. Simple cells fire continuously when they receive their input pattern.

![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f5fd56d-dce9-4108-a694-1a609e74720b_1064x718.png)

A simple cell serving as an edge detector. In the top left, we have a white diagonal line across the neuron’s receptive field. This is exactly what this neuron is looking for, so it fires off a big spike train. The next row down we have an input that is somewhat close to what the neuron is looking for, so it manages to shrug out a piddly spike train. The last two aren’t even close, so they get nothing.

Complex cells are special. Complex cells find invariances in their inputs that allow them to fire even if their input is rotated, rescaled, or even only in response to certain timing or directional motion.

![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3842064f-6742-4874-a90a-a83c320a0240_1916x1100.png)

Complex neurons with A) translation invariance B) the ability to discriminate between Bart and Homer Simpson C) directional preference D) scale invariance

Alright, background info out of the way. The Koha model proposes that dendritic spines (the mushroom things) change their shape to amplify or dampen incoming signals. The author argues that dendritic spines also have the right molecular machinery to encode a temporal pattern in the form of a sequence of “on” and “off” states. These spines then compute a distance metric between their inputs and their stored patterns to determine whether they should fire or not.

Neurons are essentially in competition with other neurons receiving the same inputs because, remember, this is a winner-takes-all race. Neurons with internal codes that are more similar to an input allow the signal to move freely through them while different codes are subject to a delay. Neurons with internal codes that are less similar to an input delay the signal by altering their shape. This means that the best-matching neuron for a given input will fire the fastest, thereby winning the lateral inhibition race.

When a neuron fires, it subsequently receives a “neural backpropagation” signal. During this process, the dendritic spines that participated in activating the neuron see a surge in calcium levels not seen in nearby spines that did not participate. The author proposes that this is the signal that indicates the spine contributed to a best-matching neuron, and that it should do more of whatever it’s doing.

The Koha model can also be viewed as an associative memory model, like a Hopfield Network or a Transformer, but I’ll leave those details in the paper.

![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2dc681bd-0288-4f9f-ad4a-89a5f22d5c4c_1496x358.png)

The "HopfieldLayer" configuration of the Modern Hopfield Network

That’s pretty much all there is to it. The conclusion is nice and concise so I’ll just quote it here.

> This work introduces two novel ideas with widespread implications for the field of neuroscience:   
>   
> On a micro level, it argues for the existence of a temporal code within every dendritic spine. Just as genes are the molecular unit of heredity, the Koha code is argued to be the unit of memory. It shows how dendritic spines use these temporal codes to scan for precise spike patterns in their synaptic inputs. It describes a biologically plausible process for how signal filtration occurs within spine necks, as well as provides compelling evidence for the existence of such a mechanism within dendritic spines.   
>   
> On a macro level, it explains how neurons within competitive circuits can learn to become pattern detectors, through competitive learning. In this model, the chance of a neuron to become the "winning neuron" within a competitive circuit, directly depends on the temporal codes within a neuron’s dendritic spines.

  
[Substack link](https://open.substack.com/pub/sigil/p/paper-summary-the-koha-code-a-biological?r=2iy3v&utm_campaign=post&utm_medium=web)