{"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/nearest-neighborhood-based-deep-clustering","title":"Nearest Neighborhood-Based Deep Clustering for Source Data-absent Unsupervised Domain Adaptation","arxiv_id":"2107.12585","date":"2021-07-27","proceeding":null,"authors":["Song Tang","Yan Yang","Zhiyuan Ma","Norman Hendrich","Fanyu Zeng","Shuzhi Sam Ge","ChangShui Zhang","Jianwei Zhang"],"abstract":"In the classic setting of unsupervised domain adaptation (UDA), the labeled source data are available in the training phase. However, in many real-world scenarios, owing to some reasons such as privacy protection and information security, the source data is inaccessible, and only a model trained on the source domain is available. This paper proposes a novel deep clustering method for this challenging task. Aiming at the dynamical clustering at feature-level, we introduce extra constraints hidden in the geometric structure between data to assist the process. Concretely, we propose a geometry-based constraint, named semantic consistency on the nearest neighborhood (SCNNH), and use it to encourage robust clustering. To reach this goal, we construct the nearest neighborhood for every target data and take it as the fundamental clustering unit by building our objective on the geometry. Also, we develop a more SCNNH-compliant structure with an additional semantic credibility constraint, named semantic hyper-nearest neighborhood (SHNNH). After that, we extend our method to this new geometry. Extensive experiments on three challenging UDA datasets indicate that our method achieves state-of-the-art results. The proposed method has significant improvement on all datasets (as we adopt SHNNH, the average accuracy increases by over 3.0% on the large-scaled dataset). Code is available at https://github.com/tntek/N2DCX.","url_abs":"https://arxiv.org/abs/2107.12585v2","url_pdf":"https://arxiv.org/pdf/2107.12585v2.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":"nearest-neighborhood-based-deep-clustering","repo_url":"https://github.com/tntek/N2DCX","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"deep-clustering","task_name":"Deep Clustering"},{"task_slug":"domain-adaptation","task_name":"Domain Adaptation"},{"task_slug":"unsupervised-domain-adaptation","task_name":"Unsupervised Domain Adaptation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2107.12585","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2107.12585"}},"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/tntek/N2DCX","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":5,"ran_honours":2,"unverified":3},"by_repo_kind":{"official":{"samples":10,"ran":7,"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":"94b5622f0aa7add1","entry":"Entropy","repo":"tntek/N2DCX","repo_kind":"official","path":"object/loss.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/loss.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"94b5622f0aa7add1"}},{"code_sha256_prefix":"9768efb52f591b55","entry":"grl_hook","repo":"tntek/N2DCX","repo_kind":"official","path":"object/loss.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/loss.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9768efb52f591b55"}},{"code_sha256_prefix":"35c2d572ebd185f5","entry":"image_train","repo":"tntek/N2DCX","repo_kind":"official","path":"object/N2DCEX_target.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/N2DCEX_target.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35c2d572ebd185f5"}},{"code_sha256_prefix":"edd7184ac144c4fa","entry":"l_loader","repo":"tntek/N2DCX","repo_kind":"official","path":"object/data_list.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/data_list.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"edd7184ac144c4fa"}},{"code_sha256_prefix":"0b7ffc9f8b77529c","entry":"lr_scheduler","repo":"tntek/N2DCX","repo_kind":"official","path":"object/N2DCEX_target.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/N2DCEX_target.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b7ffc9f8b77529c"}},{"code_sha256_prefix":"93a11f62e4a129f0","entry":"op_copy","repo":"tntek/N2DCX","repo_kind":"official","path":"object/N2DCEX_target.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/N2DCEX_target.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"93a11f62e4a129f0"}},{"code_sha256_prefix":"2c5ce24ea2b5d2a4","entry":"rgb_loader","repo":"tntek/N2DCX","repo_kind":"official","path":"object/data_list.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/data_list.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2c5ce24ea2b5d2a4"}},{"code_sha256_prefix":"385d1e010dfb76a9","entry":"CDAN","repo":"tntek/N2DCX","repo_kind":"official","path":"object/loss.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/loss.py","link_basis":"plan_row","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":"385d1e010dfb76a9"}},{"code_sha256_prefix":"e352afa5762c5a6b","entry":"calc_coeff","repo":"tntek/N2DCX","repo_kind":"official","path":"object/network.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/network.py","link_basis":"harvester_set","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":"e352afa5762c5a6b"}},{"code_sha256_prefix":"2301055cb33836bc","entry":"make_dataset","repo":"tntek/N2DCX","repo_kind":"official","path":"object/data_list.py","file_url":"https://github.com/tntek/N2DCX/blob/HEAD/object/data_list.py","link_basis":"harvester_set","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":"2301055cb33836bc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}