SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.01525 · 2026

Mean Field Reinforcement Learning

Mathieu Laurière, René Carmona, René Carmona Princeton, N Mathieu Laurière

arXiv · PDF

Code that ran

5 of 14 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 9 no recorded run), measured 2026-11-23; 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/2607.01525.json · badge: /api/ran/2607.01525.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
mlauriere/mfrl-tutorial-code canonical (classifier label)
classifier basis: census
5 ran · 9 no recorded run
FunctionStatusWhere it lives
create_run_dir Ran
ran; our contract draft was wrong, not the code
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/utils.py
code served (permissive licence) · get_code("65368332d11d7bae")
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 PosixPath. 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 tempfile
from pathlib import Path
from typing import Any, Dict

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

ARGS = {
    'config': {
        'experiment': 'test_experiment',
        'output_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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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_policy_action Ran
ran; our contract draft was wrong, not the code
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/cybersecurity_ddpg_core.py
code served (permissive licence) · get_code("7f0c73132cfcc35b")
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 torch
import torch.nn as nn
import numpy as np

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

# Define a minimal actor network that takes state and outputs action
class MinimalActor(nn.Module):
    def __init__(self, state_dim: int, action_dim: int):
        super().__init__()
        self.fc = nn.Linear(state_dim, action_dim)
    
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return self.fc(x)

# Setup parameters
state_dim = 4
action_dim = 3
batch_size = 1

# Create state (population distribution)
state = np.random.randn(state_dim).astype(np.float32)

# Create actor network
actor = MinimalActor(state_dim=state_dim, action_dim=action_dim)

# Create Gaussian noise array with same shape as action output
noise = np.random.randn(action_dim).astype(np.float32) * 0.1

# Set device to CPU
device = torch.device('cpu')

ARGS = {
    'state': state,
    'actor': actor,
    'noise': noise,
    'device': device
}
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 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
precompute_bench_values Ran
ran; our contract draft was wrong, not the code
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/cybersecurity_qlearning_core.py
code served (permissive licence) · get_code("69a52ca2419b870a")
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 3, 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
import torch
import torch.nn as nn

# Create a minimal ForwardBackwardSolver class that satisfies the function's usage
class ForwardBackwardSolver:
    """Minimal solver that implements the solve() method."""
    
    def solve(self, m: np.ndarray, max_iter: int = 20) -> tuple:
        """
        Solves and returns (result, u_traj).
        
        Args:
            m: state vector of shape (4,)
            max_iter: maximum iterations
            
        Returns:
            Tuple of (result, u_traj) where u_traj is a list of control trajectories
        """
        # m has shape (4,) representing [di, ds, ui, us]
        # Return dummy trajectory with u_traj[0] being a vector we can dot with m
        u_traj = [np.array([0.25, 0.25, 0.25, 0.25])]  # Uniform distribution over 4 components
        result = None
        return result, u_traj


# Build the arguments dictionary
ARGS = {
    'solver': ForwardBackwardSolver(),
    'mu_DI_vals': [0.1, 0.2, 0.3],  # 3 different mu_DI values
    'grid_res': 5  # Small grid resolution for speed
}
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 list, ndim 3, 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
precompute_tables Ran
ran; our contract draft was wrong, not the code
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/cybersecurity_qlearning_core.py
code served (permissive licence) · get_code("e0c4b2f6c9e25202")
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
from scipy.spatial import cKDTree

# Create a minimal stand-in environment class
class MockEnv:
    def __init__(self):
        # Discretization and action parameters
        self.n_tabular_actions = 3
        
        # Disease state transitions
        self.q_rec_D = 0.1
        self.q_rec_U = 0.2
        
        # Infection rates
        self.v_H = 0.05
        self.q_inf_D = 0.3
        self.q_inf_U = 0.25
        
        # Transmission rates
        self.beta_DD = 0.4
        self.beta_UD = 0.15
        self.beta_UU = 0.35
        self.beta_DU = 0.1
        
        # Action speed
        self.lambda_speed = 0.8
        
        # Cost coefficients
        self.k_D = 1.0
        self.k_I = 0.5
        
        # Time step
        self.dt = 0.01
        
        # Discrete actions: 3 actions, each is a 4-dim vector
        # Shape: (n_tabular_actions, 4)
        self.all_discrete_actions = np.array([
            [0.0, 0.1, 0.2, 0.0],
            [0.1, 0.0, 0.1, 0.0],
            [0.2, 0.2, 0.0, 0.0]
        ], dtype=float)

env = MockEnv()

discretization_params = {
    'n_steps_state': 2
}

ARGS = {
    'env': env,
    'discretization_params': discretization_params
}
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
sampler Ran
ran, honoured the contract we drafted
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/cybersecurity_qlearning_core.py
code served (permissive licence) · get_code("dee65c4a2a811d5e")
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 (5,) 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 sampler(n_states: int) -> np.ndarray:
    r = np.random.rand()
    if r < 0.4:
        alpha = [1.0] * n_states
        mu = np.random.dirichlet(alpha)
    elif r < 0.8:
        alpha = [0.1] * n_states
        mu = np.random.dirichlet(alpha)
    else:
        mu = np.zeros(n_states)
        n_active = np.random.randint(1, 4)
        indices = np.random.choice(n_states, n_active, replace=False)
        mu[indices] = np.random.dirichlet([1.0] * n_active)
    return mu

ARGS = {
    "n_states": 5
}
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 (5,) — shape (5,) 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
get_policy_action Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/distribution_planning_core.py
code served (permissive licence) · get_code("261ce6d7c43e6fb1")
How it ran

no invocation recorded.

load_config Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/utils.py
code served (permissive licence) · get_code("8c79ac4c8758d2b6")
How it ran

no invocation recorded.

precompute_bench_values Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/cybersecurity_ddpg_core.py
code served (permissive licence) · get_code("99a883a6fd200989")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/cybersecurity_ddpg.py
code served (permissive licence) · get_code("6804b1a6fd082b5e")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/cybersecurity_qlearning.py
code served (permissive licence) · get_code("e05b3f625b28b897")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/distribution_planning_ddpg.py
code served (permissive licence) · get_code("da473da076f954ea")
How it ran

no invocation recorded.

run Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/lq_generate_data.py
code served (permissive licence) · get_code("e41e192150e19b36")
How it ran

no invocation recorded.

run_single_solver Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/lq_mfc_policy_gradient.py
code served (permissive licence) · get_code("449010e2758daeb8")
How it ran

no invocation recorded.

write_resolved_config Not yet run
unverified (harvested, no recorded run)
mlauriere/mfrl-tutorial-code/src/mfrl_tutorial/utils.py
code served (permissive licence) · get_code("7e1ed8623ea934db")
How it ran

no invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 14 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.

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

Many realistic situations cannot be modeled with idiosyncratic noise as the only source of random shocks. In order to add random factors and random shocks affecting simultaneously

For agents

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

get_harvested_code_for_paper("2607.01525")
get_code_for_paper("2607.01525")
have("2607.01525")

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

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

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

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

Connect an agent — have() is free.