Steering CLIP's vision transformer with sparse autoencoders
Sonia Joseph, Praneet Suresh, Ethan Goldfarb, Lorenz Hufe, Yossi Gandelsman, Robert Graham, Danilo Bzdok, Wojciech Samek, Blake Aaron Richards
TL;DR
This work introduces sparse autoencoders trained on CLIP's vision transformer to reveal interpretable, steerable features and quantify their control over CLIP's outputs. By defining and validating steerability metrics, the authors show that a meaningful subset of SAE features can precisely steer predictions and substantially increase the accessible concept space compared to neuron-level control. They demonstrate practical benefits by suppressing spurious correlations and defending against typographic attacks, attaining state-of-the-art performance on typographic defenses and improved disentanglement on CelebA and Waterbirds. The results highlight fundamental differences between vision and language processing in CLIP and provide a scalable toolkit for mechanistic interpretability and robust vision-language systems.
Abstract
While vision models are highly capable, their internal mechanisms remain poorly understood -- a challenge which sparse autoencoders (SAEs) have helped address in language, but which remains underexplored in vision. We address this gap by training SAEs on CLIP's vision transformer and uncover key differences between vision and language processing, including distinct sparsity patterns for SAEs trained across layers and token types. We then provide the first systematic analysis on the steerability of CLIP's vision transformer by introducing metrics to quantify how precisely SAE features can be steered to affect the model's output. We find that 10-15\% of neurons and features are steerable, with SAEs providing thousands more steerable features than the base model. Through targeted suppression of SAE features, we then demonstrate improved performance on three vision disentanglement tasks (CelebA, Waterbirds, and typographic attacks), finding optimal disentanglement in middle model layers, and achieving state-of-the-art performance on defense against typographic attacks.
