{"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/fair-classifiers-without-fair-training-an","title":"Fairness Without Harm: An Influence-Guided Active Sampling Approach","arxiv_id":"2402.12789","date":"2024-02-20","proceeding":null,"authors":["Jinlong Pang","Jialu Wang","Zhaowei Zhu","Yuanshun Yao","Chen Qian","Yang Liu"],"abstract":"The pursuit of fairness in machine learning (ML), ensuring that the models do not exhibit biases toward protected demographic groups, typically results in a compromise scenario. This compromise can be explained by a Pareto frontier where given certain resources (e.g., data), reducing the fairness violations often comes at the cost of lowering the model accuracy. In this work, we aim to train models that mitigate group fairness disparity without causing harm to model accuracy. Intuitively, acquiring more data is a natural and promising approach to achieve this goal by reaching a better Pareto frontier of the fairness-accuracy tradeoff. The current data acquisition methods, such as fair active learning approaches, typically require annotating sensitive attributes. However, these sensitive attribute annotations should be protected due to privacy and safety concerns. In this paper, we propose a tractable active data sampling algorithm that does not rely on training group annotations, instead only requiring group annotations on a small validation set. Specifically, the algorithm first scores each new example by its influence on fairness and accuracy evaluated on the validation dataset, and then selects a certain number of examples for training. We theoretically analyze how acquiring more data can improve fairness without causing harm, and validate the possibility of our sampling approach in the context of risk disparity. We also provide the upper bound of generalization error and risk disparity as well as the corresponding connections. Extensive experiments on real-world data demonstrate the effectiveness of our proposed algorithm. Our code is available at https://github.com/UCSC-REAL/FairnessWithoutHarm.","url_abs":"https://arxiv.org/abs/2402.12789v3","url_pdf":"https://arxiv.org/pdf/2402.12789v3.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":"fair-classifiers-without-fair-training-an","repo_url":"https://github.com/ucsc-real/fairnesswithoutharm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}}],"tasks":[{"task_slug":"active-learning","task_name":"Active Learning"},{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"fairness","task_name":"Fairness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.12789","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.12789"}},"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/ucsc-real/fairnesswithoutharm","reach":{"status":"ok"}}],"summary":{"ran":11,"unverified":9},"by_repo_kind":{"official":{"samples":20,"ran":11,"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":20,"samples":[{"code_sha256_prefix":"bbab883e9f27b305","entry":"cross_entropy_loss","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/metrics.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":"bbab883e9f27b305"}},{"code_sha256_prefix":"8e2d536932c1d825","entry":"cross_entropy_loss_per_sample","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/metrics.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":"8e2d536932c1d825"}},{"code_sha256_prefix":"f8e3f16ae7fe99db","entry":"extract_line","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"read_results.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/read_results.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":"f8e3f16ae7fe99db"}},{"code_sha256_prefix":"c231223cd0275ac9","entry":"get_apply_fn_test","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/models.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/models.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":"c231223cd0275ac9"}},{"code_sha256_prefix":"63410cdc89b2ca7a","entry":"get_num_params","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/models.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/models.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":"63410cdc89b2ca7a"}},{"code_sha256_prefix":"270763e7cdb969f5","entry":"preprocess_func_adult_torch","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/data.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/data.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":"270763e7cdb969f5"}},{"code_sha256_prefix":"bd4157a1ab4b0abe","entry":"preprocess_func_celeba_torch","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/data.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/data.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":"bd4157a1ab4b0abe"}},{"code_sha256_prefix":"36dccc6aadedec47","entry":"preprocess_func_compas_torch","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/data.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/data.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":"36dccc6aadedec47"}},{"code_sha256_prefix":"1250d55ffe8b6887","entry":"record_ckpt","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/recorder.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/recorder.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":"1250d55ffe8b6887"}},{"code_sha256_prefix":"6ded3c76159d47fa","entry":"record_test_stats","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/recorder.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/recorder.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":"6ded3c76159d47fa"}},{"code_sha256_prefix":"89425067e2790cbf","entry":"record_train_stats","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/recorder.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/recorder.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":"89425067e2790cbf"}},{"code_sha256_prefix":"117795f3a7929738","entry":"get_loss_fair","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/loss_func.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/loss_func.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":"117795f3a7929738"}},{"code_sha256_prefix":"d2b7e008a778fe42","entry":"get_loss_fn","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/loss_func.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/loss_func.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":"d2b7e008a778fe42"}},{"code_sha256_prefix":"f1f44a8e6636b44d","entry":"get_loss_lmd_fix","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/loss_func.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/loss_func.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":"f1f44a8e6636b44d"}},{"code_sha256_prefix":"d539bfdeab939504","entry":"get_model","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/models.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/models.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":"d539bfdeab939504"}},{"code_sha256_prefix":"8e686aaad1330b43","entry":"get_result_typical","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"read_results.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/read_results.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":"8e686aaad1330b43"}},{"code_sha256_prefix":"2d696648a40f85f4","entry":"get_result_val","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"read_results.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/read_results.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":"2d696648a40f85f4"}},{"code_sha256_prefix":"0b158af03f71fad8","entry":"get_value","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/global_var.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/global_var.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":"0b158af03f71fad8"}},{"code_sha256_prefix":"89b278308e29baf3","entry":"hinge_loss","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/metrics.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/metrics.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":"89b278308e29baf3"}},{"code_sha256_prefix":"f66864daa20b1b6f","entry":"test","repo":"ucsc-real/fairnesswithoutharm","repo_kind":"official","path":"src/fair_train.py","file_url":"https://github.com/ucsc-real/fairnesswithoutharm/blob/HEAD/src/fair_train.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":"f66864daa20b1b6f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}