SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.07683 · CVPR · 2022

Safe Self-Refinement for Transformer-based Domain Adaptation

Tao Sun, Cheng Lu, Haibin Ling, Tianshuo Zhang

arXiv · PDF · Open in the Atlas

Code that ran

9 of 19 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 6 failures of our instrument; 10 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/2204.07683.json · badge: /api/ran/2204.07683.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
tsun/SSRT community
Papers with Code archive
8 ran · 10 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
GradientReverseFunction Ran
ran on a synthesized input · constructed an object; no result was computed
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("3d0a0d378c8dbc24")
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 an instance of its own class, GradientReverseFunction: the run constructed the object and did not call it, so no result was computed. 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.autograd import Function
from typing import Optional, Any, Tuple

torch.manual_seed(0)

class GradientReverseFunction(Function):

    @staticmethod
    def forward(ctx: Any, input: torch.Tensor, coeff: Optional[float]=1.0) -> torch.Tensor:
        ctx.coeff = coeff
        output = input * 1.0
        return output

    @staticmethod
    def backward(ctx: Any, grad_output: torch.Tensor) -> Tuple[torch.Tensor, Any]:
        return (grad_output.neg() * ctx.coeff, None)


# Create a small input tensor (batch=2, dim=4)
input_tensor = torch.randn(2, 4, requires_grad=True)

# Create a coefficient value
coeff_value = 1.5

# Map all parameters
ARGS = {
    "input": input_tensor,
    "coeff": coeff_value,
}
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 GradientReverseFunction — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a GradientReverseFunction 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
PatchEmbed Ran
ran on a synthesized input · constructed an object; no result was computed
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("22050c4d1bca63e0")
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 an instance of its own class, PatchEmbed: the run constructed the object and did not call it, so no result was computed. 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
from itertools import repeat
import collections.abc

torch.manual_seed(0)

def _ntuple(n):
    def parse(x):
        if isinstance(x, collections.abc.Iterable):
            return x
        return tuple(repeat(x, n))
    return parse

to_2tuple = _ntuple(2)

