Papers › Divide and Contrast: Source-free Domain Adaptation via Adaptive Contrastive Learning

Divide and Contrast: Source-free Domain Adaptation via Adaptive Contrastive Learning

12 Nov 2022arXiv:2211.06612archive 2025-07-28

Ziyi Zhang, Weikai Chen, Hui Cheng, Zhen Li, Siyuan Li, Liang Lin, Guanbin Li

We investigate a practical domain adaptation task, called source-free domain adaptation (SFUDA), where the source-pretrained model is adapted to the target domain without access to the source data. Existing techniques mainly leverage self-supervised pseudo labeling to achieve class-wise global alignment [1] or rely on local structure extraction that encourages feature consistency among neighborhoods [2]. While impressive progress has been made, both lines of methods have their own drawbacks - the "global" approach is sensitive to noisy labels while the "local" counterpart suffers from source bias. In this paper, we present Divide and Contrast (DaC), a new paradigm for SFUDA that strives to connect the good ends of both worlds while bypassing their limitations. Based on the prediction confidence of the source model, DaC divides the target data into source-like and target-specific samples, where either group of samples is treated with tailored goals under an adaptive contrastive learning framework. Specifically, the source-like samples are utilized for learning global class clustering thanks to their relatively clean labels. The more noisy target-specific data are harnessed at the instance level for learning the intrinsic local structures. We further align the source-like domain with the target-specific samples using a memory bank-based Maximum Mean Discrepancy (MMD) loss to reduce the distribution mismatch. Extensive experiments on VisDA, Office-Home, and the more challenging DomainNet have verified the superior performance of DaC over current state-of-the-art approaches. The code is available at https://github.com/ZyeZhang/DaC.git.

PaperPDFCodeCode 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="2211.06612")

Code

Syntology Ran 7 of 18 code samples harvested from 2 repositories linked to this paper; 11 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 7 ran; community (archive-listed): 3 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

zyezhang/dac officialmentioned in papermentioned on GitHubpytorchGPL-3.0 report
fenghz/cosda mentioned on GitHubpytorch 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

18 samples harvested; 7 ran; 0 honoured the contract we drafted; 11 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
5ran
11unverified

Licence: 15 of the 18 samples are 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

ImageList_test zyezhang/dac/VisDA/target.py official repository ran fingerprinted GPL-3.0 (copyleft) · pointer only · 069df2d4fa215e25 · report
ImageList_train zyezhang/dac/VisDA/target.py official repository ran fingerprinted GPL-3.0 (copyleft) · pointer only · 2a74a19eebc34f29 · report
MB zyezhang/dac/VisDA/target.py official repository ran GPL-3.0 (copyleft) · pointer only · 6cae9d73baff6f3b · report
MemoryBank zyezhang/dac/VisDA/target.py official repository ran GPL-3.0 (copyleft) · pointer only · 2c15973eb571a851 · report
feat_bootleneck zyezhang/dac/VisDA/target.py official repository ran GPL-3.0 (copyleft) · pointer only · 93b530743eff0c43 · report
lr_scheduler zyezhang/dac/VisDA/target.py official repository ran · our draft was wrong GPL-3.0 (copyleft) · pointer only · b7e334f5e0eb5920 · report
mb zyezhang/dac/VisDA/target.py official repository ran · our draft was wrong fingerprinted GPL-3.0 (copyleft) · pointer only · 770bd4ff7a230add · report
ImageNetPolicy zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · c9c5025b02609986 · report
SubPolicy zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · a98c6f5569a6791f · report
cal_acc zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · bd79f7cd617a9c3c · report
data_load zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · bce26a57a93cddbb · report
eval_initial zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · a27e3ff9f9e538f6 · report
image_train zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · cd55b45f072d883a · report
obtain_label zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · 5b707a834ab0fd28 · report
train_target zyezhang/dac/VisDA/target.py official repository unverified GPL-3.0 (copyleft) · pointer only · 1490acffabac55ec · report
dac_train fenghz/cosda/train/dac/dac.py community (archive-listed) unverified MIT (permissive) · d7c23e7e0e1b671b · report
eval_initial fenghz/cosda/train/dac/dac.py community (archive-listed) unverified MIT (permissive) · aeaf277ab7f6d86e · report
obtain_label fenghz/cosda/train/dac/dac.py community (archive-listed) unverified MIT (permissive) · 74c402a1775f70fe · report

Tasks

Contrastive LearningDomain AdaptationSource-Free Domain Adaptation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Source-Free Domain Adaptation VisDA-2017 DaC Accuracy 87.3 #6 of 10 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

ALIGNContrastive LearningDAC

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