SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.23091 · NeurIPS · 2024

CausalDiff: Causality-Inspired Disentanglement via Diffusion Model for Adversarial Defense

Wei Chen, Xueqi Cheng, Jiafeng Guo, Mingkun Zhang, Keping Bi, Quanrun Chen

arXiv · PDF · Open in the Atlas

Code that ran

11 of 17 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; 2 honoured the contract we drafted, 2 violated it and 2 have no contract verdict; 5 failures of our instrument; 6 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/2410.23091.json · badge: /api/ran/2410.23091.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
TMLResearchGroup-CAS/CausalDiff canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
cas-aisafetybasicresearchgroup/causaldiff marked official in Papers with Code
Papers with Code archive
2 ran · 2 no recorded run
tmlresearchgroup-cas/causaldiff reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 3 no recorded run
FunctionStatusWhere it lives
BasicBlock Ran
ran on a synthesized input
cas-aisafetybasicresearchgroup/causaldiff/model/unet_autoenc.py
code served (permissive licence) · get_code("f847a1b1c3b13042")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 4, dtype family float, shape (2, 8, 16, 16) 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
from torch import nn

class BasicBlock(nn.Module):

    def __init__(self, in_planes, out_planes, stride, dropRate=0.0):
        super(BasicBlock, self).__init__()
        self.bn1 = nn.BatchNorm2d(in_planes)
        self.relu1 = nn.ReLU(inplace=True)
        self.conv1 = nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)
        self.bn2 = nn.BatchNorm2d(out_planes)
        self.relu2 = nn.ReLU(inplace=True)
        self.conv2 = nn.Conv2d(out_planes, out_planes, kernel_size=3, stride=1, padding=1, bias=False)
        self.droprate = dropRate
        self.equalInOut = in_planes == out_planes
        self.convShortcut = not self.equalInOut and nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, padding=0, bias=False) or None

    def forward(self, x):
        if not self.equalInOut:
            x = self.relu1(self.bn1(x))
        else:
            out = self.relu1(self.bn1(x))
        out = self.relu2(self.bn2(self.conv1(out if self.equalInOut else x)))
        if self.droprate > 0:
            out = torch.nn.functional.dropout(out, p=self.droprate, training=self.training)
        out = self.conv2(out)
        return torch.add(x if self.equalInOut else self.convShortcut(x), out)


INIT_ARGS = {
    'in_planes': 4,
    'out_planes': 8,
    'stride': 1,
    'dropRate': 0.1
}

ARGS = {
    'x': torch.randn(2, 4, 16, 16)
}

if __name__ == '__main__':
    block = BasicBlock(**INIT_ARGS)
    block.eval()
    output = block(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: torch.Size([2, 8, 16, 16])")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 8, 16, 16) — shape (2, 8, 16, 16) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
Flatten Ran
ran on a synthesized input
cas-aisafetybasicresearchgroup/causaldiff/model/unet_autoenc.py
code served (permissive licence) · get_code("8990ccc3a7ed53f8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 60) 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
from torch import nn

class Flatten(nn.Module):

    def forward(self, input):
        return input.view(input.size(0), -1)


INIT_ARGS = {}

ARGS = {
    'input': torch.randn(2, 3, 4, 5)
}

if __name__ == '__main__':
    model = Flatten(**INIT_ARGS)
    output = model(**ARGS)
    print(output.shape)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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, 60) — shape (2, 60) 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
apply_conditions Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
TMLResearchGroup-CAS/CausalDiff/model/blocks.py
code served (permissive licence) · get_code("a14e237c2789b10d")
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, 4, 8, 8) 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
from numbers import Number

torch.manual_seed(0)

# Create h: feature map tensor (batch=2, channels=4, spatial_dims)
h = torch.randn(2, 4, 8, 8)

# Create emb: time conditional (batch=2, channels=8)
emb = torch.randn(2, 8)

# Create cond: encoder conditional (batch=2, channels=8)
cond = torch.randn(2, 8)

