Chapter 1
Formalizing Memory Models
How should we conceptualize memory models?
Contents
1.1Prelude
We are introducing a mathematical formalization of memory models for spaced repetition. A memory model estimates how likely you are to recall the answer to each card in your Anki collection. The formalization works across traditional models like SM-2 and FSRS, as well as future content-aware memory models. It will serve as the foundation for upcoming posts on evaluating memory models, which will explore how to answer questions like “Is FSRS any good?” and “How much better is FSRS than SM-2?”.
In Content-aware Spaced Repetition I (Giacomo) drew a distinction between two components of a spaced repetition system: the memory model, which predicts how likely a student is to remember a card at any given moment and the review scheduler, which makes recommendations about when you should actually study each card, taking into account the memory model’s predictions.
We believe that keeping these two concerns separate facilitates clearer reasoning about each one. Our research currently focuses on memory models because scheduler performance is bounded above by the quality of the memory model.
In general we will think of Spaced Repetition systems as operating on Retrieval Prompts which have Answers that the student attempts to recall. Most systems use a flashcard metaphor, where each (Retrieval Prompt, Answer) pair is represented by a digital flashcard. For simplicity, we will use the term card to refer to (Retrieval Prompt, Answer) pairs.
1.2Introduction
A memory model answers the following question for any card in the student’s collection: given everything we know about the student, including their review history, what is the likelihood the student correctly recalls the answer right now?
We call this likelihood the retrievability of a card: the probability that the student will correctly recall the answer at a specific point in time. The formal target is:
where
One could frame this as binary classification — will the student
recall or not? — but that would discard most of the useful signal. A
classifier outputs a hard decision boundary: there is some elapsed time
Anki uses four rating buttons — Again, Hard, Good, Easy — which
capture a more detailed indication of recall confidence. In this
formalization we binarize:
1.3Formalization
Let’s define the spaces involved:
: the set of students : the set of cards : the grade space (1 means recalled) : time, expressed in seconds from a fixed epoch : the history space, an ordered sequence of review observations where is the card reviewed, is the Unix timestamp, is the grade, and captures any additional metadata (e.g. the Anki ease buttons: Again/Hard/Good/Easy)
A memory model is a function:
The model takes a student, a review history, and a card, and returns
a forgetting curve: a function mapping elapsed time
This is equivalent by currying to a flat function
We use elapsed time rather than an absolute timestamp as the argument
of the forgetting curve. The forgetting curve is a statement about how
memory decays from a reference point — namely, the moment of the last
review — so elapsed time is the natural axis. Absolute timestamps would
conflate two things: when the review happened and how much time has
passed since. Using
For most practical purposes we query the model at a specific elapsed
time
1.4Traditional Models vs. Content-aware Models
This formalization makes two departures from traditional models.
First, it breaks the local
independence assumption. Most existing memory models — DASH and
its variants, Duolingo’s HLR, FSRS — restrict the history used to
predict retrievability for card
Here, the history
Second, cards are represented by their content
rather than a categorical identifier. Traditional systems assign each
card an opaque ID; here,
1.5Stability, Difficulty, and Derived Quantities
Framing the output as a forgetting curve rather than a point-in-time probability opens up useful derived concepts. Stability can be defined as:
That is, stability is the elapsed time at which retrievability first drops to 90%. This generalizes the notion used in FSRS and SuperMemo, and only requires that the forgetting curve eventually crosses 0.9.
Traditional models such as FSRS and SuperMemo make stability an
explicit latent state alongside difficulty
1.6Second-order Uncertainty
Retrievability is already a form of uncertainty: a value of 0.5 means the model is unsure whether the student will recall the card, while 0.9 means it is fairly confident they will. This is first-order uncertainty — uncertainty about the outcome. Second-order uncertainty is uncertainty about that probability itself: how confident is the model in its estimate of 0.9?
A natural question is whether the model can output not just a point
estimate of retrievability, but a distribution over it — expressing both
a mean and a confidence in that mean. Formally, the codomain of
Retrievability would then be the mean of the predictive distribution:
The Beta distribution
This would be genuinely useful for scheduling. Consider a student who has tagged a set of cards for an upcoming exam. Card A has high mean retrievability but substantial uncertainty — the model is not confident in its estimate. Card B is unrelated to the exam and has low mean retrievability with little uncertainty — confidently predicted to be near-forgotten. A scheduler that sees only point estimates would prioritize Card B, since its expected retrievability is lower. A scheduler aware of second-order uncertainty would instead prioritize Card A: the high uncertainty means the true retrievability could be considerably lower than the mean suggests, and the exam tag raises the stakes of being wrong. Point estimates cannot support this kind of risk-sensitive reasoning.
However, there is a fundamental obstacle to estimating this
uncertainty from review data in a model agnostic way. For any given
(student, history, card) triple, there is only ever one binary outcome
to observe. And crucially, the history
This means the variance of any distributional output is not just hard
to estimate in practice — it is structurally unidentified by the data.
The law of total variance makes this precise. Let
Expanding the first term:
The
The move from point estimates to forgetting curves does not resolve this. The forgetting curve is defined for a specific (student, history, card) triple; you observe one point on it, the history changes, and the curve you could have queried at other elapsed times no longer exists — the river argument applies just as before.
The resolution is to not treat
This is a legitimate path to second-order uncertainty, but it
requires committing to a specific parametric structure — what
For this reason, the formalization keeps retrievability as a point estimate. Second-order uncertainty is not impossible, but it is model-dependent, and individual model families can provide it where their structural assumptions justify it.
1.7Summary
A memory model is a function from (student, full review history, card) to a forgetting curve over future time deltas. Queried at a specific elapsed time, it returns retrievability — the probability of recall.
The key move relative to traditional formalizations is conditioning on the full review history across all cards, with card content represented as embeddings in the item space. This breaks the local independence assumption and enables knowledge transfer and cross-card forgetting patterns.
Stability emerges as a derived quantity from this general framework rather than as a first class model state. Difficulty is dropped as a framework level concept, models may have a notion of difficulty, or they may not. Second-order uncertainty (a distribution over retrievability) is a natural extension but is not identifiable from binary review data without model-specific structural assumptions — so it is kept out of the general formalization.
With this framework in place, the next post will use it to define a principled setup for comparing memory models: what metrics to use, and why.