SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2508.10531 · ICLR · 2025

Projected Coupled Diffusion for Test-Time Constrained Joint Generation

Chun Ling, See-Kiong Ng, Hao Luan, Yi Goh

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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 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.10531.json · badge: /api/ran/2508.10531.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
EdmundLuan/pcd canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
build_time_aware_multi_pred_head_classifier Ran
ran; our contract draft was wrong, not the code
EdmundLuan/pcd/image_pair/src/models/latent_classifier_resnet_enc_multihead.py
code served (permissive licence) · get_code("8350e83b8a06e5d3")
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 TimeAwareDynamicHeadResnetFeatureClassifier. 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
from collections import namedtuple

torch.manual_seed(0)

class ArgsStandIn:
    """Stand-in args object with all attributes needed."""
    def __init__(self):
        self.cls_in_channels = 4
        self.cls_head_configs = {
            "age": (10, 256, 0.5, 1.0),
            "gender": (2, 128, 0.3, 1.0),
        }
        self.cls_backbone = "resnet18"
        self.cls_pretrained_backbone = False
        self.cls_max_timestep = 999
        self.cls_timestep_cond = True
        # Additional attributes that may be set via vars(args) in __init__
        self.custom_attr_1 = "value1"
        self.custom_attr_2 = 42

args = ArgsStandIn()
device = torch.device('cpu')

ARGS = {
    'args': args,
    'device': device,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TimeAwareDynamicHeadResnetFeatureClassifier — a TimeAwareDynamicHeadResnetFeatureClassifier output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TimeAwareDynamicHeadResnetFeatureClassifier 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
dC_dx Ran
ran; our contract draft was wrong, not the code
EdmundLuan/pcd/toy_example/src/lmc.py
code served (permissive licence) · get_code("e4593d830644fec4")
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 small test tensors
# x and y should have the same shape for element-wise operations
x = torch.randn(2, 4)
y = torch.randn(2, 4)
alpha = 0.1

ARGS = {
    "x": x,
    "y": y,
    "alpha": alpha,
}
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
dC_dy Ran
ran; our contract draft was wrong, not the code
EdmundLuan/pcd/toy_example/src/lmc.py
code served (permissive licence) · get_code("aa68891598f9fc98")
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; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T01:20:07Z. 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)

# Create small tensors for x, y, and alpha
# x and y should be tensors that can be subtracted
# alpha is a scalar parameter
x = torch.randn(2, 4)
y = torch.randn(2, 4)
alpha = torch.tensor(0.1)

ARGS = {
    "x": x,
    "y": y,
    "alpha": alpha
}
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 — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
map_tensor_range Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EdmundLuan/pcd/image_pair/src/utils/dataset_util.py
code served (permissive licence) · get_code("1edd49e2dcdcce50")
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; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T01:20:07Z. 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)

# Create a small tensor with values in range [0, 10]
tensor = torch.tensor([[1.0, 2.0, 3.0, 4.0],
                       [5.0, 6.0, 7.0, 8.0]])

# Define input range [0, 10] and output range [0, 1]
in_range = (0.0, 10.0)
out_range = (0.0, 1.0)

ARGS = {
    "tensor": tensor,
    "in_range": in_range,
    "out_range": out_range,
}
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 — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
mount_resnet_multi_head_latent_classifier_configs Ran
ran; our contract draft was wrong, not the code
EdmundLuan/pcd/image_pair/src/models/latent_classifier_resnet_enc_multihead.py
code served (permissive licence) · get_code("7ab424ee31e9e801")
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 Namespace. 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 tempfile
import yaml
import os

# Create a temporary YAML config file
yaml_config = {
    'output_dir': 'outputs/ldm_train/test',
    'device': {
        'device': 'cpu',
        'deterministic': True
    },
    'wandb': {
        'use': False,
        'project': 'test_project',
        'name': 'test_run'
    },
    'data': {
        'images_dir': 'test_images',
        'label_json_filepath': 'test_labels.json',
        'train_images': '00000 - 00099',
        'test_images': '00100 - 00109',
        'age_group_classes': ['0-2', '3-6', '7-12'],
        'gender_classes': ['male', 'female'],
        'age_group_conf_thres': 0.5,
        'gender_conf_thres': 0.5,
        'img_height': 512,
        'img_width': 512,
        'img_format': 'png',
        'reweight_class_loss': 'none',
        'smoothing_factor': 1.0,
        'dataloader_num_workers': 4
    },
    'classifier': {
        'ldm_id': 'stabilityai/stable-diffusion-2-1-base',
        'in_channels': 4,
        'backbone': 'resnet18',
        'pretrained_backbone': False,
        'max_timestep': 999,
        'timestep_condition': True,
        'head_configs': {
            'age_head': {
                'num_classes': 3,
                'hidden_dim': 256,
                'dropout_p': 0.1,
                'loss_weight': 10.0
            },
            'gender_head': {
                'num_classes': 2,
                'hidden_dim': 128,
                'dropout_p': 0.05,
                'loss_weight': 5.0
            }
        }
    },
    'training': {
        'seed': 42,
        'batch_size': 32,
        'epochs': 10,
        'lr_scheduler': 'constant',
        'lr': 0.0001,
        'lr_rop_patience': 1,
        'lr_rop_factor': 0.75,
        'lr_rop_min': 1e-06,
        'lr_cosw_warmup_steps': 2500,
        'lr_cosw_max_train_steps': 51200,
        'lr_cosw_cosine_cycles': 0.5,
        'lr_cosw_last_epoch': -1,
        'lr_conw_warmup_steps': 2500,
        'sample_test_count': 10
    },
    'value_range': {
        'data_min': 0.0,
        'data_max': 1.0,
        'model_min': -1.0,
        'model_max': 1.0,
        'ldm_min': -1.0,
        'ldm_max': 1.0
    }
}

