Here we attempt to answer what is memory, how is it stored and retrieved.
Human Memory
Definition of Memory
Memory is a process by which information is:
- Encoded
- Stored
- Retrieved The brain has different types of memories, and certain brain regions are specialized for this task.
Ebbinghaus Curves

Other experiments destroy parts of the cortex and correlate this with recall.
Types of memory
We have the memory pipeline:
Sensory memory
- iconic memory (remembering images) 150-500 milliseconds
- Echoic memory (recognizing some sounds) usually retained for 1 to 2 seconds. This memory is filtered by consciousness/attention to be passed to short term working memory. The register capacity of this memory is considered to be quite large. Large Capacity: since you take in tons of sensory info, but it fades almost instantly unless you pay attention.
We can view this memory as a buffer in a device, see Devices OS. Just that we do not have a concept of attention at that level.
Short-term memory
it has an explicit storage of about 7 +- 2 items (so very small), and it depends on attention of the human. Depending on attention level, it is retained for 2 to 18 seconds. It seems the representation here is often vocal. One hypothesis why this memory is so short is that it has to be maintained with recurrent connections, which easily fade with time. This is further selectively transferred to long-term memory.
Short-Term Memory Maintains Transient Representations of Information Relevant to Immediate Goals
Interesting to notice that short term memory is goal relevant in humans.
Long-term memory
There is a division between declarative and non-declarative memory ones that can be recalled consciously or not. Conscious meaning you can recall it and transfer it to someone else. Often explicit motor experiences become implicit memories.

Priming is for example auto completion of visual stimuli.
Cell assembly theory
This theory has been proposed by Donald Hebb (1949) to explain memory creation.
“Cells that fire together, wire together.”
General Idea
After learning, partial information leads to full activation of the learned pattern -> engram.
This idea has also been explored in other years before in AI, but it is not mainstream at all.
Pattern Completion: Engram
The patterns are then stored in the strength of the connection, now we are able to do pattern completion to complete what is present there. The activations are compositional, a single activation is not enough to understand exactly what feature was present for that, but activation of one part elicits the activation of the other part, which triggers the memory within this theory.
- The engram: the physical substrate of a memory.
- Experiments using optogenetics (e.g., in mice) show that activating specific neuron ensembles can trigger recall of a memory → very Hebbian, but now with experimental precision.
Activity Sustained by Connections
One hypothesis of how memories are present is very similar to the idea or Circuiti Sequenziali for Latch SR memories, where you have feedback connections that feed each other and maintain similar firing patterns that encode the memory. This idea is very similar to the pattern completion hypothesis for cell assembly theory.
- Local inhibitory networks keep the memories separate
- Long range interactions sustain this
- Local excitatory networks could have some feedback loop on this regard.
Persistent Activity for Neural Memory
\[...\]This persistent firing is not affected by blockers of fast excitatory and inhibitory synaptic transmission, indicating that it depends on the intrinsic membrane properties of the neuron.
This activity is then sustained by network connections, that keep memories separated using loops.
What happens:
- Voltage-gated calcium channels make $Ca^{2+}$ gates open, non selective cation channels (I don’t know what it means)
- Depolarized making more voltage gated calcium channels open.
Long term memory
Non-declarative memory
These memories related to action based memories and conditioning phenomena studied in Conditioning Theory. We are not consciously able to explain how we do these nondeclarative memories by definition.
- Mice running on rotarod
- Learning rules
- Liking some things, how we come to like these things (political views for example, or certain beliefs).
For example, most of the motor experiences become implicit memories, or abilities.
Explicit motor experiences later become implicit memories:Sequence/instrumental/procedural learning.
Conscious decision takes about 150ms to process, this means that most of the actions we do are implicit, they are learned and are part of the non-declarative memories.
Declarative memories
The forms of declarative memories divide into two main kinds as we see in the following sections.
Episodic Memory
The Canadian psychologist Endel Tulving first developed the idea that explicit memory can be further classified into episodic memory (the memory of personal experiences or autobiographical memory) and semantic memory (memory for facts). Episodic memory is used to recall that we saw the first flowers of spring yesterday or that we heard Beethoven’s “Moonlight Sonata” several months ago. Semantic memory is used to learn the meanings of new words or concepts. ~ (Kandel 2013)
If we use AI, we can say that semantic memory is learnt with all those associations, and with that episodic memory too, but LLMs cannot form episodic memory and integrate new ones…
- Episodic memory: memories of specific events (time and place of some events, or life experiences), they are usually very rich and full of details.
Semantic Memories
- Semantic memory: general knowledge (e.g. bananas are yellow), they are not associated with time and space. These are distilled from episodic memories somehow.
- The replays of episodic memories often happen in REM state (which is so linked to memory consolidation).
- This semantic memory is distributed in the brain, they are not localized.
Semantic memories are a kind of declarative memories that are difficult to imbue in artificial intelligence systems. These are things like world knowledge, object, language, that are not events. We are interested how the memories of these facts in brain work, looks like its different compared to events for episodic memory. HM couldn’t have new semantic memories for example.
It is consolidated in the Hippocampal Long-term Memory, and it is digested during rest and sleep, usually the nREM sleep part of our life.
Case of Henry Molaison
Henry Molaison was an amnesic patient that had his hippocampus (medial temporal lobe on both) removed in 1953 for epilepsy. He could not form new episodic memories, but his semantic memory was intact. At the time it had no clue what the medial-temporal lobes were doing, he had seizures that started from that part of the brain, so the surgeons removed that part of his brain.
- IQ was normal
- Short term memory was normal
- Sensory and motor functions were normal
- He did a mirror-drawing task (he was able to learn the task).
- Semantic memory was ok (he had common sense, know basic facts about the world).
- Priming was ok (BERT like masking problems are ok). But: Was not able to form new declarative memories (remembering facts or addresses). But he would be able to form non-declarative memories, such as some specific tasks.
But he could not be able to recall new people, neither episodic memories up to 2 years before surgery (older memories where intact).
With R.B.’s case, where it had a very concentrated stroke, it was identified that it was exactly the CA1 pathway inside the hippocampus that contributed to the consolidation of the memory
Brain regions for recall and recognition
Anatomy of the Hippocampus
The Hippocampus

