{"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/probable-domain-generalization-via-quantile","title":"Probable Domain Generalization via Quantile Risk Minimization","arxiv_id":"2207.09944","date":"2022-07-20","proceeding":null,"authors":["Cian Eastwood","Alexander Robey","Shashank Singh","Julius von Kügelgen","Hamed Hassani","George J. Pappas","Bernhard Schölkopf"],"abstract":"Domain generalization (DG) seeks predictors which perform well on unseen test distributions by leveraging data drawn from multiple related training distributions or domains. To achieve this, DG is commonly formulated as an average- or worst-case problem over the set of possible domains. However, predictors that perform well on average lack robustness while predictors that perform well in the worst case tend to be overly-conservative. To address this, we propose a new probabilistic framework for DG where the goal is to learn predictors that perform well with high probability. Our key idea is that distribution shifts seen during training should inform us of probable shifts at test time, which we realize by explicitly relating training and test domains as draws from the same underlying meta-distribution. To achieve probable DG, we propose a new optimization problem called Quantile Risk Minimization (QRM). By minimizing the $\\alpha$-quantile of predictor's risk distribution over domains, QRM seeks predictors that perform well with probability $\\alpha$. To solve QRM in practice, we propose the Empirical QRM (EQRM) algorithm and provide: (i) a generalization bound for EQRM; and (ii) the conditions under which EQRM recovers the causal predictor as $\\alpha \\to 1$. In our experiments, we introduce a more holistic quantile-focused evaluation protocol for DG and demonstrate that EQRM outperforms state-of-the-art baselines on datasets from WILDS and DomainBed.","url_abs":"https://arxiv.org/abs/2207.09944v4","url_pdf":"https://arxiv.org/pdf/2207.09944v4.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":"probable-domain-generalization-via-quantile","repo_url":"https://github.com/cianeastwood/qrm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"probable-domain-generalization-via-quantile","repo_url":"https://github.com/facebookresearch/DomainBed","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"}],"methods":[{"method_slug":"test","method_name":"Test"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.09944","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.09944"}},"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/cianeastwood/qrm","reach":null}],"summary":{"ran":5,"ran_honours":1,"ran_draft_wrong":1,"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":8,"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":9,"samples":[{"code_sha256_prefix":"58b453da50c146d1","entry":"Distribution1D","repo":"cianeastwood/qrm","repo_kind":"official","path":"DomainBed/domainbed/algorithms.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/DomainBed/domainbed/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"58b453da50c146d1"}},{"code_sha256_prefix":"d5cf43401e8f86ef","entry":"GaussianKernel","repo":"cianeastwood/qrm","repo_kind":"official","path":"DomainBed/domainbed/algorithms.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/DomainBed/domainbed/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d5cf43401e8f86ef"}},{"code_sha256_prefix":"fc08ccc9405219ec","entry":"Kernel","repo":"cianeastwood/qrm","repo_kind":"official","path":"DomainBed/domainbed/algorithms.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/DomainBed/domainbed/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fc08ccc9405219ec"}},{"code_sha256_prefix":"764c53c6b2abeced","entry":"KernelDensityEstimator","repo":"cianeastwood/qrm","repo_kind":"official","path":"DomainBed/domainbed/algorithms.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/DomainBed/domainbed/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"764c53c6b2abeced"}},{"code_sha256_prefix":"f5c6e02dd24e9e46","entry":"Nonparametric","repo":"cianeastwood/qrm","repo_kind":"official","path":"DomainBed/domainbed/algorithms.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/DomainBed/domainbed/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f5c6e02dd24e9e46"}},{"code_sha256_prefix":"1a6beb9fb32196e3","entry":"continuous_bisect_fun_left","repo":"cianeastwood/qrm","repo_kind":"official","path":"WILDS/examples/algorithms/QRM.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/WILDS/examples/algorithms/QRM.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1a6beb9fb32196e3"}},{"code_sha256_prefix":"6b0b4fe25521becf","entry":"estimate_bandwidth","repo":"cianeastwood/qrm","repo_kind":"official","path":"WILDS/examples/algorithms/QRM.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/WILDS/examples/algorithms/QRM.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":"6b0b4fe25521becf"}},{"code_sha256_prefix":"57b8365dd88891c6","entry":"estimate_bandwidth","repo":"cianeastwood/qrm","repo_kind":"official","path":"DomainBed/domainbed/algorithms.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/DomainBed/domainbed/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"57b8365dd88891c6"}},{"code_sha256_prefix":"2b79d34cdd0e2676","entry":"EQRM","repo":"cianeastwood/qrm","repo_kind":"official","path":"DomainBed/domainbed/algorithms.py","file_url":"https://github.com/cianeastwood/qrm/blob/HEAD/DomainBed/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2b79d34cdd0e2676"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}