Product Research Pricing About Careers Blog Alpha Talk to us ⬇ Download Alpha Build
Research Learning science · 21 April 2026 · 12 min read

Spaced retrieval for code: FSRS against 18,000 review events

Spaced repetition was built for vocabulary, where an item is atomic and a lapse is cheap. Code concepts are neither. We fitted FSRS to 18,240 code review events and report where the algorithm transfers, where it needs modification, and the retention number we actually hit.

ReportAWL-2026-02
Versionv1.1
AreaLearning science

Updated 21 April 2026 · v1.1 adds the self-report against rubric grading comparison

Abstract

We fitted FSRS-5 to 18,240 concept review events from 1,120 engineers and compared it against SM-2 and a fixed-interval baseline. FSRS reduced total reviews required to hold a concept at 75% predicted retention by 31% against SM-2 and 54% against fixed intervals. Measured 30-day retention reached 71% against a 75% target, with high variance by concept type: 84% for syntactic and API concepts, 58% for architectural ones. We describe two modifications required for the code domain, prerequisite-aware scheduling and a lapse penalty proportional to concept depth.

31%fewer reviews than SM-2 to hold a concept at the same predicted retention
71%measured 30-day retention against a 75% target
26ppgap between syntactic and architectural concept retention

The most replicated finding in cognitive science is also one of the least intuitive: to make something stick, retrieve it rather than re-read it. Testing yourself beats reviewing notes, and it is not close. Spaced repetition operationalises this by scheduling each retrieval just before you would have forgotten.

All of that literature is built on flashcards. An item is atomic, a lapse costs you one word, and success is binary. A code concept is none of those things. This paper is about what survives the move.

Three schedulers

We compared FSRS-5 against SM-2, the algorithm most spaced-repetition software used for decades, and against a fixed ladder of 1, 3, 8, 21 and 60 days. Every arm used identical review content and identical grading.

Events
18,240 concept reviews, 1,120 engineers
Window
October 2025 to March 2026
Concepts
3,410 distinct concepts from the 214-concept taxonomy
Schedulers
FSRS-5, SM-2, fixed ladder (1/3/8/21/60 days)
Grading
Four-point recall grade from the explain-check rubric
Target
75% predicted retention at review time
Figure 02.557.510Fixed ladder8.4SM-25.6FSRS-5 + both mods4.3FSRS-5 + prerequisites4.2FSRS-5, unmodified3.9
Reviews required per concept to hold 75% predicted retention, by scheduler

FSRS needed 31% fewer reviews than SM-2 and 54% fewer than the fixed ladder to hold the same predicted retention. That is a real efficiency gain and it matters: every review is a claim on the attention of someone who is trying to do their job.

Predicted retention is not measured retention

A scheduler optimises predicted retention using its own model of forgetting. The number that matters is whether the engineer can still demonstrate the concept when we check independently. Ours reached 71% at 30 days against a 75% target, which is roughly where well-calibrated Anki users sit on well-curated decks, and below where we want to be.

Figure 0%25%50%75%100%Syntactic and API84%Library and framework76%Data modelling71%Concurrency64%Architectural58%
Measured 30-day retention by concept category

The aggregate hides the finding. Syntactic and API-level concepts retained at 84%. Architectural concepts, the kind where understanding means holding a system in your head, retained at 58%. A 26 point spread inside one average is a sign that the average should not be reported alone, which is why the product shows the breakdown.

Why architecture resists scheduling

A flashcard has one correct retrieval. An architectural concept has a different correct answer in every system it appears in. Retrieving "how backpressure works here" does not reliably strengthen "how backpressure works" in general, and our instrument cannot yet tell those two things apart.

Two modifications the domain forced on us

Prerequisite-aware scheduling

FSRS treats items as independent. Code concepts form a directed graph: you cannot meaningfully retrieve transaction isolation while your grasp of atomicity has lapsed. Scheduling them independently produces reviews the engineer fails for reasons that have nothing to do with the concept under test, which then corrupts the difficulty estimate for that concept.

We modified the scheduler to suppress a review when any prerequisite is below a stability threshold, and to schedule the prerequisite instead. This reduced spurious lapses by 22% and improved measured retention on dependent concepts by 6 points.

Depth-proportional lapse penalty

In vocabulary, a lapse costs one word. Forgetting an architectural concept invalidates everything built on it. Standard FSRS applies a uniform penalty to the stability estimate on failure; we scale it by the concept's depth in the prerequisite graph, so a foundational lapse resets more aggressively than a leaf one.

