{"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/deep-stable-learning-for-out-of-distribution","title":"Deep Stable Learning for Out-Of-Distribution Generalization","arxiv_id":"2104.07876","date":"2021-04-16","proceeding":"CVPR 2021 1","authors":["Xingxuan Zhang","Peng Cui","Renzhe Xu","Linjun Zhou","Yue He","Zheyan Shen"],"abstract":"Approaches based on deep neural networks have achieved striking performance when testing data and training data share similar distribution, but can significantly fail otherwise. Therefore, eliminating the impact of distribution shifts between training and testing data is crucial for building performance-promising deep models. Conventional methods assume either the known heterogeneity of training data (e.g. domain labels) or the approximately equal capacities of different domains. In this paper, we consider a more challenging case where neither of the above assumptions holds. We propose to address this problem by removing the dependencies between features via learning weights for training samples, which helps deep models get rid of spurious correlations and, in turn, concentrate more on the true connection between discriminative features and labels. Extensive experiments clearly demonstrate the effectiveness of our method on multiple distribution generalization benchmarks compared with state-of-the-art counterparts. Through extensive experiments on distribution generalization benchmarks including PACS, VLCS, MNIST-M, and NICO, we show the effectiveness of our method compared with state-of-the-art counterparts.","url_abs":"https://arxiv.org/abs/2104.07876v1","url_pdf":"https://arxiv.org/pdf/2104.07876v1.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":"deep-stable-learning-for-out-of-distribution","repo_url":"https://github.com/xxgege/StableNet","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"deep-stable-learning-for-out-of-distribution","repo_url":"https://github.com/coling2022-depro/depro","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"out-of-distribution-generalization","task_name":"Out-of-Distribution Generalization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/domain-generalization-on-pacs-2","task":"Domain Generalization","dataset":"PACS","model":"StableNet (ResNet-18)","rank_in_archive_order":56,"of":133,"metrics":{"Average Accuracy":"84.69"},"uses_additional_data":false},{"leaderboard":"/sota/domain-generalization-on-vlcs","task":"Domain Generalization","dataset":"VLCS","model":"StableNet (ResNet-18)","rank_in_archive_order":35,"of":37,"metrics":{"Average Accuracy":"77.65"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2104.07876","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.07876"}},"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/xxgege/StableNet","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/coling2022-depro/depro","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":8},"by_repo_kind":{"listed":{"samples":8,"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":"9d0e82a8b354cff0","entry":"accuracy","repo":"coling2022-depro/depro","repo_kind":"listed","path":"utilis/matrix.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/utilis/matrix.py","link_basis":"harvester_set","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":"9d0e82a8b354cff0"}},{"code_sha256_prefix":"2b4521bc664e87e8","entry":"check_data","repo":"coling2022-depro/depro","repo_kind":"listed","path":"utilis/datasets.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/utilis/datasets.py","link_basis":"harvester_set","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":"2b4521bc664e87e8"}},{"code_sha256_prefix":"5c767fa480d5a676","entry":"get_seq_len","repo":"coling2022-depro/depro","repo_kind":"listed","path":"info_regularizer.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/info_regularizer.py","link_basis":"harvester_set","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":"5c767fa480d5a676"}},{"code_sha256_prefix":"c240d0a3bb18b417","entry":"normalize_gpu","repo":"coling2022-depro/depro","repo_kind":"listed","path":"loss_reweighting.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/loss_reweighting.py","link_basis":"harvester_set","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":"c240d0a3bb18b417"}},{"code_sha256_prefix":"60e1d04034252829","entry":"processSentences","repo":"coling2022-depro/depro","repo_kind":"listed","path":"utilis/datasets.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/utilis/datasets.py","link_basis":"harvester_set","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":"60e1d04034252829"}},{"code_sha256_prefix":"ad1bc3f442fb32b4","entry":"sd","repo":"coling2022-depro/depro","repo_kind":"listed","path":"loss_reweighting.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/loss_reweighting.py","link_basis":"harvester_set","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":"ad1bc3f442fb32b4"}},{"code_sha256_prefix":"99b4f7055e888783","entry":"sd_gpu","repo":"coling2022-depro/depro","repo_kind":"listed","path":"loss_reweighting.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/loss_reweighting.py","link_basis":"harvester_set","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":"99b4f7055e888783"}},{"code_sha256_prefix":"d0fa801031b6afba","entry":"train_mi_upper_estimator","repo":"coling2022-depro/depro","repo_kind":"listed","path":"info_regularizer.py","file_url":"https://github.com/coling2022-depro/depro/blob/HEAD/info_regularizer.py","link_basis":"harvester_set","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":"d0fa801031b6afba"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}