{"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/spear-semi-supervised-data-programming-in","title":"SPEAR : Semi-supervised Data Programming in Python","arxiv_id":"2108.00373","date":"2021-08-01","proceeding":null,"authors":["Guttu Sai Abhishek","Harshad Ingole","Parth Laturia","Vineeth Dorna","Ayush Maheshwari","Rishabh Iyer","Ganesh Ramakrishnan"],"abstract":"We present SPEAR, an open-source python library for data programming with semi supervision. The package implements several recent data programming approaches including facility to programmatically label and build training data. SPEAR facilitates weak supervision in the form of heuristics (or rules) and association of noisy labels to the training dataset. These noisy labels are aggregated to assign labels to the unlabeled data for downstream tasks. We have implemented several label aggregation approaches that aggregate the noisy labels and then train using the noisily labeled set in a cascaded manner. Our implementation also includes other approaches that jointly aggregate and train the model for text classification tasks. Thus, in our python package, we integrate several cascade and joint data-programming approaches while also providing the facility of data programming by letting the user define labeling functions or rules. The code and tutorial notebooks are available at https://github.com/decile-team/spear. Further, extensive documentation can be found at https://spear-decile.readthedocs.io/. Video tutorials demonstrating the usage of our package are available here. We also present some real-world use cases of SPEAR.","url_abs":"https://arxiv.org/abs/2108.00373v3","url_pdf":"https://arxiv.org/pdf/2108.00373v3.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":"spear-semi-supervised-data-programming-in","repo_url":"https://github.com/decile-team/spear","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2108.00373","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.00373"}},"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/decile-team/spear","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":15},"by_repo_kind":{"official":{"samples":15,"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":"f4c73bbe185ea28b","entry":"change_values","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/data_feeder_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/data_feeder_utils.py","link_basis":"first_harvest_node","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":"f4c73bbe185ea28b"}},{"code_sha256_prefix":"b36fdde18d1f001e","entry":"convert_m_to_l","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/utils.py","link_basis":"first_harvest_node","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":"b36fdde18d1f001e"}},{"code_sha256_prefix":"3eb0654911de3b63","entry":"convert_weights_to_m","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/utils.py","link_basis":"first_harvest_node","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":"3eb0654911de3b63"}},{"code_sha256_prefix":"ea3b6a2cd138e70a","entry":"create_initializer","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/networks.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/networks.py","link_basis":"first_harvest_node","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":"ea3b6a2cd138e70a"}},{"code_sha256_prefix":"fd9bef6765a27691","entry":"exp_term_for_constraints","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/pr_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/pr_utils.py","link_basis":"first_harvest_node","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":"fd9bef6765a27691"}},{"code_sha256_prefix":"ee629399ec8f4d17","entry":"f_network_fully_connected","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/networks.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/networks.py","link_basis":"first_harvest_node","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":"ee629399ec8f4d17"}},{"code_sha256_prefix":"7128555c09133ba5","entry":"generalized_cross_entropy","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/gen_cross_entropy_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/gen_cross_entropy_utils.py","link_basis":"first_harvest_node","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":"7128555c09133ba5"}},{"code_sha256_prefix":"e25e2eb386bb3e22","entry":"generalized_cross_entropy_bernoulli","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/gen_cross_entropy_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/gen_cross_entropy_utils.py","link_basis":"first_harvest_node","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":"e25e2eb386bb3e22"}},{"code_sha256_prefix":"d70983758398e44a","entry":"get_best_checkpoint","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/checkmate.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/checkmate.py","link_basis":"first_harvest_node","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":"d70983758398e44a"}},{"code_sha256_prefix":"a8b96ecb6519f796","entry":"get_data","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/utils.py","link_basis":"first_harvest_node","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":"a8b96ecb6519f796"}},{"code_sha256_prefix":"daf10336705d9165","entry":"get_q_y_from_p","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/pr_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/pr_utils.py","link_basis":"first_harvest_node","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":"daf10336705d9165"}},{"code_sha256_prefix":"3b14e197324d4427","entry":"get_rule_classes","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/data_feeder_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/data_feeder_utils.py","link_basis":"first_harvest_node","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":"3b14e197324d4427"}},{"code_sha256_prefix":"0fc0c47a7295eb37","entry":"load_data","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/data_feeder_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/data_feeder_utils.py","link_basis":"first_harvest_node","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":"0fc0c47a7295eb37"}},{"code_sha256_prefix":"fa4436cec7d0a880","entry":"pr_product_term","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/pr_utils.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/pr_utils.py","link_basis":"first_harvest_node","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":"fa4436cec7d0a880"}},{"code_sha256_prefix":"8a44e31a2ba74994","entry":"w_network_fully_connected","repo":"decile-team/spear","repo_kind":"official","path":"spear/Implyloss/networks.py","file_url":"https://github.com/decile-team/spear/blob/HEAD/spear/Implyloss/networks.py","link_basis":"first_harvest_node","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":"8a44e31a2ba74994"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}