{"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/reducing-the-covariate-shift-by-mirror","title":"Reducing the Covariate Shift by Mirror Samples in Cross Domain Alignment","arxiv_id":"2110.06448","date":"2021-10-13","proceeding":"NeurIPS 2021 12","authors":["Yin Zhao","Minquan Wang","Longjun Cai"],"abstract":"Eliminating the covariate shift cross domains is one of the common methods to deal with the issue of domain shift in visual unsupervised domain adaptation. However, current alignment methods, especially the prototype based or sample-level based methods neglect the structural properties of the underlying distribution and even break the condition of covariate shift. To relieve the limitations and conflicts, we introduce a novel concept named (virtual) mirror, which represents the equivalent sample in another domain. The equivalent sample pairs, named mirror pairs reflect the natural correspondence of the empirical distributions. Then a mirror loss, which aligns the mirror pairs cross domains, is constructed to enhance the alignment of the domains. The proposed method does not distort the internal structure of the underlying distribution. We also provide theoretical proof that the mirror samples and mirror loss have better asymptotic properties in reducing the domain shift. By applying the virtual mirror and mirror loss to the generic unsupervised domain adaptation model, we achieved consistent superior performance on several mainstream benchmarks. Code is available at https://github.com/CTI-VISION/Mirror-Sample","url_abs":"https://arxiv.org/abs/2110.06448v2","url_pdf":"https://arxiv.org/pdf/2110.06448v2.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":"reducing-the-covariate-shift-by-mirror","repo_url":"https://github.com/CTI-VISION/Mirror-Sample","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"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":{"syntology_url":"https://syntology.ai/paper/2110.06448","atlas_url":"https://app.syntology.ai/?focus=2110.06448","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.06448"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"deterministic:regex_extraction","url":"https://github.com/CTI-VISION/Mirror-Sample","reach":null}],"summary":{"ran_draft_wrong":3,"unverified":1},"by_repo_kind":{"official":{"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":4,"samples":[{"code_sha256_prefix":"897480dadd034972","entry":"mirror_kl_loss_v2","repo":"CTI-VISION/Mirror-Sample","repo_kind":"official","path":"trainer.py","file_url":"https://github.com/CTI-VISION/Mirror-Sample/blob/HEAD/trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"897480dadd034972"}},{"code_sha256_prefix":"74b1e4e1b1d3ee53","entry":"resnet18","repo":"cti-vision/mirror-sample","repo_kind":"official","path":"Models/Mirror_Model.py","file_url":"https://github.com/cti-vision/mirror-sample/blob/HEAD/Models/Mirror_Model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"74b1e4e1b1d3ee53"}},{"code_sha256_prefix":"2b3f7e30f8010b1f","entry":"resnet34","repo":"cti-vision/mirror-sample","repo_kind":"official","path":"Models/Mirror_Model.py","file_url":"https://github.com/cti-vision/mirror-sample/blob/HEAD/Models/Mirror_Model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2b3f7e30f8010b1f"}},{"code_sha256_prefix":"904acc95bc6b73ea","entry":"conv3x3","repo":"cti-vision/mirror-sample","repo_kind":"official","path":"Models/Mirror_Model.py","file_url":"https://github.com/cti-vision/mirror-sample/blob/HEAD/Models/Mirror_Model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"904acc95bc6b73ea"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}