# Create layers: nn.Sequential with pre, mid, and post layers
# Structure: [pre_layer] + [mid_layers...] + [post_layer1, post_layer2]
# Total needs to be split as: pre_layers, mid_layers, post_layers
# where post_layers has last 2 elements
layers = nn.Sequential(
    nn.Conv2d(4, 4, kernel_size=1),      # pre_layers
    nn.ReLU(),                            # mid_layers[0]
    nn.ReLU(),                            # mid_layers[1]
    nn.Conv2d(4, 4, kernel_size=1),      # post_layers[0] ([-2])
    nn.ReLU(),                            # post_layers[1] ([-1])
)

# scale_bias: float
scale_bias = 1.0

# in_channels: int (must match h.shape[1])
in_channels = 4

# up_down_layer: nn.Module (optional, applied between mid and post)
up_down_layer = nn.Conv2d(4, 4, kernel_size=1)

ARGS = {
    'h': h,
    'emb': emb,
    'cond': cond,
    'layers': layers,
    'scale_bias': scale_bias,
    'in_channels': in_channels,
    'up_down_layer': up_down_layer,
}
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, 4, 8, 8) — shape (2, 4, 8, 8) 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
chunk_size Ran
ran, honoured the contract we drafted
TMLResearchGroup-CAS/CausalDiff/dist_utils.py
code served (permissive licence) · get_code("235265a7a3a652fb")
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 int, ndim 0, dtype family int, 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 torch

torch.manual_seed(0)

ARGS = {
    "size": 10,
    "rank": 2,
    "world_size": 4
}
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 int, ndim 0, dtype family int, 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
compute_acc Ran
ran, honoured the contract we drafted
TMLResearchGroup-CAS/CausalDiff/experiment.py
code served (permissive licence) · get_code("dd8d3dcf271eb1a8")
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 numpy as np

# The function compute_acc takes:
# - pred: a 2D array where argmax is taken along axis=1, shape (batch_size, num_classes)
# - target: a 1D array of class indices, shape (batch_size,)

# Create small sample data
batch_size = 2
num_classes = 4

# pred: shape (2, 4) - predictions for 2 samples with 4 classes
pred = np.array([
    [0.1, 0.8, 0.05, 0.05],  # argmax = 1
    [0.2, 0.3, 0.4, 0.1]      # argmax = 2
], dtype=np.float32)

# target: shape (2,) - ground truth class indices
target = np.array([1, 2], dtype=np.int64)

ARGS = {
    'pred': pred,
    'target': target
}
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
convert Ran
ran; our contract draft was wrong, not the code
TMLResearchGroup-CAS/CausalDiff/lmdb_writer.py
code served (permissive licence) · get_code("6b0fadb6db123712")
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 bytes. 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
from io import BytesIO
from PIL import Image

torch.manual_seed(0)

# Create a small tensor with shape (3, 4, 5) representing an image
# with 3 color channels, height 4, width 5
# Values should be in range [0, 1] based on how the function uses it
x = torch.rand(3, 4, 5)

ARGS = {
    "x": x,
    "format": "JPEG",
    "quality": 85
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bytes — a bytes output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a bytes 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
is_time Ran
ran, violated the contract we drafted
TMLResearchGroup-CAS/CausalDiff/experiment.py
code served (permissive licence) · get_code("4f9b67ed1294c6a0")
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 torch
import numpy as np

torch.manual_seed(0)

# Analyzing the function:
# - num_samples: an integer representing sample count
# - every: an integer used as divisor (frequency/period)
# - step_size: an integer used for comparison threshold
# The function performs integer division and modulo-like logic to check timing

ARGS = {
    "num_samples": 42,
    "every": 10,
    "step_size": 3
}
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 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
jsonable Ran
ran, violated the contract we drafted
TMLResearchGroup-CAS/CausalDiff/config_base.py
code served (permissive licence) · get_code("3436fefeb3a4b49a")
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 json
import torch
import numpy as np

def jsonable(x):
    try:
        json.dumps(x)
        return True
    except TypeError:
        return False

# Test with a simple JSON-serializable value
ARGS = {
    "x": {"key": "value", "number": 42, "list": [1, 2, 3]}
}
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 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
make_transform Ran
ran; our contract draft was wrong, not the code
TMLResearchGroup-CAS/CausalDiff/dataset.py
code served (permissive licence) · get_code("7b0f30c49d628c72")
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 Compose. 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 torchvision.transforms as transforms
import torchvision.transforms.functional as Ftrans
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Define the Crop class and helper functions as provided
class Crop:
    def __init__(self, x1, x2, y1, y2):
        self.x1 = x1
        self.x2 = x2
        self.y1 = y1
        self.y2 = y2

    def __call__(self, img):
        return Ftrans.crop(img, self.x1, self.y1, self.x2 - self.x1, self.y2 - self.y1)

    def __repr__(self):
        return self.__class__.__name__ + '(x1={}, x2={}, y1={}, y2={})'.format(self.x1, self.x2, self.y1, self.y2)

def d2c_crop():
    cx = 89
    cy = 121
    x1 = cy - 64
    x2 = cy + 64
    y1 = cx - 64
    y2 = cx + 64
    return Crop(x1, x2, y1, y2)

def make_transform(image_size, flip_prob=0.5, crop_d2c=False):
    if crop_d2c:
        transform = [d2c_crop(), transforms.Resize(image_size)]
    else:
        transform = [transforms.Resize(image_size), transforms.CenterCrop(image_size)]
    transform.append(transforms.RandomHorizontalFlip(p=flip_prob))
    transform.append(transforms.ToTensor())
    transform.append(transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)))
    transform = transforms.Compose(transform)
    return transform

