SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2508.20294 · NeurIPS · 2025

Dynamics-Aligned Latent Imagination in Contextual World Models for Zero-Shot Generalization

Pradeep Kr, Frank Röder, Manfred Eppe, Jan Benad, Banerjee

arXiv · PDF · Open in the Atlas

Code that ran

9 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 0 have no contract verdict; 9 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2508.20294.json · badge: /api/ran/2508.20294.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
frankroeder/DALI canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
binning Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
frankroeder/DALI/dreamerv3_compat/scores/plot.py
code served (permissive licence) · get_code("bdb3813f6efd9a11")
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 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

# Construct valid arguments for the binning function
xs = np.array([1.0, 2.0, 3.0, 4.0, 5.0])
ys = np.array([10.0, 20.0, 30.0, 40.0, 50.0])
borders = np.array([0.0, 2.5, 5.0, 7.5])

ARGS = {
    'xs': xs,
    'ys': ys,
    'borders': borders,
    'reducer': np.nanmean,
    'fill': 'nan'
}
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 tuple, ndim 2, 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
create_random_policy Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/contextual_mbrl/dreamer/eval_record.py
code served (permissive licence) · get_code("414c58cc5f5444ba")
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 function. 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
import gymnasium as gym

# Create a simple stand-in action space that mimics gymnasium Box space
class StandInActionSpace:
    def __init__(self, shape):
        self.shape = shape
    
    def sample(self):
        return np.random.randn(*self.shape).astype(np.float32)

# Create act_space parameter
act_space = {
    'action': StandInActionSpace(shape=(3,))
}