It is called hippocampus because its similar as a seahorse. Anatomically, the structure was known for a long time.
Development of hippocampus
In humans the cortex became larger but the Hippocampus remained similar, and it has been pushed back (into the posterior part). This means it is an ancient structure. But it is different in animals.
- Dentate gyrus (DG) → CA3 → CA1 → subiculum → outputs. This “trisynaptic loop” is preserved and is why the hippocampus is often called highly conserved.
- The basic wiring diagram is the same across mammals (that’s why rodent studies can tell us a lot about humans).
- But the details — size, folding, specialization — vary depending on species’ ecological niches and behaviors.

Lateral PFC (attention areas) is also useful for memory recall to happen.
Structure of the hippocampus

The dentate gyrus has more granule cells than other parts of the brain.
- 1.2 million granule cells, they make a lot of synapses, and the main hypothesis why they do is because they need to make pattern completion. Specifically the CA3 region.
- DG’s main jobs is to take in overlapping inputs from the entorhinal cortex and transform them into sparse, non-overlapping codes. This means that studying sparse coding is a good way to understand what this region is doing.
The dentate gyrus is believed for pattern separation, while the CA3 region, due to the prevalence of recurrent connections, is believed it is used for pattern completion.
Formation of memories
At the end here is a rapresentation of the Hebbian rule: cells that fire together wire together.
! Only when many synapses are activated at the same time are activated.
Strong synapses are good for memory (for example very dangerous situations). Usually memory is from multiple sensory streams.
Hippocampus is difficult to excite unless we need to do it multiple times.
Long-term potentiation of the Schaffer Collateral
We want to know when the Schaffer collateral is activated (remember from CA3 to CA1, after the pattern completion). They go to fiber bundles that are easily stimulated electrically (then we record the neurons in the CA1 region), which makes experiments in this field easy. We see LTP by stimulating those fibers.
The pre-synapse releases glutamate that binds to AMPA receptors that activate and bring potassium in that bring the potential of the post-synapse up. Glutamate also binds with NMDA receptors, now do nothing because magnesium is blocking the path, but they are important for learning. But if the post-synaptic neuron fires, then the magnesium ion is removed (pushed away by the high potential) and the NMDA receptor can be activated, which means the neuron can learn, they fired together after bringing more AMPA glutamate receptors to the membrane and being more sensitive to the glutamate released by the presynaptic fire. NMDA lets calcium in, which creates a cascade of processes that bring more AMPA ion gates in the post-synapse.
CA1 have NMDA receptors that are important for this connection (if you add blockers then they are not stimulated anymore, these are important for brain plasticity, ketamines modulate NMDA receptors for example). If they fire together, the calcium makes the signal stronger using a retrograde signal that brings more AMPA receptors in the membrane, which means they more strongly linked. This is LTP.
Information analysis
Allocentric Information
The brain represents some allocentric information which is not egocentric information, meaning it is not dependent of the point of view. The memories are created with allocentric information to create place cells. This is the nonspatial information, this is why pattern completion of associative cells is not enough.
So it is linked with the dorsal pathway for vision.
- Processes spatial information
- Flows from postrhinal cortex → MEC (Medial Entorhinal Cortex) → CA1 proximal
- Labeled as “Allocentric” processing
- Handles spatial location and navigation
Associative memories
Activating part of the network activates the other parts too! This is an hypothesis of how the dentate gyrus part of our brain works. Activating part of one pattern accidentally triggers other stored patterns. The network doesn’t enforce uniqueness of associations. Anytime one input fires, it may incorrectly cause unrelated outputs to fire, leading to interference and memory corruption.

