SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.02140 · 2019

Fully Parameterized Quantile Function for Distributional Reinforcement Learning

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 3 failures of our instrument; 4 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/1911.02140.json · badge: /api/ran/1911.02140.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
ku2482/fqf-iqn-qrdqn.pytorch community (classifier label)
classifier basis not recorded on the link
3 ran · 3 no recorded run
BY571/FQF-and-Extensions community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
robinzixuan/IQN_Agent community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
calculate_huber_loss Ran
ran; our contract draft was wrong, not the code
BY571/FQF-and-Extensions/agent.py
code served (permissive licence) · get_code("d9d455622c2dcd61")
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 Tensor, ndim 3, dtype family float, shape (2, 32, 32) 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 torch

torch.manual_seed(0)

# The function expects td_errors to be a tensor where the output shape is (batch_size, 32, 32)
# Based on the assertion, we need td_errors such that loss.shape == (batch_size, 32, 32)
# This means td_errors should have shape (batch_size, 32, 32)

td_errors = torch.randn(2, 32, 32)
k = 1.0

ARGS = {
    "td_errors": td_errors,
    "k": k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 32, 32) — shape (2, 32, 32) 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
calculate_huber_loss Ran
ran on a synthesized input
ku2482/fqf-iqn-qrdqn.pytorch/fqf_iqn_qrdqn/utils.py
code served (permissive licence) · get_code("8467036da5b81c2f")
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 Tensor, ndim 2, dtype family float, shape (2, 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 torch

torch.manual_seed(0)

# Create td_errors tensor - small batch of temporal difference errors
# Shape: (2, 4) - batch size 2, 4 error values per sample
td_errors = torch.randn(2, 4)

# kappa parameter - threshold for Huber loss
kappa = 1.0

ARGS = {
    "td_errors": td_errors,
    "kappa": kappa,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
calculate_quantile_huber_loss Ran
ran on a synthesized input
ku2482/fqf-iqn-qrdqn.pytorch/fqf_iqn_qrdqn/utils.py
code served (permissive licence) · get_code("6e8ed4390d6cac69")
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 Tensor, 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 torch

torch.manual_seed(0)

# td_errors: shape (batch_size, N, N_dash)
# taus: shape (N,) with requires_grad=False
# weights: optional, shape (batch_size, 1)
# kappa: scalar float

batch_size = 2
N = 3
N_dash = 4

td_errors = torch.randn(batch_size, N, N_dash)
taus = torch.tensor([0.1, 0.5, 0.9], requires_grad=False)
weights = torch.ones(batch_size, 1)
kappa = 1.0

ARGS = {
    "td_errors": td_errors,
    "taus": taus,
    "weights": weights,
    "kappa": kappa,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
calculate_quantile_huber_loss Ran
ran on a synthesized input
robinzixuan/IQN_Agent/fqf_iqn_qrdqn/utils.py
code served (permissive licence) · get_code("ee9ee61faefc4729")
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 Tensor, 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 torch

torch.manual_seed(0)

# td_errors: shape (batch_size, N, N_dash)
# taus: 1D tensor, requires_grad must be False
# weights: optional, shape (batch_size, 1)
# kappa: scalar float

batch_size = 2
N = 4
N_dash = 3

td_errors = torch.randn(batch_size, N, N_dash)
taus = torch.tensor([0.25, 0.5, 0.75], requires_grad=False)
weights = torch.ones(batch_size, 1)
kappa = 1.0

ARGS = {
    "td_errors": td_errors,
    "taus": taus,
    "weights": weights,
    "kappa": kappa,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
make_atari Ran
ran; our contract draft was wrong, not the code
ku2482/fqf-iqn-qrdqn.pytorch/fqf_iqn_qrdqn/env.py
code served (permissive licence) · get_code("4bc698f17fe89d85")
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 MaxAndSkipEnv. The image it ran in was not recorded. If your copy returns the same type 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 gym
import numpy as np

# Create a minimal mock Atari environment that satisfies the requirements
class MockAtariEnv(gym.Env):
    def __init__(self):
        self.observation_space = gym.spaces.Box(
            low=0, high=255, shape=(84, 84), dtype=np.uint8
        )
        self.action_space = gym.spaces.Discrete(4)
        self.spec = type('obj', (object,), {'id': 'PongNoFrameskip-v4'})()
        self._step_count = 0
    
    def get_action_meanings(self):
        return ['NOOP', 'FIRE', 'RIGHT', 'LEFT']
    
    def reset(self, **kwargs):
        self._step_count = 0
        return np.zeros((84, 84), dtype=np.uint8)
    
    def step(self, action):
        self._step_count += 1
        obs = np.zeros((84, 84), dtype=np.uint8)
        reward = 1.0
        done = self._step_count > 100
        info = {}
        return obs, reward, done, info
    
    def seed(self, seed=None):
        np.random.seed(seed)
        return [seed]

# Patch gym.make to return our mock environment
original_gym_make = gym.make

def mock_gym_make(env_id):
    if 'NoFrameskip' in env_id:
        return MockAtariEnv()
    return original_gym_make(env_id)

gym.make = mock_gym_make

# Define arguments for make_atari
ARGS = {
    'env_id': 'PongNoFrameskip-v4'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MaxAndSkipEnv — a MaxAndSkipEnv output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MaxAndSkipEnv output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
make_env Ran
ran; our contract draft was wrong, not the code
BY571/FQF-and-Extensions/wrapper.py
code served (permissive licence) · get_code("06fc02646fefa30a")
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 ScaledFloatFrame. The image it ran in was not recorded. If your copy returns the same type 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 gym
import numpy as np

# Create a minimal mock environment that satisfies gym.Env requirements
class MockAtariEnv(gym.Env):
    def __init__(self):
        self.action_space = gym.spaces.Discrete(18)
        self.observation_space = gym.spaces.Box(
            low=0, high=255, shape=(210, 160, 3), dtype=np.uint8
        )
        self._step_count = 0
    
    def get_action_meanings(self):
        # Must have 'FIRE' at index 1 and at least 3 actions
        return ['NOOP', 'FIRE', 'RIGHT', 'LEFT']
    
    def reset(self):
        self._step_count = 0
        return np.random.randint(0, 256, size=(210, 160, 3), dtype=np.uint8)
    
    def step(self, action):
        self._step_count += 1
        obs = np.random.randint(0, 256, size=(210, 160, 3), dtype=np.uint8)
        reward = 1.0
        done = self._step_count > 100
        info = {}
        return obs, reward, done, info
    
    def render(self, mode='human'):
        pass

# Mock gym.make to return our custom environment
original_make = gym.make

def mock_make(env_name):
    return MockAtariEnv()

gym.make = mock_make

ARGS = {
    "env_name": "PongNoFrameskip-v4"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, gym, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ScaledFloatFrame — a ScaledFloatFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ScaledFloatFrame output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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
calc_fraction_loss Not yet run
unverified (harvested, no recorded run)
BY571/FQF-and-Extensions/agent.py
code served (permissive licence) · get_code("14e1926aa3c869bb")
How it ran

no invocation recorded.

evaluate_quantile_at_action Not yet run
unverified (harvested, no recorded run)
ku2482/fqf-iqn-qrdqn.pytorch/fqf_iqn_qrdqn/utils.py
code served (permissive licence) · get_code("77f81f55ded2bb12")
How it ran

no invocation recorded.

make_pytorch_env Not yet run
unverified (harvested, no recorded run)
ku2482/fqf-iqn-qrdqn.pytorch/fqf_iqn_qrdqn/env.py
code served (permissive licence) · get_code("b89e7274f78fdda2")
How it ran

no invocation recorded.

wrap_deepmind_pytorch Not yet run
unverified (harvested, no recorded run)
ku2482/fqf-iqn-qrdqn.pytorch/fqf_iqn_qrdqn/env.py
code served (permissive licence) · get_code("75ec4650e3554f24")
How it ran

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, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 1 later) and 7 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
make_atari 6 other papers
2 dated earlier, 4 later
1511.06581 (2015-11)
Dueling Network Architectures for Deep Reinforcement Learning
1910.07207 (2019-10)
Soft Actor-Critic for Discrete Action Settings
2002.04839 (2020-02)
LaProp: Separating Momentum and Adaptivity in Adam
and 3 more not named here
make_env 2 other papers
2 dated earlier
1803.00933 (2018-03)
Distributed Prioritized Experience Replay
1806.06923 (2018-06)
Implicit Quantile Networks for Distributional Reinforcement Learning
calculate_huber_loss 1 other paper
1 dated earlier
1801.01290 (2018-01)
Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor

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

Distributional Reinforcement Learning (RL) differs from traditional RL in that, rather than the expectation of total returns, it estimates distributions and has achieved state-of-the-art performance on Atari Games. The key challenge in practical distributional RL algorithms lies in how to parameterize estimated distributions so as to better approximate the true continuous distribution. Existing distributional RL algorithms parameterize either the probability side or the return value side of the distribution function, leaving the other side uniformly fixed as in C51, QR-DQN or randomly sampled as in IQN. In this paper, we propose fully parameterized quantile function that parameterizes both the quantile fraction axis (i.e., the x-axis) and the value axis (i.e., y-axis) for distributional RL. Our algorithm contains a fraction proposal network that generates a discrete set of quantile fractions and a quantile value network that gives corresponding quantile values. The two networks are jointly trained to find the best approximation of the true distribution. Experiments on 55 Atari Games show that our algorithm significantly outperforms existing distributional RL algorithms and creates a new record for the Atari Learning Environment for non-distributed agents.

For agents

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

get_harvested_code_for_paper("1911.02140")
get_code_for_paper("1911.02140")
have("1911.02140")

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

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

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

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

Connect an agent — have() is free.