# Create test arguments
ARGS = {
    'image_size': 224,
    'flip_prob': 0.5,
    'crop_d2c': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
psnr Ran
ran; our contract draft was wrong, not the code
TMLResearchGroup-CAS/CausalDiff/metrics.py
code served (permissive licence) · get_code("79dd7b45925d286c")
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

torch.manual_seed(0)

# Create two small image tensors with shape (n, c, h, w)
# n=2 (batch size), c=3 (channels), h=4 (height), w=5 (width)
img1 = torch.rand(2, 3, 4, 5)
img2 = torch.rand(2, 3, 4, 5)

ARGS = {
    "img1": img1,
    "img2": img2,
}
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
space_timesteps Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tmlresearchgroup-cas/causaldiff/diffusion/diffusion.py
code served (permissive licence) · get_code("39352f70cb57396e")
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) and returned set. 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.

# Setup code for space_timesteps function

ARGS = {
    "num_timesteps": 300,
    "section_counts": [10, 15, 20],
}

# Alternative test cases can be created like:
# ARGS = {
#     "num_timesteps": 1000,
#     "section_counts": "50,75,100",
# }

# Or with DDIM:
# ARGS = {
#     "num_timesteps": 1000,
#     "section_counts": "ddim50",
# }
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
NetworkBlock Not yet run
unverified (harvested, no recorded run)
cas-aisafetybasicresearchgroup/causaldiff/model/unet_autoenc.py
code served (permissive licence) · get_code("7e8b3a3ffd864e29")
How it ran

no invocation recorded.

compute_acc Not yet run
unverified (harvested, no recorded run)
tmlresearchgroup-cas/causaldiff/run_eval.py
code served (permissive licence) · get_code("3f55f85544860186")
How it ran

no invocation recorded.

d_LaCIM Not yet run
unverified (harvested, no recorded run)
cas-aisafetybasicresearchgroup/causaldiff/model/unet_autoenc.py
code served (permissive licence) · get_code("2b8bea10ddab8540")
How it ran

no invocation recorded.

mean_nll Not yet run
unverified (harvested, no recorded run)
tmlresearchgroup-cas/causaldiff/run_eval.py
code served (permissive licence) · get_code("9f4bd412a84d05e0")
How it ran

no invocation recorded.

t_sample Not yet run
unverified (harvested, no recorded run)
tmlresearchgroup-cas/causaldiff/run_eval.py
code served (permissive licence) · get_code("c921df1a998cbb0f")
How it ran

no invocation recorded.

