SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.06494 · NeurIPS · 2024

DiffPhyCon: A Generative Approach to Control Complex Physical Systems

Tailin Wu, Rui Wang, Yue Wang, Zhi-Ming Ma, Ruiqi Feng, Long Wei, Tao Zhang, Peiyan Hu, Haodong Feng, Yixuan Du

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 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; 8 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/2407.06494.json · badge: /api/ran/2407.06494.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
AI4Science-WestlakeU/diffphycon canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
ai4science-westlakeu/diffphycon community
Papers with Code archive
0 ran · 2 no recorded run
FunctionStatusWhere it lives
MLP Ran
ran; our contract draft was wrong, not the code
AI4Science-WestlakeU/diffphycon/baselines/BC_burgers/net.py
code served (permissive licence) · get_code("4941b3d35f5f6a94")
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 Sequential. 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

torch.manual_seed(0)

ARGS = {
    'input_dim': 4,
    'hidden_dim': 8,
    'depth': 3,
    'output_dim': 2,
    'final_activation': 'relu'
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
apply_conditioning Ran
ran; our contract draft was wrong, not the code
AI4Science-WestlakeU/diffphycon/baselines/BC_jellyfish/modules.py
code served (permissive licence) · get_code("b3d593fb33f79ac5")
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, 5, 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
import torch.nn as nn

torch.manual_seed(0)

# x: tensor that will be indexed and have values assigned
# The function indexes x[:, t, action_dim:] where t comes from conditions.keys()
# and assigns val.clone() to it
# So x needs shape (batch_size, time_steps, feature_dim)
# with feature_dim > action_dim
batch_size = 2
time_steps = 5
action_dim = 2
feature_dim = 4  # must be > action_dim

x = torch.randn(batch_size, time_steps, feature_dim)

# conditions: dict mapping timestep t to a tensor val
# The function does x[:, t, action_dim:] = val.clone()
# So val should have shape (batch_size, feature_dim - action_dim)
condition_shape = (batch_size, feature_dim - action_dim)
conditions = {
    1: torch.randn(condition_shape),
    3: torch.randn(condition_shape),
}

ARGS = {
    "x": x,
    "conditions": conditions,
    "action_dim": action_dim,
}
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, 5, 4) — shape (2, 5, 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
compute_orthonormal Ran
ran; our contract draft was wrong, not the code
AI4Science-WestlakeU/diffphycon/utils.py
code served (permissive licence) · get_code("9aa3ee4d1c86d92e")
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 torch

torch.manual_seed(0)

# Create a small boundary tensor with shape [number of boundary nodes, 2]
# Using 4 boundary nodes as a small example
boundary = torch.tensor([
    [0.0, 0.0],
    [1.0, 0.0],
    [1.0, 1.0],
    [0.0, 1.0]
], dtype=torch.float32)

ARGS = {
    "boundary": boundary
}
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 — 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
cosine_beta_schedule Ran
ran, honoured the contract we drafted
AI4Science-WestlakeU/diffphycon/baselines/BC_jellyfish/modules.py
code served (permissive licence) · get_code("b6113e0f43155a33")
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 (10,) 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
import torch

torch.manual_seed(0)

ARGS = {
    "timesteps": 10,
    "s": 0.008,
    "dtype": torch.float32,
}
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 Tensor, ndim 1, dtype family float, shape (10,) — shape (10,) 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
display_name Ran
ran; our contract draft was wrong, not the code
AI4Science-WestlakeU/diffphycon/phi/model.py
code served (permissive licence) · get_code("7d3807f597feb193")
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 str. 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

torch.manual_seed(0)

ARGS = {
    "python_name": "hello_world_example"
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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_device Ran
ran; our contract draft was wrong, not the code
AI4Science-WestlakeU/diffphycon/train/train_surrogate_models_jellyfish.py
code served (permissive licence) · get_code("a0b5708a7ead4d9f")
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 device. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.gpu = 0

ARGS = {
    'args': Args()
}
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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device 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_time Ran
ran; our contract draft was wrong, not the code
AI4Science-WestlakeU/diffphycon/utils.py
code served (permissive licence) · get_code("35d5144a8f9cae87")
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 str. 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.

from datetime import datetime
from time import localtime, strftime, time

ARGS = {
    'is_bracket': True,
    'return_numerical_time': False,
    'precision': 'second'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
soft_clamp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
AI4Science-WestlakeU/diffphycon/baselines/BC_burgers/net.py
code served (permissive licence) · get_code("c8dc65736e6bef1e")
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 a small tensor to pass as x
x = torch.randn(2, 4)

# Create a tuple of bounds (low, high)
bound = (-1.0, 1.0)

ARGS = {
    "x": x,
    "bound": bound,
}
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
synchronized_method Ran
ran; our contract draft was wrong, not the code
AI4Science-WestlakeU/diffphycon/phi/model.py
code served (permissive licence) · get_code("35eb6064f0c2c7a2")
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 threading
import inspect

def synchronized_method(method):
    outer_lock = threading.Lock()
    lock_name = '__' + method.__name__ + '_lock' + '__'

    def sync_method(self, *args, **kws):
        with outer_lock:
            if not hasattr(self, lock_name):
                setattr(self, lock_name, threading.Lock())
            lock = getattr(self, lock_name)
            with lock:
                return method(self, *args, **kws)
    return sync_method


class TestClass:
    @synchronized_method
    def test_method(self, x, y=10):
        return x + y


def sample_function(a, b):
    return a + b


ARGS = {
    'method': sample_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, six — 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
GaussianDiffusion Not yet run
unverified (harvested, no recorded run)
ai4science-westlakeu/diffphycon/diffusion/diffusion_1d_burgers.py
code served (permissive licence) · get_code("0f4fbff3e621e12e")
How it ran

no invocation recorded.

cosine_beta_schedule Not yet run
unverified (harvested, no recorded run)
ai4science-westlakeu/diffphycon/diffusion/diffusion_1d_burgers.py
code served (permissive licence) · get_code("b2861c16f8920d11")
How it ran

no invocation recorded.

extract Not yet run
unverified (harvested, no recorded run)
AI4Science-WestlakeU/diffphycon/baselines/BC_jellyfish/modules.py
code served (permissive licence) · get_code("09c8479d9a5b3e06")
How it ran

no invocation recorded.

linear_transform Not yet run
unverified (harvested, no recorded run)
AI4Science-WestlakeU/diffphycon/utils.py
code served (permissive licence) · get_code("26f8f5ab9f799b05")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 11 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 2 the same month, 7 later) and 2 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
extract
brick of this paper's assembly: helper
77 other papers
46 dated earlier, 4 the same month, 25 later, 2 same year, order not determinable · 32 only as an assembly brick
1711.11585 (2017-11)
High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2102.05379 (2021-02)
Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
and 74 more not named here
cosine_beta_schedule 20 other papers
11 dated earlier, 1 the same month, 8 later · 8 only as an assembly brick
2208.06193 (2022-08)
Diffusion Policies as an Expressive Policy Class for Offline Reinforcement Learning
2210.15629 (2022-10)
Language Control Diffusion: Efficiently Scaling through Space, Time, and Tasks
2303.14676 (2023-03)
PDPP: Projected Diffusion for Procedure Planning in Instructional Videos
and 17 more not named here
cosine_beta_schedule
brick of this paper's assembly: helper
13 other papers
9 dated earlier, 4 later · 5 only as an assembly brick
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2303.11579 (2023-03)
Diffusion-Based 3D Human Pose Estimation with Multi-Hypothesis Aggregation
2303.17959 (2023-03)
Diffusion Action Segmentation
and 10 more not named here
apply_conditioning 9 other papers
4 dated earlier, 5 later · 2 only as an assembly brick
2210.15629 (2022-10)
Language Control Diffusion: Efficiently Scaling through Space, Time, and Tasks
2305.18459 (2023-05)
Diffusion Model is an Effective Planner and Data Synthesizer for Multi-Task Reinforcement Learning
2405.04235 (2024-05)
LTLDoG: Satisfying Temporally-Extended Symbolic Constraints for Safe Diffusion-based Planning
and 6 more not named here
display_name 2 other papers
2 later
2408.03124 (2024-08)
CL-DiffPhyCon: Closed-loop Diffusion Control of Complex Physical Systems
2412.04833 (2024-12)
Wavelet Diffusion Neural Operator
get_time 2 other papers
1 dated earlier, 1 later
2401.13171 (2024-01)
Compositional Generative Inverse Design
2502.01989 (2025-02)
VFScale: Intrinsic Reasoning through Verifier-Free Test-time Scalable Diffusion Model
soft_clamp 2 other papers
2 dated earlier
2302.11312 (2023-02)
Behavior Proximal Policy Optimization
2311.03351 (2023-11)
Uni-O4: Unifying Online and Offline Deep Reinforcement Learning with Multi-Step On-Policy Optimization
synchronized_method 2 other papers
2 later
2408.03124 (2024-08)
CL-DiffPhyCon: Closed-loop Diffusion Control of Complex Physical Systems
2412.04833 (2024-12)
Wavelet Diffusion Neural Operator
MLP 1 other paper
1 dated earlier
2302.11312 (2023-02)
Behavior Proximal Policy Optimization
compute_orthonormal 1 other paper
1 dated earlier
2401.13171 (2024-01)
Compositional Generative Inverse Design
linear_transform 1 other paper
1 dated earlier
2401.13171 (2024-01)
Compositional Generative Inverse Design

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

Controlling the evolution of complex physical systems is a fundamental task across science and engineering. Classical techniques suffer from limited applicability or huge computational costs. On the other hand, recent deep learning and reinforcement learning-based approaches often struggle to optimize long-term control sequences under the constraints of system dynamics. In this work, we introduce Diffusion Physical systems Control (DiffPhyCon), a new class of method to address the physical systems control problem. DiffPhyCon excels by simultaneously minimizing both the learned generative energy function and the predefined control objectives across the entire trajectory and control sequence. Thus, it can explore globally and plan near-optimal control sequences. Moreover, we enhance DiffPhyCon with prior reweighting, enabling the discovery of control sequences that significantly deviate from the training distribution. We test our method on three tasks: 1D Burgers' equation, 2D jellyfish movement control, and 2D highdimensional smoke control, where our generated jellyfish dataset is released as a benchmark for complex physical system control research. Our method outperforms widely applied classical approaches and state-of-the-art deep learning and reinforcement learning methods. Notably, DiffPhyCon unveils an intriguing fastclose-slow-open pattern observed in the jellyfish, aligning with established findings in the field of fluid dynamics. The project website, jellyfish dataset, and code can be found at https://github.com/AI4Science-WestlakeU/diffphycon.

For agents

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

get_harvested_code_for_paper("2407.06494")
get_code_for_paper("2407.06494")
have("2407.06494")

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

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

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

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

Connect an agent — have() is free.