SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.09498 · 2024

OT-VP: Optimal Transport-guided Visual Prompting for Test-Time Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

12 of 16 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; 4 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 7 failures of our instrument; 4 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/2407.09498.json · badge: /api/ran/2407.09498.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
zybeich/ot-vp canonical (classifier label)
classifier basis: census
12 ran · 4 no recorded run
FunctionStatusWhere it lives
Classifier Ran
ran; our contract draft was wrong, not the code
zybeich/ot-vp/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
compute_conditional_wd Ran
ran; our contract draft was wrong, not the code
zybeich/ot-vp/domainbed/adapt_algorithms.py
code served (permissive licence) · get_code("289f47229057c748")
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, ndim 3, 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 numpy as np

torch.manual_seed(0)

# Create small tensors for source features and labels
src_features = torch.randn(2, 4)  # batch_size=2, feature_dim=4
src_labels = torch.tensor([0, 1], dtype=torch.long)

# Create small tensors for target features and labels
trg_features = torch.randn(3, 4)  # batch_size=3, feature_dim=4
trg_labels = torch.tensor([0, 1, 0], dtype=torch.long)

# Device
device = 'cpu'

ARGS = {
    'trg_features': trg_features,
    'trg_labels': trg_labels,
    'src_features': src_features,
    'src_labels': src_labels,
    'device': device,
    'normalize': True,
    'label_distance': 10000.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, ot, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
configure_model Ran
ran; our contract draft was wrong, not the code
zybeich/ot-vp/domainbed/adapt_algorithms.py
code served (permissive licence) · get_code("09762c09de098b26")
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 SimpleConvNet. 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)

# Build a minimal model with BatchNorm2d layers
class SimpleConvNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv1 = nn.Conv2d(3, 16, kernel_size=3, padding=1)
        self.bn1 = nn.BatchNorm2d(16)
        self.conv2 = nn.Conv2d(16, 32, kernel_size=3, padding=1)
        self.bn2 = nn.BatchNorm2d(32)
        self.fc = nn.Linear(32 * 8 * 8, 10)
    
    def forward(self, x):
        x = self.bn1(torch.relu(self.conv1(x)))
        x = self.bn2(torch.relu(self.conv2(x)))
        x = x.view(x.size(0), -1)
        x = self.fc(x)
        return x

model = SimpleConvNet()

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 SimpleConvNet — a SimpleConvNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleConvNet 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
dataloader Ran
ran on a synthesized input
zybeich/ot-vp/domainbed/lib/torchmisc.py
code served (permissive licence) · get_code("8722522e3721ebfe")
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 DataLoader. 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 torch.utils.data import Dataset

torch.manual_seed(0)

class DummyDataset(Dataset):
    def __init__(self, size=8, input_dim=4, output_dim=3):
        self.size = size
        self.input_dim = input_dim
        self.output_dim = output_dim
    
    def __len__(self):
        return self.size
    
    def __getitem__(self, idx):
        x = torch.randn(self.input_dim)
        y = torch.randint(0, self.output_dim, (1,)).item()
        return x, y

dataset = DummyDataset(size=8, input_dim=4, output_dim=3)

ARGS = {
    "dataset": dataset,
    "batch_size": 4,
    "num_workers": 0,
    "valid": True,
    "gpu": True
}
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 DataLoader — a DataLoader output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataLoader 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
get_test_records Ran
ran; our contract draft was wrong, not the code
zybeich/ot-vp/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
grad_reverse Ran
ran; our contract draft was wrong, not the code
zybeich/ot-vp/domainbed/lib/torchmisc.py
pointer only (licence: MIT); the stored copy get_code serves, from guanqun-yang/reproducibility_challenge_neurips_2019, is pointer only (licence: NONE) · get_code("b5becb520f35423a")
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 guanqun-yang/reproducibility_challenge_neurips_2019, 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.

hashable Ran
ran, honoured the contract we drafted
zybeich/ot-vp/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
zybeich/ot-vp/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
zybeich/ot-vp/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
make_weights_for_balanced_classes Ran
ran, honoured the contract we drafted
zybeich/ot-vp/domainbed/lib/misc.py
code served (permissive licence) · get_code("3cb172d2f57f12cf")
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 (6,) 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.utils.data import Dataset

