Papers › Safe Self-Refinement for Transformer-based Domain Adaptation

Safe Self-Refinement for Transformer-based Domain Adaptation

16 Apr 2022CVPR 2022 1arXiv:2204.07683archive 2025-07-28

Tao Sun, Cheng Lu, Tianshuo Zhang, Haibin Ling

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.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2204.07683")

Code

Syntology Ran 9 of 19 code samples harvested from 1 repository linked to this paper; 10 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 4 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 8 ran; 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

tsun/ssrt officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 9 ran; 0 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
4ran · fixture could not drive it
3ran
10unverified

Licence: 1 of the 19 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from tsun/SSRT. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

GradientReverseFunction tsun/SSRT/model/SSRT.py official repository ran MIT (permissive) · 3d0a0d378c8dbc24 · report
PatchEmbed tsun/SSRT/model/SSRT.py official repository ran · metamorphic tier: deterministic MIT (permissive) · 22050c4d1bca63e0 · report
WarmStartGradientReverseLayer tsun/SSRT/model/SSRT.py official repository ran · metamorphic tier: deterministic MIT (permissive) · ec88df6f428e3f61 · report
_no_grad_trunc_normal_ tsun/SSRT/model/SSRT.py official repository ran · fixture could not drive it MIT (permissive) · fa2dd3be10cf9804 · report
_ntuple tsun/SSRT/model/SSRT.py official repository ran · our draft was wrong MIT (permissive) · 553ee0765abad219 · report
named_apply tsun/SSRT/model/SSRT.py official repository ran · our draft was wrong MIT (permissive) · 75e11c702145c5c3 · report
resize_pos_embed tsun/SSRT/model/SSRT.py official repository ran · fixture could not drive it MIT (permissive) · b01c11b0a035cd40 · report
trunc_normal_ tsun/SSRT/model/SSRT.py official repository ran · fixture could not drive it MIT (permissive) · 02566da69866c48c · report
Attention tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · bbf9328517c62d43 · report
Block tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · eb8b342e174c85c9 · report
SSRT tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · be99cca89b88af5e · report
SSRTNet tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · 0904466d7926c365 · report
VT tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · 17aa99cd0717e1d0 · report
VisionTransformer tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · 2a0271883efece1e · report
_init_vit_weights tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · ddbeb989cf002f02 · report
_load_weights tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · 3c95bc9517c87684 · report
lecun_normal_ tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · 50805d05a18a031e · report
variance_scaling_ tsun/SSRT/model/SSRT.py official repository unverified MIT (permissive) · 1a6538cd23fa0b1a · report
adapt_input_conv identical code first harvested elsewhere ran · fixture could not drive it fingerprinted licence of this copy not recorded · 552d614343c6f5b0 · report

Tasks

Domain AdaptationTransfer LearningUnsupervised Domain Adaptation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Domain Adaptation Office-31 SSRT-B (ours) Average Accuracy 93.5 #4 of 40 Archive leaderboard report
Unsupervised Domain Adaptation Office-Home SSRT-B Accuracy 85.43 #7 of 20 Archive leaderboard report
Unsupervised Domain Adaptation VisDA2017 SSRT-B (ours) Accuracy 88.76 #8 of 13 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

AttentionDense ConnectionsLayer NormalizationLinear LayerMulti-Head AttentionResidual ConnectionSoftmaxVision Transformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections