SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.14846 · ICLR · 2024

Understanding Domain Generalization: A Noise Robustness Perspective

Bryan Kian, Hsiang Low, Rui Qiao

arXiv · PDF · Open in the Atlas

Code that ran

13 of 18 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; 5 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 5 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/2401.14846.json · badge: /api/ran/2401.14846.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
qiaoruiyt/NoiseRobustDG canonical (classifier label)
classifier basis: census
13 ran · 5 no recorded run
FunctionStatusWhere it lives
Classifier Ran
ran; our contract draft was wrong, not the code
qiaoruiyt/NoiseRobustDG/domainbed/networks.py
code served (permissive licence) · get_code("ce7990d7ad5821ff")
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 Linear. 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 = {
    "in_features": 16,
    "out_features": 4,
    "is_nonlinear": False,
}
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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
qiaoruiyt/NoiseRobustDG/domainbed/lib/wide_resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from DaikiTanak/manifold_mixup, is pointer only (licence: NONE) · get_code("00e569acd6b45ef0")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from DaikiTanak/manifold_mixup, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_temp_bash_script Ran
ran; our contract draft was wrong, not the code
qiaoruiyt/NoiseRobustDG/domainbed/command_launchers.py
code served (permissive licence) · get_code("f3acf46e82ea9bf0")
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 tempfile

SLURM = 'slurm'
SLURM_LONG = 'slurm_long'

def create_temp_bash_script(command, cloud=SLURM):
    if cloud == SLURM:
        content = '#!/bin/bash\n#SBATCH --job-name=dbsweep\n#SBATCH --time=3:00:00\n#SBATCH --partition=medium\n#SBATCH --output=slurm_sweep/sweep_%j.txt\n#SBATCH --gpus=1\n#SBATCH --cpus-per-gpu=8'
    elif cloud == SLURM_LONG:
        content = '#!/bin/bash\n#SBATCH --job-name=dbsweep\n#SBATCH --time=12:00:00\n#SBATCH --partition=long\n#SBATCH --output=slurm_sweep/sweep_%j.txt\n#SBATCH --gpus=1\n#SBATCH --cpus-per-gpu=8'
    else:
        raise Exception('Unsupported Cloud Name')
    content += f'\n\n{command}'
    with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.sh') as temp_script:
        temp_script.write(content)
    return temp_script.name

ARGS = {
    'command': 'python train.py --epochs 10',
    'cloud': SLURM
}
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
distance Ran
ran, honoured the contract we drafted
qiaoruiyt/NoiseRobustDG/domainbed/lib/misc.py
code served (permissive licence) · get_code("fbb8c05a0a7696ec")
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 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 torch.nn as nn

torch.manual_seed(0)

class SimpleClassifier(nn.Module):
    def __init__(self, input_dim=4, hidden_dim=3, output_dim=2):
        super().__init__()
        self.fc1 = nn.Linear(input_dim, hidden_dim)
        self.fc2 = nn.Linear(hidden_dim, output_dim)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

h1 = SimpleClassifier(input_dim=4, hidden_dim=3, output_dim=2)
h2 = SimpleClassifier(input_dim=4, hidden_dim=3, output_dim=2)

ARGS = {
    "h1": h1,
    "h2": h2,
}
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 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
get_projections Ran
ran, honoured the contract we drafted
qiaoruiyt/NoiseRobustDG/toy_example/random_feature_utils.py
code served (permissive licence) · get_code("9d1aed5c27329c07")
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 ndarray, ndim 2, dtype family float, shape (2, 3) 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

# x is used with @ operator (matrix multiplication) and passed to np.maximum
# W is used with @ operator (matrix multiplication)
# The function computes x @ W and applies ReLU (np.maximum with 0)

# Create small matrices with distinct dimensions
# x should be shape (batch, input_dim) = (2, 4)
# W should be shape (input_dim, output_dim) = (4, 3)
x = np.random.randn(2, 4).astype(np.float32)
W = np.random.randn(4, 3).astype(np.float32)

ARGS = {
    "x": x,
    "W": W,
}
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 ndarray, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
get_random_features Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
qiaoruiyt/NoiseRobustDG/toy_example/random_feature_utils.py
code served (permissive licence) · get_code("6bee5175f6c9e4a2")
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 numpy as np

np.random.seed(42)

# Create small dummy data for train and test sets
# train_x_1: shape (2, 4) - 2 samples, 4 features
train_x_1 = np.random.randn(2, 4)
test_x_1 = np.random.randn(3, 4)

# train_x_2: shape (2, 5) - 2 samples, 5 features
train_x_2 = np.random.randn(2, 5)
test_x_2 = np.random.randn(3, 5)

