{"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/when-more-is-less-incorporating-additional","title":"When More is Less: Incorporating Additional Datasets Can Hurt Performance By Introducing Spurious Correlations","arxiv_id":"2308.04431","date":"2023-08-08","proceeding":null,"authors":["Rhys Compton","Lily Zhang","Aahlad Puli","Rajesh Ranganath"],"abstract":"In machine learning, incorporating more data is often seen as a reliable strategy for improving model performance; this work challenges that notion by demonstrating that the addition of external datasets in many cases can hurt the resulting model's performance. In a large-scale empirical study across combinations of four different open-source chest x-ray datasets and 9 different labels, we demonstrate that in 43% of settings, a model trained on data from two hospitals has poorer worst group accuracy over both hospitals than a model trained on just a single hospital's data. This surprising result occurs even though the added hospital makes the training distribution more similar to the test distribution. We explain that this phenomenon arises from the spurious correlation that emerges between the disease and hospital, due to hospital-specific image artifacts. We highlight the trade-off one encounters when training on multiple datasets, between the obvious benefit of additional data and insidious cost of the introduced spurious correlation. In some cases, balancing the dataset can remove the spurious correlation and improve performance, but it is not always an effective strategy. We contextualize our results within the literature on spurious correlations to help explain these outcomes. Our experiments underscore the importance of exercising caution when selecting training data for machine learning models, especially in settings where there is a risk of spurious correlations such as with medical imaging. The risks outlined highlight the need for careful data selection and model evaluation in future research and practice.","url_abs":"https://arxiv.org/abs/2308.04431v1","url_pdf":"https://arxiv.org/pdf/2308.04431v1.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":"when-more-is-less-incorporating-additional","repo_url":"https://github.com/basedrhys/ood-generalization","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2308.04431","atlas_url":"https://app.syntology.ai/?focus=2308.04431","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.04431"}},"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/basedrhys/ood-generalization","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":10,"unverified":2},"by_repo_kind":{"official":{"samples":12,"ran":10,"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":12,"samples":[{"code_sha256_prefix":"0946df67b41ca7e6","entry":"block_until_running","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/command_launchers.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/command_launchers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0946df67b41ca7e6"}},{"code_sha256_prefix":"e91f7d025aac4e1d","entry":"cat","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/algorithms.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e91f7d025aac4e1d"}},{"code_sha256_prefix":"81186e8df1f9769c","entry":"compute_opt_thresh","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/datasets.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"81186e8df1f9769c"}},{"code_sha256_prefix":"b6530052a755f0c1","entry":"cross_entropy","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/algorithms.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/algorithms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b6530052a755f0c1"}},{"code_sha256_prefix":"501459823473afca","entry":"get_num_jobs","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/command_launchers.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/command_launchers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"501459823473afca"}},{"code_sha256_prefix":"a5ac56dac9b4dd4c","entry":"get_wandb_name","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/utils.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"a5ac56dac9b4dd4c"}},{"code_sha256_prefix":"5f576ed342c48a0a","entry":"make_weights_for_balanced_classes","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/lib/misc.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/lib/misc.py","link_basis":"harvester_set","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":"5f576ed342c48a0a"}},{"code_sha256_prefix":"18e820e42046bc45","entry":"split_dataset","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/lib/misc.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/lib/misc.py","link_basis":"plan_row","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":"18e820e42046bc45"}},{"code_sha256_prefix":"6957fee49762783e","entry":"torch_bernoulli","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/datasets.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"6957fee49762783e"}},{"code_sha256_prefix":"8eeb5c1550b93d16","entry":"torch_xor","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/datasets.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/datasets.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"8eeb5c1550b93d16"}},{"code_sha256_prefix":"b0bc80b1655a6802","entry":"get_algorithm_class","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/algorithms.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/algorithms.py","link_basis":"harvester_set","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":"b0bc80b1655a6802"}},{"code_sha256_prefix":"af3c9a80c8fd1f7a","entry":"print_row","repo":"basedrhys/ood-generalization","repo_kind":"official","path":"clinicaldg/lib/misc.py","file_url":"https://github.com/basedrhys/ood-generalization/blob/HEAD/clinicaldg/lib/misc.py","link_basis":"harvester_set","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":"af3c9a80c8fd1f7a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}