SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.12284 · 2024

Demystifying the Recency Heuristic in Temporal-Difference Learning

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2406.12284.json · badge: /api/ran/2406.12284.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
brett-daley/recency-heuristic canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
calculate Ran
ran; our contract draft was wrong, not the code
brett-daley/recency-heuristic/learning/return_estimators.py
pointer only (licence: NONE) · get_code("12cca2249119d079")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

calculate_auc Ran
ran, honoured the contract we drafted
brett-daley/recency-heuristic/plotting/utils.py
pointer only (licence: NONE) · get_code("dcf8fb5c2dde194d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_sparse_lambda_func Ran
ran; our contract draft was wrong, not the code
brett-daley/recency-heuristic/plotting/plot_eligibility.py
pointer only (licence: NONE) · get_code("22fa413b90a3f7ce")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_trunc_lambda_func Ran
ran; our contract draft was wrong, not the code
brett-daley/recency-heuristic/plotting/plot_eligibility.py
pointer only (licence: NONE) · get_code("3bf188221615e214")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_extra Ran
ran; our contract draft was wrong, not the code
brett-daley/recency-heuristic/cmdline/parse.py
pointer only (licence: NONE) · get_code("363d1c954acd4477")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

parse_kwargs Ran
ran; our contract draft was wrong, not the code
brett-daley/recency-heuristic/cmdline/parse.py
pointer only (licence: NONE) · get_code("bde5baf8af452a92")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

policy_evaluation Ran
ran, honoured the contract we drafted
brett-daley/recency-heuristic/learning/dynamic_programming.py
pointer only (licence: NONE) · get_code("202dd22e01f0f721")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

try_cast Ran
ran, honoured the contract we drafted
brett-daley/recency-heuristic/cmdline/parse.py
pointer only (licence: NONE) · get_code("2b0b94149a0318a6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

insert_defaults Not yet run
unverified (harvested, no recorded run)
brett-daley/recency-heuristic/cmdline/defaults.py
pointer only (licence: NONE) · get_code("5a2d82c50fce3111")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

load_defaults Not yet run
unverified (harvested, no recorded run)
brett-daley/recency-heuristic/cmdline/defaults.py
pointer only (licence: NONE) · get_code("8d4d29fcc36bc1b4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, brett-daley/recency-heuristic when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
insert_defaults 1 other paper
1 dated earlier
2402.03903 (2024-02)
Averaging n-step Returns Reduces Variance in Reinforcement Learning
load_defaults 1 other paper
1 dated earlier
2402.03903 (2024-02)
Averaging n-step Returns Reduces Variance in Reinforcement Learning
parse_extra 1 other paper
1 dated earlier
2402.03903 (2024-02)
Averaging n-step Returns Reduces Variance in Reinforcement Learning
parse_kwargs 1 other paper
1 dated earlier
2402.03903 (2024-02)
Averaging n-step Returns Reduces Variance in Reinforcement Learning
try_cast 1 other paper
1 dated earlier
2402.03903 (2024-02)
Averaging n-step Returns Reduces Variance in Reinforcement Learning

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The recency heuristic in reinforcement learning is the assumption that stimuli that occurred closer in time to an acquired reward should be more heavily reinforced. The recency heuristic is one of the key assumptions made by TD($λ$), which reinforces recent experiences according to an exponentially decaying weighting. In fact, all other widely used return estimators for TD learning, such as $n$-step returns, satisfy a weaker (i.e., non-monotonic) recency heuristic. Why is the recency heuristic effective for temporal credit assignment? What happens when credit is assigned in a way that violates this heuristic? In this paper, we analyze the specific mathematical implications of adopting the recency heuristic in TD learning. We prove that any return estimator satisfying this heuristic: 1) is guaranteed to converge to the correct value function, 2) has a relatively fast contraction rate, and 3) has a long window of effective credit assignment, yet bounded worst-case variance. We also give a counterexample where on-policy, tabular TD methods violating the recency heuristic diverge. Our results offer some of the first theoretical evidence that credit assignment based on the recency heuristic facilitates learning.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.12284")
get_code_for_paper("2406.12284")
have("2406.12284")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2406.12284.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2406.12284.svg)](https://syntology.ai/paper/2406.12284)

Connect an agent — have() is free.