# Single input case
train_x_single = np.random.randn(2, 4)
test_x_single = np.random.randn(3, 4)

# Test case 1: Single input with single N value
ARGS = {
    "train_x": train_x_single,
    "test_x": test_x_single,
    "N": 3
}

# Alternative test case 2: Tuple of inputs with tuple of N values
ARGS_tuple = {
    "train_x": (train_x_1, train_x_2),
    "test_x": (test_x_1, test_x_2),
    "N": (2, 3)
}

# Use the single case as default
ARGS = {
    "train_x": train_x_single,
    "test_x": test_x_single,
    "N": 3
}
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 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
get_test_records Ran
ran; our contract draft was wrong, not the code
qiaoruiyt/NoiseRobustDG/domainbed/model_selection.py
code served (permissive licence) · get_code("53fac8d8d949e72b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned MockRecords. 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.

class MockRecords:
    def __init__(self, data):
        self.data = data
    
    def filter(self, fn):
        filtered_data = [item for item in self.data if fn(item)]
        return MockRecords(filtered_data)
    
    def __iter__(self):
        return iter(self.data)
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        return self.data[idx]

# Create sample records with test_envs
sample_records_data = [
    {
        'args': {
            'test_envs': [0]
        },
        'other_field': 'value1'
    },
    {
        'args': {
            'test_envs': [1]
        },
        'other_field': 'value2'
    },
    {
        'args': {
            'test_envs': [0, 1]
        },
        'other_field': 'value3'
    },
    {
        'args': {
            'test_envs': [2]
        },
        'other_field': 'value4'
    },
    {
        'args': {
            'test_envs': [0, 2, 3]
        },
        'other_field': 'value5'
    }
]

records = MockRecords(sample_records_data)

ARGS = {
    'records': records
}
Setup block drafted by
a language model, Claude Sonnet 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 MockRecords — a MockRecords output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MockRecords 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
hashable Ran
ran, honoured the contract we drafted
qiaoruiyt/NoiseRobustDG/domainbed/lib/query.py
code served (permissive licence) · get_code("71a3a61ceed99bf3")
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 json
import torch

def hashable(obj):
    try:
        hash(obj)
        return obj
    except TypeError:
        return json.dumps({'_': obj}, sort_keys=True)

torch.manual_seed(0)

# Test with a hashable object (int)
hashable_obj = 42

# Test with an unhashable object (list)
unhashable_obj = [1, 2, 3]

ARGS = {
    'obj': hashable_obj
}
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
l2_between_dicts Ran
ran, honoured the contract we drafted
qiaoruiyt/NoiseRobustDG/domainbed/lib/misc.py
code served (permissive licence) · get_code("1fdaff04251a0d51")
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 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

torch.manual_seed(0)

# The function expects two dictionaries containing tensors
# It computes the L2 distance between flattened concatenations of tensor values

dict_1 = {
    'a': torch.randn(2, 4),
    'b': torch.randn(3, 5),
}

dict_2 = {
    'a': torch.randn(2, 4),
    'b': torch.randn(3, 5),
}

ARGS = {
    'dict_1': dict_1,
    'dict_2': dict_2,
}
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 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_selector_fn Ran
ran; our contract draft was wrong, not the code
qiaoruiyt/NoiseRobustDG/domainbed/lib/query.py
code served (permissive licence) · get_code("2f8af5779e1edcb6")
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 types
import torch

torch.manual_seed(0)

# Test case 1: string selector with simple key access
selector_simple_key = "x"

# Test case 2: string selector with nested key access (dot notation)
selector_nested = "x.y"

# Test case 3: string selector with multiple keys (comma notation)
selector_multiple = "x,y"

# Test case 4: function selector
def custom_selector(obj):
    return obj['data']

selector_func = custom_selector

# Create test objects that would work with these selectors
test_obj_simple = {'x': 42}
test_obj_nested = {'x': {'y': 100}}
test_obj_multiple = {'x': 1, 'y': 2}
test_obj_custom = {'data': 'value'}

ARGS = {
    'selector': selector_simple_key
}
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 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
proj Ran
ran; our contract draft was wrong, not the code
qiaoruiyt/NoiseRobustDG/domainbed/lib/misc.py
code served (permissive licence) · get_code("17202e0de9779f70")
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 SimpleClassifier. 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 SimpleClassifier(nn.Module):
    def __init__(self, input_dim=4, hidden_dim=3, output_dim=2):
        super().__init__()
        self.fc1 = nn.Linear(input_dim, hidden_dim)
        self.fc2 = nn.Linear(hidden_dim, output_dim)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return x

# Create two classifier networks
h = SimpleClassifier(input_dim=4, hidden_dim=3, output_dim=2)
adv_h = SimpleClassifier(input_dim=4, hidden_dim=3, output_dim=2)

# Initialize adv_h with slightly different weights from h
with torch.no_grad():
    for param_adv, param_h in zip(adv_h.parameters(), h.parameters()):
        param_adv.copy_(param_h + torch.randn_like(param_h) * 0.1)

# delta is the radius of the ball for projection
delta = 0.5

ARGS = {
    'delta': delta,
    'adv_h': adv_h,
    'h': h
}
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 SimpleClassifier — a SimpleClassifier output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleClassifier 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
remove_batch_norm_from_resnet Ran
ran; our contract draft was wrong, not the code
qiaoruiyt/NoiseRobustDG/domainbed/networks.py
code served (permissive licence) · get_code("196cab71d7129d62")
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 MinimalResNet. 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 Identity(nn.Module):
    """An identity layer"""

    def __init__(self):
        super(Identity, self).__init__()

    def forward(self, x):
        return x

class BottleneckBlock(nn.Module):
    """Minimal bottleneck block for ResNet"""
    def __init__(self, in_channels, out_channels, downsample=False):
        super(BottleneckBlock, self).__init__()
        self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1)
        self.bn1 = nn.BatchNorm2d(out_channels)
        self.conv2 = nn.Conv2d(out_channels, out_channels, kernel_size=3, padding=1)
        self.bn2 = nn.BatchNorm2d(out_channels)
        self.conv3 = nn.Conv2d(out_channels, out_channels * 4, kernel_size=1)
        self.bn3 = nn.BatchNorm2d(out_channels * 4)
        
        if downsample:
            self.downsample = nn.Sequential(
                nn.Conv2d(in_channels, out_channels * 4, kernel_size=1),
                nn.BatchNorm2d(out_channels * 4)
            )
        else:
            self.downsample = None

