{"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/a-general-framework-for-learning-from-weak","title":"A General Framework for Learning from Weak Supervision","arxiv_id":"2402.01922","date":"2024-02-02","proceeding":null,"authors":["Hao Chen","Jindong Wang","Lei Feng","Xiang Li","Yidong Wang","Xing Xie","Masashi Sugiyama","Rita Singh","Bhiksha Raj"],"abstract":"Weakly supervised learning generally faces challenges in applicability to various scenarios with diverse weak supervision and in scalability due to the complexity of existing algorithms, thereby hindering the practical deployment. This paper introduces a general framework for learning from weak supervision (GLWS) with a novel algorithm. Central to GLWS is an Expectation-Maximization (EM) formulation, adeptly accommodating various weak supervision sources, including instance partial labels, aggregate statistics, pairwise observations, and unlabeled data. We further present an advanced algorithm that significantly simplifies the EM computational demands using a Non-deterministic Finite Automaton (NFA) along with a forward-backward algorithm, which effectively reduces time complexity from quadratic or factorial often required in existing solutions to linear scale. The problem of learning from arbitrary weak supervision is therefore converted to the NFA modeling of them. GLWS not only enhances the scalability of machine learning models but also demonstrates superior performance and versatility across 11 weak supervision scenarios. We hope our work paves the way for further advancements and practical deployment in this field.","url_abs":"https://arxiv.org/abs/2402.01922v3","url_pdf":"https://arxiv.org/pdf/2402.01922v3.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":"a-general-framework-for-learning-from-weak","repo_url":"https://github.com/hhhhhhao/general-framework-weak-supervision","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"weakly-supervised-learning","task_name":"Weakly-supervised Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2402.01922","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.01922"}},"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/hhhhhhao/general-framework-weak-supervision","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":3,"ran":12,"unverified":7},"by_repo_kind":{"official":{"samples":22,"ran":15,"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":22,"samples":[{"code_sha256_prefix":"4a0ac9d611e018bc","entry":"AutoContrast","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/rand_aug.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/rand_aug.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a0ac9d611e018bc"}},{"code_sha256_prefix":"61ed09bbdb8adb72","entry":"Brightness","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/rand_aug.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/rand_aug.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":"61ed09bbdb8adb72"}},{"code_sha256_prefix":"5e4ee5c45933ae09","entry":"Color","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/rand_aug.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/rand_aug.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":"5e4ee5c45933ae09"}},{"code_sha256_prefix":"9cb870aea654a626","entry":"bag_collate_fn","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/base_datasets.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/base_datasets.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":"9cb870aea654a626"}},{"code_sha256_prefix":"583f9780bdd00a45","entry":"conv3x3","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/preact_resnet.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/preact_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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"583f9780bdd00a45"}},{"code_sha256_prefix":"d4a2791e30483900","entry":"create_mask","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/core/nfa.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/core/nfa.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":"d4a2791e30483900"}},{"code_sha256_prefix":"b1417ed32c2e4043","entry":"create_multi_ins_graph","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/core/nfa.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/core/nfa.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":"b1417ed32c2e4043"}},{"code_sha256_prefix":"cde1fc2eb8cb26cd","entry":"create_proportion_graph","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/core/nfa.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/core/nfa.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":"cde1fc2eb8cb26cd"}},{"code_sha256_prefix":"c35ca4772f06187d","entry":"get_dataloader","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/base_data.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/base_data.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":"c35ca4772f06187d"}},{"code_sha256_prefix":"326d3f64fe176c15","entry":"get_partial_labels","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/imprecise_label.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/imprecise_label.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":"326d3f64fe176c15"}},{"code_sha256_prefix":"2714f01391c258a3","entry":"get_partial_noisy_labels","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/imprecise_label.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/imprecise_label.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":"2714f01391c258a3"}},{"code_sha256_prefix":"3d2e20212ece0354","entry":"get_semisup_labels","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/imprecise_label.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/imprecise_label.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":"3d2e20212ece0354"}},{"code_sha256_prefix":"88f4962784e09b88","entry":"param_groups_weight_decay","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/utils.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/utils.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"88f4962784e09b88"}},{"code_sha256_prefix":"4d728036343fc563","entry":"preact_resnet18","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/preact_resnet.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/preact_resnet.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":"4d728036343fc563"}},{"code_sha256_prefix":"4c0668013863ad3f","entry":"resize_pos_embed_vit","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/utils.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/utils.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":"4c0668013863ad3f"}},{"code_sha256_prefix":"c7b0093e888cfc83","entry":"get_data","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/base_data.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/base_data.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":"c7b0093e888cfc83"}},{"code_sha256_prefix":"1ff5d0514a4192c7","entry":"get_img_transform","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/datasets/base_datasets.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/datasets/base_datasets.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":"1ff5d0514a4192c7"}},{"code_sha256_prefix":"ef61eb580d048fbd","entry":"inception_resnet_v2","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/inception_resnet.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/inception_resnet.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":"ef61eb580d048fbd"}},{"code_sha256_prefix":"b158ea331635a6c9","entry":"load_checkpoint","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/utils.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/utils.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":"b158ea331635a6c9"}},{"code_sha256_prefix":"eea49993a0e6e109","entry":"resnet18","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/resnet.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/resnet.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":"eea49993a0e6e109"}},{"code_sha256_prefix":"58ef386297161b88","entry":"resnet34","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/resnet.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/resnet.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":"58ef386297161b88"}},{"code_sha256_prefix":"511c83e45637d4f3","entry":"resnet50","repo":"hhhhhhao/general-framework-weak-supervision","repo_kind":"official","path":"src/nets/resnet.py","file_url":"https://github.com/hhhhhhao/general-framework-weak-supervision/blob/HEAD/src/nets/resnet.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":"511c83e45637d4f3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}