SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.01771 · 2026

Hyperparameter Trajectory Inference with Conditional Lagrangian Optimal Transport

Mihaela Van Der Schaar, Harry Amad

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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, 1 violated it and 1 has no contract verdict; 4 failures of our instrument; 1 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/2603.01771.json · badge: /api/ran/2603.01771.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
DLR-RM/stable-baselines3 canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
GilesLuo/DTRGym community
Papers with Code archive
1 ran · 0 no recorded run
FunctionStatusWhere it lives
MatrixMDP Ran
ran on a synthesized input · constructed an object; no result was computed
GilesLuo/DTRGym/DTRGym/OberstSepsisEnv/cf/counterfactual.py
code served (permissive licence) · get_code("ac66a4f1c1e9b789")
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, MatrixMDP: 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 numpy as np

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

# Create a simple 3D transition matrix: (n_actions x n_states x n_states)
n_actions = 2
n_states = 4
tx_mat_3d = np.random.dirichlet(np.ones(n_states), size=(n_actions, n_states))
tx_mat_3d = tx_mat_3d.astype(np.float64)

# Create a simple 3D reward matrix with same shape
r_mat_3d = np.random.randn(n_actions, n_states, n_states)
r_mat_3d = r_mat_3d.astype(np.float64)

# Optional: create 4D versions with mixture components
n_components = 2
tx_mat_4d = np.random.dirichlet(np.ones(n_states), size=(n_components, n_actions, n_states))
tx_mat_4d = tx_mat_4d.astype(np.float64)
r_mat_4d = np.random.randn(n_components, n_actions, n_states, n_states)
r_mat_4d = r_mat_4d.astype(np.float64)

# Create initial state probability distribution
p_initial_state_3d = np.random.dirichlet(np.ones(n_states))
p_initial_state_3d = p_initial_state_3d[np.newaxis, :]  # Shape: (1, n_states)

p_initial_state_4d = np.random.dirichlet(np.ones(n_states), size=n_components)
p_initial_state_4d = p_initial_state_4d.astype(np.float64)  # Shape: (n_components, n_states)

# Create mixture probability distribution
p_mixture = np.random.dirichlet(np.ones(n_components))
p_mixture = p_mixture.astype(np.float64)  # Shape: (n_components,)

ARGS = {
    'tx_mat': tx_mat_3d,
    'r_mat': r_mat_3d,
    'p_initial_state': p_initial_state_3d,
    'p_mixture': None,
}
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 MatrixMDP — 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 MatrixMDP 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; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DLR-RM/stable-baselines3/stable_baselines3/common/torch_layers.py
code served (permissive licence) · get_code("7362fa063b732f66")
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, 16],
    "activation_fn": nn.ReLU,
    "squash_output": False,
    "with_bias": True,
    "pre_linear_modules": None,
    "post_linear_modules": None,
}
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
get_actor_critic_arch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
DLR-RM/stable-baselines3/stable_baselines3/common/torch_layers.py
code served (permissive licence) · get_code("eb7d59a536215255")
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 2, dtype family int; 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 numpy as np

# Test case 1: net_arch as a list
ARGS_list = {
    'net_arch': [256, 256]
}

# Test case 2: net_arch as a dict with different actor and critic architectures
ARGS_dict = {
    'net_arch': {'pi': [64, 64], 'qf': [400, 300]}
}

# Test case 3: net_arch as an empty list (linear network)
ARGS_empty_list = {
    'net_arch': []
}

# Test case 4: net_arch as a dict with empty lists
ARGS_empty_dict = {
    'net_arch': {'pi': [], 'qf': []}
}