class MinimalResNet(nn.Module):
    """Minimal ResNet-like model for testing"""
    def __init__(self):
        super(MinimalResNet, self).__init__()
        self.conv1 = nn.Conv2d(3, 64, kernel_size=7, padding=3)
        self.bn1 = nn.BatchNorm2d(64)
        
        self.layer1 = nn.Sequential(
            BottleneckBlock(64, 64, downsample=False)
        )
        self.layer2 = nn.Sequential(
            BottleneckBlock(256, 128, downsample=True)
        )
        self.layer3 = nn.Sequential(
            BottleneckBlock(512, 256, downsample=False)
        )
        self.layer4 = nn.Sequential(
            BottleneckBlock(1024, 512, downsample=False)
        )

model = MinimalResNet()

ARGS = {
    "model": model
}
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 MinimalResNet — a MinimalResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalResNet 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
sample_from_sphere Ran
ran, honoured the contract we drafted
qiaoruiyt/NoiseRobustDG/toy_example/random_feature_utils.py
code served (permissive licence) · get_code("0a57f8c6ed773a07")
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 ndarray, 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 numpy as np

def sample_from_sphere(n, d):
    x = np.random.multivariate_normal(np.zeros(d), np.identity(d), n)
    x = (x.T / np.linalg.norm(x, axis=1)).T
    return x

# Set seed for reproducibility
np.random.seed(0)

# Define arguments
ARGS = {
    "n": 2,      # number of samples
    "d": 4       # dimensionality
}
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 ndarray, 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
get_algorithm_class Not yet run
unverified (harvested, no recorded run)
qiaoruiyt/NoiseRobustDG/domainbed/algorithms.py
code served (permissive licence) · get_code("b0bc80b1655a6802")
How it ran

no invocation recorded.

get_dataset_class Not yet run
unverified (harvested, no recorded run)
qiaoruiyt/NoiseRobustDG/domainbed/datasets.py
code served (permissive licence) · get_code("2d2f64d7a41ad2de")
How it ran

no invocation recorded.

initialize_bert_transform Not yet run
unverified (harvested, no recorded run)
qiaoruiyt/NoiseRobustDG/domainbed/datasets.py
code served (permissive licence) · get_code("19940f022dbba01d")
How it ran

no invocation recorded.

num_environments Not yet run
unverified (harvested, no recorded run)
qiaoruiyt/NoiseRobustDG/domainbed/datasets.py
code served (permissive licence) · get_code("944fbdf77623d13b")
How it ran

no invocation recorded.

