SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.05616 · 2026

Evaluation of Randomization through Style Transfer for Enhanced Domain Generalization

Gemma Roig, Dustin Eisenhardt

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2604.05616.json · badge: /api/ran/2604.05616.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
naoto0804/pytorch-AdaIN canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
adaptive_instance_normalization Ran
ran; our contract draft was wrong, not the code
naoto0804/pytorch-AdaIN/function.py
code served (permissive licence) · get_code("16679a24b9881031")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create small 4D tensors for content and style features
# Shape: (N, C, H, W) where N=batch, C=channels, H=height, W=width
# Using distinct sizes: batch=2, channels=4, height=3, width=5
content_feat = torch.randn(2, 4, 3, 5)
style_feat = torch.randn(2, 4, 3, 5)

ARGS = {
    "content_feat": content_feat,
    "style_feat": style_feat,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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, 3, 5) — shape (2, 4, 3, 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
calc_mean_std Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naoto0804/pytorch-AdaIN/function.py
code served (permissive licence) · get_code("38eaf8511dc7bc9c")
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 tuple, ndim 5, 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

torch.manual_seed(0)

# The function expects a 4D tensor (N, C, H, W)
# N = batch size, C = channels, H = height, W = width
# Using distinct sizes: batch=2, channels=4, height=3, width=5
feat = torch.randn(2, 4, 3, 5)

ARGS = {
    "feat": feat,
    "eps": 1e-05
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 5, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
coral Ran
ran; our contract draft was wrong, not the code
naoto0804/pytorch-AdaIN/function.py
code served (permissive licence) · get_code("277f955e6caa9cfb")
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 (3, 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

torch.manual_seed(0)

# The function `coral` expects two tensors: source and target
# Looking at the function body:
# - Both tensors are passed to _calc_feat_flatten_mean_std which asserts feat.size()[0] == 3
# - So both tensors must have first dimension == 3
# - They are flattened to (3, -1), meaning shape is (3, num_features)
# - The function works with these flattened features

# Create source tensor with shape (3, 8) - 3 channels, 8 features
source = torch.randn(3, 8, dtype=torch.float32)

# Create target tensor with shape (3, 12) - 3 channels, 12 features (different size)
target = torch.randn(3, 12, dtype=torch.float32)

ARGS = {
    "source": source,
    "target": target,
}
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 (3, 8) — shape (3, 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
lua_recursive_source Ran
ran; our contract draft was wrong, not the code
naoto0804/pytorch-AdaIN/torch_to_pytorch.py
code served (permissive licence) · get_code("56fbe35b933005f0")
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 map. 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)

class MockModule:
    """Mock module with .modules attribute"""
    def __init__(self, submodules):
        self.modules = submodules

class MockConvolution:
    def __init__(self):
        self.nInputPlane = 3
        self.nOutputPlane = 64
        self.kW = 3
        self.kH = 3
        self.dW = 1
        self.dH = 1
        self.padW = 1
        self.padH = 1
        self.groups = 1
        self.bias = True

class MockBatchNorm:
    def __init__(self):
        self.running_mean = torch.randn(64)
        self.eps = 1e-5
        self.momentum = 0.1
        self.affine = True

class MockReLU:
    pass

class MockMaxPooling:
    def __init__(self):
        self.kW = 2
        self.kH = 2
        self.dW = 2
        self.dH = 2
        self.padW = 0
        self.padH = 0
        self.ceil_mode = False

class MockAveragePooling:
    def __init__(self):
        self.kW = 2
        self.kH = 2
        self.dW = 2
        self.dH = 2
        self.padW = 0
        self.padH = 0
        self.ceil_mode = False

class MockUpSamplingNearest:
    def __init__(self):
        self.scale_factor = 2

class MockView:
    pass

class MockLinear:
    def __init__(self):
        self.weight = torch.randn(128, 256)
        self.bias = torch.randn(128)

class MockDropout:
    def __init__(self):
        self.p = 0.5

class MockSoftMax:
    pass

class MockIdentity:
    pass

class MockConvTranspose:
    def __init__(self):
        self.nInputPlane = 64
        self.nOutputPlane = 32
        self.kW = 3
        self.kH = 3
        self.dW = 1
        self.dH = 1
        self.padW = 1
        self.padH = 1

class MockReplicationPadding:
    def __init__(self):
        self.pad_l = 1
        self.pad_r = 1
        self.pad_t = 1
        self.pad_b = 1

class MockReflectionPadding:
    def __init__(self):
        self.pad_l = 1
        self.pad_r = 1
        self.pad_t = 1
        self.pad_b = 1

class MockCopy:
    pass

class MockNarrow:
    def __init__(self):
        self.dimension = 1
        self.index = 0
        self.length = 5

class MockSequential:
    def __init__(self, submodules):
        self.modules = submodules

class MockConcatTable:
    def __init__(self, submodules):
        self.modules = submodules

class MockCAddTable:
    pass

class MockConcat:
    def __init__(self, submodules):
        self.dimension = 1
        self.modules = submodules

class MockUnknown:
    pass

# Build a test module hierarchy
submodules = [
    MockConvolution(),
    MockBatchNorm(),
    MockReLU(),
    MockMaxPooling(),
    MockAveragePooling(),
    MockUpSamplingNearest(),
    MockView(),
    MockLinear(),
    MockDropout(),
    MockSoftMax(),
    MockIdentity(),
    MockConvTranspose(),
    MockReplicationPadding(),
    MockReflectionPadding(),
    MockCopy(),
    MockNarrow(),
    MockSequential([MockReLU()]),
    MockConcatTable([MockReLU()]),
    MockCAddTable(),
    MockConcat([MockReLU()]),
    MockUnknown(),
]

module = MockModule(submodules)

ARGS = {
    'module': module
}
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 map — a map output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a map 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
simplify_source Ran
ran; our contract draft was wrong, not the code
naoto0804/pytorch-AdaIN/torch_to_pytorch.py
code served (permissive licence) · get_code("7e2ea00ab6257df1")
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
import torch.nn as nn

torch.manual_seed(0)

# The function takes a single parameter 's' which is an iterable of strings
# The function applies a series of string replacements using map and lambda
# Then reduces them with string concatenation
# So 's' should be an iterable (list) of strings

ARGS = {
    's': [
        '(Conv2d(3, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1),(1, 1),(0, 0),1,1,bias=True),#Conv2d',
        '(BatchNorm2d(64, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True),1e-05,0.1,True),#BatchNorm2d',
        '(MaxPool2d(kernel_size=2, stride=2, padding=0,(0, 0),ceil_mode=False),#MaxPool2d',
        '(AvgPool2d(kernel_size=2, stride=2, padding=0,(0, 0),ceil_mode=False),#AvgPool2d',
        '(Linear(128, 10, bias=True)),#Linear'
    ]
}
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

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 0 later) and 0 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
calc_mean_std 26 other papers
26 dated earlier · 4 only as an assembly brick
1703.06868 (2017-03)
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
1812.02342 (2018-12)
Arbitrary Style Transfer with Style-Attentional Networks
1911.10033 (2019-11)
Domain Adaptation for Object Detection via Style Consistency
and 23 more not named here
adaptive_instance_normalization 12 other papers
12 dated earlier
1703.06868 (2017-03)
Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization
1911.10033 (2019-11)
Domain Adaptation for Object Detection via Style Consistency
2003.08436 (2020-03)
Collaborative Distillation for Ultra-Resolution Universal Style Transfer
and 9 more not named here
coral 8 other papers
8 dated earlier
2006.07991 (2020-06)
Emergent Properties of Foveated Perceptual Systems
2106.00592 (2021-06)
Semi-Supervised Domain Generalization with Stochastic StyleMatch
2112.00374 (2021-12)
CLIPstyler: Image Style Transfer with a Single Text Condition
and 5 more not named here
simplify_source 2 other papers
2 dated earlier
2203.07740 (2022-03)
Exact Feature Distribution Matching for Arbitrary Style Transfer and Domain Generalization
2310.15171 (2023-10)
RoboDepth: Robust Out-of-Distribution Depth Estimation under Corruptions
lua_recursive_source 1 other paper
1 dated earlier
2203.07740 (2022-03)
Exact Feature Distribution Matching for Arbitrary Style Transfer and Domain Generalization

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-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

Deep learning models for computer vision often suffer from poor generalization when deployed in real-world settings, especially when trained on synthetic data due to the well-known Sim2Real gap. Despite the growing popularity of style transfer as a data augmentation strategy for domain generalization, the literature contains unresolved contradictions regarding three key design axes: the diversity of the style pool, the role of texture complexity, and the choice of style source. We present a systematic empirical study that isolates and evaluates each of these factors for driving scene understanding, resolving inconsistencies in prior work. Our findings show that (i) expanding the style pool yields larger gains than repeated augmentation with few styles, (ii) texture complexity has no significant effect when the pool is sufficiently large, and (iii) diverse artistic styles outperform domain-aligned alternatives. Guided by these insights, we derive StyleMixDG (Style-Mixing for Domain Generalization), a lightweight, model-agnostic augmentation recipe that requires no architectural modifications or additional losses. Evaluated on the GTAV → {BDD100k, Cityscapes, Mapillary Vistas} benchmark, StyleMixDG demonstrates consistent improvements over strong baselines, confirming that the empirically identified design principles translate into practical gains. The code will be released on GitHub.

For agents

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

get_harvested_code_for_paper("2604.05616")
get_code_for_paper("2604.05616")
have("2604.05616")

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

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

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

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

Connect an agent — have() is free.