{"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/causalgym-benchmarking-causal","title":"CausalGym: Benchmarking causal interpretability methods on linguistic tasks","arxiv_id":"2402.12560","date":"2024-02-19","proceeding":null,"authors":["Aryaman Arora","Dan Jurafsky","Christopher Potts"],"abstract":"Language models (LMs) have proven to be powerful tools for psycholinguistic research, but most prior work has focused on purely behavioural measures (e.g., surprisal comparisons). At the same time, research in model interpretability has begun to illuminate the abstract causal mechanisms shaping LM behavior. To help bring these strands of research closer together, we introduce CausalGym. We adapt and expand the SyntaxGym suite of tasks to benchmark the ability of interpretability methods to causally affect model behaviour. To illustrate how CausalGym can be used, we study the pythia models (14M--6.9B) and assess the causal efficacy of a wide range of interpretability methods, including linear probing and distributed alignment search (DAS). We find that DAS outperforms the other methods, and so we use it to study the learning trajectory of two difficult linguistic phenomena in pythia-1b: negative polarity item licensing and filler--gap dependencies. Our analysis shows that the mechanism implementing both of these tasks is learned in discrete stages, not gradually.","url_abs":"https://arxiv.org/abs/2402.12560v1","url_pdf":"https://arxiv.org/pdf/2402.12560v1.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":"causalgym-benchmarking-causal","repo_url":"https://github.com/aryamanarora/causalgym","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"causalgym-benchmarking-causal","repo_url":"https://github.com/jannik-brinkmann/multilingual-features","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"},{"task_slug":"interpretability-techniques-for-deep-learning","task_name":"Interpretability Techniques for Deep Learning"}],"methods":[{"method_slug":"pythia","method_name":"Pythia"}],"datasets_introduced":[{"slug":"causalgym","name":"CausalGym","full_name":""}],"methods_introduced":[],"results":[{"leaderboard":"/sota/interpretability-techniques-for-deep-learning","task":"Interpretability Techniques for Deep Learning","dataset":"CausalGym","model":"DAS","rank_in_archive_order":1,"of":7,"metrics":{"Log odds-ratio (pythia-6.9b)":"9.95"},"uses_additional_data":false},{"leaderboard":"/sota/interpretability-techniques-for-deep-learning","task":"Interpretability Techniques for Deep Learning","dataset":"CausalGym","model":"Linear probe","rank_in_archive_order":2,"of":7,"metrics":{"Log odds-ratio (pythia-6.9b)":"3.42"},"uses_additional_data":false},{"leaderboard":"/sota/interpretability-techniques-for-deep-learning","task":"Interpretability Techniques for Deep Learning","dataset":"CausalGym","model":"Difference-in-means","rank_in_archive_order":3,"of":7,"metrics":{"Log odds-ratio (pythia-6.9b)":"2.91"},"uses_additional_data":false},{"leaderboard":"/sota/interpretability-techniques-for-deep-learning","task":"Interpretability Techniques for Deep Learning","dataset":"CausalGym","model":"k-means","rank_in_archive_order":4,"of":7,"metrics":{"Log odds-ratio (pythia-6.9b)":"1.87"},"uses_additional_data":false},{"leaderboard":"/sota/interpretability-techniques-for-deep-learning","task":"Interpretability Techniques for Deep Learning","dataset":"CausalGym","model":"PCA","rank_in_archive_order":5,"of":7,"metrics":{"Log odds-ratio (pythia-6.9b)":"1.81"},"uses_additional_data":false},{"leaderboard":"/sota/interpretability-techniques-for-deep-learning","task":"Interpretability Techniques for Deep Learning","dataset":"CausalGym","model":"LDA","rank_in_archive_order":6,"of":7,"metrics":{"Log odds-ratio (pythia-6.9b)":"0.27"},"uses_additional_data":false},{"leaderboard":"/sota/interpretability-techniques-for-deep-learning","task":"Interpretability Techniques for Deep Learning","dataset":"CausalGym","model":"Random","rank_in_archive_order":7,"of":7,"metrics":{"Log odds-ratio (pythia-6.9b)":"0.01"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.12560","atlas_url":"https://app.syntology.ai/?focus=2402.12560","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.12560"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/aryamanarora/causalgym","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jannik-brinkmann/multilingual-features","reach":null}],"summary":{"ran_draft_wrong":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":2,"samples":[{"code_sha256_prefix":"42202b44c1ae3c17","entry":"load_file","repo":"aryamanarora/causalgym","repo_kind":"official","path":"plot.py","file_url":"https://github.com/aryamanarora/causalgym/blob/HEAD/plot.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"42202b44c1ae3c17"}},{"code_sha256_prefix":"98d4ff3e578af44b","entry":"pick_better_probe","repo":"aryamanarora/causalgym","repo_kind":"official","path":"plot.py","file_url":"https://github.com/aryamanarora/causalgym/blob/HEAD/plot.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"98d4ff3e578af44b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}