{"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-fair-loss-function-for-network-pruning","title":"A Fair Loss Function for Network Pruning","arxiv_id":"2211.10285","date":"2022-11-18","proceeding":null,"authors":["Robbie Meyer","Alexander Wong"],"abstract":"Model pruning can enable the deployment of neural networks in environments with resource constraints. While pruning may have a small effect on the overall performance of the model, it can exacerbate existing biases into the model such that subsets of samples see significantly degraded performance. In this paper, we introduce the performance weighted loss function, a simple modified cross-entropy loss function that can be used to limit the introduction of biases during pruning. Experiments using the CelebA, Fitzpatrick17k and CIFAR-10 datasets demonstrate that the proposed method is a simple and effective tool that can enable existing pruning methods to be used in fairness sensitive contexts. Code used to produce all experiments contained in this paper can be found at https://github.com/robbiemeyer/pw_loss_pruning.","url_abs":"https://arxiv.org/abs/2211.10285v2","url_pdf":"https://arxiv.org/pdf/2211.10285v2.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-fair-loss-function-for-network-pruning","repo_url":"https://github.com/robbiemeyer/pw_loss_pruning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"fairness","task_name":"Fairness"},{"task_slug":"lesion-classification","task_name":"Lesion Classification"},{"task_slug":"network-pruning","task_name":"Network Pruning"},{"task_slug":"skin-lesion-classification","task_name":"Skin Lesion Classification"}],"methods":[{"method_slug":"pruning","method_name":"Pruning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2211.10285","atlas_url":"https://app.syntology.ai/?focus=2211.10285","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.10285"}},"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":"deterministic:regex_extraction","url":"https://github.com/robbiemeyer/pw","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/robbiemeyer/pw_loss_pruning","reach":null}],"summary":{"ran":6,"ran_draft_wrong":2,"unverified":4},"by_repo_kind":{"official":{"samples":12,"ran":8,"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":"8796d407ae814c41","entry":"BasicBlock","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"8796d407ae814c41"}},{"code_sha256_prefix":"f97529d458bbb259","entry":"Conv2dBN","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"f97529d458bbb259"}},{"code_sha256_prefix":"d1fd6e80cc50df59","entry":"PaddingLayer","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"d1fd6e80cc50df59"}},{"code_sha256_prefix":"9891b7ba3ed65671","entry":"PrunableConv2d","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"9891b7ba3ed65671"}},{"code_sha256_prefix":"ba15c200d4a78a25","entry":"ScoreWeightedAutoBot","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"ba15c200d4a78a25"}},{"code_sha256_prefix":"626f8f15d140082e","entry":"fix_labels","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"626f8f15d140082e"}},{"code_sha256_prefix":"85883a001a9d4609","entry":"get_all_predictions","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"85883a001a9d4609"}},{"code_sha256_prefix":"66a173f0a926547a","entry":"sw_weights","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"66a173f0a926547a"}},{"code_sha256_prefix":"5e43e5a4795fb217","entry":"AutoBot","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"5e43e5a4795fb217"}},{"code_sha256_prefix":"3199bb828218ee5b","entry":"SoftDataset","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"3199bb828218ee5b"}},{"code_sha256_prefix":"c6f437d1e742b295","entry":"replace_conv2_layers","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"c6f437d1e742b295"}},{"code_sha256_prefix":"03345979ad9b651d","entry":"revert_conv2_layers","repo":"robbiemeyer/pw_loss_pruning","repo_kind":"official","path":"prune/pruner.py","file_url":"https://github.com/robbiemeyer/pw_loss_pruning/blob/HEAD/prune/pruner.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":"03345979ad9b651d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}