SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.13900 · ICLR · 2021

Quantifying Differences in Reward Functions

Adam Gleave, Michael Dennis, Shane Legg, Stuart Russell, Jan Leike

arXiv · PDF · Open in the Atlas

Code that ran

10 of 15 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 5 failures of our instrument; 5 no recorded run), measured 2026-11-22; 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/2006.13900.json · badge: /api/ran/2006.13900.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
HumanCompatibleAI/evaluating-rewards canonical (classifier label)
classifier basis: census
5 ran · 4 no recorded run
humancompatibleai/evaluating-rewards canonical (classifier label)
classifier basis: classifier_2025
5 ran · 1 no recorded run
FunctionStatusWhere it lives
average_loss Ran
ran on a synthesized input
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/analysis/results.py
code served (permissive licence) · get_code("a29d79e85914dfb5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import pandas as pd
from typing import Any, Mapping

torch.manual_seed(0)

# The function expects:
# - stats: a Mapping with a 'loss' key containing data that can be converted to a DataFrame
# - n: an integer (default 10)

# The function accesses stats['loss'] and converts it to a DataFrame,
# then selects column 'singleton', so we need to construct loss data accordingly

loss_data = {
    'singleton': [0.5, 0.45, 0.4, 0.38, 0.36, 0.35, 0.34, 0.33, 0.32, 0.31, 0.30, 0.29, 0.28, 0.27, 0.26]
}

stats = {
    'loss': loss_data
}

ARGS = {
    'stats': stats,
    'n': 10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
average_unwrapped_loss Ran
ran on a synthesized input
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/analysis/results.py
code served (permissive licence) · get_code("0bb7f4c2ffeed496")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from typing import Any, Mapping

# Construct valid arguments for average_unwrapped_loss
# The function expects: stats: Stats (which is Mapping[str, Any])
# It accesses stats['metrics'], which should be iterable
# Each element v in metrics should have v['singleton']['unwrapped_loss']

stats = {
    'metrics': [
        {
            'singleton': {
                'unwrapped_loss': 0.5
            }
        },
        {
            'singleton': {
                'unwrapped_loss': 0.7
            }
        },
        {
            'singleton': {
                'unwrapped_loss': 0.3
            }
        }
    ]
}

ARGS = {
    'stats': stats
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
canonical_reward Ran
ran; our contract draft was wrong, not the code
humancompatibleai/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
code served (permissive licence) · get_code("99673a17240a4b96")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 3, dtype family float, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def deshape_fn_example(rew: np.ndarray, discount: float) -> np.ndarray:
    """
    Example deshape function that removes shaping component.
    Takes a reward array and discount factor, returns modified reward.
    """
    # Simple example: scale by discount factor
    return rew * discount

# Create a small 3D reward array (distinct dimensions: 2x3x4)
rew = np.random.randn(2, 3, 4).astype(np.float32)

# Discount factor
discount = 0.99

# Distribution (optional) - must sum to 1 and match reward shape
dist = np.ones((2, 3, 4)) / (2 * 3 * 4)

# Power parameter
p = 1

# Epsilon threshold
eps = 1e-10

ARGS = {
    "rew": rew,
    "discount": discount,
    "deshape_fn": deshape_fn_example,
    "p": p,
    "dist": dist,
    "eps": eps,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
canonical_reward_distance Ran
ran; our contract draft was wrong, not the code
humancompatibleai/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
code served (permissive licence) · get_code("57bfe2328f932299")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float32, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Define a simple deshape function that removes shaping
def simple_deshape_fn(rew: np.ndarray, discount: float) -> np.ndarray:
    """Simple deshaping function that applies a discount factor scaling."""
    return rew * (1 - discount)

# Create small 3D reward arrays (distinct dimensions: 2x3x4)
rewa = np.random.randn(2, 3, 4).astype(np.float32)
rewb = np.random.randn(2, 3, 4).astype(np.float32)

# Create a distribution that matches the shape of reward arrays
dist = np.ones((2, 3, 4)) / (2 * 3 * 4)

ARGS = {
    "rewa": rewa,
    "rewb": rewb,
    "discount": 0.99,
    "deshape_fn": simple_deshape_fn,
    "p": 1,
    "dist": dist,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
canonical_scale_normalizer Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
humancompatibleai/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
code served (permissive licence) · get_code("f77296320081f6cb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float64, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small 3D reward array
rew = np.random.randn(2, 3, 4)

# Create a distribution that sums to 1 and matches the shape of rew
dist = np.ones((2, 3, 4)) / (2 * 3 * 4)

# Define arguments for canonical_scale_normalizer
ARGS = {
    "rew": rew,
    "p": 2,
    "dist": dist,
    "eps": 1e-10
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
canonicalize_reward_cfg Ran
ran on a synthesized input
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/distances/common_config.py
code served (permissive licence) · get_code("de1436200998ee2b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
from typing import Tuple

# Create a temporary directory to use as data_root
temp_dir = tempfile.mkdtemp()

# Define arguments for canonicalize_reward_cfg
# reward_cfg: a tuple of (kind, path)
# data_root: a root directory path

ARGS = {
    "reward_cfg": ("model_type", "subdir/model.pkl"),
    "data_root": temp_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
direct_distance Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
humancompatibleai/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
code served (permissive licence) · get_code("059ae906194fa41e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float64, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Create two reward arrays with distinct shapes for clarity
rewa = np.array([1.0, 2.0, 3.0, 4.0])
rewb = np.array([1.5, 2.5, 2.5, 3.5])

# Create a valid distribution (sums to 1, all non-negative)
dist = np.array([0.1, 0.2, 0.3, 0.4])

ARGS = {
    "rewa": rewa,
    "rewb": rewb,
    "p": 2,
    "dist": dist,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
empirical_ci Ran
ran on a synthesized input
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/analysis/util.py
code served (permissive licence) · get_code("d51d87c4fe9aac67")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (3,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a sample array with some numeric values
# Using a variety of values to get meaningful percentiles
arr = np.array([1.0, 2.5, 3.7, 4.2, 5.1, 6.8, 7.3, 8.9, 9.5, 10.2])

# Create alpha parameter for 95% confidence interval
alpha = 95.0

ARGS = {
    "arr": arr,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (3,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
lp_norm Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
humancompatibleai/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
code served (permissive licence) · get_code("52e8470eebb3f3b2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned float64, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small array to compute the norm of
arr = np.array([[1.0, 2.0, 3.0, 4.0],
                [5.0, 6.0, 7.0, 8.0]])

# Create a valid probability distribution with matching shape
dist = np.array([[0.1, 0.2, 0.3, 0.4],
                 [0.0, 0.0, 0.0, 0.0]])
dist[1] = [0.0, 0.0, 0.0, 0.0]
# Normalize to sum to 1
dist = dist / np.sum(dist)

# Ensure dist sums to 1 and has correct shape
dist = np.ones((2, 4)) / 8.0

p = 2

ARGS = {
    "arr": arr,
    "p": p,
    "dist": dist
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
point_maze_learned_cfgs Ran
ran on a synthesized input
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/distances/common_config.py
code served (permissive licence) · get_code("305cdb60adc847a4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
from typing import Tuple, List

RewardCfg = Tuple[str, str]

ARGS = {
    'prefix': 'transfer_point_maze'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_check_dist Not yet run
unverified (harvested, no recorded run)
humancompatibleai/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
code served (permissive licence) · get_code("133a3fcd2cec81e8")
How it ran

no invocation recorded.

closest_potential Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from shshnkreddy/deceptiverl, is pointer only (licence: NONE) · get_code("fde68a593d79622a")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from shshnkreddy/deceptiverl, and GitHub detected no licence in that repository 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.

cross_distance Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/analysis/util.py
code served (permissive licence) · get_code("634610fc0258be61")
How it ran

no invocation recorded.

shape Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/distances/tabular.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from shshnkreddy/deceptiverl, is pointer only (licence: NONE) · get_code("8bf23ee16d057358")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from shshnkreddy/deceptiverl, and GitHub detected no licence in that repository 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.

to_series Not yet run
unverified (harvested, no recorded run)
HumanCompatibleAI/evaluating-rewards/src/evaluating_rewards/analysis/results.py
code served (permissive licence) · get_code("ae2b77081a249387")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 13 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
closest_potential 1 other paper
1 later
2407.09809 (2024-07)
Preserving the Privacy of Reward Functions in MDPs through Deception
shape 1 other paper
1 later
2407.09809 (2024-07)
Preserving the Privacy of Reward Functions in MDPs through Deception

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

For many tasks, the reward function is inaccessible to introspection or too complex to be specified procedurally, and must instead be learned from user data. Prior work has evaluated learned reward functions by evaluating policies optimized for the learned reward. However, this method cannot distinguish between the learned reward function failing to reflect user preferences and the policy optimization process failing to optimize the learned reward. Moreover, this method can only tell us about behavior in the evaluation environment, but the reward may incentivize very different behavior in even a slightly different deployment environment. To address these problems, we introduce the Equivalent-Policy Invariant Comparison (EPIC) distance to quantify the difference between two reward functions directly, without a policy optimization step. We prove EPIC is invariant on an equivalence class of reward functions that always induce the same optimal policy. Furthermore, we find EPIC can be efficiently approximated and is more robust than baselines to the choice of coverage distribution. Finally, we show that EPIC distance bounds the regret of optimal policies even under different transition dynamics, and we confirm empirically that it predicts policy training success. Our source code is available at https: //github.com/HumanCompatibleAI/evaluating-rewards. * Work partially conducted while at DeepMind.

For agents

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

get_harvested_code_for_paper("2006.13900")
get_code_for_paper("2006.13900")
have("2006.13900")

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

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

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

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

Connect an agent — have() is free.