class PatchEmbed(nn.Module):
    """ 2D Image to Patch Embedding
    """

    def __init__(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768, norm_layer=None, flatten=True):
        super().__init__()
        img_size = to_2tuple(img_size)
        patch_size = to_2tuple(patch_size)
        self.img_size = img_size
        self.patch_size = patch_size
        self.grid_size = (img_size[0] // patch_size[0], img_size[1] // patch_size[1])
        self.num_patches = self.grid_size[0] * self.grid_size[1]
        self.flatten = flatten
        self.proj = nn.Conv2d(in_chans, embed_dim, kernel_size=patch_size, stride=patch_size)
        self.norm = norm_layer(embed_dim) if norm_layer else nn.Identity()

    def forward(self, x):
        B, C, H, W = x.shape
        assert H == self.img_size[0] and W == self.img_size[1], f"Input image size ({H}*{W}) doesn't match model ({self.img_size[0]}*{self.img_size[1]})."
        x = self.proj(x)
        if self.flatten:
            x = x.flatten(2).transpose(1, 2)
        x = self.norm(x)
        return x

class SimpleNorm(nn.Module):
    def __init__(self, dim):
        super().__init__()
        self.weight = nn.Parameter(torch.ones(dim))
    
    def forward(self, x):
        return x * self.weight

ARGS = {
    "img_size": 32,
    "patch_size": 4,
    "in_chans": 3,
    "embed_dim": 8,
    "norm_layer": SimpleNorm,
    "flatten": 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 PatchEmbed — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PatchEmbed 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
WarmStartGradientReverseLayer Ran
ran on a synthesized input · constructed an object; no result was computed
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("ec88df6f428e3f61")
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 an instance of its own class, WarmStartGradientReverseLayer: the run constructed the object and did not call it, so no result was computed. 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
import numpy as np

torch.manual_seed(0)

ARGS = {
    "alpha": 1.0,
    "lo": 0.0,
    "hi": 1.0,
    "max_iters": 1000,
    "auto_step": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type WarmStartGradientReverseLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a WarmStartGradientReverseLayer 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
_no_grad_trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("fa2dd3be10cf9804")
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 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 torch
import math

torch.manual_seed(0)

# Create a small tensor to be initialized
tensor = torch.empty(2, 4)

# Define parameters for truncated normal distribution
mean = 0.0
std = 1.0
a = -2.0  # lower bound
b = 2.0   # upper bound

ARGS = {
    "tensor": tensor,
    "mean": mean,
    "std": std,
    "a": a,
    "b": b,
}
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 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
_ntuple Ran
ran; our contract draft was wrong, not the code
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("553ee0765abad219")
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 torch
import collections.abc
from itertools import repeat

# Analyze the function: _ntuple(n) takes a single parameter 'n'
# It returns a parse function that takes 'x' and either returns it if iterable,
# or repeats it n times as a tuple

# The function only uses:
# - n: an integer value used in repeat(x, n)
# - x: tested with isinstance(x, collections.abc.Iterable)

# Valid argument: n should be an integer
n = 3

ARGS = {
    "n": n
}
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
adapt_input_conv Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from kkoutini/passt
pointer only · get_code("552d614343c6f5b0")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

named_apply Ran
ran; our contract draft was wrong, not the code
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("75e11c702145c5c3")
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 SimpleModel. 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
from typing import Callable

torch.manual_seed(0)

# Create a simple nested module structure
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.layer1 = nn.Linear(4, 3)
        self.layer2 = nn.Linear(3, 2)
        self.sublayers = nn.Sequential(
            nn.Linear(2, 2),
            nn.ReLU()
        )

model = SimpleModel()

# Create a simple callback function that tracks which modules were visited
visited_modules = []

def callback_fn(module: nn.Module, name: str):
    visited_modules.append((name, type(module).__name__))

ARGS = {
    'fn': callback_fn,
    'module': model,
    'name': '',
    'depth_first': True,
    'include_root': False
}
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 SimpleModel — a SimpleModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a SimpleModel 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
resize_pos_embed Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("b01c11b0a035cd40")
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 3, dtype family float, shape (1, 101, 8) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Create position embedding tensor with batch size 1
# Shape: (batch=1, num_patches + num_tokens, embed_dim)
# num_tokens=1, so we have 1 token + 64 grid positions (8x8) = 65 total
posemb = torch.randn(1, 65, 8)

# Create new position embedding tensor with different number of patches
# num_tokens=1, so we have 1 token + 100 grid positions (10x10) = 101 total
posemb_new = torch.randn(1, 101, 8)

# Number of tokens at the beginning of the sequence (e.g., cls token)
num_tokens = 1

# New grid size (height, width)
gs_new = (10, 10)

ARGS = {
    'posemb': posemb,
    'posemb_new': posemb_new,
    'num_tokens': num_tokens,
    'gs_new': gs_new,
}
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 3, dtype family float, shape (1, 101, 8) — shape (1, 101, 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
trunc_normal_ Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("02566da69866c48c")
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 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 torch
import math

torch.manual_seed(0)

# Create a small tensor to be filled with truncated normal values
tensor = torch.empty(2, 4)

# Define arguments for trunc_normal_
ARGS = {
    'tensor': tensor,
    'mean': 0.0,
    'std': 1.0,
    'a': -2.0,
    'b': 2.0
}
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 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
Attention Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("bbf9328517c62d43")
How it ran

no invocation recorded.

Block Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("eb8b342e174c85c9")
How it ran

no invocation recorded.

SSRT Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("be99cca89b88af5e")
How it ran

no invocation recorded.

SSRTNet Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("0904466d7926c365")
How it ran

no invocation recorded.

VT Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("17aa99cd0717e1d0")
How it ran

no invocation recorded.

VisionTransformer Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("2a0271883efece1e")
How it ran

no invocation recorded.

_init_vit_weights Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("ddbeb989cf002f02")
How it ran

no invocation recorded.

_load_weights Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("3c95bc9517c87684")
How it ran

no invocation recorded.

lecun_normal_ Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("50805d05a18a031e")
How it ran

no invocation recorded.

variance_scaling_ Not yet run
unverified (harvested, no recorded run)
tsun/SSRT/model/SSRT.py
code served (permissive licence) · get_code("1a6538cd23fa0b1a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 19 samples lifted from this paper's linked repositories, 19 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 12 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 8 the same month, 9 later) and 7 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
trunc_normal_
brick of this paper's assembly: helper
160 other papers
27 dated earlier, 6 the same month, 126 later, 1 same year, order not determinable · 36 only as an assembly brick
1911.10194 (2019-11)
Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation
2005.10242 (2020-05)
Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
2007.12911 (2020-07)
Tighter risk certificates for neural networks
and 157 more not named here
_no_grad_trunc_normal_
brick of this paper's assembly: helper
44 other papers
7 dated earlier, 3 the same month, 34 later · 38 only as an assembly brick
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2105.14432 (2021-05)
TransMatcher: Deep Image Matching Through Transformers for Generalizable Person Re-identification
2106.08254 (2021-06)
BEIT: BERT Pre-Training of Image Transformers
and 41 more not named here
named_apply
brick of this paper's assembly: helper
26 other papers
1 dated earlier, 23 later, 2 undated
2010.11929 (2020-10)
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
2304.07193 (2023-04)
DINOv2: Learning Robust Visual Features without Supervision
2309.16588 (2023-09)
Vision Transformers Need Registers
and 23 more not named here
_ntuple
brick of this paper's assembly: helper
20 other papers
4 dated earlier, 1 the same month, 15 later · 18 only as an assembly brick
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
2105.14432 (2021-05)
TransMatcher: Deep Image Matching Through Transformers for Generalizable Person Re-identification
2108.10257 (2021-08)
SwinIR: Image Restoration Using Swin Transformer
and 17 more not named here
resize_pos_embed
brick of this paper's assembly: helper
14 other papers
3 dated earlier, 11 later
2112.07658 (2021-12)
AdaViT: Adaptive Tokens for Efficient Vision Transformer
2203.05962 (2022-03)
Anti-Oversmoothing in Deep Vision Transformers via the Fourier Domain Analysis: From Theory to Practice
2203.12614 (2022-03)
Unsupervised Salient Object Detection with Spectral Cluster Voting
and 11 more not named here
adapt_input_conv
brick of this paper's assembly: helper
6 other papers
2 dated earlier, 4 later
2110.05069 (2021-10)
Efficient Training of Audio Transformers with Patchout
2110.07641 (2021-10)
Non-deep Networks
2206.03452 (2022-06)
Can CNNs Be More Robust Than Transformers?
and 3 more not named here
GradientReverseFunction
brick of this paper's assembly: helper
4 other papers
3 dated earlier, 1 the same month · 3 only as an assembly brick
1409.7495 (2014-09)
Unsupervised Domain Adaptation by Backpropagation
2004.12529 (2020-04)
Towards Accurate and Robust Domain Adaptation under Noisy Environments
2106.11344 (2021-06)
f -Domain-Adversarial Learning: Theory and Algorithms
and 1 more not named here
lecun_normal_
brick of this paper's assembly: helper
4 other papers
2 dated earlier, 1 the same month, 1 later
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
and 1 more not named here
WarmStartGradientReverseLayer
brick of this paper's assembly: update_rule
3 other papers
2 dated earlier, 1 the same month
1409.7495 (2014-09)
Unsupervised Domain Adaptation by Backpropagation
2004.12529 (2020-04)
Towards Accurate and Robust Domain Adaptation under Noisy Environments
2204.03838 (2022-04)
Reusing the Task-specific Classifier as a Discriminator: Discriminator-free Adversarial Domain Adaptation
_init_vit_weights
brick of this paper's assembly: helper
3 other papers
1 the same month, 2 later · 1 only as an assembly brick
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
2307.15324 (2023-07)
TaskExpert: Dynamically Assembling Multi-Task Representations with Memorial Mixture-of-Experts
2403.17749 (2024-03)
Multi-Task Dense Prediction via Mixture of Low-Rank Experts
variance_scaling_
brick of this paper's assembly: helper
3 other papers
2 dated earlier, 1 the same month
2103.14030 (2021-03)
Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
2204.03645 (2022-04)
DaViT: Dual Attention Vision Transformers
PatchEmbed
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2302.01056 (2023-02)
Beyond Pretrained Features: Noisy Image Modeling Provides Adversarial Defense

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

Unsupervised Domain Adaptation (UDA) aims to leverage a label-rich source domain to solve tasks on a related unlabeled target domain. It is a challenging problem especially when a large domain gap lies between the source and target domains. In this paper we propose a novel solution named SSRT (Safe Self-Refinement for Transformer-based domain adaptation), which brings improvement from two aspects. First, encouraged by the success of vision transformers in various vision tasks, we arm SSRT with a transformer backbone. We find that the combination of vision transformer with simple adversarial adaptation surpasses best reported Convolutional Neural Network (CNN)-based results on the challenging DomainNet benchmark, showing its strong transferable feature representation. Second, to reduce the risk of model collapse and improve the effectiveness of knowledge transfer between domains with large gaps, we propose a Safe Self-Refinement strategy. Specifically, SSRT utilizes predictions of perturbed target domain data to refine the model. Since the model capacity of vision transformer is large and predictions in such challenging tasks can be noisy, a safe training mechanism is designed to adaptively adjust learning configuration. Extensive evaluations are conducted on several widely tested UDA benchmarks and SSRT achieves consistently the best performances, including 85.43% on Office-Home, 88.76% on VisDA-2017 and 45.2% on DomainNet.

For agents

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

get_harvested_code_for_paper("2204.07683")
get_code_for_paper("2204.07683")
have("2204.07683")

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

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

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

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

Connect an agent — have() is free.