{"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/sparse-autoencoders-reveal-selective","title":"Sparse autoencoders reveal selective remapping of visual concepts during adaptation","arxiv_id":"2412.05276","date":"2024-12-06","proceeding":null,"authors":["Hyesu Lim","Jinho Choi","Jaegul Choo","Steffen Schneider"],"abstract":"Adapting foundation models for specific purposes has become a standard approach to build machine learning systems for downstream applications. Yet, it is an open question which mechanisms take place during adaptation. Here we develop a new Sparse Autoencoder (SAE) for the CLIP vision transformer, named PatchSAE, to extract interpretable concepts at granular levels (e.g. shape, color, or semantics of an object) and their patch-wise spatial attributions. We explore how these concepts influence the model output in downstream image classification tasks and investigate how recent state-of-the-art prompt-based adaptation techniques change the association of model inputs to these concepts. While activations of concepts slightly change between adapted and non-adapted models, we find that the majority of gains on common adaptation tasks can be explained with the existing concepts already present in the non-adapted foundation model. This work provides a concrete framework to train and use SAEs for Vision Transformers and provides insights into explaining adaptation mechanisms.","url_abs":"https://arxiv.org/abs/2412.05276v1","url_pdf":"https://arxiv.org/pdf/2412.05276v1.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":"sparse-autoencoders-reveal-selective","repo_url":"https://github.com/dynamical-inference/patchsae","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"sparse-autoencoder","method_name":"Sparse Autoencoder"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2412.05276","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2412.05276"}},"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/dynamical-inference/patchsae","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"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":0,"samples":[{"code_sha256_prefix":"c0113839c1642005","entry":"calculate_entropy","repo":"dynamical-inference/patchsae","repo_kind":"official","path":"analysis/utils.py","file_url":"https://github.com/dynamical-inference/patchsae/blob/HEAD/analysis/utils.py","link_basis":"plan_row","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":"c0113839c1642005"}},{"code_sha256_prefix":"8b00d270f0a5a818","entry":"get_predictions","repo":"dynamical-inference/patchsae","repo_kind":"official","path":"tasks/classification_with_top_k_masking.py","file_url":"https://github.com/dynamical-inference/patchsae/blob/HEAD/tasks/classification_with_top_k_masking.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":"8b00d270f0a5a818"}},{"code_sha256_prefix":"4a7cb61e02537776","entry":"get_scheduler","repo":"dynamical-inference/patchsae","repo_kind":"official","path":"src/sae_training/utils.py","file_url":"https://github.com/dynamical-inference/patchsae/blob/HEAD/src/sae_training/utils.py","link_basis":"harvester_set","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":"4a7cb61e02537776"}},{"code_sha256_prefix":"b251e3420ace47d7","entry":"load_checkpoint","repo":"dynamical-inference/patchsae","repo_kind":"official","path":"src/models/utils.py","file_url":"https://github.com/dynamical-inference/patchsae/blob/HEAD/src/models/utils.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":"b251e3420ace47d7"}},{"code_sha256_prefix":"effece23664132b2","entry":"load_state_dict_without_prompt_learner","repo":"dynamical-inference/patchsae","repo_kind":"official","path":"src/models/utils.py","file_url":"https://github.com/dynamical-inference/patchsae/blob/HEAD/src/models/utils.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":"effece23664132b2"}},{"code_sha256_prefix":"daa2ff5af7df15ac","entry":"load_stats","repo":"dynamical-inference/patchsae","repo_kind":"official","path":"analysis/utils.py","file_url":"https://github.com/dynamical-inference/patchsae/blob/HEAD/analysis/utils.py","link_basis":"plan_row","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":"daa2ff5af7df15ac"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}