{"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/episodic-training-for-domain-generalization","title":"Episodic Training for Domain Generalization","arxiv_id":"1902.00113","date":"2019-01-31","proceeding":"ICCV 2019 10","authors":["Da Li","Jianshu Zhang","Yongxin Yang","Cong Liu","Yi-Zhe Song","Timothy M. Hospedales"],"abstract":"Domain generalization (DG) is the challenging and topical problem of learning models that generalize to novel testing domains with different statistics than a set of known training domains. The simple approach of aggregating data from all source domains and training a single deep neural network end-to-end on all the data provides a surprisingly strong baseline that surpasses many prior published methods. In this paper, we build on this strong baseline by designing an episodic training procedure that trains a single deep network in a way that exposes it to the domain shift that characterises a novel domain at runtime. Specifically, we decompose a deep network into feature extractor and classifier components, and then train each component by simulating it interacting with a partner who is badly tuned for the current domain. This makes both components more robust, ultimately leading to our networks producing state-of-the-art performance on three DG benchmarks. Furthermore, we consider the pervasive workflow of using an ImageNet trained CNN as a fixed feature extractor for downstream recognition tasks. Using the Visual Decathlon benchmark, we demonstrate that our episodic-DG training improves the performance of such a general-purpose feature extractor by explicitly training a feature for robustness to novel problems. This shows that DG training can benefit standard practice in computer vision.","url_abs":"https://arxiv.org/abs/1902.00113v3","url_pdf":"https://arxiv.org/pdf/1902.00113v3.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":"episodic-training-for-domain-generalization","repo_url":"https://github.com/HAHA-DL/Episodic-DG","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"episodic-training-for-domain-generalization","repo_url":"https://github.com/Emma0118/domain-generalization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/domain-generalization-on-pacs-2","task":"Domain Generalization","dataset":"PACS","model":"Epi-FCR (Resnet-18)","rank_in_archive_order":85,"of":133,"metrics":{"Average Accuracy":"81.5"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-pacs-2","task":"Domain Generalization","dataset":"PACS","model":"Epi-FCR (Alexnet)","rank_in_archive_order":115,"of":133,"metrics":{"Average Accuracy":"72.00"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1902.00113","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1902.00113"}},"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/HAHA-DL/Episodic-DG","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Emma0118/domain-generalization","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"official":{"samples":5,"ran":1,"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":"fac5364e2f53c6db","entry":"conv3x3","repo":"HAHA-DL/Episodic-DG","repo_kind":"official","path":"PACS/resnet_epi_fcr.py","file_url":"https://github.com/HAHA-DL/Episodic-DG/blob/HEAD/PACS/resnet_epi_fcr.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":"fac5364e2f53c6db"}},{"code_sha256_prefix":"b101efe4f564972d","entry":"resnet18","repo":"HAHA-DL/Episodic-DG","repo_kind":"official","path":"PACS/resnet_vanilla.py","file_url":"https://github.com/HAHA-DL/Episodic-DG/blob/HEAD/PACS/resnet_vanilla.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":"b101efe4f564972d"}},{"code_sha256_prefix":"e66d8098b50090e3","entry":"shuffle_data","repo":"HAHA-DL/Episodic-DG","repo_kind":"official","path":"common/utils.py","file_url":"https://github.com/HAHA-DL/Episodic-DG/blob/HEAD/common/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":"e66d8098b50090e3"}},{"code_sha256_prefix":"c63cc42fd5b3834f","entry":"shuffle_list","repo":"HAHA-DL/Episodic-DG","repo_kind":"official","path":"common/utils.py","file_url":"https://github.com/HAHA-DL/Episodic-DG/blob/HEAD/common/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":"c63cc42fd5b3834f"}},{"code_sha256_prefix":"704f4addaa30438d","entry":"unfold_label","repo":"HAHA-DL/Episodic-DG","repo_kind":"official","path":"common/utils.py","file_url":"https://github.com/HAHA-DL/Episodic-DG/blob/HEAD/common/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":"704f4addaa30438d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}