# Write config to temporary file
with tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', delete=False) as f:
    yaml.dump(yaml_config, f)
    yaml_path = f.name

ARGS = {
    'yaml_path': yaml_path,
    'args': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
proj Ran
ran; our contract draft was wrong, not the code
EdmundLuan/pcd/toy_example/src/lmc.py
code served (permissive licence) · get_code("92b387080acca955")
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; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T01:20:07Z. 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)

# Create small tensors for the projection function
z = torch.randn(2, 4)  # batch of 2, dim 4
lo = torch.tensor(-1.0)  # lower bound
hi = torch.tensor(1.0)   # upper bound

ARGS = {
    "z": z,
    "lo": lo,
    "hi": hi,
}
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 — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
recursive_to Ran
ran; our contract draft was wrong, not the code
EdmundLuan/pcd/image_pair/src/utils/device_util.py
code served (permissive licence) · get_code("90bc52caa747a1de")
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 torch

torch.manual_seed(0)

# Create a deeply nested structure with tensors at various levels
tensor_1 = torch.randn(2, 4, dtype=torch.float32)
tensor_2 = torch.randn(3, 5, dtype=torch.float64)
tensor_3 = torch.randn(1, 2, dtype=torch.float32)

nested_structure = {
    'tensors': [tensor_1, tensor_2],
    'nested_dict': {
        'single_tensor': tensor_3,
        'list_of_tensors': [tensor_1, tensor_3],
        'tuple_of_tensors': (tensor_2, tensor_1),
        'set_of_values': {1, 2, 3},
    },
    'metadata': 'some_string',
    'number': 42,
    'float_value': 3.14,
}

ARGS = {
    'obj': nested_structure,
    'to_device': 'cpu',
    'to_dtype': torch.float32,
}
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 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
resize_imgs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
EdmundLuan/pcd/image_pair/src/utils/dataset_util.py
code served (permissive licence) · get_code("692e605a7896a3df")
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 4, dtype family float, shape (2, 3, 4, 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.functional as F

torch.manual_seed(0)

# Create a small batch of images: [B=2, C=3, H=8, W=8]
x = torch.randn(2, 3, 8, 8)

# Target size for resizing
m = 4

# Interpolation mode
mode = 'bicubic'

ARGS = {
    'x': x,
    'm': m,
    'mode': mode
}
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 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
simplex_grid Ran
ran, honoured the contract we drafted
EdmundLuan/pcd/image_pair/src/utils/combinatorial_util.py
code served (permissive licence) · get_code("e2c718798232bdd1")
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; no output shape is stated. It ran in syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1) at 2026-09-27T01:20:07Z. 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 itertools

torch.manual_seed(0)

# The function simplex_grid takes two integer parameters:
# k: number of exemplars / vertices
# resolution: denominator R (grid spacing = 1/R)

# Let's use small values to keep output manageable
k = 3
resolution = 2

ARGS = {
    "k": k,
    "resolution": resolution,
}
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 — no output shape is stated: no later run recorded an output shape for this sample (observed_output and metamorphic_properties carry none; shape_contract and output_contract record ndim only)
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 syntology-harvest-sandbox:v5-deps (sha256:6a292aa1aed1); 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
grid_interpolations Not yet run
unverified (harvested, no recorded run)
EdmundLuan/pcd/image_pair/src/utils/combinatorial_util.py
code served (permissive licence) · get_code("54a5cd94dc643a05")
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, 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 10 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-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

Modifications to test-time sampling have emerged as an important extension to diffusion algorithms, with the goal of biasing the generative process to achieve a given objective without having to retrain the entire diffusion model. However, generating jointly correlated samples from multiple pre-trained diffusion models while simultaneously enforcing task-specific constraints without costly retraining has remained challenging. To this end, we propose Projected Coupled Diffusion (PCD), a novel test-time framework for constrained joint generation. PCD introduces a coupled guidance term into the generative dynamics to encourage coordination between diffusion models and incorporates a projection step at each diffusion step to enforce hard constraints. Empirically, we demonstrate the effectiveness of PCD in application scenarios of image-pair generation, object manipulation, and multi-robot motion planning. Our results show improved coupling effects and guaranteed constraint satisfaction without incurring excessive computational costs. Our code is available at https://github.com/EdmundLuan/pcd.

For agents

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

get_harvested_code_for_paper("2508.10531")
get_code_for_paper("2508.10531")
have("2508.10531")

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

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

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

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

Connect an agent — have() is free.