{"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/gradiend-monosemantic-feature-learning-within","title":"GRADIEND: Monosemantic Feature Learning within Neural Networks Applied to Gender Debiasing of Transformer Models","arxiv_id":"2502.01406","date":"2025-02-03","proceeding":null,"authors":["Jonathan Drechsel","Steffen Herbold"],"abstract":"AI systems frequently exhibit and amplify social biases, including gender bias, leading to harmful consequences in critical areas. This study introduces a novel encoder-decoder approach that leverages model gradients to learn a single monosemantic feature neuron encoding gender information. We show that our method can be used to debias transformer-based language models, while maintaining other capabilities. We demonstrate the effectiveness of our approach across multiple encoder-only based models and highlight its potential for broader applications.","url_abs":"https://arxiv.org/abs/2502.01406v1","url_pdf":"https://arxiv.org/pdf/2502.01406v1.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":"gradiend-monosemantic-feature-learning-within","repo_url":"https://github.com/aieng-lab/gradiend","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"}],"methods":[],"datasets_introduced":[{"slug":"geneutral","name":"GENEUTRAL","full_name":""},{"slug":"genter","name":"GENTER","full_name":"GEnder Name TEmplates with pRonouns"},{"slug":"gentypes","name":"GENTYPES","full_name":"Gender Stereotypes"},{"slug":"namexact","name":"NAMEXACT","full_name":""},{"slug":"namextend","name":"NAMEXTEND","full_name":""}],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2502.01406","atlas_url":"https://app.syntology.ai/?focus=2502.01406","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.01406"}},"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/aieng-lab/gradiend-bias","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/aieng-lab/gradiend","reach":null}],"summary":{"ran":2,"ran_draft_wrong":4,"unverified":5},"by_repo_kind":{"official":{"samples":3,"ran":2,"repositories":1},"found_in_text":{"samples":8,"ran":4,"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":"2fce88cdf9c23568","entry":"LargeLinear","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/model.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/model.py","link_basis":"first_harvest_node","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":"2fce88cdf9c23568"}},{"code_sha256_prefix":"f0ae40797e7c4249","entry":"LargeLinear","repo":"aieng-lab/gradiend","repo_kind":"official","path":"gradiend/model/model.py","file_url":"https://github.com/aieng-lab/gradiend/blob/HEAD/gradiend/model/model.py","link_basis":"first_harvest_node","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":"f0ae40797e7c4249"}},{"code_sha256_prefix":"20e1c499fda1de6c","entry":"convert_tuple_keys_recursively","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/model.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/model.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"20e1c499fda1de6c"}},{"code_sha256_prefix":"c056e040a07e6c67","entry":"get_activation","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/model.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/model.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c056e040a07e6c67"}},{"code_sha256_prefix":"b5d368803b6b5a6c","entry":"get_activation","repo":"aieng-lab/gradiend","repo_kind":"official","path":"gradiend/model/model.py","file_url":"https://github.com/aieng-lab/gradiend/blob/HEAD/gradiend/model/model.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b5d368803b6b5a6c"}},{"code_sha256_prefix":"e9a1e0ae7afb92c6","entry":"hash_it","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/model.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/model.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e9a1e0ae7afb92c6"}},{"code_sha256_prefix":"f3498d317263f1a7","entry":"GradiendModel","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/model.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/model.py","link_basis":"first_harvest_node","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":"f3498d317263f1a7"}},{"code_sha256_prefix":"0b09e27b255b08fa","entry":"GradiendModel","repo":"aieng-lab/gradiend","repo_kind":"official","path":"gradiend/model/model.py","file_url":"https://github.com/aieng-lab/gradiend/blob/HEAD/gradiend/model/model.py","link_basis":"first_harvest_node","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":"0b09e27b255b08fa"}},{"code_sha256_prefix":"7c76d06aaa408115","entry":"compute_bias_score","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/evaluation/analyze_decoder.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/evaluation/analyze_decoder.py","link_basis":"first_harvest_node","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":"7c76d06aaa408115"}},{"code_sha256_prefix":"63880b46142f096d","entry":"compute_bias_score_v1","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/evaluation/analyze_decoder.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/evaluation/analyze_decoder.py","link_basis":"first_harvest_node","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":"63880b46142f096d"}},{"code_sha256_prefix":"4f6a9dbc21fa4d20","entry":"compute_bias_score_v2","repo":"aieng-lab/gradiend-bias","repo_kind":"found_in_text","path":"gradiend/evaluation/analyze_decoder.py","file_url":"https://github.com/aieng-lab/gradiend-bias/blob/HEAD/gradiend/evaluation/analyze_decoder.py","link_basis":"first_harvest_node","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":"4f6a9dbc21fa4d20"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}