{"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/identifying-functionally-important-features","title":"Identifying Functionally Important Features with End-to-End Sparse Dictionary Learning","arxiv_id":"2405.12241","date":"2024-05-17","proceeding":null,"authors":["Dan Braun","Jordan Taylor","Nicholas Goldowsky-Dill","Lee Sharkey"],"abstract":"Identifying the features learned by neural networks is a core challenge in mechanistic interpretability. Sparse autoencoders (SAEs), which learn a sparse, overcomplete dictionary that reconstructs a network's internal activations, have been used to identify these features. However, SAEs may learn more about the structure of the datatset than the computational structure of the network. There is therefore only indirect reason to believe that the directions found in these dictionaries are functionally important to the network. We propose end-to-end (e2e) sparse dictionary learning, a method for training SAEs that ensures the features learned are functionally important by minimizing the KL divergence between the output distributions of the original model and the model with SAE activations inserted. Compared to standard SAEs, e2e SAEs offer a Pareto improvement: They explain more network performance, require fewer total features, and require fewer simultaneously active features per datapoint, all with no cost to interpretability. We explore geometric and qualitative differences between e2e SAE features and standard SAE features. E2e dictionary learning brings us closer to methods that can explain network behavior concisely and accurately. We release our library for training e2e SAEs and reproducing our analysis at https://github.com/ApolloResearch/e2e_sae","url_abs":"https://arxiv.org/abs/2405.12241v2","url_pdf":"https://arxiv.org/pdf/2405.12241v2.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":"identifying-functionally-important-features","repo_url":"https://github.com/apolloresearch/e2e_sae","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"dictionary-learning","task_name":"Dictionary Learning"}],"methods":[{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.12241","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.12241"}},"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/apolloresearch/e2e_sae","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":8,"unverified":3},"by_repo_kind":{"official":{"samples":11,"ran":8,"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":"4240424af18cec3a","entry":"calc_explained_variance","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/losses.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4240424af18cec3a"}},{"code_sha256_prefix":"c965ff7e1ebc030d","entry":"load_config","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/utils.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c965ff7e1ebc030d"}},{"code_sha256_prefix":"d8a05e02085eeb90","entry":"setup_logger","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/log.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/log.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d8a05e02085eeb90"}},{"code_sha256_prefix":"940eb3f8703e24c9","entry":"statistical_distance","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/metrics.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"940eb3f8703e24c9"}},{"code_sha256_prefix":"10dfdb7059057d01","entry":"to_numpy","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/utils.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"10dfdb7059057d01"}},{"code_sha256_prefix":"785cf677e1de98f6","entry":"tokenize_and_concatenate","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/data.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"785cf677e1de98f6"}},{"code_sha256_prefix":"fd3eafcb040f48d9","entry":"top1_consistency","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/metrics.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd3eafcb040f48d9"}},{"code_sha256_prefix":"328f50c831db8d0f","entry":"topk_accuracy","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/metrics.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"328f50c831db8d0f"}},{"code_sha256_prefix":"495a63f69d38d772","entry":"convert_str_to_torch_dtype","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/types.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/types.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"495a63f69d38d772"}},{"code_sha256_prefix":"0b6d19ab9443ea4e","entry":"load_pretrained_saes","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/loader.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/loader.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b6d19ab9443ea4e"}},{"code_sha256_prefix":"0c353f5afddae0f1","entry":"serialize_torch_dtype_to_str","repo":"apolloresearch/e2e_sae","repo_kind":"official","path":"e2e_sae/types.py","file_url":"https://github.com/apolloresearch/e2e_sae/blob/HEAD/e2e_sae/types.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0c353f5afddae0f1"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}