{"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/kernelized-heterogeneous-risk-minimization","title":"Kernelized Heterogeneous Risk Minimization","arxiv_id":"2110.12425","date":"2021-10-24","proceeding":null,"authors":["Jiashuo Liu","Zheyuan Hu","Peng Cui","Bo Li","Zheyan Shen"],"abstract":"The ability to generalize under distributional shifts is essential to reliable machine learning, while models optimized with empirical risk minimization usually fail on non-$i.i.d$ testing data. Recently, invariant learning methods for out-of-distribution (OOD) generalization propose to find causally invariant relationships with multi-environments. However, modern datasets are frequently multi-sourced without explicit source labels, rendering many invariant learning methods inapplicable. In this paper, we propose Kernelized Heterogeneous Risk Minimization (KerHRM) algorithm, which achieves both the latent heterogeneity exploration and invariant learning in kernel space, and then gives feedback to the original neural network by appointing invariant gradient direction. We theoretically justify our algorithm and empirically validate the effectiveness of our algorithm with extensive experiments.","url_abs":"https://arxiv.org/abs/2110.12425v1","url_pdf":"https://arxiv.org/pdf/2110.12425v1.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":"kernelized-heterogeneous-risk-minimization","repo_url":"https://github.com/ljsthu/kernelized-hrm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2110.12425","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.12425"}},"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":"deterministic:regex_extraction","url":"https://github.com/LJSthu/Kernelized-HRM","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ljsthu/kernelized-hrm","reach":{"status":"ok"}}],"summary":{"ran_honours":2,"ran":4,"ran_draft_wrong":6,"unverified":3},"by_repo_kind":{"official":{"samples":15,"ran":12,"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":15,"samples":[{"code_sha256_prefix":"3b6283c878822a61","entry":"sign","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim2.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim2.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3b6283c878822a61"}},{"code_sha256_prefix":"bf437be63ede2989","entry":"Cluster","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"bf437be63ede2989"}},{"code_sha256_prefix":"27ab67ec9210e7b3","entry":"LinearRegression","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"27ab67ec9210e7b3"}},{"code_sha256_prefix":"11d0bc2a1914365c","entry":"MLP","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"11d0bc2a1914365c"}},{"code_sha256_prefix":"1c99d2dc9ab7891c","entry":"OLS","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"1c99d2dc9ab7891c"}},{"code_sha256_prefix":"19807066944b363c","entry":"compute_num_params","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"19807066944b363c"}},{"code_sha256_prefix":"f70cb7870823be0b","entry":"data_generation","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim2.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim2.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f70cb7870823be0b"}},{"code_sha256_prefix":"3b4fd708358d370f","entry":"generate_data","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3b4fd708358d370f"}},{"code_sha256_prefix":"fd4759ad594a444e","entry":"generate_data_list","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"fd4759ad594a444e"}},{"code_sha256_prefix":"d54bbed2b4ddf817","entry":"generate_data_list","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"d54bbed2b4ddf817"}},{"code_sha256_prefix":"9ca7f76887e2e090","entry":"pretty","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"9ca7f76887e2e090"}},{"code_sha256_prefix":"063084ef6602865c","entry":"pretty","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"063084ef6602865c"}},{"code_sha256_prefix":"23e8900a6cf8f63a","entry":"compute_NTF","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"23e8900a6cf8f63a"}},{"code_sha256_prefix":"08d53c1a25fc4fe1","entry":"generate_data","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"08d53c1a25fc4fe1"}},{"code_sha256_prefix":"56efc9e5e87bde34","entry":"main_KernelHRM","repo":"ljsthu/kernelized-hrm","repo_kind":"official","path":"KernelHRM_sim1.py","file_url":"https://github.com/ljsthu/kernelized-hrm/blob/HEAD/KernelHRM_sim1.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":"56efc9e5e87bde34"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}