ARGS = {
    'act_space': act_space
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
get_act Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/dreamerv3_compat/dreamerv3/nets.py
code served (permissive licence) · get_code("03dd934385b4d240")
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 custom_jvp. 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 jax
import jax.numpy as jnp

def get_act(name):
    if callable(name):
        return name
    elif name == 'none':
        return lambda x: x
    elif name == 'mish':
        return lambda x: x * jnp.tanh(jax.nn.softplus(x))
    elif hasattr(jax.nn, name):
        return getattr(jax.nn, name)
    else:
        raise NotImplementedError(name)

# Test with string name 'relu'
ARGS = {
    'name': 'relu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
jax — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type custom_jvp — a custom_jvp output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a custom_jvp 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
get_df_from_file Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/anaylsis/utils.py
code served (permissive licence) · get_code("8c25f8b1d2e1adb9")
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 DataFrame. 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 pickle
import tempfile
import os
import numpy as np

# Create a temporary pickle file with the required data structure
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, 'test_data.pkl')

# Construct the data structure that get_df_from_file expects
data = [
    {
        'context': {'ctx_key1': 'value1', 'ctx_key2': 'value2'},
        'context_order': ['ctx_key1', 'ctx_key2'],
        'episodes': [
            {
                'obs': np.random.randn(3, 4),
                'action': np.random.randn(3, 4),
                'reward': np.random.randn(3, 4),
                'embed': np.random.randn(3, 4),
            },
            {
                'obs': np.random.randn(2, 4),
                'action': np.random.randn(2, 4),
                'reward': np.random.randn(2, 4),
            }
        ]
    },
    {
        'context': {'ctx_key1': 'value3', 'ctx_key2': 'value4'},
        'context_order': ['ctx_key1', 'ctx_key2'],
        'episodes': [
            {
                'obs': np.random.randn(2, 4),
                'action': np.random.randn(2, 4),
                'embed': np.random.randn(2, 4),
            }
        ]
    }
]

# Save to pickle file
with open(temp_file, 'wb') as f:
    pickle.dump(data, f)

ARGS = {
    'filename': temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
linear_schedule Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/contextual_mbrl/baseline/model.py
code served (permissive licence) · get_code("2df73e2474aca4ca")
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 function. 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 numpy as np
from typing import Callable, Union

torch.manual_seed(0)

# The function linear_schedule takes initial_value which can be a float or str
# It returns a function that takes progress_remaining (float) and returns float
# The function uses: float(initial_value) and multiplies progress_remaining by it

ARGS = {
    "initial_value": 0.001
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
match_and_normalize_metrics Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/anaylsis/plot_rliable.py
code served (permissive licence) · get_code("b7039ec08477856e")
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 dict. 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

# The function expects three dictionaries where:
# - Keys are tuples of two numeric values (context dimensions)
# - Values are numeric returns/metrics

# Create agent_metrics: dict with tuple keys and numeric values
agent_metrics = {
    (1.0, 2.0): 0.5,
    (2.0, 3.0): 0.7,
    (3.0, 4.0): 0.9,
}

# Create expert_metrics: dict with tuple keys and numeric values
expert_metrics = {
    (1.0, 2.0): 1.0,
    (2.0, 3.0): 1.0,
    (3.0, 4.0): 1.0,
}

# Create random_metrics: dict with tuple keys and numeric values
random_metrics = {
    (1.0, 2.0): 0.1,
    (2.0, 3.0): 0.15,
    (3.0, 4.0): 0.2,
}

ARGS = {
    "agent_metrics": agent_metrics,
    "expert_metrics": expert_metrics,
    "random_metrics": random_metrics,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
parse_folder_name Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/anaylsis/neurips_plots.py
code served (permissive licence) · get_code("41733de071f9c46a")
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 torch

torch.manual_seed(0)

ARGS = {
    'folder': 'carl_Walker2d_double_box_enc_vision_dec_action_ctxencoder_mlp'
}
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 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
plots Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/dreamerv3_compat/scores/plot.py
code served (permissive licence) · get_code("02a86e713fbde0a9")
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. 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 matplotlib.pyplot as plt
import numpy as np
from matplotlib import ticker

ARGS = {
    "amount": 6,
    "cols": 4,
    "size": (2, 2.3),
    "xticks": 4,
    "yticks": 5,
    "grid": (1, 1),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
reduce Ran
ran; our contract draft was wrong, not the code
frankroeder/DALI/dreamerv3_compat/scores/plot.py
code served (permissive licence) · get_code("3712b709b2e95945")
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 warnings
import numpy as np

# Create test data for the reduce function
values = np.array([1.0, 2.0, np.nan, 4.0, 5.0])

# Define the reducer function (using default np.nanmean)
reducer = np.nanmean

# Create ARGS dict with all parameters
ARGS = {
    "values": values,
    "reducer": reducer,
}
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
ablation_auc_analysis Not yet run
unverified (harvested, no recorded run)
frankroeder/DALI/anaylsis/neurips_plots.py
code served (permissive licence) · get_code("f393b6b86a70bd14")
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, 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 5 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
get_act 9 other papers
9 dated earlier
2303.03226 (2023-03)
Safe Reinforcement Learning via Probabilistic Logic Shields
2305.14343 (2023-05)
Video Prediction Models as Rewards for Reinforcement Learning
2306.11488 (2023-06)
Informed POMDP: Leveraging Additional Information in Model-Based RL
and 6 more not named here
binning 1 other paper
1 dated earlier
2403.10967 (2024-03)
Dreaming of Many Worlds: Learning Contextual World Models Aids Zero-Shot Generalization
linear_schedule 1 other paper
1 dated earlier
2403.10967 (2024-03)
Dreaming of Many Worlds: Learning Contextual World Models Aids Zero-Shot Generalization
plots 1 other paper
1 dated earlier
2403.10967 (2024-03)
Dreaming of Many Worlds: Learning Contextual World Models Aids Zero-Shot Generalization
reduce 1 other paper
1 dated earlier
2403.10967 (2024-03)
Dreaming of Many Worlds: Learning Contextual World Models Aids Zero-Shot Generalization

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-24.

Repositories linked to this paper

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

Abstract

Real-world reinforcement learning demands adaptation to unseen environmental conditions without costly retraining. Contextual Markov Decision Processes (cMDP) model this challenge, but existing methods often require explicit context variables (e.g., friction, gravity), limiting their use when contexts are latent or hard to measure. We introduce Dynamics-Aligned Latent Imagination (DALI), a framework integrated within the Dreamer architecture that infers latent context representations from agent-environment interactions. By training a self-supervised encoder to predict forward dynamics, DALI generates actionable representations conditioning the world model and policy, bridging perception and control. We theoretically prove this encoder is essential for efficient context inference and robust generalization. DALI's latent space enables counterfactual consistency: Perturbing a gravity-encoding dimension alters imagined rollouts in physically plausible ways. On challenging cMDP benchmarks, DALI achieves significant gains over contextunaware baselines, often surpassing context-aware baselines in extrapolation tasks, enabling zero-shot generalization to unseen contextual variations.

For agents

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

get_harvested_code_for_paper("2508.20294")
get_code_for_paper("2508.20294")
have("2508.20294")

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

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

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

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

Connect an agent — have() is free.