torch.manual_seed(0)

class SimpleDataset(Dataset):
    def __init__(self, data, labels):
        self.data = data
        self.labels = labels
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        return self.data[idx], self.labels[idx]

data = torch.randn(6, 4)
labels = [0, 1, 0, 2, 1, 2]

dataset = SimpleDataset(data, labels)

ARGS = {
    "dataset": dataset
}
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 (6,) — shape (6,) 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
net_dist Ran
ran, honoured the contract we drafted
zybeich/ot-vp/domainbed/lib/torchmisc.py
code served (permissive licence) · get_code("d3981d403538b1d3")
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 SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

net1 = SimpleNet()
net2 = SimpleNet()

ARGS = {
    "net1": net1,
    "net2": net2,
}
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
remove_batch_norm_from_resnet Ran
ran; our contract draft was wrong, not the code
zybeich/ot-vp/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
get_algorithm_class Not yet run
unverified (harvested, no recorded run)
zybeich/ot-vp/domainbed/adapt_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)
zybeich/ot-vp/domainbed/datasets.py
code served (permissive licence) · get_code("d0ea85d74c20dea9")
How it ran

no invocation recorded.

num_environments Not yet run
unverified (harvested, no recorded run)
zybeich/ot-vp/domainbed/datasets.py
code served (permissive licence) · get_code("73f32252eedba6a4")
How it ran

no invocation recorded.

print_row Not yet run
unverified (harvested, no recorded run)
zybeich/ot-vp/domainbed/lib/misc.py
code served (permissive licence) · get_code("6fe6cf9070a01da7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 14 are also present in other papers whose code we hold (14 with at least one paper dated earlier, 3 the same month, 6 later) and 2 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
get_algorithm_class 39 other papers
37 dated earlier, 1 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
20 dated earlier, 4 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
21 dated earlier, 2 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
21 dated earlier, 1 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
get_dataset_class 21 other papers
21 dated earlier
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
num_environments 21 other papers
20 dated earlier, 1 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
19 dated earlier, 1 the same month
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
19 dated earlier, 1 the same month
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_weights_for_balanced_classes 18 other papers
16 dated earlier, 1 the same month, 1 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 15 more not named here
l2_between_dicts 9 other papers
9 dated earlier
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
configure_model 3 other papers
3 dated earlier
2111.12853 (2021-11)
Domain Prompt Learning for Efficiently Adapting CLIP to Unseen Domains
2203.05574 (2022-03)
On-the-Fly Test-time Adaptation for Medical Image Segmentation
2207.10792 (2022-07)
Test-Time Adaptation via Self-Training with Nearest Neighbor Information
grad_reverse 2 other papers
2 dated earlier
1905.13549 (2019-05)
Learning Robust Global Representations by Penalizing Local Predictive Power
2208.08914 (2022-08)
Prompt Vision Transformer for Domain Generalization
dataloader 1 other paper
1 dated earlier
2208.08914 (2022-08)
Prompt Vision Transformer for Domain Generalization
net_dist 1 other paper
1 dated earlier
2208.08914 (2022-08)
Prompt Vision Transformer for 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-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

Vision Transformers (ViTs) have demonstrated remarkable capabilities in learning representations, but their performance is compromised when applied to unseen domains. Previous methods either engage in prompt learning during the training phase or modify model parameters at test time through entropy minimization. The former often overlooks unlabeled target data, while the latter doesn't fully address domain shifts. In this work, our approach, Optimal Transport-guided Test-Time Visual Prompting (OT-VP), handles these problems by leveraging prompt learning at test time to align the target and source domains without accessing the training process or altering pre-trained model parameters. This method involves learning a universal visual prompt for the target domain by optimizing the Optimal Transport distance.OT-VP, with only four learned prompt tokens, exceeds state-of-the-art performance across three stylistic datasets-PACS, VLCS, OfficeHome, and one corrupted dataset ImageNet-C. Additionally, OT-VP operates efficiently, both in terms of memory and computation, and is adaptable for extension to online settings.

For agents

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

get_harvested_code_for_paper("2407.09498")
get_code_for_paper("2407.09498")
have("2407.09498")

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

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

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

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

Connect an agent — have() is free.