{"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/open-sampling-exploring-out-of-distribution","title":"Open-Sampling: Exploring Out-of-Distribution data for Re-balancing Long-tailed datasets","arxiv_id":"2206.08802","date":"2022-06-17","proceeding":null,"authors":["Hongxin Wei","Lue Tao","Renchunzi Xie","Lei Feng","Bo An"],"abstract":"Deep neural networks usually perform poorly when the training dataset suffers from extreme class imbalance. Recent studies found that directly training with out-of-distribution data (i.e., open-set samples) in a semi-supervised manner would harm the generalization performance. In this work, we theoretically show that out-of-distribution data can still be leveraged to augment the minority classes from a Bayesian perspective. Based on this motivation, we propose a novel method called Open-sampling, which utilizes open-set noisy labels to re-balance the class priors of the training dataset. For each open-set instance, the label is sampled from our pre-defined distribution that is complementary to the distribution of original class priors. We empirically show that Open-sampling not only re-balances the class priors but also encourages the neural network to learn separable representations. Extensive experiments demonstrate that our proposed method significantly outperforms existing data re-balancing methods and can boost the performance of existing state-of-the-art methods.","url_abs":"https://arxiv.org/abs/2206.08802v3","url_pdf":"https://arxiv.org/pdf/2206.08802v3.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":"open-sampling-exploring-out-of-distribution","repo_url":"https://github.com/hongxin001/logitnorm_ood","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"open-sampling-exploring-out-of-distribution","repo_url":"https://github.com/hongxin001/open-sampling","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"open-sampling-exploring-out-of-distribution","repo_url":"https://github.com/hongxin001/ODNL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2206.08802","atlas_url":"https://app.syntology.ai/?focus=2206.08802","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2206.08802"}},"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/hongxin001/logitnorm_ood","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hongxin001/ODNL","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hongxin001/open-sampling","reach":null}],"summary":{"ran":2,"ran_draft_wrong":3,"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":10,"samples":[{"code_sha256_prefix":"ab2b524fe8bece7c","entry":"BasicBlock","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ab2b524fe8bece7c"}},{"code_sha256_prefix":"5b47587f1215ca8d","entry":"ResNet_s","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.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":"5b47587f1215ca8d"}},{"code_sha256_prefix":"aa5465518a0ebdbf","entry":"create_ood_noise","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aa5465518a0ebdbf"}},{"code_sha256_prefix":"6526f339ad3f174a","entry":"get_data_transform","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6526f339ad3f174a"}},{"code_sha256_prefix":"2c6392d2c02f6238","entry":"resnet32","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2c6392d2c02f6238"}},{"code_sha256_prefix":"465c1568006e85c1","entry":"BaseAlg","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.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":"465c1568006e85c1"}},{"code_sha256_prefix":"ce4dfe90431b8715","entry":"OEScratch","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.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":"ce4dfe90431b8715"}},{"code_sha256_prefix":"6c523c58024ba795","entry":"TinyImages","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.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":"6c523c58024ba795"}},{"code_sha256_prefix":"0cdf090fff5d2106","entry":"create_model","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.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":"0cdf090fff5d2106"}},{"code_sha256_prefix":"f15b32e86407417e","entry":"create_ood_dataset","repo":"hongxin001/open-sampling","repo_kind":"official","path":"alg/oe.py","file_url":"https://github.com/hongxin001/open-sampling/blob/HEAD/alg/oe.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":"f15b32e86407417e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}