Sparse autoencoders reveal selective remapping of visual concepts during adaptation

Hyesu Lim, Jinho Choi, Jaegul Choo, Steffen Schneider
12/6/2024
cs.CVcs.LG

No official code found. Best implementation: dynamical-inference/patchsae (34 stars, MIT, PyTorch, last commit 2026-04-22).

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.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

Implementation of PatchSAE as presented in "Sparse autoencoders reveal selective remapping of visual concepts during adaptation"

345Shell, PythonDec 2, 20246 months agoMIT
explainable-aipytorchsaesparse-autoencodersxai

Similar Papers

Cite this paper

@article{lim2024sparse,
  title  = {Sparse autoencoders reveal selective remapping of visual concepts during adaptation},
  author = {Hyesu Lim and Jinho Choi and Jaegul Choo and Steffen Schneider},
  year   = {2024},
  eprint = {2412.05276},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.05276v2},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.05276.svg)](https://codeofpaper.com/paper/2412.05276)

Discussion