{"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/optimal-representations-for-covariate-shift-1","title":"Optimal Representations for Covariate Shift","arxiv_id":"2201.00057","date":"2021-12-31","proceeding":"ICLR 2022 4","authors":["Yangjun Ruan","Yann Dubois","Chris J. Maddison"],"abstract":"Machine learning systems often experience a distribution shift between training and testing. In this paper, we introduce a simple variational objective whose optima are exactly the set of all representations on which risk minimizers are guaranteed to be robust to any distribution shift that preserves the Bayes predictor, e.g., covariate shifts. Our objective has two components. First, a representation must remain discriminative for the task, i.e., some predictor must be able to simultaneously minimize the source and target risk. Second, the representation's marginal support needs to be the same across source and target. We make this practical by designing self-supervised objectives that only use unlabelled data and augmentations to train robust representations. Our objectives give insights into the robustness of CLIP, and further improve CLIP's representations to achieve SOTA results on DomainBed.","url_abs":"https://arxiv.org/abs/2201.00057v2","url_pdf":"https://arxiv.org/pdf/2201.00057v2.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":"optimal-representations-for-covariate-shift-1","repo_url":"https://github.com/ryoungj/optdom","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"optimal-representations-for-covariate-shift-1","repo_url":"https://github.com/facebookresearch/DomainBed","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"}],"methods":[{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-objectnet","task":"Image Classification","dataset":"ObjectNet","model":"CLIP L","rank_in_archive_order":38,"of":106,"metrics":{"Top-1 Accuracy":"42.80"},"uses_additional_data":true},{"leaderboard":"/sota/image-classification-on-objectnet","task":"Image Classification","dataset":"ObjectNet","model":"CLIP L (LAION)","rank_in_archive_order":41,"of":106,"metrics":{"Top-1 Accuracy":"42.10"},"uses_additional_data":true}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2201.00057","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.00057"}},"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/facebookresearch/DomainBed","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ryoungj/optdom","reach":null}],"summary":{"ran":3,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"official":{"samples":5,"ran":4,"repositories":1},"listed":{"samples":1,"ran":0,"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":"4f0f21854ca59e7c","entry":"AbstractBottleneck","repo":"ryoungj/optdom","repo_kind":"official","path":"DomainBed/domainbed/bottlenecks.py","file_url":"https://github.com/ryoungj/optdom/blob/HEAD/DomainBed/domainbed/bottlenecks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f0f21854ca59e7c"}},{"code_sha256_prefix":"8b6d515e3709d929","entry":"CADBottleneck","repo":"ryoungj/optdom","repo_kind":"official","path":"DomainBed/domainbed/bottlenecks.py","file_url":"https://github.com/ryoungj/optdom/blob/HEAD/DomainBed/domainbed/bottlenecks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8b6d515e3709d929"}},{"code_sha256_prefix":"222beedb5ae19428","entry":"SupConLoss","repo":"ryoungj/optdom","repo_kind":"official","path":"DomainBed/domainbed/bottlenecks.py","file_url":"https://github.com/ryoungj/optdom/blob/HEAD/DomainBed/domainbed/bottlenecks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"222beedb5ae19428"}},{"code_sha256_prefix":"41e2a81d614059e6","entry":"finite_mean","repo":"ryoungj/optdom","repo_kind":"official","path":"DomainBed/domainbed/bottlenecks.py","file_url":"https://github.com/ryoungj/optdom/blob/HEAD/DomainBed/domainbed/bottlenecks.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":"41e2a81d614059e6"}},{"code_sha256_prefix":"626c9eb954a177cd","entry":"AbstractCAD","repo":"facebookresearch/DomainBed","repo_kind":"listed","path":"domainbed/algorithms.py","file_url":"https://github.com/facebookresearch/DomainBed/blob/HEAD/domainbed/algorithms.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":"626c9eb954a177cd"}},{"code_sha256_prefix":"9d8524ef1fd0b1ba","entry":"AbstractContrastBottleneck","repo":"ryoungj/optdom","repo_kind":"official","path":"DomainBed/domainbed/bottlenecks.py","file_url":"https://github.com/ryoungj/optdom/blob/HEAD/DomainBed/domainbed/bottlenecks.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":"9d8524ef1fd0b1ba"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}