{"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/quantifying-social-biases-in-nlp-a","title":"Quantifying Social Biases in NLP: A Generalization and Empirical Comparison of Extrinsic Fairness Metrics","arxiv_id":"2106.14574","date":"2021-06-28","proceeding":null,"authors":["Paula Czarnowska","Yogarshi Vyas","Kashif Shah"],"abstract":"Measuring bias is key for better understanding and addressing unfairness in NLP/ML models. This is often done via fairness metrics which quantify the differences in a model's behaviour across a range of demographic groups. In this work, we shed more light on the differences and similarities between the fairness metrics used in NLP. First, we unify a broad range of existing metrics under three generalized fairness metrics, revealing the connections between them. Next, we carry out an extensive empirical comparison of existing metrics and demonstrate that the observed differences in bias measurement can be systematically explained via differences in parameter choices for our generalized metrics.","url_abs":"https://arxiv.org/abs/2106.14574v1","url_pdf":"https://arxiv.org/pdf/2106.14574v1.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":"quantifying-social-biases-in-nlp-a","repo_url":"https://github.com/amazon-science/generalized-fairness-metrics","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"fairness","task_name":"Fairness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.14574","atlas_url":"https://app.syntology.ai/?focus=2106.14574","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.14574"}},"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/amazon-science/generalized-fairness-metrics","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":9,"unverified":1},"by_repo_kind":{"listed":{"samples":10,"ran":9,"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":"117323a1352f3035","entry":"convert_line","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"src/models/process_predictions.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/src/models/process_predictions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"117323a1352f3035"}},{"code_sha256_prefix":"64713e46413c2156","entry":"convert_line_seq","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"src/models/process_predictions.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/src/models/process_predictions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"64713e46413c2156"}},{"code_sha256_prefix":"a1a2002ce03c7d63","entry":"get_file_paths","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a1a2002ce03c7d63"}},{"code_sha256_prefix":"099e071760bdb9bd","entry":"get_name_from_path","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"099e071760bdb9bd"}},{"code_sha256_prefix":"5d431c8ad5f62afe","entry":"is_tokenized","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"src/models/turn_data_to_json.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/src/models/turn_data_to_json.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5d431c8ad5f62afe"}},{"code_sha256_prefix":"bdcab7b8c2b76f8f","entry":"join_tokens","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"src/utils.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/src/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bdcab7b8c2b76f8f"}},{"code_sha256_prefix":"7119d0199094dd5f","entry":"recursive_apply","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"expanded_checklist/checklist/editor.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/expanded_checklist/checklist/editor.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7119d0199094dd5f"}},{"code_sha256_prefix":"43c9cb585e0725c1","entry":"replace_mask","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"expanded_checklist/checklist/editor.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/expanded_checklist/checklist/editor.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"43c9cb585e0725c1"}},{"code_sha256_prefix":"e1a1ac537cadf5d0","entry":"softmax","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"src/models/process_predictions.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/src/models/process_predictions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e1a1ac537cadf5d0"}},{"code_sha256_prefix":"157c60c142af6297","entry":"recursive_format","repo":"amazon-science/generalized-fairness-metrics","repo_kind":"listed","path":"expanded_checklist/checklist/editor.py","file_url":"https://github.com/amazon-science/generalized-fairness-metrics/blob/HEAD/expanded_checklist/checklist/editor.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"157c60c142af6297"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}