ConfigurationReviews per conceptMeasured 30-day retentionSpurious lapses
Fixed ladder8.454%n/a
SM-25.663%18%
FSRS-5, unmodified3.966%16%
FSRS-5 + prerequisites4.270%12%
FSRS-5 + both mods (shipped)4.371%11%
Mean reviews to hold 75% predicted retention, with independently measured 30-day retention.

The modifications cost us 0.4 reviews per concept and bought 5 points of measured retention. Note that the shipped configuration is slightly less efficient than unmodified FSRS on the metric FSRS optimises, and better on the metric we care about. That is the whole argument for measuring retention independently of the scheduler.

The grading problem underneath all of this

Every scheduler depends on an honest recall grade. Anki asks the user to grade themselves, which works because the user wants to learn Japanese. An engineer under sprint pressure grading their own comprehension has a different incentive.

We grade from the explain-check rubric rather than self-report. Comparing the two on 4,200 events where we had both, self-reported grades were higher than rubric grades 68% of the time, with a mean inflation of 0.7 points on a four-point scale. A scheduler fed self-reports would have concluded that retention was 12 points better than it was.

68%of self-reported recall grades exceeded the rubric grade
0.7mean grade inflation on a four-point scale
12ppoverstatement of retention a self-report scheduler would produce

Limits

Fitted parameters, the prerequisite graph, the anonymised review event log and the grading comparison subset are published.

The forgetting curve this work schedules against is Ebbinghaus [1], and the spacing effect is surveyed comprehensively by Cepeda and colleagues [2]. We use FSRS [3] rather than SM-2 [4] for the reasons its authors document, and our efficiency comparison reproduces the direction of their result on a very different item type. The prerequisite-aware modification is motivated by knowledge-space theory [5], which models exactly the dependency structure that flat scheduling ignores. Our grading concern is the metacognitive-accuracy problem described by Dunlosky and Lipko [6]: learners systematically overestimate what they have retained, which makes self-reported recall grades unsafe input to a scheduler. The comprehension instrument used for grading is documented in AWL-2026-06 [7], and the tagger that identifies concepts in AWL-2026-03 [8].

Artefacts

Everything below is published or available on request. A number nobody can reproduce is an advertisement, not a result.

DataFitted FSRS-5 parameters for the code domainJSON
InstrumentPrerequisite graph, 3,410 conceptsJSON, CC BY 4.0
DataAnonymised review event logCSV, 18,240 events
CodeDepth-proportional lapse penalty implementationPython, MIT
DataSelf-report against rubric comparison subsetCSV, 4,200 events

References

  1. Ebbinghaus, H. (1885). Uber das Gedachtnis. Duncker & Humblot.
  2. Cepeda, N. J., Pashler, H., Vul, E., Wixted, J. T., & Rohrer, D. (2006). Distributed Practice in Verbal Recall Tasks. Psychological Bulletin, 132(3).
  3. Ye, J., Su, J., & Cao, Y. (2022). A Stochastic Shortest Path Algorithm for Optimizing Spaced Repetition Scheduling. KDD.
  4. Wozniak, P. A., & Gorzelanczyk, E. J. (1994). Optimization of Repetition Spacing in the Practice of Learning. Acta Neurobiologiae Experimentalis, 54.
  5. Doignon, J.-P., & Falmagne, J.-C. (1999). Knowledge Spaces. Springer.
  6. Dunlosky, J., & Lipko, A. R. (2007). Metacomprehension: A Brief History and How to Improve Its Accuracy. Current Directions in Psychological Science, 16(4).
  7. Bhardwaj, M. (2026). The comprehension gap: 200 engineers, 12 months, and what agentic coding did to recall. AI Work Lab Research, AWL-2026-06.
  8. Bhardwaj, M. (2026). A concept tagger that does not lie: calibration across 41 repositories. AI Work Lab Research, AWL-2026-03.
Cite this work

Bhardwaj, M. (2026). Spaced retrieval for code: FSRS against 18,000 review events. AI Work Lab Research, AWL-2026-02.

Mohit Bhardwaj

Head of Research · aiworklab

Mohit runs the research programme at AI Work Lab: the longitudinal study of how agentic coding changes what engineers retain, the comprehension instruments the product gates on, and the evaluation harness the team uses to decide what ships. He writes up the measurements that changed our minds, including the ones that were inconvenient for the product.