# Primary test case: simple list architecture
ARGS = {
    'net_arch': [256, 128]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family int — 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
is_wrapped Ran
ran, violated the contract we drafted
DLR-RM/stable-baselines3/stable_baselines3/common/env_util.py
code served (permissive licence) · get_code("2c839f254aa3cd8e")
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 bool, 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 gymnasium as gym
from gymnasium import spaces
import numpy as np

# Create a simple base environment
class SimpleEnv(gym.Env):
    def __init__(self):
        self.observation_space = spaces.Box(low=0, high=1, shape=(4,), dtype=np.float32)
        self.action_space = spaces.Discrete(2)
    
    def reset(self):
        return self.observation_space.sample(), {}
    
    def step(self, action):
        obs = self.observation_space.sample()
        reward = 0.0
        terminated = False
        truncated = False
        info = {}
        return obs, reward, terminated, truncated, info
    
    def render(self):
        pass

# Create a custom wrapper class to search for
class CustomWrapper(gym.Wrapper):
    def __init__(self, env):
        super().__init__(env)

# Create another wrapper class (different from what we're searching for)
class AnotherWrapper(gym.Wrapper):
    def __init__(self, env):
        super().__init__(env)

# Create an environment wrapped with CustomWrapper
base_env = SimpleEnv()
wrapped_env = CustomWrapper(base_env)

ARGS = {
    "env": wrapped_env,
    "wrapper_class": CustomWrapper
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gymnasium, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
sum_independent_dims Ran
ran; our contract draft was wrong, not the code
DLR-RM/stable-baselines3/stable_baselines3/common/distributions.py
code served (permissive licence) · get_code("a43c0716fbe4e561")
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 1, dtype family float, shape (2,) 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 as th

th.manual_seed(0)

# Test case 1: 2D tensor (n_batch=2, n_actions=4)
tensor_2d = th.randn(2, 4)

# Test case 2: 1D tensor (n_batch=2,)
tensor_1d = th.randn(2)

# We'll use the 2D tensor as the primary test case
ARGS = {
    "tensor": tensor_2d
}
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 1, dtype family float, shape (2,) — shape (2,) 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
unwrap_wrapper Ran
ran; our contract draft was wrong, not the code
DLR-RM/stable-baselines3/stable_baselines3/common/env_util.py
code served (permissive licence) · get_code("581c471094365ae5")
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 CustomWrapper. 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 gymnasium as gym
import torch

# Create a base environment
base_env = gym.make('CartPole-v1')

# Create a custom wrapper class to search for
class CustomWrapper(gym.Wrapper):
    def __init__(self, env):
        super().__init__(env)

# Create another wrapper class that won't be found
class OtherWrapper(gym.Wrapper):
    def __init__(self, env):
        super().__init__(env)

# Build a wrapped environment: OtherWrapper -> CustomWrapper -> base_env
wrapped_env = CustomWrapper(base_env)
wrapped_env = OtherWrapper(wrapped_env)

ARGS = {
    "env": wrapped_env,
    "wrapper_class": CustomWrapper
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
gymnasium, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type CustomWrapper — a CustomWrapper output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a CustomWrapper 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
kl_divergence Not yet run
unverified (harvested, no recorded run)
DLR-RM/stable-baselines3/stable_baselines3/common/distributions.py
code served (permissive licence) · get_code("b0d527dcd96cd8de")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 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
sum_independent_dims 4 other papers
4 dated earlier
2010.14484 (2020-10)
One Solution is Not All You Need: Few-Shot Extrapolation via Structured MaxEnt RL
2305.06242 (2023-05)
Think Twice before Driving: Towards Scalable Decoders for End-to-End Autonomous Driving
2308.00398 (2023-08)
DriveAdapter: Breaking the Coupling Barrier of Perception and Planning in End-to-End Autonomous Driving
and 1 more not named here

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

Neural networks (NNs) often have critical behavioural trade-offs that are set at design time with hyperparameters-such as reward weights in reinforcement learning or quantile targets in regression. Post-deployment, however, user preferences can evolve, making initial settings undesirable, necessitating potentially expensive retraining. To circumvent this, we introduce the task of Hyperparameter Trajectory Inference (HTI): to learn, from observed data, how a NN's conditional output distribution changes with its hyperparameters, and construct a surrogate model that approximates the NN at unobserved hyperparameter settings. HTI requires extending existing trajectory inference approaches to incorporate conditions, exacerbating the challenge of ensuring inferred paths are feasible. We propose an approach based on conditional Lagrangian optimal transport, jointly learning the Lagrangian function governing hyperparameter-induced dynamics along with the associated optimal transport maps and geodesics between observed marginals, which form the surrogate model. We incorporate inductive biases based on the manifold hypothesis and least-action principles into the learned Lagrangian, improving surrogate model feasibility. We empirically demonstrate that our approach reconstructs NN outputs across various hyperparameter spectra better than other alternatives.

For agents

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

get_harvested_code_for_paper("2603.01771")
get_code_for_paper("2603.01771")
have("2603.01771")

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

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

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

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

Connect an agent — have() is free.