run_sbatch Not yet run
unverified (harvested, no recorded run)
qiaoruiyt/NoiseRobustDG/domainbed/command_launchers.py
code served (permissive licence) · get_code("39b946021cb18647")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 14 are also present in other papers whose code we hold (14 with at least one paper dated earlier, 0 the same month, 11 later) and 4 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
conv3x3 74 other papers
52 dated earlier, 21 later, 1 same year, order not determinable · 5 only as an assembly brick
1605.07146 (2016-05)
Wide Residual Networks
1707.01629 (2017-07)
Dual Path Networks
1802.05668 (2018-02)
Model compression via distillation and quantization
and 71 more not named here
get_algorithm_class 39 other papers
34 dated earlier, 4 later, 1 same year, order not determinable
1907.02893 (2019-07)
Invariant Risk Minimization
2007.01434 (2020-07)
In Search of Lost Domain Generalization
2007.02931 (2020-07)
Adaptive Risk Minimization: Learning to Adapt to Domain Shift
and 36 more not named here
Classifier 24 other papers
17 dated earlier, 7 later · 4 only as an assembly brick
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
2205.09739 (2022-05)
Diverse Weight Averaging for Out-of-Distribution Generalization
and 21 more not named here
remove_batch_norm_from_resnet 23 other papers
18 dated earlier, 5 later
1907.02893 (2019-07)
Invariant Risk Minimization
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
and 20 more not named here
get_test_records 22 other papers
18 dated earlier, 4 later
1710.03077 (2017-10)
Deeper, Broader and Artier Domain Generalization
1907.02893 (2019-07)
Invariant Risk Minimization
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
and 19 more not named here
num_environments 21 other papers
16 dated earlier, 5 later
1907.02893 (2019-07)
Invariant Risk Minimization
2007.01434 (2020-07)
In Search of Lost Domain Generalization
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
and 18 more not named here
hashable 20 other papers
16 dated earlier, 4 later
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
and 17 more not named here
make_selector_fn 20 other papers
16 dated earlier, 4 later
2106.02266 (2021-06)
SAND-mask: An Enhanced Gradient Masking Strategy for the Discovery of Invariances in Domain Generalization
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
2203.10789 (2022-03)
Domain Generalization by Mutual-Information Regularization with Pre-trained Models
and 17 more not named here
l2_between_dicts 9 other papers
7 dated earlier, 2 later
1907.02893 (2019-07)
Invariant Risk Minimization
2205.09739 (2022-05)
Diverse Weight Averaging for Out-of-Distribution Generalization
2205.13462 (2022-05)
FedBR: Improving Federated Learning on Heterogeneous Data via Local Learning Bias Reduction
and 6 more not named here
distance 4 other papers
3 dated earlier, 1 later · 1 only as an assembly brick
2106.03632 (2021-06)
Quantifying and Improving Transferability in Domain Generalization
2106.07847 (2021-06)
Learning Stable Classifiers by Transferring Unstable Features
2307.12502 (2023-07)
Cross Contrasting Feature Perturbation for Domain Generalization
and 1 more not named here
proj 4 other papers
3 dated earlier, 1 later · 1 only as an assembly brick
2106.03632 (2021-06)
Quantifying and Improving Transferability in Domain Generalization
2106.07847 (2021-06)
Learning Stable Classifiers by Transferring Unstable Features
2307.12502 (2023-07)
Cross Contrasting Feature Perturbation for Domain Generalization
and 1 more not named here
get_projections 1 other paper
1 dated earlier
2312.03044 (2023-12)
REST: Enhancing Group Robustness in DNNs through Reweighted Sparse Training
get_random_features 1 other paper
1 dated earlier
2312.03044 (2023-12)
REST: Enhancing Group Robustness in DNNs through Reweighted Sparse Training
sample_from_sphere 1 other paper
1 dated earlier
2312.03044 (2023-12)
REST: Enhancing Group Robustness in DNNs through Reweighted Sparse Training

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 the rapid development of machine learning algorithms for domain generalization (DG), there is no clear empirical evidence that the existing DG algorithms outperform the classic empirical risk minimization (ERM) across standard benchmarks. To better understand this phenomenon, we investigate whether there are benefits of DG algorithms over ERM through the lens of label noise. Specifically, our finite-sample analysis reveals that label noise exacerbates the effect of spurious correlations for ERM, undermining generalization. Conversely, we illustrate that DG algorithms exhibit implicit label-noise robustness during finite-sample training even when spurious correlation is present. Such desirable property helps mitigate spurious correlations and improve generalization in synthetic experiments. However, additional comprehensive experiments on real-world benchmark datasets indicate that label-noise robustness does not necessarily translate to better performance compared to ERM. We conjecture that the failure mode of ERM arising from spurious correlations may be less pronounced in practice. Our code is available at https://github.com/qiaoruiyt/NoiseRobustDG

For agents

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

get_harvested_code_for_paper("2401.14846")
get_code_for_paper("2401.14846")
have("2401.14846")

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

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

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

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

Connect an agent — have() is free.