{"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/bayes-optimal-fair-classification-with-linear","title":"Bayes-Optimal Fair Classification with Linear Disparity Constraints via Pre-, In-, and Post-processing","arxiv_id":"2402.02817","date":"2024-02-05","proceeding":null,"authors":["Xianli Zeng","Guang Cheng","Edgar Dobriban"],"abstract":"Machine learning algorithms may have disparate impacts on protected groups. To address this, we develop methods for Bayes-optimal fair classification, aiming to minimize classification error subject to given group fairness constraints. We introduce the notion of \\emph{linear disparity measures}, which are linear functions of a probabilistic classifier; and \\emph{bilinear disparity measures}, which are also linear in the group-wise regression functions. We show that several popular disparity measures -- the deviations from demographic parity, equality of opportunity, and predictive equality -- are bilinear. We find the form of Bayes-optimal fair classifiers under a single linear disparity measure, by uncovering a connection with the Neyman-Pearson lemma. For bilinear disparity measures, Bayes-optimal fair classifiers become group-wise thresholding rules. Our approach can also handle multiple fairness constraints (such as equalized odds), and the common scenario when the protected attribute cannot be used at the prediction phase. Leveraging our theoretical results, we design methods that learn fair Bayes-optimal classifiers under bilinear disparity constraints. Our methods cover three popular approaches to fairness-aware classification, via pre-processing (Fair Up- and Down-Sampling), in-processing (Fair Cost-Sensitive Classification) and post-processing (a Fair Plug-In Rule). Our methods control disparity directly while achieving near-optimal fairness-accuracy tradeoffs. We show empirically that our methods compare favorably to existing algorithms.","url_abs":"https://arxiv.org/abs/2402.02817v2","url_pdf":"https://arxiv.org/pdf/2402.02817v2.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":"bayes-optimal-fair-classification-with-linear","repo_url":"https://github.com/xianlizeng/bayes-optimal-fair-classification","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"fairness","task_name":"Fairness"},{"task_slug":"lemma","task_name":"LEMMA"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.02817","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.02817"}},"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/xianlizeng/bayes-optimal-fair-classification","reach":null}],"summary":{"ran_honours":2},"by_repo_kind":{"official":{"samples":2,"ran":2,"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":"ea36a9f42763de9c","entry":"get_level","repo":"xianlizeng/bayes-optimal-fair-classification","repo_kind":"official","path":"Algorithms/algorithm_FUDS.py","file_url":"https://github.com/xianlizeng/bayes-optimal-fair-classification/blob/HEAD/Algorithms/algorithm_FUDS.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea36a9f42763de9c"}},{"code_sha256_prefix":"0b6dd0a828780be8","entry":"get_training_parameters","repo":"xianlizeng/bayes-optimal-fair-classification","repo_kind":"official","path":"Algorithms/algorithm_FUDS.py","file_url":"https://github.com/xianlizeng/bayes-optimal-fair-classification/blob/HEAD/Algorithms/algorithm_FUDS.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b6dd0a828780be8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}