{"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/linear-adversarial-concept-erasure","title":"Linear Adversarial Concept Erasure","arxiv_id":"2201.12091","date":"2022-01-28","proceeding":null,"authors":["Shauli Ravfogel","Michael Twiton","Yoav Goldberg","Ryan Cotterell"],"abstract":"Modern neural models trained on textual data rely on pre-trained representations that emerge without direct supervision. As these representations are increasingly being used in real-world applications, the inability to \\emph{control} their content becomes an increasingly important problem. We formulate the problem of identifying and erasing a linear subspace that corresponds to a given concept, in order to prevent linear predictors from recovering the concept. We model this problem as a constrained, linear maximin game, and show that existing solutions are generally not optimal for this task. We derive a closed-form solution for certain objectives, and propose a convex relaxation, \\method, that works well for others. When evaluated in the context of binary gender removal, the method recovers a low-dimensional subspace whose removal mitigates bias by intrinsic and extrinsic evaluation. We show that the method is highly expressive, effectively mitigating bias in deep nonlinear classifiers while maintaining tractability and interpretability.","url_abs":"https://arxiv.org/abs/2201.12091v8","url_pdf":"https://arxiv.org/pdf/2201.12091v8.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":"linear-adversarial-concept-erasure","repo_url":"https://github.com/shauli-ravfogel/rlace-icml","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"linear-adversarial-concept-erasure","repo_url":"https://github.com/shauli-ravfogel/adv-kernel-removal","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2201.12091","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2201.12091"}},"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/shauli-ravfogel/rlace-icml","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/shauli-ravfogel/adv-kernel-removal","reach":null}],"summary":{"ran_draft_wrong":5,"ran":1,"ran_fixture":1,"unverified":8},"by_repo_kind":{"official":{"samples":13,"ran":7,"repositories":1},"listed":{"samples":2,"ran":0,"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":15,"samples":[{"code_sha256_prefix":"e50fcbca94b3abf5","entry":"get_entropy","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e50fcbca94b3abf5"}},{"code_sha256_prefix":"7fa83359beb345ed","entry":"get_majority_acc","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7fa83359beb345ed"}},{"code_sha256_prefix":"da6b1fd5b8bedac5","entry":"get_projection","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"da6b1fd5b8bedac5"}},{"code_sha256_prefix":"9c941dc3a7a5221b","entry":"get_svd","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"glove/run_glove.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/glove/run_glove.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9c941dc3a7a5221b"}},{"code_sha256_prefix":"a1a3b3fd3054c606","entry":"init_classifier","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a1a3b3fd3054c606"}},{"code_sha256_prefix":"9fb42506cc0ae256","entry":"prepare_output","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9fb42506cc0ae256"}},{"code_sha256_prefix":"46887c9171dfba2b","entry":"solve_constraint","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"46887c9171dfba2b"}},{"code_sha256_prefix":"d7edaf170e8ed046","entry":"get_score","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.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":"d7edaf170e8ed046"}},{"code_sha256_prefix":"b765918151ddbd4e","entry":"get_score","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.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":"b765918151ddbd4e"}},{"code_sha256_prefix":"2e9f7545f8882b0b","entry":"get_score","repo":"shauli-ravfogel/adv-kernel-removal","repo_kind":"listed","path":"relaxed_inlp.py","file_url":"https://github.com/shauli-ravfogel/adv-kernel-removal/blob/HEAD/relaxed_inlp.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":"2e9f7545f8882b0b"}},{"code_sha256_prefix":"1c34c38fee030abc","entry":"solve_adv_game","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.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":"1c34c38fee030abc"}},{"code_sha256_prefix":"a4f8002563910f5b","entry":"solve_constraint","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4f8002563910f5b"}},{"code_sha256_prefix":"8c544ec180660646","entry":"solve_fantope_relaxation","repo":"shauli-ravfogel/adv-kernel-removal","repo_kind":"listed","path":"relaxed_inlp.py","file_url":"https://github.com/shauli-ravfogel/adv-kernel-removal/blob/HEAD/relaxed_inlp.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":"8c544ec180660646"}},{"code_sha256_prefix":"4b6bf35b1e1ce947","entry":"symmetric","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.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":"4b6bf35b1e1ce947"}},{"code_sha256_prefix":"5eb6f7201a4d2f1c","entry":"symmetric","repo":"shauli-ravfogel/rlace-icml","repo_kind":"official","path":"rlace.py","file_url":"https://github.com/shauli-ravfogel/rlace-icml/blob/HEAD/rlace.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":"5eb6f7201a4d2f1c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}