But we have problems with memory interference.
Associativity at the Synapse level
Remember that often a single synapse is not sufficient to activate the synapse of the next neuron. You need cooperativity of a group of neurons or a strong synapse (Associativity). and some times the association is specific meaning some synapses are stronger than others even if the activation level is similar.
Multiple sensory streams help creating strong connections. (Hippocampus is difficult to excite, it needs often to be multi-modal to activate).
Spatial Memory
We go and investigate how episodic memory of places is formed, and how does the hippocampus represent this memory.
Morris Water Maze Experiment
Setting and Objective of the Experiment
Setting: In this experiment, the rat is put in a pool of water and has to find a platform to get out of the water (not pleasurable fro mices to stay in water). The rat is trained to find the platform (random walk before experience, then they are more directed), and then the platform is removed. The rat is then put back in the pool and the time to find the platform is measured.
Objective: We want to study episodic memory formation. It concludes that hippocampus is crucial in formation of memories in the hippocampus.
Effects on alterations of NMDAR receptor
NMDAR receptor: They mutated a gene to remove NMDAR, and they observed you are much slower in any learning in the rats. (It took more time for the rats to find the platform). They also did the opposite, overexpressing NMDAR made them learning faster.
- Checked the electrophysiology activations of transgenic and wild type
- And did behavioral analysis of mice performance in this task.
Removing and overexpressing was very strong evidence of importance of learning.

This experiment aims to measure spatial memory.
Place Cells
1. Dynamic ensemble membership: Only 15-25% of place cells active on any given day were also active on another day, even just 5-30 days apart. Most cells (57%) were active in only one or two sessions out of ten.
2. Stable spatial coding when active: When individual place cells did appear across multiple sessions, their place fields remained in exactly the same locations - they didn’t drift or change position.
3. Preserved spatial representation: Despite the constantly changing cast of active cells, the overall spatial representation remained accurate enough that the researchers could decode the mouse’s location from neural activity using patterns learned 30 days earlier.
- Stability: Place fields maintain fixed locations when cells are active
- Plasticity: Different subsets of cells are active each day, creating unique “signatures” for different visits to the same environment CA1 coding has day-to-day dynamism at the cellular level
Place specificity
CA1 neurons are place specific, they fire if they recognize to be in some specific position, now always. Then they used microdrives to record the firing of the neurons in the CA1 region of the hippocampus. The neurons fire in multiple places, not single place. They used information from multiple neurons to reconstruct information of the paths taken by the rat.
Cofiring logic
They also saw that there was a large overlapping of place fields for cells that co-fire temporally. (cell ensemble code hypothesis). They saw that cells with small overlapping place fields, do not fire together (anti-correlation), but only This has been seen in many species (also in humans, monkeys, bats).
If another neurons take input from these cells, they will fire when these cells fire, which allow to see how the information flows and is co-used.
Grid Cells
The MEC
They wanted to know the input of the place cells, this has allocentric information about the animal. Grid cells are found in the medial entorhinal cortex, they fire in a grid-like pattern (invariant of animal species, animal’s posture, landmarks etc), they are used to create a map of the environment. They are also found in humans.
Ventral and Dorsal
They also find some shifted grid patterns, rotated and similars. Grids that have different spacing in dorsal or ventral MEC part of the brain (ventral is coarser (1m) compared to dorsal), and they also fire at different periodicity, and change in different animals (flying or not, more complex for flying animals, or climbing animals, could be tri dimensional for those).
In humans grid cells are two-dimensional
Mathematical operation for Grid Cells
The grid looks like a Fourier transformation in space, not time domain (wavelet or fourier decomposition). A good reference is work by Yoram Burak (Accurate Path Integration in Continuous Attractor Network Models).
Even in the absence of external sensory cues, foraging rodents maintain an estimate of their position, allowing them to return home in a roughly straight line. This computation is known as dead reckoning or path integration. A discovery made three years ago in rats focused attention on the dorsolateral medial entorhinal cortex (dMEC) as a location in the rat’s brain where this computation might be performed. In this area, so-called grid cells fire whenever the rat is on any vertex of a triangular grid that tiles the plane. Here we propose a model that could generate grid-cell-like responses in a neural network. The inputs to the model network convey information about the rat’s velocity and heading, consistent with known inputs projecting into the dMEC. The network effectively integrates these inputs to produce a response that depends on the rat’s absolute position. We show that such a neural network can integrate position accurately and can reproduce grid-cell-like responses similar to those observed experimentally. ~Yoram Burak
Position is just by visual information.
Head direction
In the thalamus we can observe some head-direction cells.

Cortex for Memory
We have also cortex input for episodic memory recall. If you look at brain activity patterns, you see that hippocampus is not enough for memory recall. The important part is Left inferior prefrontal cortex. This means that the memory system is still complex and we don’t have understood clearly how this part comes into play.
References
[1] Kandel “Principles of Neural Science, Fifth Edition” McGraw Hill Professional 2013