{"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/fairlib-a-unified-framework-for-assessing-and","title":"fairlib: A Unified Framework for Assessing and Improving Classification Fairness","arxiv_id":"2205.01876","date":"2022-05-04","proceeding":null,"authors":["Xudong Han","Aili Shen","Yitong Li","Lea Frermann","Timothy Baldwin","Trevor Cohn"],"abstract":"This paper presents fairlib, an open-source framework for assessing and improving classification fairness. It provides a systematic framework for quickly reproducing existing baseline models, developing new methods, evaluating models with different metrics, and visualizing their results. Its modularity and extensibility enable the framework to be used for diverse types of inputs, including natural language, images, and audio. In detail, we implement 14 debiasing methods, including pre-processing, at-training-time, and post-processing approaches. The built-in metrics cover the most commonly used fairness criterion and can be further generalized and customized for fairness evaluation.","url_abs":"https://arxiv.org/abs/2205.01876v1","url_pdf":"https://arxiv.org/pdf/2205.01876v1.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":"fairlib-a-unified-framework-for-assessing-and","repo_url":"https://github.com/HanXudong/fairlib","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"fairlib-a-unified-framework-for-assessing-and","repo_url":"https://github.com/hanxudong/fair_nlp_classification","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"fairness","task_name":"Fairness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2205.01876","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.01876"}},"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/hanxudong/fair_nlp_classification","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/HanXudong/fairlib","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":1,"unverified":6},"by_repo_kind":{"official":{"samples":7,"ran":1,"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":"39f6c590c770bf56","entry":"color_grayscale_arr","repo":"HanXudong/fairlib","repo_kind":"official","path":"fairlib/datasets/coloredMNIST/MNIST.py","file_url":"https://github.com/HanXudong/fairlib/blob/HEAD/fairlib/datasets/coloredMNIST/MNIST.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"39f6c590c770bf56"}},{"code_sha256_prefix":"726ea9e4ff6f5e2c","entry":"convert_object_type_to_category","repo":"HanXudong/fairlib","repo_kind":"official","path":"fairlib/datasets/Adult/Adult.py","file_url":"https://github.com/HanXudong/fairlib/blob/HEAD/fairlib/datasets/Adult/Adult.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":"726ea9e4ff6f5e2c"}},{"code_sha256_prefix":"8b903d41a49eb730","entry":"load_trustpilots","repo":"HanXudong/fairlib","repo_kind":"official","path":"fairlib/datasets/TP_POS/pos.py","file_url":"https://github.com/HanXudong/fairlib/blob/HEAD/fairlib/datasets/TP_POS/pos.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":"8b903d41a49eb730"}},{"code_sha256_prefix":"437aa8ad9824a771","entry":"load_web_eng","repo":"HanXudong/fairlib","repo_kind":"official","path":"fairlib/datasets/TP_POS/pos.py","file_url":"https://github.com/HanXudong/fairlib/blob/HEAD/fairlib/datasets/TP_POS/pos.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":"437aa8ad9824a771"}},{"code_sha256_prefix":"bf5f54a02e90d15f","entry":"preprocessing","repo":"HanXudong/fairlib","repo_kind":"official","path":"fairlib/datasets/Adult/Adult.py","file_url":"https://github.com/HanXudong/fairlib/blob/HEAD/fairlib/datasets/Adult/Adult.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":"bf5f54a02e90d15f"}},{"code_sha256_prefix":"a44cb9421db7cccc","entry":"preprocessing","repo":"HanXudong/fairlib","repo_kind":"official","path":"fairlib/datasets/COMPAS/COMPAS.py","file_url":"https://github.com/HanXudong/fairlib/blob/HEAD/fairlib/datasets/COMPAS/COMPAS.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":"a44cb9421db7cccc"}},{"code_sha256_prefix":"6a047b18b8a5a0cc","entry":"process_colored_MNIST","repo":"HanXudong/fairlib","repo_kind":"official","path":"fairlib/datasets/coloredMNIST/MNIST.py","file_url":"https://github.com/HanXudong/fairlib/blob/HEAD/fairlib/datasets/coloredMNIST/MNIST.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":"6a047b18b8a5a0cc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}