use_cached_dataset_path Not yet run
unverified (harvested, no recorded run)
TMLResearchGroup-CAS/CausalDiff/dataset_util.py
code served (permissive licence) · get_code("96226a66ab62eb91")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 1 the same month, 2 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
space_timesteps 57 other papers
43 dated earlier, 4 the same month, 10 later · 2 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
and 54 more not named here
Flatten
brick of this paper's assembly: helper
6 other papers
5 dated earlier, 1 later · 4 only as an assembly brick
1705.05363 (2017-05)
Curiosity-driven Exploration by Self-supervised Prediction
1810.12894 (2018-10)
Exploration by Random Network Distillation
2002.10025 (2020-02)
Triple Wins: Boosting Accuracy, Robustness and Efficiency Together by Enabling Input-Adaptive Inference
and 3 more not named here
NetworkBlock
brick of this paper's assembly: helper
5 other papers
5 dated earlier · 4 only as an assembly brick
1605.07146 (2016-05)
Wide Residual Networks
2005.02359 (2020-05)
Classification-Based Anomaly Detection for General Data
2101.06395 (2021-01)
Free Lunch for Few-shot Learning: Distribution Calibration
and 2 more not named here
jsonable 5 other papers
5 dated earlier
2111.15640 (2021-11)
Diffusion Autoencoders: Toward a Meaningful and Decodable Representation
2211.12500 (2022-11)
Person Image Synthesis via Denoising Diffusion Model
2308.01316 (2023-08)
Patched Denoising Diffusion Models For High-Resolution Image Synthesis
and 2 more not named here
BasicBlock
brick of this paper's assembly: helper
4 other papers
4 dated earlier · 3 only as an assembly brick
1605.07146 (2016-05)
Wide Residual Networks
2101.06395 (2021-01)
Free Lunch for Few-shot Learning: Distribution Calibration
2303.13813 (2023-03)
Generalist: Decoupling Natural and Robust Generalization
and 1 more not named here
apply_conditions 2 other papers
2 dated earlier
2211.12500 (2022-11)
Person Image Synthesis via Denoising Diffusion Model
2308.01316 (2023-08)
Patched Denoising Diffusion Models For High-Resolution Image Synthesis
chunk_size 2 other papers
2 dated earlier
2111.15640 (2021-11)
Diffusion Autoencoders: Toward a Meaningful and Decodable Representation
2308.09223 (2023-08)
DMCVR: Morphology-Guided Diffusion Model for 3D Cardiac Volume Reconstruction
is_time 2 other papers
2 dated earlier
2308.01316 (2023-08)
Patched Denoising Diffusion Models For High-Resolution Image Synthesis
2308.09223 (2023-08)
DMCVR: Morphology-Guided Diffusion Model for 3D Cardiac Volume Reconstruction
make_transform 2 other papers
2 dated earlier
2111.15640 (2021-11)
Diffusion Autoencoders: Toward a Meaningful and Decodable Representation
2308.09223 (2023-08)
DMCVR: Morphology-Guided Diffusion Model for 3D Cardiac Volume Reconstruction
use_cached_dataset_path 2 other papers
2 dated earlier
2111.15640 (2021-11)
Diffusion Autoencoders: Toward a Meaningful and Decodable Representation
2308.09223 (2023-08)
DMCVR: Morphology-Guided Diffusion Model for 3D Cardiac Volume Reconstruction

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

Despite ongoing efforts to defend neural classifiers from adversarial attacks, they remain vulnerable, especially to unseen attacks. In contrast, humans are difficult to be cheated by subtle manipulations, since we make judgments only based on essential factors. Inspired by this observation, we attempt to model label generation with essential label-causative factors and incorporate label-non-causative factors to assist data generation. For an adversarial example, we aim to discriminate the perturbations as non-causative factors and make predictions only based on the labelcausative factors. Concretely, we propose a casual diffusion model (CausalDiff) that adapts diffusion models for conditional data generation and disentangles the two types of casual factors by learning towards a novel casual information bottleneck objective. Empirically, CausalDiff has significantly outperformed state-of-the-art defense methods on various unseen attacks, achieving an average robustness of 86.39% (+4.01%) on CIFAR-10, 56.25% (+3.13%) on CIFAR-100, and 82.62% (+4.93%) on GTSRB (German Traffic Sign Recognition Benchmark). The code is available at https://github.com/TMLResearchGroup-CAS/CausalDiff.

For agents

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

get_harvested_code_for_paper("2410.23091")
get_code_for_paper("2410.23091")
have("2410.23091")

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

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

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

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

Connect an agent — have() is free.