SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.17098 · ICML · 2024

Learning Temporal Distances: Contrastive Successor Features Can Provide a Metric Structure for Decision-Making

Sergey Levine, Anca Dragan, Benjamin Eysenbach, Vivek Myers, Chongyi Zheng

arXiv · PDF · Open in the Atlas

Code that ran

11 of 11 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 0 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.17098.json · badge: /api/ran/2406.17098.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
mnm-anonymous/qmd canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
vivekmyers/contrastive_metrics canonical (classifier label)
classifier basis: census
2 ran · 0 no recorded run
FunctionStatusWhere it lives
apply_policy_and_sample Ran
ran; our contract draft was wrong, not the code
mnm-anonymous/qmd/metric_distillation/networks.py
pointer only (licence: NONE) · get_code("86b31cc8f58a61b4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

collect_data Ran
ran; our contract draft was wrong, not the code
mnm-anonymous/qmd/plot_lc.py
pointer only (licence: NONE) · get_code("8973ec79994a1f01")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

collect_data Ran
ran; our contract draft was wrong, not the code
vivekmyers/contrastive_metrics/plot_results.py
pointer only (licence: NONE) · get_code("7e534b0247bd8bab")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vivekmyers/contrastive_metrics 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.

filter_outliers Ran
ran, honoured the contract we drafted
mnm-anonymous/qmd/plot_lc.py
pointer only (licence: NONE) · get_code("c606a9e24a7a5a75")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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_reward Ran
ran, honoured the contract we drafted
mnm-anonymous/qmd/envs/fetch_envs.py
pointer only (licence: NONE) · get_code("35bd6ebd08652e20")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

goal_to_obs_2d Ran
ran; our contract draft was wrong, not the code
mnm-anonymous/qmd/metric_distillation/utils.py
pointer only (licence: NONE) · get_code("a5f0dbc29eaab649")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

make_offline_d4rl Ran
ran; our contract draft was wrong, not the code
mnm-anonymous/qmd/envs/offline_ant_envs.py
pointer only (licence: NONE) · get_code("aae1c7c736822527")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

make_offline_d4rl Ran
ran; our contract draft was wrong, not the code
vivekmyers/contrastive_metrics/envs/offline_ant_envs.py
pointer only (licence: NONE) · get_code("ec5bf1abfe384d4c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, vivekmyers/contrastive_metrics 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.

obs_to_goal_1d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mnm-anonymous/qmd/metric_distillation/utils.py
pointer only (licence: NONE) · get_code("414dbeb2f8b06a40")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

obs_to_goal_2d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mnm-anonymous/qmd/metric_distillation/utils.py
pointer only (licence: NONE) · get_code("1896647d018339ef")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

window_smooth Ran
ran; our contract draft was wrong, not the code
mnm-anonymous/qmd/plot_lc.py
pointer only (licence: NONE) · get_code("d879cdca2b43f708")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mnm-anonymous/qmd 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.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 6 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
apply_policy_and_sample 1 other paper
1 dated earlier
2310.20141 (2023-10)
Contrastive Difference Predictive Coding
get_reward 1 other paper
1 dated earlier
2310.20141 (2023-10)
Contrastive Difference Predictive Coding
make_offline_d4rl 1 other paper
1 dated earlier
2310.20141 (2023-10)
Contrastive Difference Predictive Coding
obs_to_goal_1d 1 other paper
1 dated earlier
2310.20141 (2023-10)
Contrastive Difference Predictive Coding
obs_to_goal_2d 1 other paper
1 dated earlier
2310.20141 (2023-10)
Contrastive Difference Predictive Coding

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

Temporal distances lie at the heart of many algorithms for planning, control, and reinforcement learning that involve reaching goals, allowing one to estimate the transit time between two states. However, prior attempts to define such temporal distances in stochastic settings have been stymied by an important limitation: these prior approaches do not satisfy the triangle inequality. This is not merely a definitional concern, but translates to an inability to generalize and find shortest paths. In this paper, we build on prior work in contrastive learning and quasimetrics to show how successor features learned by contrastive learning (after a change of variables) form a temporal distance that does satisfy the triangle inequality, even in stochastic settings. Importantly, this temporal distance is computationally efficient to estimate, even in high-dimensional and stochastic settings. Experiments in controlled settings and benchmark suites demonstrate that an RL algorithm based on these new temporal distances exhibits combinatorial generalization (i.e., "stitching") and can sometimes learn more quickly than prior methods, including those based on quasimetrics.

For agents

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

get_harvested_code_for_paper("2406.17098")
get_code_for_paper("2406.17098")
have("2406.17098")

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

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

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

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

Connect an agent — have() is free.