{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/tune-it-the-right-way-unsupervised-validation","title":"Tune it the Right Way: Unsupervised Validation of Domain Adaptation via Soft Neighborhood Density","arxiv_id":"2108.10860","date":"2021-08-24","proceeding":"ICCV 2021 10","authors":["Kuniaki Saito","Donghyun Kim","Piotr Teterwak","Stan Sclaroff","Trevor Darrell","Kate Saenko"],"abstract":"Unsupervised domain adaptation (UDA) methods can dramatically improve generalization on unlabeled target domains. However, optimal hyper-parameter selection is critical to achieving high accuracy and avoiding negative transfer. Supervised hyper-parameter validation is not possible without labeled target data, which raises the question: How can we validate unsupervised adaptation techniques in a realistic way? We first empirically analyze existing criteria and demonstrate that they are not very effective for tuning hyper-parameters. Intuitively, a well-trained source classifier should embed target samples of the same class nearby, forming dense neighborhoods in feature space. Based on this assumption, we propose a novel unsupervised validation criterion that measures the density of soft neighborhoods by computing the entropy of the similarity distribution between points. Our criterion is simpler than competing validation methods, yet more effective; it can tune hyper-parameters and the number of training iterations in both image classification and semantic segmentation models. The code used for the paper will be available at \\url{https://github.com/VisionLearningGroup/SND}.","url_abs":"https://arxiv.org/abs/2108.10860v1","url_pdf":"https://arxiv.org/pdf/2108.10860v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"tune-it-the-right-way-unsupervised-validation","repo_url":"https://github.com/visionlearninggroup/snd","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"tune-it-the-right-way-unsupervised-validation","repo_url":"https://github.com/kevinmusgrave/pytorch-adapt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"domain-adaptation","task_name":"Domain Adaptation"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"unsupervised-domain-adaptation","task_name":"Unsupervised Domain Adaptation"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2108.10860","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.10860"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kevinmusgrave/pytorch-adapt","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/visionlearninggroup/snd","reach":null}],"summary":{"ran_draft_wrong":1,"ran_violates":1,"ran_honours":2,"unverified":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":4,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"94f8fc01101d529d","entry":"_mmd_quadratic","repo":"kevinmusgrave/pytorch-adapt","repo_kind":"listed","path":"src/pytorch_adapt/layers/utils.py","file_url":"https://github.com/kevinmusgrave/pytorch-adapt/blob/HEAD/src/pytorch_adapt/layers/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"94f8fc01101d529d"}},{"code_sha256_prefix":"cf0373553cc13a09","entry":"get_default_kernel_weights","repo":"kevinmusgrave/pytorch-adapt","repo_kind":"listed","path":"src/pytorch_adapt/layers/utils.py","file_url":"https://github.com/kevinmusgrave/pytorch-adapt/blob/HEAD/src/pytorch_adapt/layers/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cf0373553cc13a09"}},{"code_sha256_prefix":"290d39bd082c87ea","entry":"get_weight","repo":"visionlearninggroup/snd","repo_kind":"official","path":"nc_ps/utils/dev.py","file_url":"https://github.com/visionlearninggroup/snd/blob/HEAD/nc_ps/utils/dev.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"290d39bd082c87ea"}},{"code_sha256_prefix":"5e23c9898c9dacf4","entry":"num_elements_minus_diag","repo":"kevinmusgrave/pytorch-adapt","repo_kind":"listed","path":"src/pytorch_adapt/layers/utils.py","file_url":"https://github.com/kevinmusgrave/pytorch-adapt/blob/HEAD/src/pytorch_adapt/layers/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5e23c9898c9dacf4"}},{"code_sha256_prefix":"7fa7545c81625d00","entry":"get_mmd_quadratic","repo":"kevinmusgrave/pytorch-adapt","repo_kind":"listed","path":"src/pytorch_adapt/layers/utils.py","file_url":"https://github.com/kevinmusgrave/pytorch-adapt/blob/HEAD/src/pytorch_adapt/layers/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7fa7545c81625d00"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}