{"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/generalizing-across-domains-via-cross","title":"Generalizing Across Domains via Cross-Gradient Training","arxiv_id":"1804.10745","date":"2018-04-28","proceeding":"ICLR 2018 1","authors":["Shiv Shankar","Vihari Piratla","Soumen Chakrabarti","Siddhartha Chaudhuri","Preethi Jyothi","Sunita Sarawagi"],"abstract":"We present CROSSGRAD, a method to use multi-domain training data to learn a\nclassifier that generalizes to new domains. CROSSGRAD does not need an\nadaptation phase via labeled or unlabeled data, or domain features in the new\ndomain. Most existing domain adaptation methods attempt to erase domain signals\nusing techniques like domain adversarial training. In contrast, CROSSGRAD is\nfree to use domain signals for predicting labels, if it can prevent overfitting\non training domains. We conceptualize the task in a Bayesian setting, in which\na sampling step is implemented as data augmentation, based on domain-guided\nperturbations of input instances. CROSSGRAD parallelly trains a label and a\ndomain classifier on examples perturbed by loss gradients of each other's\nobjectives. This enables us to directly perturb inputs, without separating and\nre-mixing domain signals while making various distributional assumptions.\nEmpirical evaluation on three different applications where this setting is\nnatural establishes that (1) domain-guided perturbation provides consistently\nbetter generalization to unseen domains, compared to generic instance\nperturbation methods, and that (2) data augmentation is a more stable and\naccurate method than domain adversarial training.","url_abs":"http://arxiv.org/abs/1804.10745v2","url_pdf":"http://arxiv.org/pdf/1804.10745v2.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":"generalizing-across-domains-via-cross","repo_url":"https://github.com/vihari/crossgrad","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"domain-adaptation","task_name":"Domain Adaptation"},{"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":"CrossGrad (Resnet-18)","rank_in_archive_order":92,"of":133,"metrics":{"Average Accuracy":"80.7"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/1804.10745","atlas_url":"https://app.syntology.ai/?focus=1804.10745","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1804.10745"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/vihari/crossgrad","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":2},"by_repo_kind":{"official":{"samples":2,"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":"b118e995c81f2377","entry":"optimize_clones","repo":"vihari/crossgrad","repo_kind":"official","path":"deployment/model_deploy.py","file_url":"https://github.com/vihari/crossgrad/blob/HEAD/deployment/model_deploy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b118e995c81f2377"}},{"code_sha256_prefix":"9a474b74cf0bced3","entry":"preprocess_image","repo":"vihari/crossgrad","repo_kind":"official","path":"preprocessing/lenet_preprocessing.py","file_url":"https://github.com/vihari/crossgrad/blob/HEAD/preprocessing/lenet_preprocessing.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9a474b74cf0bced3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}