SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.16782 · ICML · 2024

Confidence Aware Inverse Constrained Reinforcement Learning

Pascal Poupart, Sriram Subramanian, Kasra Rezaee, Guiliang Liu, Mohammed Elmahgiubi

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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.16782.json · badge: /api/ran/2406.16782.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
sriram94/confidenceawareicrl canonical (classifier label)
classifier basis: classifier_2025
3 ran · 3 no recorded run
FunctionStatusWhere it lives
ConstraintNet Ran
ran on a synthesized input · constructed an object; no result was computed
sriram94/confidenceawareicrl/constraint_models/constraint_net/caicrl_constraint_net.py
code served (permissive licence) · get_code("bb6bc247794f523c")
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 an instance of its own class, ConstraintNet: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
from typing import Tuple, Callable, Optional, Dict, Any

torch.manual_seed(0)
np.random.seed(0)

# Create minimal expert data
expert_obs = np.random.randn(2, 4).astype(np.float32)
expert_acs = np.random.randn(2, 3).astype(np.float32)

# Create a learning rate schedule function
def lr_schedule(progress: float) -> float:
    return 0.001 * progress

# Create minimal environment config dict
env_configs = {
    'obs_dim': 4,
    'acs_dim': 3,
}

# Create optimizer kwargs
optimizer_kwargs = {
    'eps': 1e-5,
}

ARGS = {
    'obs_dim': 4,
    'acs_dim': 3,
    'hidden_sizes': (8, 8),
    'batch_size': 2,
    'lr_schedule': lr_schedule,
    'expert_obs': expert_obs,
    'expert_acs': expert_acs,
    'is_discrete': False,
    'task': 'ICRL',
    'regularizer_coeff': 0.0,
    'obs_select_dim': None,
    'acs_select_dim': None,
    'optimizer_class': optim.Adam,
    'optimizer_kwargs': optimizer_kwargs,
    'no_importance_sampling': True,
    'per_step_importance_sampling': False,
    'clip_obs': 10.0,
    'initial_obs_mean': np.zeros(4, dtype=np.float32),
    'initial_obs_var': np.ones(4, dtype=np.float32),
    'action_low': -1.0,
    'action_high': 1.0,
    'target_kl_old_new': -1.0,
    'target_kl_new_old': -1.0,
    'train_gail_lambda': False,
    'eps': 1e-5,
    'recon_obs': False,
    'env_configs': env_configs,
    'device': 'cpu',
    'log_file': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ConstraintNet — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConstraintNet 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
create_mlp Ran
ran; our contract draft was wrong, not the code
sriram94/confidenceawareicrl/constraint_models/constraint_net/caicrl_constraint_net.py
code served (permissive licence) · get_code("e2d94c0410800dae")
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 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "input_dim": 4,
    "output_dim": 2,
    "net_arch": [8, 6],
    "activation_fn": nn.ReLU,
    "squash_output": False,
}
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 list, ndim 1, 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
idx2vector Ran
ran; our contract draft was wrong, not the code
sriram94/confidenceawareicrl/constraint_models/constraint_net/caicrl_constraint_net.py
code served (permissive licence) · get_code("c3b7d2139df68a23")
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 2, dtype family float, shape (2, 20) 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

# The function idx2vector takes:
# - indices: a list/array of coordinate pairs [x, y]
# - height: integer for map height
# - width: integer for map width

# Create sample indices as a list of coordinate pairs
indices = [
    [1.2, 2.3],
    [0.8, 3.1],
]

height = 4
width = 5

ARGS = {
    "indices": indices,
    "height": height,
    "width": width,
}
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 2, dtype family float, shape (2, 20) — shape (2, 20) 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
CAICRLConstraintNet Not yet run
unverified (harvested, no recorded run)
sriram94/confidenceawareicrl/constraint_models/constraint_net/caicrl_constraint_net.py
code served (permissive licence) · get_code("b5aa530e42b0d9ce")
How it ran

no invocation recorded.

null_cost Not yet run
unverified (harvested, no recorded run)
sriram94/confidenceawareicrl/interface/train_icrl.py
code served (permissive licence) · get_code("6b3f8d5ecf6d6351")
How it ran

no invocation recorded.

update_learning_rate Not yet run
unverified (harvested, no recorded run)
sriram94/confidenceawareicrl/constraint_models/constraint_net/caicrl_constraint_net.py
code served (permissive licence) · get_code("0ac24376a7fb330b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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, 0 later) and 3 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
create_mlp
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 1 only as an assembly brick
2010.14484 (2020-10)
One Solution is Not All You Need: Few-Shot Extrapolation via Structured MaxEnt RL
2011.09999 (2020-11)
Inverse Constrained Reinforcement Learning
2111.03941 (2021-11)
Time Discretization-Invariant Safe Action Repetition for Policy Gradient Methods
and 1 more not named here
null_cost 1 other paper
1 dated earlier
2206.09670 (2022-06)
Benchmarking Constraint Inference in Inverse Reinforcement Learning
update_learning_rate
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2011.09999 (2020-11)
Inverse Constrained 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-23.

Repositories linked to this paper

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

Abstract

In coming up with solutions to real-world problems, humans implicitly adhere to constraints that are too numerous and complex to be specified completely. However, reinforcement learning (RL) agents need these constraints to learn the correct optimal policy in these settings. The field of Inverse Constraint Reinforcement Learning (ICRL) deals with this problem and provides algorithms that aim to estimate the constraints from expert demonstrations collected offline. Practitioners prefer to know a measure of confidence in the estimated constraints, before deciding to use these constraints, which allows them to only use the constraints that satisfy a desired level of confidence. However, prior works do not allow users to provide the desired level of confidence for the inferred constraints. This work provides a principled ICRL method that can take a confidence level with a set of expert demonstrations and outputs a constraint that is at least as constraining as the true underlying constraint with the desired level of confidence. Further, unlike previous methods, this method allows a user to know if the number of expert trajectories is insufficient to learn a constraint with a desired level of confidence, and therefore collect more expert trajectories as required to simultaneously learn constraints with the desired level of confidence and a policy that achieves the desired level of performance.

For agents

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

get_harvested_code_for_paper("2406.16782")
get_code_for_paper("2406.16782")
have("2406.16782")

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

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

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

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

Connect an agent — have() is free.