{"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/occamnets-mitigating-dataset-bias-by-favoring","title":"OccamNets: Mitigating Dataset Bias by Favoring Simpler Hypotheses","arxiv_id":"2204.02426","date":"2022-04-05","proceeding":null,"authors":["Robik Shrestha","Kushal Kafle","Christopher Kanan"],"abstract":"Dataset bias and spurious correlations can significantly impair generalization in deep neural networks. Many prior efforts have addressed this problem using either alternative loss functions or sampling strategies that focus on rare patterns. We propose a new direction: modifying the network architecture to impose inductive biases that make the network robust to dataset bias. Specifically, we propose OccamNets, which are biased to favor simpler solutions by design. OccamNets have two inductive biases. First, they are biased to use as little network depth as needed for an individual example. Second, they are biased toward using fewer image locations for prediction. While OccamNets are biased toward simpler hypotheses, they can learn more complex hypotheses if necessary. In experiments, OccamNets outperform or rival state-of-the-art methods run on architectures that do not incorporate these inductive biases. Furthermore, we demonstrate that when the state-of-the-art debiasing methods are combined with OccamNets results further improve.","url_abs":"https://arxiv.org/abs/2204.02426v5","url_pdf":"https://arxiv.org/pdf/2204.02426v5.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":"occamnets-mitigating-dataset-bias-by-favoring","repo_url":"https://github.com/erobic/occam-nets-v1","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"action-recognition-in-videos","task_name":"Action Recognition"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/action-recognition-on-bar","task":"Action Recognition","dataset":"BAR","model":"OccamResNet","rank_in_archive_order":3,"of":4,"metrics":{"Accuracy":"52.6"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2204.02426","atlas_url":"https://app.syntology.ai/?focus=2204.02426","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.02426"}},"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/erobic/occam-nets-v1","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"ran_draft_wrong":2,"ran_honours":1,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"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":"5030c4896494b3ff","entry":"build_non_linearity","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"models/occam_lib.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/models/occam_lib.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5030c4896494b3ff"}},{"code_sha256_prefix":"d9def42110729a85","entry":"conv1x1","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"models/variable_width_resnet.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/models/variable_width_resnet.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":"d9def42110729a85"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"models/variable_width_resnet.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/models/variable_width_resnet.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":"160bb14bd76201b4"}},{"code_sha256_prefix":"296d54b0c408de2e","entry":"map_imagenet_classes","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"datasets/image_net_dataset.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/datasets/image_net_dataset.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"296d54b0c408de2e"}},{"code_sha256_prefix":"f321f54723433661","entry":"pil_loader","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"datasets/image_net_dataset.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/datasets/image_net_dataset.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f321f54723433661"}},{"code_sha256_prefix":"be43891178e945b5","entry":"build_model","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"models/model_factory.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/models/model_factory.py","link_basis":"harvester_set","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":"be43891178e945b5"}},{"code_sha256_prefix":"e043344bc8ef3fda","entry":"get_early_exit_ixs","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"models/occam_lib.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/models/occam_lib.py","link_basis":"harvester_set","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":"e043344bc8ef3fda"}},{"code_sha256_prefix":"2c9286f3a295dcaf","entry":"get_early_exit_values","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"models/occam_lib.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/models/occam_lib.py","link_basis":"harvester_set","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":"2c9286f3a295dcaf"}},{"code_sha256_prefix":"a112dc051428bbc2","entry":"replace_layer_recursive","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"pytorch_grad_cam/ablation_cam_multilayer.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/pytorch_grad_cam/ablation_cam_multilayer.py","link_basis":"harvester_set","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":"a112dc051428bbc2"}},{"code_sha256_prefix":"9b8c38f00cd8f3aa","entry":"resnet10vw","repo":"erobic/occam-nets-v1","repo_kind":"official","path":"models/variable_width_resnet.py","file_url":"https://github.com/erobic/occam-nets-v1/blob/HEAD/models/variable_width_resnet.py","link_basis":"harvester_set","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":"9b8c38f00cd8f3aa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}