SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.00592 · 2021

Semi-Supervised Domain Generalization with Stochastic StyleMatch

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 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; 3 failures of our instrument; 0 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/2106.00592.json · badge: /api/ran/2106.00592.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
KaiyangZhou/ssdg-benchmark canonical (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
FunctionStatusWhere it lives
adaptive_instance_normalization Ran
ran; our contract draft was wrong, not the code
KaiyangZhou/ssdg-benchmark/trainers/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)
KaiyangZhou/ssdg-benchmark/trainers/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
compute_ci95 Ran
ran, honoured the contract we drafted
KaiyangZhou/ssdg-benchmark/parse_test_res.py
code served (permissive licence) · get_code("ba26afd892405335")
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

# compute_ci95 takes a single parameter 'res' which is used with:
# - np.std(res) - needs array-like
# - np.sqrt(len(res)) - needs len() to work
# A simple numpy array or list works perfectly

res = np.array([1.2, 2.3, 3.1, 4.5, 5.2, 6.1, 7.3, 8.9])

ARGS = {
    "res": res
}
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
coral Ran
ran; our contract draft was wrong, not the code
KaiyangZhou/ssdg-benchmark/trainers/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

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 4 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
compute_ci95 37 other papers
36 later, 1 undated
2203.05557 (2022-03)
Conditional Prompt Learning for Vision-Language Models
2203.07740 (2022-03)
Exact Feature Distribution Matching for Arbitrary Style Transfer and Domain Generalization
2207.03111 (2022-07)
Masked Surfel Prediction for Self-Supervised Point Cloud Learning
and 34 more not named here
calc_mean_std 26 other papers
7 dated earlier, 18 later, 1 same year, order not determinable · 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
5 dated earlier, 7 later
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
1 dated earlier, 7 later
2006.07991 (2020-06)
Emergent Properties of Foveated Perceptual Systems
2112.00374 (2021-12)
CLIPstyler: Image Style Transfer with a Single Text Condition
136850478 (2022 (year only))
Unbiased Manifold Augmentation for Coarse Class Subdivision
and 5 more not named here

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

Ideally, visual learning algorithms should be generalizable, for dealing with any unseen domain shift when deployed in a new target environment; and data-efficient, for reducing development costs by using as little labels as possible. To this end, we study semi-supervised domain generalization (SSDG), which aims to learn a domain-generalizable model using multi-source, partially-labeled training data. We design two benchmarks that cover state-of-the-art methods developed in two related fields, i.e., domain generalization (DG) and semi-supervised learning (SSL). We find that the DG methods, which by design are unable to handle unlabeled data, perform poorly with limited labels in SSDG; the SSL methods, especially FixMatch, obtain much better results but are still far away from the basic vanilla model trained using full labels. We propose StyleMatch, a simple approach that extends FixMatch with a couple of new ingredients tailored for SSDG: 1) stochastic modeling for reducing overfitting in scarce labels, and 2) multi-view consistency learning for enhancing domain generalization. Despite the concise designs, StyleMatch achieves significant improvements in SSDG. We hope our approach and the comprehensive benchmarks can pave the way for future research on generalizable and data-efficient learning systems. The source code is released at \url{https://github.com/KaiyangZhou/ssdg-benchmark}.

For agents

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

get_harvested_code_for_paper("2106.00592")
get_code_for_paper("2106.00592")
have("2106.00592")

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

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

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

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

Connect an agent — have() is free.