Manuscript Offprint
arXiv:2611.01513Label-Free Localization and Test-Time Suppression of CLIP's Typographic Circuits
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
CLIP-based Vision-Language Models have become cornerstones of modern multimodal systems. The cross-modal contrastive objective equips the CLIP vision encoder to both see objects and read text. These two abilities induce an entanglement between the encoding of lexical and semantic shapes, creating a distinctive vulnerability to typographic attacks, in which rendered text overrides an image's semantic content with its literal meaning. The black-box nature of these encoders has prevented a mechanistic interpretation of such entanglement. We introduce a head-decomposed Sparse Dictionary Learning (SDL) architecture that, by design, decomposes individual attention heads into interpretable, head-specific latents. Based on this inductive disentanglement, we re-purpose Clarity Score and propose normalized Text Attribution Score, which are both label-free, to identify attention heads that carry typographic information. As a causal validation of successful circuit separation, we perform a mechanistic intervention that reweighs attention away from the patch tokens in the identified lexical heads at test-time. Experiments show that the intervention effectively recovers object classification under typographic attack and, across five CLIP variants and four typographic benchmarks, achieves up to 46.9% improvement while incurring up to 1% accuracy loss in general image perception, outperforming prior supervised and training-free methods. Expanding on the mechanistic intervention, we propose a test-time adaptive attention head routing to further reduce the impact on performance at matched robustness, pushing beyond the Pareto frontier of current robustness-perception tradeoff.
1 Introduction
Vision encoders trained on web-scale image-text pairs develop two distinct visual processing capacities. They encode semantic shape for zero-shot recognition, while also encoding lexical shape from rendered text, both capacities induced by the contrastive objective in Contrastive Language-Image Pretraining (CLIP) (Radford et al. 2021). Their entanglement creates a distinctive failure mode: rendered text can distract CLIP models from semantic shape, shifting visual encoding toward the text's literal meaning: in Figure 1, a cat overlaid with the text "Goose" is misclassified as a goose.
This entanglement, exploited by typographic attacks (Goh et al. 2021), has been studied in black-box defenses (Azuma and Matsui 2023; Materzyńska, Torralba,

Figure 1: Motivating example. A superimposed “Goose” text causes CLIP to label a cat as a goose.
and Bau 2022). The mechanistic question of where in the network lexical and semantic processing live, and at what computational granularity they are separable, has remained underexplored. Existing interpretability tools for CLIP either decompose the residual stream into per-layer and per-head components through text-based analysis (Gandelsman, Efros, and Steinhardt 2024a,b) or apply Sparse Autoencoders (SAEs) (Huben et al. 2024) to layer outputs as monolithic blocks (Zaigrajew, Baniecki, and Biecek 2025; Dreyer et al. 2025b). These approaches either fail to leverage the spatial routing of information within an attention head or ignore the division of labor across attention heads, resulting in minimal findings beyond superficial observation of letter-reading attention modules. Meanwhile, Dyslexify (Hufe et al. 2025) investigates the attention weight distribution over text and object shapes, but does not verify what the attended tokens encode in the latent space.
In this paper, we argue that the individual attention head is the key unit for interpreting and resolving such entanglement. Multi-Head Self-Attention (MHSA) is designed to project the residual stream into parallel low-dimensional subspaces, apply attention separately within each subspace, and recombine via an output projection (Vaswani et al. 2017). As descriptive context, head outputs in the last 20% of transformer blocks are approximately mutually decorrelated under Centered Kernel Alignment (Kornblith et al. 2019) (CKA panels and discussion in the supplement). The primary evidence that the per-head unit is the right granularity is causal and comes from our matched-capacity ablation against a monolithic dictionary (supplement). Therefore, sparse decompo-
Corresponding author.
sition methods that aggregate across heads contradict this structure, increasing the polysemanticity of learned activations under the sparsity constraints.
We close this gap with a head-decomposed sparse transcoder that interprets the subspace structure of MHSA. Independent encoders operate on individual head outputs, and a joint decoder reconstructs the post-projection residual stream. The encoder preserves head-local activation by construction, whereas the decoder respects the downstream computation that recombines head latents through the output projection. Our dictionary design provides localized head-level concepts that underpin our circuit mining metrics: Clarity Score, an unsupervised measure of cluster concentration that captures the geometric signature of semantic processing, and normalized Text Attribution Score, which operates on minimally augmented unlabeled images to provide causal concept attribution. They provide a strong signal that separates lexical concepts from semantic concepts without class labels.
Subsequent circuit mining reveals a separation between lexical and semantic processing among attention heads. Per-head latents partition into two distinct populations: object concepts activate on semantic shapes, and their activating image sets cluster tightly in CLIP space. In contrast, lexical concepts activate on image sets that are visually disparate, held together only by the presence of rendered text. Individual attention heads have concept dictionaries that are overwhelmingly composed of either type. By reweighting attention away from text patches in the identified lexical heads, we causally suppress the lexical circuit while preserving the semantic stream. This mechanistic intervention recovers the semantic representation under typographic attacks, with consistent accuracy gains across five CLIP variants and four typographic benchmarks (up to 46.9%) and less than 1% accuracy loss on general clean-data classification. Beyond a practical defense, the result establishes that typographic vulnerability arises from localized entanglement within the CLIP encoder, and disentangling the circuits recovers semantic perception.
Building up on the mechanistic insights, we propose a test-time adaptive intervention that activates based on individual attention module's output norm, allowing further mitigation of clean-data performance loss and preservation of the model's internal representations. Experiments show that adaptive intervention pushes beyond the Pareto frontier established by prior arts. We summarize our contributions as follows:
-
Head-decomposed sparse transcoders. We introduce a sparse decomposition architecture that respects the subspace structure of MHSA, motivated by the subspace structure of MHSA, with late-layer head decorrelation as supporting evidence and the mechanistic prerequisite of self-supervised circuit mining signals.
-
Localization of lexical and semantic processing. We identify the geometric and attributional signals of the two processing streams: we discover that the Clarity Score (Dreyer et al. 2025a), introduced for concept-concentration evaluation, doubles as a head-level robustness indicator, and we propose the normalized Text Attribution Score to separate lexical and semantic attention heads without concept labels.
-
Causal intervention recovers semantic perception. We demonstrate that intervention on identified lexical components recovers object classification under typographic attack across five CLIP ViT variants and four benchmarks, with sub-1% cost on general classification, outperforming supervised and unsupervised baselines, and an input-conditional adaptive variant that fires only on heads exceeding their clean firing statistics retains the defense at near-zero clean-data accuracy cost on every variant.
2.1 Sparse Dictionary Learning
Sparse Dictionary Learning (SDL) (Olshausen and Field 1997; Lee et al. 2006) uncovers interpretable structure in high-dimensional representations via sparse linear combinations of basis vectors. Neural architectures such as Sparse Autoencoders (SAEs) (Huben et al. 2024) and Sparse Transcoders (Dunefsky, Chlenski, and Nanda 2024) extend SDL by combining reconstruction and sparsity objectives to learn concept dictionaries from model activations in a self-supervised manner, revealing disentangled semantic factors in large vision and language models. However, existing approaches often suffer from polysemanticity due to feature entanglement and a lack of structural constraints (Elhage et al. 2022). Our work introduces a head-decomposed sparse learning architecture that exploits the modularity of MHSA to learn clearer, head-specific semantic dictionaries.
2.2 Interpretability on Attention Heads
Multi-Head Self-Attention (MHSA) (Vaswani et al. 2017) remains underexplored at the level of per-head behavior and semantics. He et al. (2025) adds unit-channel output and value projections to MHSA to learn sparse concept representations within attention layers. Gandelsman, Efros, and Steinhardt (2024a) studies head and layer decomposition in CLIP-ViT by greedily optimizing text descriptions that maximize explained variance per head. Component attribution in this spirit extends beyond CLIP (Balasubramanian, Basu, and Feizi 2024), and Basile et al. (2025) tie head specialization to the geometry of head representations, likewise reporting late-layer letter-reading heads. Su, Kempe, and Ullrich (2025) uses output and value projections into the residual stream (Elhage et al. 2021) to analyze head contributions and concept vectors via SAE (Huben et al. 2024). Kissane et al. (2024) applies SAEs directly to attention-layer outputs, using decoder-channel norms for attribution, thereby supporting our hypothesis of independent single-head representations.
2.3 Disentangling Lexical and Semantic Circuits
Typographic attacks exploit CLIP's tendency to over-attend to rendered text in images, causing misclassification toward the written label (Goh et al. 2021). Materzyńska, Torralba, and Bau (2022) introduces benchmark datasets and demonstrates the separability of visual and lexical processing, but does not localize the responsible units. DefensePrefix (Azuma and Matsui 2023) learns a text-encoder prefix from annotated datasets to suppress adversarial text. Dyslexify (Hufe et al. 2025) greedily searches typographic cir-cuits via attention weights, an approach increasingly noisy as model depth grows. Joseph et al. (2025) steers CLIP-ViT through SAE features but stops short of identifying the heads causally responsible for lexical processing, and Pach et al. (2025) steer multimodal LLMs downstream of CLIP through SAE latents. In contrast, our method is label-free, performs head-decomposed sparse decomposition with causal attribution, and scales across model sizes.
3 Method
In this section, we introduce our two-stage method as shown in Figure 2. Figure 2(a) presents a head-decomposed sparse transcoder, trained in a self-supervised manner on unlabeled image data, that produces concept-based interpretations of attention modules at per-head granularity. In Figure 2(b), attention heads are examined based on their corresponding concepts. We leverage two metrics, Clarity Score (CS) and the proposed Text Attribution Score (TAS), to disentangle lexical and semantic circuits. Given the transformer circuit composed of the lexical attention heads, the attentions within the circuits are reweighted towards the class token for effective semantic perception under interference.
3.1 Preliminaries
Multi-Head Self-Attention. Given input sequence and projection weights and , an MHSA module with heads of dimension satisfying computes
where Attn denotes the standard scaled dot-product attention (Vaswani et al. 2017).
Residual Stream. Following Gandelsman, Efros, and Steinhardt (2024a), the output of transformer layer i decomposes additively as
so the final layer output is a sum over per-block attention and MLP contributions. We refer to these contributions and their accumulation as components of the residual stream.
Sparse Autoencoder and Transcoder. Sparse Autoencoders (SAEs) (Huben et al. 2024) decompose dense representations into a high-dimensional sparse latent space. Given sparse dimension , weights , , biases , , and activation , an SAE maps to
trained with reconstruction loss and optional sparsity regularization:
Sparsity is realized via L1 regularization (Huben et al. 2024) or Top-K filtering (Gao et al. 2025), with subsequent variants in both branches (Bussmann, Leask, and Nanda 2024; Rajamanoharan et al. 2024b; Zaigrajew, Baniecki, and Biecek 2025; Rajamanoharan et al. 2024a). Transcoders (Dunefsky, Chlenski, and Nanda 2024) adapt SAEs by replacing the reconstruction target with a regression target downstream of the input.
3.2 Interpretability via Attention Head Decomposition
We propose a head-decomposed transcoder that independently encodes each head’s output and predicts an attention block’s residual stream contribution. Unlike prior work that trains a single encoder on concatenated head outputs (Kissane et al. 2024), we train one encoder per head, preventing cross-head entanglement during dictionary learning. Given MHSA output with each , per-head encoders with sparse dimension , encoder bias , joint decoder , and decoder bias , the forward pass is
The transcoder is trained to predict the post-projection MHSA output with regression loss and optional L1 sparsity:
We formally discuss the structural motivation for this design in the supplemental material.
3.3 Localizing Lexical and Semantic Circuits
The head-decomposed dictionary shows two geometrically distinct populations of latent concepts. We uncover this separation using two unsupervised metrics: the Clarity Score and the normalized Text Attribution Score, which identify heads in the lexical and semantic circuits without concept labels. We use lexical heads and semantic heads as shorthand for heads whose latent populations are dominated by lexical and semantic activations, respectively. For a common reading direction, we report the lexicality axis as and , with denoting per-layer z-standardization, so that higher always denotes stronger lexical enrichment.
Self-supervised Clarity Scoring. Per-head latents partition into two qualitatively different geometric patterns. Semantic latents activate on visually concentrated image clusters with low mean pairwise distance in CLIP embedding space, as illustrated by the siamese cat cluster in Figure 2. Lexical latents activate on visually disjoint clusters held together only by similar rendered text, as illustrated by the “Tamron/Tabor” cluster discovered by Attn in Figure 2. We capture this distinction with the Clarity Score (Dreyer et al. 2025a), an unsupervised measure of cluster concentration in CLIP embedding space; proposed originally to evaluate concept concentration in sparse dictionaries, we discover that at the head level it indicates robustness to typographic content and repurpose it for circuit selection. Given a latent c and a set of images that activate c, the Clarity Score of c is defined as the average pairwise cosine similarity among the activation

Figure 2: Method Overview. (a) Head-decomposed sparse decomposition. We employ Sparse Dictionary Learning to decompose each attention module () into per-head sparse latent neurons. (b) Lexical-head localization and causal intervention. The decomposition surfaces a separation between heads encoding semantic shapes and heads encoding lexical shapes. Identifying the lexical heads (e.g., ) and reweighting their attention away from patch tokens onto the class token causally suppresses the lexical-processing circuit, recovering semantic perception under typographic attacks.
set with :
where denotes the CLIP image encoder. Because CLIP's contrastive objective aligns embeddings on visual semantic content rather than lexical shape, a higher Clarity Score indicates a more semantically focused concept, and a lower one indicates a lexical concept. Heads whose latents have low Clarity Scores are candidates for the lexical-encoding population. We establish the empirical grounding of this metric in Section 4.5.
Causal Text Attribution. To complement the geometric signal of CS with a causal one, we quantify the influence of input tokens on each latent activation. Given a ViT input sequence composed of one class token followed by patch tokens, an attention head of dimension , and a target feature defined by the encoder vector , we first compute the alignment of all value vectors with the feature, given by . Then, the total contribution from the attention head to the feature is the weighted sum of these alignments over the post-softmax attention weights , given by . To identify which tokens actively promote this feature, we calculate the gradient of the feature activation with respect to the pre-softmax attention scores . This yields the attribution map
where denotes element-wise multiplication and . Intuitively, this gradient assigns positive attribution to tokens whose value contribution
exceeds the attention-weighted average , indicating that increased attention to these tokens strengthens the concept's activation. Following prior work on attention scoring (Dreyer et al. 2025b), we propose a Text Attribution Score that captures how strongly a latent's activation is supported by patches containing rendered text. Given a text-injected image with known text location , the text-corresponding patch locations yield the text mask with , where is the token index and is the indicator function given the set . Then the inverse text mask . The Text Attribution Score (TAS) and its normalized form (nTAS) are defined as:
In Equation (10), TAS retains only positive gradient attribution on the patch token sequence, matching the implicit ReLU nonlinearity in Top-K transcoders. Normalized TAS jointly considers object and lexical shapes and scales TAS to . Per-head scores are computed as the mean over the head's latent concepts.
In Section 4, we show that a simple layer-wise statistical threshold on each metric selects the extreme lexical tail for intervention, intermediate heads remain unassigned rather than forced into a binary lexical/semantic ontology, and provides a clean signal for causal intervention to resolve text-shape entanglement, further demonstrating the strength of the mechanistic localization. The augmentation detail for preparing data for nTAS calculation is included in Appendix B.2.
3.4 Input-Conditional Head Gating
The intervention of Equation (15) acts unconditionally: every selected head is suppressed on every input, including clean images that contain no rendered text. Because the attention head is the bottleneck through which lexical content reaches the class-token representation, the magnitude of a head's output is itself a signal of whether that bottleneck is active on a given input. We therefore propose a simple yet effective input-adaptive intervention. For a selected head with value vectors , class-token attention weights , and output-projection block , define the firing statistic
which is the norm of head i's contribution to the class-token residual on input x. Its clean-corpus statistics are estimated once on an unlabeled, text-free image corpus. At test time, the head is suppressed only when it fires beyond its clean statistics.
This adaptive intervention reduces disturbance to ViTs' internal states and only fires when abnormality is detected, keeping clean-data performance intact. The gating statistic at test time is readily available in the forward pass, so applying it induces minimal overhead.
4 Experiments
4.1 Implementation Details
Evaluation Datasets. Our method identifies and disentangles lexical-processing heads from semantic-processing heads within the CLIP encoder; typographic attacks, which directly pit rendered text against visual semantics, are therefore the natural testbed — a successful disentanglement should recover semantic perception precisely where lexical signals would otherwise dominate. The RTA-100 (Azuma and Matsui 2023), Disentangling (Materzyńska, Torralba, and Bau 2022), and PAINT (Ilharco et al. 2022) datasets are used to evaluate the encoder's behavior under typographic attacks, and the Kaggle ImageNet-100 dataset (Shekhar 2021) is used to evaluate semantic perception on clean data under intervention. Zero-shot accuracy on the rendered word (Attack Accuracy) measures the residual lexical influence after intervention. In addition, existing typographic-attack datasets contain either basic text renderings or photos of everyday objects with sticker notes, with limited diversity in objects and text. To obtain a more diverse evaluation, we use Qwen-Image-Edit (Wu et al. 2025) to construct a synthetic typographic dataset from Huggingface ImageNet-100 (Tian, Krishnan, and Isola 2020), denoted ImageNet100-text-D, detailed in Appendix B.2.
Baseline Methods. We compare our intervention with two prior approaches that also target typographic attacks through different disentanglement approaches: Defense-Prefix (Azuma and Matsui 2023) and Dyslexify (Hufe et al. 2025) detailed in Section 2.3. Both require a class-labeled image dataset for parametric learning or circuit mining, whereas our approach is label-free. Our pipeline also avoids backpropagation through the ViT encoder and replaces per-module forward passes with constant-time filtering over precomputed scores. The computational cost of each approach is summarized in Appendix O.1. All methods are evaluated on ViT-B/16, ViT-L/14, ViT-H/14, ViT-G/14, and ViT-bigG/14, pretrained on LAION-2B (Schuhmann et al. 2022) and released by OpenCLIP (Cherti et al. 2023). We additionally report vanilla CLIP under typographic attacks as a no-intervention baseline.
Sparse Dictionary Learning. Motivated by the late-layer head-decorrelation analysis and the structural argument (both in the supplement), we attach a Top-128 Head-decomposed Sparse Transcoder with expansion factor 16 to each transformer block in the last 20% of the ViT, where attention heads are approximately decorrelated and individually align with the global semantic embedding. The SDL weights are trained on the ViT model's intermediate representation obtained from the ImageNet training set. The loss function defined in Equation (7) is the L2 loss with sparsity coefficient as generally used with Top-K SAEs. Following Dreyer et al. (2025a), the transcoders are trained for 30 epochs, each epoch using a random-sampled 10% subset of the training set, with the Adam optimizer and cosine learning rate annealing, and an initial learning rate of .
Statistical Head Identification. Head-level nTAS and CS are obtained by averaging per-latent scores over the ImageNet (Deng et al. 2009) validation set. Lexical heads are identified by layer-wise statistical thresholding:
where is the set of head scores at layer . We use for CS, requiring no validation data, and for nTAS, selected on a synthetic typographic subset based on a 0.1% sample from ImageNet-100. Heads above the nTAS threshold or below the CS threshold are identified as lexical.
Causal Intervention via Attention Reweighting. In identified lexical heads, we redirect class-token attention away from patch tokens following Dyslexify (Hufe et al. 2025):
where is the original class-token attention map, is a control parameter, indexes tokens ( , ) following Dosovitskiy et al. (2021). We set , fully suppressing patch-token contributions in the lexical circuits to demonstrate the accuracy of our circuit mining approach. Full sweep and ablation are in Appendix C.1.
4.2 Effect of Intervention on Semantic Perception
Table 1 evaluates interventions guided by the two metrics of Section 3.3, Clarity Score (CS) and normalized Text Attribution Score (nTAS), against vanilla CLIP under typographic attack. Across all five variants, suppressing the identified lexical heads substantially recovers Object Accuracy on attacked data at sub-point clean cost in most configurations (per-cell confidence intervals in the supplement); the pipeline requires only unlabeled images for SDL training, and CS-based identification is fully label-free. Attack-Accuracy reductions mirror these gains and are tabulated in the supplement.
| Method | IN-100 (Clean) | RTA-100 | Disentangling | PAINT | IN-100-Text-D |
|---|---|---|---|---|---|
| No intervention | 81.5 | 55.1 | 45.6 | 55.1 | 57.7 |
| Defense-Prefix | 81.4 (-0.1) | 63.6 | 67.8 | 67.8 | 70.1 |
| Dyslexify | 81.3 (-0.3) | 66.1 | 63.7 | 70.9 | 71.4 |
| Dyslexify* | 81.0 (-0.5) | 68.5 | 70.7 | 72.2 | - |
| Ours (CS) | 80.5 (-1.0) | 69.9 | 82.4 | 70.9 | 75.3 |
| Ours (nTAS) | 81.1 (-0.4) | 70.8 | 75.8 | 71.6 | 76.7 |
Table 1: Comparison of intervention strategies, macro-averaged over the five ViT variants. Numbers are zero-shot Object Accuracy (%) averaged over ViT-B/16, L/14, H/14, g/14, and bigG/14; ImageNet-100 (Clean) shows the mean difference to the un-intervened model in parentheses. Per-model breakdown in the supplement. Defense-Prefix and Dyslexify rows from their released evaluation artifacts under matched benchmarks. Bold and italic mark first and second place per column. * indicates numbers reported by the original authors with larger data budget; “-” marks benchmarks absent from the original report.
4.3 Comparison with Prior Works
We compare against two alternative disentanglement-and-intervention strategies, Defense-Prefix (Azuma and Matsui 2023) and Dyslexify (Hufe et al. 2025). As shown in Table 1, our intervention achieves the strongest recovery of zero-shot Object Accuracy across typographic-stimulus datasets and model sizes, with only self-supervised SDL and minimal annotated data. Dyslexify (Hufe et al. 2025) performs greedy head search by evaluating one (layer, head) module at a time. This approach is constrained by its label requirement and grows noisier as model depth increases. By contrast, our top-down identification requires only constant-time classification evaluations once the lexical circuits are identified, and therefore scales more favorably with model size, exceeding supervised Defense-Prefix (Azuma and Matsui 2023) by a significant margin on the larger ViT backbones. The intervention itself imposes no parameter updates on the ViT encoder: only the head-decomposed transcoder is trained, and its head-wise factorization keeps each per-head encoder proportional to rather than the of a monolithic encoder. All tested methods show minimal trade-offs in general clean image classification, with macro-averaged accuracy drops of at most 1.1 points. We further show that adaptive intervention (Section 4.4) reduces cost on clean data accuracy. Figure 3 summarizes the trade-off: seven of the eight Pareto-frontier points over all evaluations belong to our variants, with the adaptive rows extending the frontier's clean-accuracy end. We include more details on the trade-off in the Appendix C.2. Notably, Joseph et al. (2025) reports perception performance comparable to Defense-Prefix (Azuma and Matsui 2023), suggesting that SAE-based steering without circuit-level causal analysis plateaus at a similar performance

Figure 3: Robustness–accuracy trade-off. Mean attacked accuracy (RTA-100, Disentangling, PAINT) vs. clean accuracy; gray staircase: Pareto frontier over matched-protocol points. Seven of its eight members are ours.
ceiling as black-box prefix tuning. We omit this method from the comparison due to code availability constraints.
4.4 Input-Conditional Suppression at Zero Clean Cost
| Method | IN-100 (Clean) | RTA-100 | Disentangling | PAINT | IN-100-Text-D |
|---|---|---|---|---|---|
| CS | 80.5 (-1.0) | 69.9 | 82.4 | 70.9 | 75.3 |
| nTAS | 81.1 (-0.4) | 70.8 | 75.8 | 71.6 | 76.7 |
| CS+Adapt. | 81.4 (-0.2) | 67.7 | 76.8 | 68.4 | 74.8 |
| nTAS+Adapt. | 81.2 (-0.3) | 69.4 | 73.0 | 70.5 | 76.2 |
Table 2: Static versus adaptive intervention, averaged over the five ViT variants. Bold and italic mark first and second place per column. Gating narrows the clean-data cost while retaining most attacked-accuracy recovery.
The firing statistics () are calibrated on the clean, unlabeled calibration half of the ImageNet-100 validation set. The threshold is selected once per model by sweeping and maximizing attacked-data accuracy on a held-in half of ImageNet-100-Text-D; all reported results, including the adaptive rows of Table 1, evaluate the selected on held-out data under the full-benchmark protocol. Per-model values are listed in the supplement. The static intervention suppresses every selected head on every input. The gated variant of Section 3.4 instead consults each head's firing statistic per image and suppresses only heads that fire beyond their clean-corpus calibration. The CS+Adaptive and nTAS+Adaptive rows of Table 1 evaluate this variant: gating retains the bulk of the static recovery under attack while the clean-data cost falls close to zero across all ten configurations. On ViT-bigG/14, the largest static clean cost of points falls to under gating. Selection remains dictionary-scored; only execution is statistics-triggered, so the dictionary is consulted offline, and the runtime overhead is one matrix-vector product and a norm per selected head.
4.5 Convergence of Localization Metrics
Plotting per-head (CS, nTAS) jointly in the late-layer regime reveals that the two localization metrics, defined indepen-

(a) ViT-B/16
(b) ViT-G/14

(c) Pearson r
(d) Regression slope
Figure 4: CS-nTAS convergence across depth and scale. (a,b) Per-head CS-nTAS scatter in late layers of ViT-B/16 and ViT-G/14: each point is one attention head; lexical heads cluster at high nTAS / low CS, semantic heads at the opposite corner. (c,d) The anti-correlation strengthens across all CLIP scales: Pearson r becomes more negative, and the regression slope steepens in the final 20% of blocks.
dently from concept geometry and from input attribution, identify the same separation. Figure 4 shows that head-level CS and nTAS are strongly anti-correlated in late layers across all tested ViT variants. Figures 4c and 4d trace this anti-correlation across normalized depth and CLIP scales: the Pearson correlation strengthens sharply, and the regression slope steepens in the same final 20% of blocks. With this correlation, we establish the Clarity Score as a valid signal for disentangling lexical and semantic circuits, given its predictive correlation with the causality-based nTAS metric.
4.6 Attribution Faithfulness
Figure 5 provides direct visual evidence for the dual-processing claim. Latents in semantic-encoding heads (low nTAS) activate on visually concentrated image clusters with clear object content (Mallard and Film Camera in rows 1 and 3), and their gradient attribution maps localize to object regions. Latents in lexical-encoding heads (high nTAS) activate on visually disparate image sets held together only by the presence of rendered text, and their attribution maps localize to the text patches themselves, establishing the causal link between text input and lexical activation. The lexical neurons (ViT-B#2323, ViT-G#22271) are tuned to text shapes rather than semantic content, and their activation sets correspond-

Figure 5: Typographic and Semantic Neurons. Example activating images of neurons and their parent attention head. The top 4 activating images are shown with corresponding neuron attribution overlaid in a red gradient. Neurons with high nTAS scores are activated by the images that contain text with no significant semantic focus, whereas neurons with low nTAS scores lead to image clusters with strong semantic meaning, e.g., “Mallard” in the first row.
ingly receive low Clarity Scores, supporting our proposal that Clarity Score serves as a signal for typographic circuit mining. More case studies, experiments, and implementation details are available in the Appendix.
5 Conclusion
We introduced a head-decomposed sparse transcoder that yields head-attributable concepts by construction, preventing the cross-head entanglement that contaminates monolithic dictionaries. On this decomposition, CS and nTAS identify lexical-encoding heads with minimal labels, and attention reweighting on the identified heads recovers object classification under typographic attack across five CLIP scales and four benchmarks (up to 46.9 points) at minimal clean cost, surpassing prior supervised and unsupervised defenses. Adaptive intervention conditioned on each head's firing statistics retains this recovery at near-zero clean cost, extending the robustness-perception Pareto frontier. We hope this work pushes the boundary of mechanistic interpretability in multimodal perception systems.
References
Azuma, H.; and Matsui, Y. 2023. Defense-prefix for preventing typographic attacks on clip. In Proceedings of the
IEEE/CVF International Conference on Computer Vision, 3644–3653.
Bai, S.; Cai, Y.; Chen, R.; Chen, K.; Chen, X.; Cheng, Z.; Deng, L.; Ding, W.; Gao, C.; Ge, C.; et al. 2025. Qwen3-vl technical report. arXiv preprint arXiv:2511.21631.
Balasubramanian, S.; Basu, S.; and Feizi, S. 2024. Decomposing and Interpreting Image Representations via Text in ViTs Beyond CLIP. In The Thirty-eighth Annual Conference on Neural Information Processing Systems.
Basile, L.; Maiorca, V.; Bortolussi, L.; Rodolà, E.; and Locatello, F. 2025. ResiDual Transformer Alignment with Spectral Decomposition. Transactions on Machine Learning Research.
Bussmann, B.; Leask, P.; and Nanda, N. 2024. BatchTopK Sparse Autoencoders. In NeurIPS 2024 Workshop on Scientific Methods for Understanding Deep Learning.
Cherti, M.; Beaumont, R.; Wightman, R.; Wortsman, M.; Ilharco, G.; Gordon, C.; Schuhmann, C.; Schmidt, L.; and Jitsev, J. 2023. Reproducible scaling laws for contrastive language-image learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 2818–2829.
Deng, J.; Dong, W.; Socher, R.; Li, L.-J.; Li, K.; and Fei-Fei, L. 2009. ImageNet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, 248–255.
Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; Uszkoreit, J.; and Houlsby, N. 2021. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. In International Conference on Learning Representations.
Dreyer, M.; Berend, J.; Labarta, T.; Vielhaben, J.; Wiegand, T.; Lapuschkin, S.; and Samek, W. 2025a. Mechanistic understanding and validation of large AI models with SemanticLens. Nature Machine Intelligence, 7(9): 1572–1585.
Dreyer, M.; Hufe, L.; Berend, J.; Wiegand, T.; Lapuschkin, S.; and Samek, W. 2025b. From What to How: Attributing CLIP's Latent Components Reveals Unexpected Semantic Reliance. arXiv preprint arXiv:2505.20229.
Dunefsky, J.; Chlenski, P.; and Nanda, N. 2024. Transcoders find interpretable LLM feature circuits. In Globerson, A.; Mackey, L.; Belgrave, D.; Fan, A.; Paquet, U.; Tomczak, J.; and Zhang, C., eds., Advances in Neural Information Processing Systems, volume 37, 24375–24410. Curran Associates, Inc.
Elhage, N.; Hume, T.; Olsson, C.; Schiefer, N.; Henighan, T.; Kravec, S.; Hatfield-Dodds, Z.; Lasenby, R.; Drain, D.; Chen, C.; Grosse, R.; McCandlish, S.; Kaplan, J.; Amodei, D.; Wattenberg, M.; and Olah, C. 2022. Toy Models of Superposition. Transformer Circuits Thread. https://transformer-circuits.pub/2022/toy_model/index.html.
Elhage, N.; Nanda, N.; Olsson, C.; Henighan, T.; Joseph, N.; Mann, B.; Askell, A.; Bai, Y.; Chen, A.; Conerly, T.; DasSarma, N.; Drain, D.; Ganguli, D.; Hatfield-Dodds, Z.; Hernandez, D.; Jones, A.; Kernion,
J.; Lovitt, L.; Ndousse, K.; Amodei, D.; Brown, T.; Clark, J.; Kaplan, J.; McCandlish, S.; and Olah, C. 2021. A Mathematical Framework for Transformer Circuits. Transformer Circuits Thread. Https://transformer-circuits.pub/2021/framework/index.html.
Gandelsman, Y.; Efros, A. A.; and Steinhardt, J. 2024a. Interpreting CLIP's Image Representation via Text-Based Decomposition. In The Twelfth International Conference on Learning Representations.
Gandelsman, Y.; Efros, A. A.; and Steinhardt, J. 2024b. Interpreting the Second-Order Effects of Neurons in CLIP. arXiv preprint arXiv:2406.04341.
Gao, L.; la Tour, T. D.; Tillman, H.; Goh, G.; Troll, R.; Radford, A.; Sutskever, I.; Leike, J.; and Wu, J. 2025. Scaling and evaluating sparse autoencoders. In The Thirteenth International Conference on Learning Representations.
Goh, G.; Cammarata, N.; Voss, C.; Carter, S.; Petrov, M.; Schubert, L.; Radford, A.; and Olah, C. 2021. Multimodal Neurons in Artificial Neural Networks. Distill, 6(3): e30.
He, Z.; Wang, J.; Lin, R.; Ge, X.; Shu, W.; Tang, Q.; Zhang, J.; and Qiu, X. 2025. Towards Understanding the Nature of Attention with Low-Rank Sparse Decomposition. arXiv preprint arXiv:2504.20938.
Huben, R.; Cunningham, H.; Smith, L. R.; Ewart, A.; and Sharkey, L. 2024. Sparse Autoencoders Find Highly Interpretable Features in Language Models. In The Twelfth International Conference on Learning Representations.
Hufe, L.; Venhoff, C.; Dreyer, M.; Lapuschkin, S.; and Samek, W. 2025. Towards mechanistic defenses against typographic attacks in clip. arXiv preprint arXiv:2508.20570.
Ilharco, G.; Wortsman, M.; Gadre, S. Y.; Song, S.; Hajishirzi, H.; Kornblith, S.; Farhadi, A.; and Schmidt, L. 2022. Patching open-vocabulary models by interpolating weights. Advances in Neural Information Processing Systems, 35: 29262–29277.
Joseph, S.; Suresh, P.; Goldfarb, E.; Hufe, L.; Gandelsman, Y.; Graham, R.; Bzdok, D.; Samek, W.; and Richards, B. A. 2025. Steering CLIP's vision transformer with sparse autoencoders. In Mechanistic Interpretability for Vision at CVPR 2025 (Non-proceedings Track).
Kissane, C.; Krzyzanowski, R.; Bloom, J. I.; Conny, A.; and Nanda, N. 2024. Interpreting Attention Layer Outputs with Sparse Autoencoders. arXiv preprint arXiv:2406.17759.
Kornblith, S.; Norouzi, M.; Lee, H.; and Hinton, G. 2019. Similarity of Neural Network Representations Revisited. In Chaudhuri, K.; and Salakhutdinov, R., eds., Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, 3519–3529. PMLR.
Lee, H.; Battle, A.; Raina, R.; and Ng, A. 2006. Efficient sparse coding algorithms. Advances in neural information processing systems, 19.
Materzyńska, J.; Torralba, A.; and Bau, D. 2022. Disentangling Visual and Written Concepts in CLIP. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 16410–16419.
Olshausen, B. A.; and Field, D. J. 1997. Sparse coding with an overcomplete basis set: A strategy employed by V1? Vision research, 37(23): 3311–3325.
Pach, M.; Karthik, S.; Bouniot, Q.; Belongie, S.; and Akata, Z. 2025. Sparse Autoencoders Learn Monosemic Features in Vision-Language Models. In The Thirty-ninth Annual Conference on Neural Information Processing Systems.
Radford, A.; Kim, J. W.; Hallacy, C.; Ramesh, A.; Goh, G.; Agarwal, S.; Sastry, G.; Askell, A.; Mishkin, P.; Clark, J.; Krueger, G.; and Sutskever, I. 2021. Learning Transferable Visual Models From Natural Language Supervision. In Meila, M.; and Zhang, T., eds., Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, 8748–8763. PMLR.
Rajamanoharan, S.; Conmy, A.; Smith, L.; Lieberum, T.; Varma, V.; Kramár, J.; Shah, R.; and Nanda, N. 2024a. Improving Sparse Decomposition of Language Model Activations with Gated Sparse Autoencoders. In Globerson, A.; Mackey, L.; Belgrave, D.; Fan, A.; Paquet, U.; Tomczak, J.; and Zhang, C., eds., Advances in Neural Information Processing Systems, volume 37, 775–818. Curran Associates, Inc.
Rajamanoharan, S.; Lieberum, T.; Sonnerat, N.; Conmy, A.; Varma, V.; Kramár, J.; and Nanda, N. 2024b. Jumping ahead: Improving reconstruction fidelity with jumprelu sparse autoencoders. arXiv preprint arXiv:2407.14435.
Schuhmann, C.; Beaumont, R.; Vencu, R.; Gordon, C.; Wightman, R.; Cherti, M.; Coombes, T.; Katta, A.; Mullis, C.; Wortsman, M.; et al. 2022. Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in neural information processing systems, 35: 25278–25294.
Shekhar, A. 2021. ImageNet100. Kaggle. Accessed: 2026-01-16.
Su, J.; Kempe, J.; and Ullrich, K. 2025. From Concepts to Components: Concept-Agnostic Attention Module Discovery in Transformers. arXiv preprint arXiv:2506.17052.
Team, G.; Kamath, A.; Ferret, J.; Pathak, S.; Vieillard, N.; Merhej, R.; Perrin, S.; Matejovicova, T.; Ramé, A.; Rivière, M.; Rouillard, L.; Mesnard, T.; Cideron, G.; bastien Grill, J.; Ramos, S.; Yvinec, E.; Casbon, M.; Pot, E.; Penchev, I.; Liu, G.; Visin, F.; Kenealy, K.; Beyer, L.; Zhai, X.; Tsitsulin, A.; Busa-Fekete, R.; Feng, A.; Sachdeva, N.; Coleman, B.; Gao, Y.; Mustafa, B.; Barr, I.; Parisotto, E.; Tian, D.; Eyal, M.; Cherry, C.; Peter, J.-T.; Sinopalnikov, D.; Bhupatiraju, S.; Agarwal, R.; Kazemi, M.; Malkin, D.; Kumar, R.; Villar, D.; Brusilovsky, I.; Luo, J.; Steiner, A.; Friesen, A.; Sharma, A.; Sharma, A.; Gilady, A. M.; Goedeckemeyer, A.; Saade, A.; Feng, A.; Kolesnikov, A.; Bendebury, A.; Abdagic, A.; Vadi, A.; György, A.; Pinto, A. S.; Das, A.; Bapna, A.; Miech, A.; Yang, A.; Paterson, A.; Shenoy, A.; Chakrabarti, A.; Piot, B.; Wu, B.; Shahriari, B.; Petrini, B.; Chen, C.; Lan, C. L.; Choquette-Choo, C. A.; Carey, C.; Brick, C.; Deutsch, D.; Eisenbud, D.; Cattle, D.; Cheng, D.; Paparas, D.; Sreepathihalli, D. S.; Reid, D.; Tran, D.; Zelle, D.; Noland, E.; Huizenga, E.; Kharitonov, E.; Liu,
F.; Amirkhanyan, G.; Cameron, G.; Hashemi, H.; Klimczak-Plucińska, H.; Singh, H.; Mehta, H.; Lehri, H. T.; Hazimeh, H.; Ballantyne, I.; Szpektor, I.; Nardini, I.; Pouget-Abadie, J.; Chan, J.; Stanton, J.; Wieting, J.; Lai, J.; Orbay, J.; Fernandez, J.; Newlan, J.; yeong J, J.; Singh, J.; Black, K.; Yu, K.; Hui, K.; Vodrahalli, K.; Greff, K.; Qiu, L.; Valentine, M.; Coelho, M.; Ritter, M.; Hoffman, M.; Watson, M.; Chaturvedi, M.; Moynihan, M.; Ma, M.; Babar, N.; Noy, N.; Byrd, N.; Roy, N.; Momchev, N.; Chauhan, N.; Sachdeva, N.; Bunyan, O.; Botarda, P.; Caron, P.; Rubenstein, P. K.; Culliton, P.; Schmid, P.; Sessa, P. G.; Xu, P.; Stanczyk, P.; Tafti, P.; Shivanna, R.; Wu, R.; Pan, R.; Rokni, R.; Willoughby, R.; Vallu, R.; Mullins, R.; Jerome, S.; Smoot, S.; Girgin, S.; Iqbal, S.; Reddy, S.; Sheth, S.; Pöder, S.; Bhatnagar, S.; Panyam, S. R.; Eiger, S.; Zhang, S.; Liu, T.; Yacovone, T.; Liechty, T.; Kalra, U.; Evci, U.; Misra, V.; Roseberry, V.; Feinberg, V.; Kolesnikov, V.; Han, W.; Kwon, W.; Chen, X.; Chow, Y.; Zhu, Y.; Wei, Z.; Egyed, Z.; Cotruta, V.; Giang, M.; Kirk, P.; Rao, A.; Black, K.; Babar, N.; Lo, J.; Moreira, E.; Martins, L. G.; Sansevier, O.; Gonzalez, L.; Gleicher, Z.; Warkentin, T.; Mirrokni, V.; Senter, E.; Collins, E.; Barral, J.; Ghahramani, Z.; Hadsell, R.; Matias, Y.; Sculley, D.; Petrov, S.; Fiedel, N.; Shazeer, N.; Vinyals, O.; Dean, J.; Hassabis, D.; Kavukcuoglu, K.; Farabet, C.; Buchatskaya, E.; Alayrac, J.-B.; Anil, R.; Dmitry; Lepikhin; Borgeaud, S.; Bachem, O.; Joulin, A.; Andreev, A.; Hardin, C.; Dadashi, R.; and Hussenot, L. 2025. Gemma 3 Technical Report. arXiv preprint arXiv:2503.19786.
Tian, Y.; Krishnan, D.; and Isola, P. 2020. Contrastive Multiview Coding. In Computer Vision – ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XI, 776–794. Berlin, Heidelberg: Springer-Verlag. ISBN 978-3-030-58620-1.
Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A. N.; Kaiser, L. u.; and Polosukhin, I. 2017. Attention is All you Need. In Guyon, I.; Luxburg, U. V.; Bengio, S.; Wallach, H.; Fergus, R.; Vishwanathan, S.; and Garnett, R., eds., Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc.
Wang, W.; Gao, Z.; Gu, L.; Pu, H.; Cui, L.; Wei, X.; Liu, Z.; Jing, L.; Ye, S.; Shao, J.; et al. 2025. Internvl3. 5: Advancing open-source multimodal models in versatility, reasoning, and efficiency. arXiv preprint arXiv:2508.18265.
Waseda, F.; Yamabe, S.; Shiono, D.; Sasaki, K.; and Takahashi, T. 2025. Read or Ignore? A Unified Benchmark for Typographic-Attack Robustness and Text Recognition in Vision-Language Models. arXiv preprint arXiv:2512.11899.
Wu, C.; Li, J.; Zhou, J.; Lin, J.; Gao, K.; Yan, K.; Yin, S.-m.; Bai, S.; Xu, X.; Chen, Y.; et al. 2025. Qwen-image technical report. arXiv preprint arXiv:2508.02324.
Zaigrajew, V.; Baniecki, H.; and Biecek, P. 2025. Interpreting CLIP with Hierarchical Sparse Autoencoders. In Forty-second International Conference on Machine Learning.
Appendix
A Broader Impact
This work introduces and evaluates an intervention method against typographic attacks. We recognize the potential risks in releasing the method and results, but believe the advances in mechanistic understanding of how ViT processes information from distinct modalities outweigh these risks and promote stronger disentanglement and defense.
B Datasets and Text Augmentation
B.1 Dataset Details
Training Dataset. We train our sparse transcoder on ImageNet (Deng et al. 2009) with the self-supervised objective. Evaluation Datasets. We evaluate the defense methods on the following datasets:
-
RTA-100 (Azuma and Matsui 2023) consists of 100 categories and a 1000-item mixture of synthetic and real-world typographic attack images. The images are drawn from 10 regular image datasets, 2 typographic attack datasets, and additional images collected from the literature.
-
Disentangling (Materzyńska, Torralba, and Bau 2022) consists of 19 categories and 171 images, constructed with daily objects and attack text written on sticky notes.
-
PAINT (Ilharco et al. 2022) contains 110 images of daily objects and attack-text sticky notes.
-
ImageNet-100-Text-D is constructed from a 100-class subset of ImageNet (Tian, Krishnan, and Isola 2020). We use the validation set of 5000 images for data augmentation with Qwen-Image-Edit (Wu et al. 2025). We consider seven common types of texts that often coexist with objects across various scenarios and are visualized in ways not covered by previous datasets: neon sign, comic chat balloon, street sign, billboard, engraved metal plate, sculpted 3D CGI text, and obvious watermark. The prompt for generating the text-injected images is shown in Figure 6.
-
ImageNet-100 (Shekhar 2021) is a subset of ImageNet consisting of 100 classes. We use it to evaluate defense tradeoffs in regular image classification accuracy and compare with other methods.
User Prompt
<image> Add a {text_type} displaying the text "{text_word}" next to the {gt_text}.
Figure 6: Prompt for Typographic Image Editing. text_type refers to one of the seven text types we defined. text_word is chosen randomly from the class label set, excluding the ground truth label of the input image. gt_text refers to the ground truth label of the input image.
B.2 Text Injection Augmentation
The text injection augmentation for nTAS calculation is defined as follows. Given an unlabeled image dataset and a reference text set , for each image, we randomly choose text and text position index , where correspond to up, down, left, and right, respectively. Then we define the shrink factor and resize the image with original shape into if , or if . The text is rendered at the corresponding side as defined above with shape if , or if . Since we know the location of text during augmentation, it is trivial to obtain the text mask in Equation (10).
B.3 ImageNet-100-Text-D Samples
Figure 7 shows 16 images from the dataset. Notably, this dataset contains a broad range of text occurrences and object contexts, with occasional text-rendering errors due to an imperfect diffusion image-editing process.

Figure 7: Sampled Images from ImageNet-100-Text-D.
C Intervention Analysis on CLIP
C.1 Intervention Strength and Circuit Ablation Efficacy
Figure 8 shows that the intervention removes the most lexical information during CLIP encoding with maximal . The sweep shows a clean progression from full lexical-circuit-induced interference at to strong semantic focus at . The clean ImageNet-100 test accuracy is minimally affected across values of . The observations support our choice of in the applications.
C.2 Clean-Data Trade-off
As shown in the Clean column of Table 5, our method for defense against typographic attacks minimally degrades the performance of CLIP models' zero-shot object classification, even operating with no object class labels in the clarity score ranking setup. Notably, the nTAS selection's clean-accuracy cost matches or undercuts that of supervised Defense-Prefix training on ViT-L/14, ViT-H/14, and ViT-g/14 (-0.0/-0.4/-0.5 vs. -0.1/-0.4/-0.6 points), while Defense-Prefix, which fine-tunes a prefix, gains clean accuracy outright on ViT-B/16 and ViT-bigG/14. Compared to Hufe et al. (2025), the nTAS selection and all four gated variants stay within their 1% accuracy budget for greedy circuit finding on every backbone; the static CS selection exceeds it only on ViT-bigG/14 (-3.3, repaired to -0.4 by gating). Such an observation suggests that Hufe et al. (2025)'s bottom-up greedy circuit search based on attention-weight ranking suffers from noisy module ranking and may operate on correlation rather than causality: a text patch can receive high attention weights, but the message passed by the attention head to downstream modules may not be lexical shape. By contrast, our top-down method uses sparse decompositions of the attention head outputs to interpret the internal information processing of individual attention heads, eliminating the need for incremental greedy circuit search and improving attribution faithfulness. The causal relations are shown via gradient-based attribution in Figure 5.
C.3 ViT-B/16 Case Study
This section shows our intervention in action by visualizing attention and attribution maps from in-circuit heads. The changes in the image embeddings introduced by the intervention are demonstrated by examining the cosine similarities between the image embedding and the object text, and between the image embedding and the attack text. We present two cases: one from our diverse synthetic ImageNet-100-Text-D dataset (Obj: boar, Atk: cauliflower) and the other from the simple RTA-100 dataset (Obj: melon, Atk: pot). Figure 9a and Figure 9b show that our typographic circuit mining and attention reweighting intervention has successfully corrected the error in classification in both cases. A more detailed inspection in Figure 10a shows that the in-circuit attention heads produce activations that are attributed to the text regions in the image. The strength of attribution over attention is demonstrated in Layer 10 Head 7 and Layer 11 Head 1, where attention maps produce distracting maps to the text, whereas attribution yields faithful maps in the text region.
The case from RTA-100 in Figure 10b demonstrates further the robustness of our circuit mining method. The Layer 11 Head 11 attribution map does not fully cover the attack text in the boar-cauliflower example, but in the melon-pot example yields accurate attribution to the text. Conversely, the Layer 10 Head 7 attribution map captures the cauliflower text successfully, but does not cover the pot text. These changes in the behavior of the same attention head across images and texts indicate a division of labor among attention heads in processing lexical information. Our circuit mining method nonetheless captures these typographic-focusing heads despite such behavioral variance, demonstrating robustness.
D Red-Teaming the Clarity Score
Scoring-corpus contamination is not an operational attack scenario: the scoring corpus is chosen by the model owner, offline. We nevertheless stress-tested the metrics with adversarial text corpora to characterize their failure modes. Six conditions were applied to controlled 2,500 images: no overlay, one repeated word, a 5-word set, a 100-word set, scrambled glyphs, and a non-text overlay of the same geometry.
Failure mode and mechanism. With 100 distinct words for circuit mining, text-firing latents curate word-concentrated top sets: 69% (B/16, layer 11) and 49–78% (H/14, layers 26–31) have a single word on at least half of their top-10 images, and word concentration predicts a latent's CLIP-space CS at across these layers. Consequently (Table 3, Figure 11), CS scored on low-diversity text corpora collapses and the latent-level separation of text-firing latents under a single repeated word falls below our criterion fixed in advance of evaluation.
Remedy. Scoring the same top-activating sets in DINOv2 space, where no language supervision exists to cluster shared words, remains predictive under every manipulation: the geometric signal is genuine, and the CLIP embedding was the wrong measuring instrument for contaminated corpora. Note these paired-stimulus values are not comparable to the main text's natural-corpus budget curve (a larger and easier scoring setting; H/14 reaches 0.280 on this corpus vs. 0.374–0.404 on natural corpora).
Reading Table 3 and Figure 11. Each cell of Table 3 is a Spearman rank correlation computed as follows: score every late-layer head's CS on the corpus named by the row (2,500 held-out images, overlay content varied only), rank heads by that score, and correlate the ranking against the same heads' held-out causal effect — the per-head object-accuracy recovery measured by suppressing that head alone on the causal-evaluation split, which serves as ground truth for "is this head worth muting." Column pairs give the embedding space in which CS's cluster concentration is measured: CLIP space (the metric as used in the main text) and DINOv2 space (same top-activating image sets, re-embedded in a language-free encoder). The message is the interaction: rows with low text diversity (one word, 5-word set) destroy the CLIP-space columns (B/16 0.611 0.166; H/14 to exactly 0.000) because shared rendered words fake cluster tightness in a language-supervised space, while the DINOv2 columns stay in their normal range under every row — the top-activating sets themselves remain informative; only the measuring space was corrupted. Figure 11 plots the same twelve values with 95% bootstrap confidence intervals (resampling heads), so the collapse cells can be distinguished from noise: the H/14 5-word CLIP-space CI straddles zero, whereas every DINOv2 CI excludes it.

Figure 8: Intervention Strength vs. Performance. We sweep 5 values across [0,1] of , plot clean ImageNet-100 accuracy, and aggregate the Object Accuracy and the Attack Accuracy among all 5 tested CLIP models. Increasing gives consistent performance gain with minimal effect on clean data accuracy.

(a) Obj: boar, Atk: cauliflower.
(b) Obj: melon, Atk: pot.
Figure 9: Changes in object and attack text similarity. The bar plot shows the changes in cosine similarities of the CLIP image embedding to both the object text (Obj) and attack text (Atk). (a) The ImageNet-100-Text-D case. (b) The RTA-100 case.
| Corpus text | CLIP space | DINOv2 space | ||
|---|---|---|---|---|
| B/16 | H/14 | B/16 | H/14 | |
| none (clean) | 0.611 | 0.280 | 0.522 | 0.206 |
| one word | 0.479 | 0.135 | 0.590 | 0.230 |
| 5-word set | 0.166 | 0.000 | 0.592 | 0.284 |
| 100-word set | 0.329 | 0.190 | 0.480 | 0.306 |
| scrambled glyphs | 0.528 | 0.401 | 0.700 | 0.313 |
| non-text overlay | 0.610 | 0.251 | 0.555 | 0.177 |
Table 3: Red-teaming the Clarity Score. Spearman between the CS head ranking (scored on each contaminated corpus) and held-out causal effect. In CLIP space low-diversity text destroys the signal (H/14 CI contains zero); in a language-free space the same top-activating sets remain predictive throughout.
E Content Sensitivity of the Text-Attribution Signal
With identical border geometry per image, we compare real words against scrambled glyphs, a texture patch, a solid rectangle, and a blank border. Two findings. (i) nTAS detects rendered script, not readability: scrambled glyphs reproduce the real-text head ranking almost exactly (rank correlation 0.978 on B/16, 0.794 on H/14) with equal or better causal accuracy ( vs. 0.569/0.350). This is consistent with the mechanism: heads detect text form . (ii) Text specificity is model-dependent: on H/14, non-text overlays collapse the signal ( vs. 0.35–0.39 for script), cleanly dissociating script sensitivity from border salience; on B/16, solid and blank borders retain (texture 0.37), so smaller-model “lexical” heads overlap with generally border-attentive heads.
F Architecture Ablation at Equal Capacity
| Selector | vs. causal | Group (pt) | ||
|---|---|---|---|---|
| B/16 | H/14 | B/16 | H/14 | |
| Head-dec. nTAS | 0.569 | 0.350 | +12.5 | +15.3 |
| Monolithic nTAS | 0.576 | 0.340 | +14.4 | +17.6 |
| Direct grad. ratio | 0.654 | 0.403 | n/a | n/a |
| Head-dec. CS (50k) | 0.712 | 0.404 | +19.1 | +14.9 |
| Monolithic CS | 0.494 | 0.116 | n/a | n/a |
Table 4: Architecture ablation at equal capacity. Head ranking accuracy and group recovery on ImageNet-100-Text. Group here uses the held-out causal-evaluation split; the main table reports full-benchmark absolute accuracies, hence the different magnitudes. “n/a”: ranking-only baselines, evaluated for selection accuracy but not run as group interventions. nTAS rows here use the neutral-vocabulary scoring protocol (Appendix E). CS row: at the 50k scoring budget; its group uses the clean-corpus selection.
We train monolithic transcoders over concatenated heads (Kissane et al. 2024) at exactly the same budget (same total latents, K, seed, data, trainer) and report the trade

(a) ImageNet-100-Text-D case: object boar, attack cauliflower, injected as a neon sign.
(b) RTA-100 case: object melon, attack pot, injected via a sticker note.
Figure 10: Case visualizations. Each panel shows the text-injected image overlaid with the patch attention map of the <cls> token (rows 1, 3) and the average attribution maps of the Top-3 activations in each head (rows 2, 4). Post-intervention visualizations are omitted; patch tokens do not contribute to the <cls> representation at reweighting parameter .

Figure 11: Red-teaming the Clarity Score. 95% bootstrap CIs: CLIP-space scoring collapses under low-diversity text; DINov2-space scoring of the same top-activating sets does not.
plainly. In Table 4, each row is a head-selection strategy: our head-decomposed dictionaries scored by nTAS and by CS, the same scores computed on the equal-capacity monolithic dictionary (latents assigned to their dominant head), and a dictionary-free baseline that ranks heads directly by their gradient attribution ratio. The “ vs. causal” columns report the Spearman correlation between each selector’s head ranking and the per-head causal ground truth defined in Appendix D (higher = the selector orders heads closer to their
true causal importance). The “Group ” columns report the end effect: the change in object accuracy (points) on the held-out causal-evaluation split of ImageNet-100-Text when the selector’s chosen head group is suppressed together; ranking-only baselines that were never run as group interventions are marked n/a. Costs of head decomposition: the monolithic dictionary reconstructs better everywhere (FVU 0.068–0.094 vs. 0.088–0.120 on B/16; 0.107–0.214 vs. 0.136–0.258 across H/14 layers)—a 17–23% relative penalty—and, for defense-only head ranking, monolithic-derived and even dictionary-free direct selectors are as good (Table 4). What the constraint buys: monolithic latents are head-mixed at near-chance purity (dominant head energy share 0.10–0.14 vs. chance 0.06–0.08), so latent-to-head attribution is ill-posed without the constraint; and the label-free CS selector—the best single selector here and the only one usable with no synthetic text at all—degrades severely when built on dominant-head-assigned monolithic latents (0.712 0.494 on B/16, 0.404 0.116 on H/14). Head-local structure is load-bearing for label-free identification.
G Qualitative Concept Panels
Figure 12 grounds the two latent populations in examples. Each row is a single latent of the ViT-B/16 dictionaries: the top two rows are the highest-nTAS latents inside the selected lexical heads; the bottom two are low-nTAS latents drawn from the top-CS decile of the remaining heads of the same layer (row labels report each latent’s nTAS / CS). For each latent, the four highest-activating images on the clean corpus are shown with the latent’s analytic gradient attribution overlaid in red. The dissociation the two scores measure is directly visible: lexical latents fire on rendered text wherever it occurs, product labels, book typography, stock-photo watermarks, engraved plaques, across otherwise unrelated images (hence low CS), and their attribution lands on the text pixels themselves; semantic latents fire on visually coherent object clusters (hence high CS), with attribution on the object.
The same construction applies unchanged to the remaining four backbones (Figures 13 to 16), and the dissociation strengthens with scale: the selected lexical latents' nTAS rises from 0.92 (B/16) to 0.99 (bigG/14) while the semantic rows hold CS between 0.68 and 0.86; the lexical rows' content ranges over product labels, captions, watermarks, posters, and clock lettering, always with attribution on the text pixels.
The construction also transfers to the three LVLM vision towers (Figures 17 to 19), with two adaptations: scores are the raw text-region attribution fraction, and clarity is computed in each tower's own mean-pooled embedding space. Head selection uses the rendered scoring corpus, as in the method. On all three towers, the lexical latents' top natural images are unified by naturally occurring text, like signage, advertisements, watermarks, menus, product labels, with attribution on the text itself; InternVL's second lexical latent is a particularly clean script-form detector, firing on typewriter keys, keyboard keys, engraved bottle lettering, and stamped metal. Semantic rows form coherent object clusters on Qwen and InternVL, with Gemma's being the weakest.
H Per-Model Comparison Detail
Table 5 expands the macro-averaged main-text comparison to all five backbones and all methods, including the adaptive variants. The table is method-major: each block is one intervention strategy, with one row per CLIP backbone. Columns are zero-shot object-classification accuracy (%) on clean ImageNet-100 (with the signed change against that backbone's no-intervention row in parentheses) and on the four typographic-attack benchmarks (RTA-100, Disentangling, PAINT, ImageNet-100-Text-D). All non-starred rows are produced by our replication run of the official code releases. The gray * row copies the Dyslexify numbers as printed in the original paper, whose evaluation protocol differs, and is shown for reference. It is excluded from best/second-best ranking everywhere, which our methods outperform nonetheless in most cases. The adaptive variants track their static counterparts' attack accuracy within a few points while consistently shrinking the clean-accuracy column's loss.
I Statistical Detail
I.1 Main-Table Detail: Baselines, CIs, and Corrections
Table 6 expands the macro-averaged main-table comparison to per-model, per-benchmark detail. Within each backbone block, the “Base acc.” row gives the un-intervened zero-shot accuracy (%) on each benchmark column, and the four rows give the accuracy change (points) produced by Ours (CS), Ours (nTAS), and their gated (+Adaptive) variants. Every is computed against that run's own paired baseline — intervened and un-intervened predictions on the identical image set — so run-level nuisances cancel. The bracketed interval is a per-cell paired bootstrap: images are resampled with replacement times, the paired delta is recomputed on each resample, and the 2.5th/97.5th percentiles are reported. Because 20 attack cells are tested for the CS family (five models four attack benchmarks, one-sided), Holm correction is applied across them: 19/20 remain significant at 0.05; the exception is L/14 on PAINT-DS, whose 110 images make it the widest-CI column throughout. Two regularities to read off: every attack-column delta is positive on every backbone for all four variants, and the +Adaptive rows' Clean deltas never exceed -0.5 points in magnitude on any backbone — most with CIs containing zero — with the static outlier bigG/14 CS (-3.3) repaired to -0.4. Random-suppression baselines are characterized distributionally in Table 8. Selected head lists and gating thresholds are recorded in each run's manifest.
I.2 Data-Budget Sweep
Table 7 expands the budget curve summarized in the main text and answers “how much unlabeled data does CS scoring need.” N is the scoring-corpus size, subsampled from clean ImageNet-1k val with 3 random seeds per budget. For each seed the CS head ranking is recomputed from scratch at that budget; the columns report the seed-mean Spearman correlation against the same held-out per-head causal ground truth used throughout (Appendix D), separately for B/16 and H/14. p@k is precision-at-k: the fraction of the causal top-k heads recovered in the CS top-k, with k set to the top quartile of that model's scored heads. “Stab. (min)” is the worst-case reproducibility number: the minimum, over both models and all seed pairs at that budget, of the Spearman correlation between two seeds' rankings. The message: the ranking is essentially formed by N=1k-2k (stability already 0.90), improves modestly to a plateau at N=25k-50k, and the main-text operating point (50k) sits on that plateau rather than on a rising slope.
I.3 Per-Layer CS-nTAS Correlations
Figure 20 is the agreement check between our two selection signals, resolved at every scored layer. Its purpose: CS (geometric, computed from top-activating image clusters) and nTAS (attributional, computed from gradients into rendered-text regions) are derived from entirely different measurements, so if both track the same underlying property — how lexical a head is — their per-head scores should correlate wherever lexical heads exist. Each panel is one backbone; each point gives, at that transformer block, the Spearman correlation across the block's 16 attention heads between their CS-derived lexicality scores and their nTAS scores on the common axes. The shaded band is a 95% CI bootstrapped over the 16 heads and is accordingly wide — with n=16 per block, individual blocks are not separately significant, and no per-block claim is made. Curves start where scoring starts (for the deeper models, mid-depth, where the SDL dictionaries are trained; e.g. L/14 at block 4, bigG/14 at block 28).
L10:H7
lexical
nTAS 0.92 / CS 0.23

Donna Karan Cashmere Mist W


CAROLINA HERRERA 212
GENTY WOMAN
L10:H8
lexical
nTAS 0.92 / CS 0.27


L10:H4
semantic
nTAS 0.07 / CS 0.70

L10:H4
semantic
nTAS 0.08 / CS 0.72

Figure 12: Concept panels, ViT-B/16. Two lexical (top rows) and two semantic (bottom rows) latents — the four highest-activating images of each latent, with its analytic attribution overlaid in red. Row labels: layer:head, population, and nTAS / CS of the latent.
The orange span is the last 20% of each model's depth — the region the intervention actually draws from — and its 29 blocks across the five panels form the family of the aggregate test: all 29 sit above the dashed zero line (one-sided sign test , stated with the caveat that blocks within a model are not independent samples). The pattern to see is the depth trend: early blocks fluctuate around zero (B/16 blocks 0–2, L/14 blocks 4–10), and the curves become consistently positive from mid-depth onward, which is exactly where lexical processing concentrates.
I. 4 Random Head Suppression over Twenty Draws
Table 8 characterizes random head suppression at the selection's own set size: for each backbone, 20 head sets of exactly the CS selection's size are drawn uniformly from the same late-layer pool (seeds 1000–1019) and each is run through the identical intervention and evaluation pipeline. Columns report, over the 20 draws, the mean standard deviation and the [min, max] range of the change in object accuracy (points) relative to no intervention — left pair on ImageNet-100-Text (higher is better), right pair on clean ImageNet-100 (closer to zero is better).
Random suppression is high-variance (per-model sd 7.0–

Figure 13: Concept panels, ViT-L/14.
17.0 points on ImageNet-100-Text) and unreliable: mean recovery never exceeds +7.9 points and is negative on three of the five models. The CS selection's per-model recovery on ImageNet-100-Text-D (+12.8 to +23.3; Table 5) exceeds the best of the twenty random draws on every model (+11.8/+11.7/+16.5/+16.4/+12.6), though we note the bigG/14 margin is only 0.2 points; the reliable contrast there is the mean (+12.8 vs. -3.7) and the clean cost. Random draws are also far costlier on clean data (mean -3.9 to -11.6 points; worst draws -23 to -62), versus at most -3.3 points for CS selection.
I.5 Hybrid Selection
Averaging the two normalized axes matches the best single signal on B/16 (+18.6 vs. +19.1) and is best on H/14 under
the evaluation-split scoring protocol (+16.1, lowest clean cost); under the smaller 10k-corpus scoring protocol the H/14 hybrid degrades. We therefore recommend the hybrid only when both signals are computed at adequate budget, and CS alone when only label-free scoring is available.
J LVLM Experiments: Native-Encoder Protocol and Selection Stability
J.1 Protocol
For each LVLM (Gemma-3, Qwen3-VL, InternVL3.5 families), we train Top-K (, seed 123, expansion ) head-decomposed transcoders on activations of the model's native vision encoder (SigLIP for Gemma-3, the packed Qwen3-VL encoder, InternViT for InternVL3.5) cached over

Figure 14: Concept panels, ViT-H/14.
ImageNet; heads are scored with the same text-region attribution protocol on RIO-Bench renderings, the selected tail is zero-ablated, and VQA accuracy is measured on RIO-Bench splits (3,166 examples each). No OpenCLIP component is transferred at any point. Head selections are stable under independent dictionary retraining (Appendix K).
J.2 VQA Accuracy Across Model Scales
To demonstrate the extension of the disentanglement to LVLMs, we test Gemma3 (Team et al. 2025), Qwen3-VL (Bai et al. 2025) and InternVL3.5 (Wang et al. 2025) on a typographic attack VQA dataset, RIO-Bench (Waseda et al. 2025). Table 9 reports VQA accuracy across the four multiple-choice splits: clean, easy, medium, and hard. Each split contains 3166 VQA triplets. We adapt the zero-ablation
intervention on the lexical circuits by overriding the lexical attention head's output to zero vectors, as LVLM vision encoders may not include a dedicated class token, and all patch tokens are passed to the downstream language model.
Notably, our disentanglement and intervention pipeline increased VQA accuracy on two of the three LVLM lines tested, namely Gemma3 and Qwen3-VL, with modest margins in which head indentification matters mainly on the hardest split; we make no head-selection-superiority claim at LVLM scale. The InternVL3.5 models do not show significant improvement under the intervention, which may be due to their specific adapter design and handling of visual tokens. The three 8–12B towers of this sweep are also evaluated in Table 11; those counts come from a later independent execution and differ from this sweep's percentages within

Figure 15: Concept panels, ViT-g/14.
run-to-run evaluation noise (0.8 points).
J.3 Random-Head Comparison
A per-layer random head specification of the same size (single draw, seed 123) evaluated identically (Table 10; Accuracy = % of the 3,166 multiple-choice examples answered correctly under Base / our selection / the random draw, ASR = attack-success rate, the % of attacked examples where the model outputs the attack-injected label instead of the object — lower is better, undefined on the clean split) shows that on the easy and medium splits, random same-layer ablation recovers essentially the same accuracy as the selected heads (differences of -5 to +1 correct out of 3,166, within run-to-run evaluation noise). Head identity separates from random only on the hard split (+28 correct; the random draw
raises attack-success rate over Base by +0.57 points where ours lowers it) and in clean degradation (-0.13 vs. -0.44 points). The Base-to-Ours deltas on this line are small ( +1 point), and we accordingly make no LVLM head-selection-superiority claim: the LVLM evidence establishes that the model-specific procedure runs natively and that its selections are reproducible, with a modest effect in which head identity matters mainly on the hardest split. Single-draw caveat: one random specification per split.
J.4 Adaptive Gating on the LVLM Towers
We port the adaptive intervention to all three towers (firing statistic: mean token-wise output-contribution norm; calibration on 500 text-free ImageNet images; selected on a held-in half of the easy split). Notably, tuning selects

Figure 16: Concept panels, ViT-bigG/14.
on all three towers. Table 11 reports correct counts (/3166) per RIO-Bench split (clean, and the easy/medium/hard attack tiers) for three variants of each tower: Base (no intervention), Static (unconditional zero-ablation of the selected heads on every input), and Adaptive (the same ablation applied per-image only to heads whose firing statistic exceeds its clean calibration by standard deviations). The three lines span the full regime of the mechanism, and paired exact tests (McNemar over items, two-sided) calibrate every comparison. On Gemma, the most typographically sensitive tower, the gated intervention separates decisively from no intervention (easy ; attack splits pooled ) — a stronger separation than static ablation achieves (/ n.s. per split) — and its point estimates exceed static on every attack split; the adaptive-static
differences themselves, however, are within paired noise (pooled ), so the supported claim is that gating matches static protection at half the (already small) clean cost, not that it exceeds it. Head identity separates from the equal-size random draw on the hard split (; pooled ). On Qwen, whose tower is more robust at baseline, the intervention effect is the most decisive of the three lines (adaptive vs. base pooled ); static ablation is free on clean data there, and its small attack-split advantage over gating is real (pooled ), so on that tower always-on suppression is simply the better operating point. On InternVL, neither static nor adaptive ablation moves accuracy (within of base everywhere) although the gate demonstrably fires (~1.8 of 9 selected heads per image): the selected heads are not causally implicated on this tower,
L25:H11
lexical
TAS 0.78 / CS 0.18

L25:H11
lexical
TAS 0.77 / CS 0.19

L24:H14
semantic
TAS 0.14 / CS 0.52

L24:H14
semantic
TAS 0.14 / CS 0.26

Figure 17: Concept panels, Qwen3-VL-8B vision tower. Scores are TAS / CS evaluated with a CLIP ViT-B/16 reference encoder.
consistent with its higher baseline robustness.
K Random-Seed Stability of Head Selection
Head selection depends on trained dictionaries, so we check that it is a property of the encoder rather than of one training run's randomness. On CLIP ViT-B/16, the late-layer dictionaries were retrained from scratch under two additional seeds (124, 125; identical data, budget, and K): the per-head CS rankings from the three seeds agree at pairwise Spearman (0.997/0.990/0.989 for the three seed pairs), so the selected head set is unchanged. On the LVLM towers, every dictionary was trained twice from independent runs and the selections recomputed: Gemma recovers the same head specification exactly on two of four evaluation splits,
with a single-head jitter at one layer on the other two (the same jitter site in both runs); Qwen is exact on three of four splits with one head differing on the fourth. InternVL marks the boundary of this stability: the per-layer Jaccard overlap between its two runs' selections falls from 1.0 at the shallowest selected layer to 0.25 at the deepest — and this is also the tower on which the intervention has no effect (Table 11), consistent with the reading that where the selection is not stable, there is no localized circuit to find. Raw per-head score vectors and comparison records for all towers accompany the code-and-data supplement.
L20:H7 lexical TAS 0.87 / CS 0.22

TEMPORALLY OUT OF ORDER TOUCH SCREEN MENU IS NOT WORKING
L20:H7 lexical TAS 0.82 / CS 0.30

L21:H2 semantic TAS 0.05 / CS 0.61

L23:H8 semantic TAS 0.05 / CS 0.69

Figure 18: Concept panels, InternVL3.5-8B vision tower. Scores are TAS / CS evaluated with a CLIP ViT-B/16 reference encoder.
L Threat Model and Adaptive Attacks
Our defense mutes a fixed set of script-sensitive heads; it is a static defense against a static attack family. The content-sensitivity comparisons of Appendix E show the selected heads respond to rendered script form generally (scrambled glyphs rank-correlate 0.98/0.79 with real words), so attacks that merely change wording or font family remain within the detected family; attacks that move text outside the script-form distribution (e.g., extreme warping, handwriting, very low contrast) or that target the unselected middle of the head distribution are not covered by our evaluation and are plausible adaptive strategies. Separately, muting script-sensitive heads by design trades away legitimate text perception (scene-text reading); quantifying that capability cost
on OCR-style probes is left to future work (the intervention hook in the code supplement exposes the required machinery). These are disclosed limitations, not claims.
M Adaptive Head Gating
Static muting acts unconditionally, including on clean inputs. An input-adaptive variant keeps the operator fixed and makes only the per-image decision adaptive: for each selected head, precompute the mean and standard deviation of its CLS output-contribution norm on a clean held-in corpus (no labels), and at test time mute the head for a given image only when it fires beyond its clean statistics, , applying the reallocation when triggered and leaving the forward pass untouched otherwise. Clean
L22:H11
lexical
TAS 0.70 / CS 0.23

L22:H11
lexical
TAS 0.68 / CS 0.27

L26:H1
semantic
TAS 0.10 / CS 0.31

L26:H11
semantic
TAS 0.11 / CS 0.45

Figure 19: Concept panels, Gemma-3 12B SigLIP tower. Scores are TAS / CS evaluated with a CLIP ViT-B/16 reference encoder.

(a) B/16
(b) L/14
(c) H/14
(d) g/14
(e) bigG/14
Figure 20: Per-layer CS-nTAS agreement. Spearman correlation at every scored transformer block, one panel per backbone. Each point is the correlation, across the 16 heads of that block, between the two per-head lexicality scores; the shaded band is the 95% bootstrap CI over heads, the dashed line marks , and the orange region is the last 20% of depth — the region interventions draw from, and the 29-block family of the sign test.
| Method | Model | IN-100 (Clean) | RTA-100 | Disentangling | PAINT | IN-100-Text-D |
|---|---|---|---|---|---|---|
| No intervention | ViT-B/16 | 74.8 | 56.4 | 46.2 | 59.1 | 54.6 |
| ViT-L/14 | 79.9 | 54.6 | 46.2 | 60.9 | 58.2 | |
| ViT-H/14 | 83.8 | 53.4 | 39.4 | 50.9 | 56.6 | |
| ViT-g/14 | 83.8 | 50.2 | 53.8 | 54.5 | 56.9 | |
| ViT-bigG/14 | 85.4 | 60.9 | 42.5 | 50.0 | 62.4 | |
| Defense-Prefix | ViT-B/16 | 75.4 (+0.7) | 65.6 | 84.4 | 68.0 | 69.9 |
| ViT-L/14 | 79.8 (-0.1) | 62.9 | 77.2 | 71.8 | 71.6 | |
| ViT-H/14 | 83.4 (-0.4) | 63.5 | 67.2 | 64.1 | 70.4 | |
| ViT-g/14 | 83.2 (-0.6) | 58.1 | 60.0 | 66.0 | 66.7 | |
| ViT-bigG/14 | 85.4 (+0.1) | 67.8 | 50.0 | 68.9 | 71.7 | |
| Dyslexify | ViT-B/16 | 75.3 (+0.5) | 67.9 | 83.9 | 69.9 | 73.5 |
| ViT-L/14 | 79.5 (-0.3) | 69.3 | 60.6 | 79.6 | 75.0 | |
| ViT-H/14 | 83.4 (-0.4) | 66.1 | 53.9 | 68.9 | 70.3 | |
| ViT-g/14 | 83.0 (-0.8) | 59.9 | 64.4 | 74.8 | 67.7 | |
| ViT-bigG/14 | 85.1 (-0.3) | 67.5 | 55.6 | 61.2 | 70.6 | |
| Dyslexify* | ViT-B/16 | 75.0 (+0.2) | 68.3 | 85.0 | 72.7 | - |
| ViT-L/14 | 79.5 (-0.4) | 71.0 | 60.6 | 76.4 | - | |
| ViT-H/14 | 83.4 (-0.4) | 68.3 | 72.2 | 70.9 | - | |
| ViT-g/14 | 82.6 (-1.2) | 62.0 | 67.2 | 71.8 | - | |
| ViT-bigG/14 | 84.7 (-0.6) | 72.9 | 68.3 | 69.1 | - | |
| Ours (CS) | ViT-B/16 | 74.4 (-0.4) | 66.1 | 86.2 | 67.3 | 73.2 |
| ViT-L/14 | 79.6 (-0.3) | 66.2 | 70.0 | 67.3 | 72.8 | |
| ViT-H/14 | 83.3 (-0.5) | 75.2 | 86.2 | 76.4 | 79.9 | |
| ViT-g/14 | 83.0 (-0.8) | 67.2 | 86.2 | 72.7 | 75.4 | |
| ViT-bigG/14 | 82.1 (-3.3) | 74.7 | 83.1 | 70.9 | 75.2 | |
| Ours (nTAS) | ViT-B/16 | 74.2 (-0.5) | 68.7 | 86.9 | 70.9 | 74.2 |
| ViT-L/14 | 79.9 (-0.0) | 67.7 | 64.4 | 65.5 | 74.2 | |
| ViT-H/14 | 83.4 (-0.4) | 75.6 | 79.4 | 78.2 | 79.1 | |
| ViT-g/14 | 83.3 (-0.5) | 66.0 | 81.2 | 73.6 | 75.5 | |
| ViT-bigG/14 | 84.7 (-0.7) | 75.8 | 66.9 | 70.0 | 80.3 | |
| Ours (CS+Adaptive) | ViT-B/16 | 74.5 (-0.3) | 66.3 | 85.0 | 67.3 | 72.2 |
| ViT-L/14 | 79.8 (-0.1) | 64.7 | 67.5 | 65.5 | 73.1 | |
| ViT-H/14 | 83.9 (+0.1) | 71.7 | 77.5 | 71.8 | 77.6 | |
| ViT-g/14 | 83.7 (-0.1) | 65.1 | 79.4 | 71.8 | 74.5 | |
| ViT-bigG/14 | 84.9 (-0.4) | 70.6 | 74.4 | 65.5 | 76.9 | |
| Ours (nTAS+Adaptive) | ViT-B/16 | 74.4 (-0.3) | 67.5 | 86.2 | 70.9 | 73.8 |
| ViT-L/14 | 79.8 (-0.1) | 65.6 | 62.5 | 63.6 | 74.3 | |
| ViT-H/14 | 83.6 (-0.2) | 74.8 | 77.5 | 76.4 | 78.0 | |
| ViT-g/14 | 83.3 (-0.5) | 63.8 | 74.4 | 72.7 | 74.8 | |
| ViT-bigG/14 | 85.0 (-0.4) | 75.2 | 64.4 | 69.1 | 79.9 |
Table 5: Per-model comparison. All intervention strategies; conventions as in the main text; * rows as reported by the original authors (gray; their own evaluation protocol rather than ours).
inputs rarely trigger the gate, so clean cost is near zero by construction; is tuned on held-in data only.
Table 12 reports the full matrix — five models, both selections, tuned per configuration — under the tuning-split protocol ( tuned on the even-index half of ImageNet-100-Text-D; IN100-T reports the held-out half; clean on the evaluation half).
Columns: selection signal and variant (Static = always-on muting; Gated = the input-conditional gate), the tuned threshold ( units; “–” for Static, which has no threshold), then the accuracy change in points against the paired un-intervened baseline on the four attack benchmarks and clean ImageNet-100. held-out half of the tuning benchmark. clean-cost 95% CI contains zero — true for the gated variant in all ten configurations (both selections, all five models); the static variant’s clean cost excludes zero on three configurations (B/16-nTAS, g/14-CS, bigG/14-CS). Tuned thresholds per configuration are listed in the column of Table 12
| Model | Quantity | RTA-100 | Disent. | PAINT | IN100-T | Clean |
|---|---|---|---|---|---|---|
| B/16 | Base acc. (%) | 56.4 | 46.2 | 59.1 | 54.6 | 74.8 |
| CS Δ [CI] | +9.7 [+7.5, +11.9] | +40.0 [+32.5, +47.5] | +8.2 [+0.9, +15.5] | +18.6 [+17.4, +19.9] | -0.4 [-1.0, +0.2] | |
| nTAS Δ [CI] | +12.3 [+10.0, +14.6] | +40.6 [+33.1, +48.1] | +11.8 [+3.6, +20.0] | +19.6 [+18.4, +20.9] | -0.5 [-1.2, +0.1] | |
| CS+Adaptive Δ [CI] | +9.9 [+7.8, +12.0] | +38.8 [+31.2, +46.2] | +8.2 [+1.8, +15.5] | +17.6 [+16.4, +18.9] | -0.3 [-0.6, +0.0] | |
| nTAS+Adaptive Δ [CI] | +11.1 [+8.9, +13.4] | +40.0 [+32.5, +47.5] | +11.8 [+4.5, +19.1] | +19.2 [+18.0, +20.5] | -0.3 [-0.8, +0.2] | |
| L/14 | Base acc. (%) | 54.6 | 46.2 | 60.9 | 58.2 | 79.9 |
| CS Δ [CI] | +11.6 [+9.3, +14.0] | +23.8 [+16.9, +30.6] | +6.4 [-2.7, +15.5] | +14.6 [+13.5, +15.7] | -0.3 [-0.9, +0.3] | |
| nTAS Δ [CI] | +13.1 [+10.7, +15.5] | +18.1 [+11.9, +24.4] | +4.5 [-4.5, +13.6] | +16.0 [+14.9, +17.2] | -0.0 [-0.6, +0.6] | |
| CS+Adaptive Δ [CI] | +10.1 [+8.1, +12.2] | +21.2 [+15.0, +27.5] | +4.5 [-3.6, +12.7] | +14.9 [+13.8, +16.0] | -0.1 [-0.3, +0.2] | |
| nTAS+Adaptive Δ [CI] | +11.0 [+8.8, +13.2] | +16.2 [+10.0, +22.5] | +2.7 [-5.5, +10.9] | +16.1 [+15.0, +17.3] | -0.1 [-0.4, +0.2] | |
| H/14 | Base acc. (%) | 53.4 | 39.4 | 50.9 | 56.6 | 83.8 |
| CS Δ [CI] | +21.8 [+19.0, +24.6] | +46.9 [+39.4, +54.4] | +25.5 [+16.4, +34.5] | +23.3 [+22.0, +24.6] | -0.5 [-1.0, +0.1] | |
| nTAS Δ [CI] | +22.2 [+19.4, +25.0] | +40.0 [+31.9, +48.1] | +27.3 [+18.2, +36.4] | +22.5 [+21.2, +23.7] | -0.4 [-0.9, +0.0] | |
| CS+Adaptive Δ [CI] | +18.3 [+15.7, +20.9] | +38.1 [+30.6, +45.6] | +20.9 [+11.8, +30.0] | +20.9 [+19.7, +22.1] | +0.1 [-0.2, +0.5] | |
| nTAS+Adaptive Δ [CI] | +21.4 [+18.7, +24.1] | +38.1 [+30.6, +46.2] | +25.5 [+17.3, +33.6] | +21.4 [+20.2, +22.6] | -0.2 [-0.5, +0.2] | |
| g/14 | Base acc. (%) | 50.2 | 53.8 | 54.5 | 56.9 | 83.8 |
| CS Δ [CI] | +17.0 [+14.5, +19.5] | +32.5 [+25.6, +40.0] | +18.2 [+9.1, +27.3] | +18.5 [+17.4, +19.7] | -0.8 [-1.3, -0.2] | |
| nTAS Δ [CI] | +15.7 [+13.3, +18.2] | +27.5 [+20.6, +34.4] | +19.1 [+10.0, +28.2] | +18.6 [+17.4, +19.8] | -0.5 [-1.1, +0.1] | |
| CS+Adaptive Δ [CI] | +14.8 [+12.5, +17.1] | +25.6 [+18.8, +32.5] | +17.3 [+10.0, +25.5] | +17.6 [+16.5, +18.7] | -0.1 [-0.5, +0.3] | |
| nTAS+Adaptive Δ [CI] | +13.5 [+11.2, +15.8] | +20.6 [+13.8, +27.5] | +18.2 [+10.0, +26.4] | +17.9 [+16.8, +19.0] | -0.5 [-0.9, -0.1] | |
| bigG/14 | Base acc. (%) | 60.9 | 42.5 | 50.0 | 62.4 | 85.4 |
| CS Δ [CI] | +13.8 [+11.2, +16.5] | +40.6 [+33.1, +48.1] | +20.9 [+11.8, +30.0] | +12.8 [+11.6, +14.1] | -3.3 [-4.0, -2.6] | |
| nTAS Δ [CI] | +14.8 [+12.5, +17.2] | +24.4 [+18.1, +31.2] | +20.0 [+12.7, +28.2] | +18.0 [+16.9, +19.2] | -0.6 [-1.1, -0.2] | |
| CS+Adaptive Δ [CI] | +9.6 [+7.4, +11.7] | +31.9 [+25.0, +39.4] | +15.5 [+7.3, +23.6] | +14.6 [+13.4, +15.7] | -0.4 [-0.7, -0.1] | |
| nTAS+Adaptive Δ [CI] | +14.2 [+12.0, +16.5] | +21.9 [+15.6, +28.7] | +19.1 [+11.8, +27.3] | +17.6 [+16.4, +18.7] | -0.4 [-0.7, -0.0] |
Table 6: Main-table detail. Baseline accuracies and per-cell paired-bootstrap deltas with 95% CIs ( resamples) for both selection signals and their gated variants, computed against each run's own paired baseline. Holm correction over the 20-cell CS attack family (five models four attack sets, one-sided): 19/20 cells remain significant at 0.05. Random-suppression distributions: Table 8.
| N | B/16 | H/14 | Stab. (min) | ||
|---|---|---|---|---|---|
| p@k | p@k | ||||
| 1k | 0.553 | 0.72 | 0.374 | 0.39 | 0.903 |
| 2k | 0.607 | 0.83 | 0.370 | 0.39 | 0.956 |
| 5k | 0.658 | 0.83 | 0.387 | 0.43 | 0.978 |
| 10k | 0.670 | 0.83 | 0.378 | 0.43 | 0.986 |
| 25k | 0.711 | 0.83 | 0.391 | 0.47 | 0.995 |
| 50k | 0.712 | 0.83 | 0.404 | 0.46 | - |
Table 7: Data-budget sweep. Clean ImageNet-1k val (3 subsample seeds per budget; mean and precision@k; minimum pairwise cross-seed rank stability across both models).
| Model | IN100-T (pts) | Clean (pts) | ||
|---|---|---|---|---|
| meansd | [min, max] | meansd | [min, max] | |
| B/16 | -5.1 12.4 | [-35.9, +11.8] | -11.6 15.1 | [-62.1, +0.1] |
| L/14 | -0.8 12.7 | [-45.3, +11.7] | -8.2 13.0 | [-55.5, -0.6] |
| H/14 | +7.9 7.0 | [-14.1, +16.5] | -4.3 4.6 | [-23.3, -1.5] |
| g/14 | +4.8 9.5 | [-19.5, +16.4] | -3.9 5.4 | [-24.0, +0.2] |
| bigG | -3.7 17.0 | [-45.6, +12.6] | -8.9 13.8 | [-54.3, -0.6] |
Table 8: Random head suppression over twenty draws. Head sets of the CS selection's size; change in object accuracy versus no intervention on ImageNet-100-Text and on clean ImageNet-100 (points).
and recorded in the evaluation-run manifests; the main paper's Adaptive rows re-evaluate the same (, statistics) under the full-benchmark protocol of the main table. On B/16 the gate matches static muting on every attack benchmark at zero measured clean cost; on H/14 it retains most of the recovery. A patch-level adaptive variant probing a single mean lexical direction was also evaluated and does not recover attack accuracy (its per-head mean direction washes out over word-selective latents; localization AUC 0.37–0.65, versus 0.74–0.92 for per-latent probes), which is why the head-level gate is the variant reported.
N CKA Context: Late-Layer Head Decorrelation
Centered Kernel Alignment (CKA; Kornblith et al., 2019) across normalized ViT depth provides descriptive context for the per-head decomposition: in the last 20% of CLIP ViT blocks, attention heads grow mutually decorrelated (Figure 21, left), while individual head outputs align more closely with the final image [cls] embedding (right). We treat this as context rather than primary motivation: the residual stream is additive, so later-block alignment with the final [cls] embedding is partially expected by construction. The primary evidence that the per-head unit is the right granularity is the equal-capacity ablation against a monolithic dictionary
| Model | Clean | Easy | Medium | Hard | ||||
|---|---|---|---|---|---|---|---|---|
| Base | Ours | Base | Ours | Base | Ours | Base | Ours | |
| Gemma-3 4B | 93.7 | 94.4 | 48.0 | 49.8 | 46.5 | 47.6 | 38.6 | 40.7 |
| Gemma-3 12B | 94.6 | 94.6 | 49.9 | 52.3 | 48.7 | 49.8 | 46.1 | 47.5 |
| InternVL3.5 4B | 92.0 | 91.6 | 55.1 | 54.8 | 47.4 | 47.7 | 36.1 | 35.9 |
| InternVL3.5 8B | 95.3 | 95.3 | 63.6 | 63.7 | 60.7 | 60.7 | 50.3 | 50.2 |
| InternVL3.5 14B | 92.0 | 91.8 | 56.9 | 57.0 | 55.7 | 55.8 | 46.6 | 46.7 |
| Qwen3-VL 8B | 94.9 | 95.2 | 74.1 | 75.8 | 71.3 | 73.5 | 64.5 | 66.1 |
| Qwen3-VL 30B-A3B | 83.7 | 84.1 | 67.3 | 69.6 | 66.7 | 67.8 | 60.9 | 63.1 |
Table 9: VQA accuracy under typographic attacks. Accuracy in %. Base: vision encoder without intervention; Ours: vision encoder with intervention. Bold marks the higher value within each pair. Clean, Easy, Medium, Hard denote the splits, with Clean split free of lexical interference.
| Split | Accuracy (%) | ASR (%) | ||||
|---|---|---|---|---|---|---|
| Base | Ours | Rand. | Base | Ours | Rand. | |
| clean | 94.76 | 94.63 | 94.31 | – | – | – |
| easy | 50.69 | 51.67 | 51.83 | 48.42 | 47.41 | 47.28 |
| medium | 48.61 | 49.65 | 49.62 | 50.66 | 49.40 | 49.53 |
| hard | 46.65 | 46.90 | 46.02 | 52.65 | 52.40 | 53.22 |
Table 10: Selected heads vs. an equal-size random draw. Gemma-3 12B. Base columns are identical between the two runs (bit-stable).
| Tower | Variant | clean | easy | medium | hard |
|---|---|---|---|---|---|
| Gemma-3 12B | Base | 3000 | 1605 | 1539 | 1477 |
| Static | 2996 | 1636 | 1572 | 1485 | |
| Adaptive | 2998 | 1653 | 1577 | 1495 | |
| Qwen3-VL 8B | Base | 3010 | 2349 | 2255 | 2055 |
| Static | 3011 | 2416 | 2319 | 2109 | |
| Adaptive | 3010 | 2406 | 2306 | 2090 | |
| InternVL3.5 8B | Base | 3019 | 2022 | 1924 | 1586 |
| Static | 3017 | 2019 | 1925 | 1584 | |
| Adaptive | 3020 | 2023 | 1923 | 1586 |
Table 11: Adaptive gating on three LVLM vision towers. RIO-Bench, correct counts out of 3166; on every tower). Bold marks the best intervention per attack split where any intervention beats base.
(Appendix F).
O Computational Cost and Infrastructure
O.1 Method Cost Comparison
Table 13 summarizes the per-image compute footprint of each method. Defense-Prefix (Azuma and Matsui 2023) optimizes a learnable prefix and therefore propagates gradients through the full ViT for epochs, dominated by the cost of differentiating through the encoder. Dyslexify (Hufe et al. 2025) performs greedy circuit search by evaluating one (layer, head) module per training image, scaling its inference cost as . Our pipeline runs a single ViT forward pass per image to extract intermediate representations, then trains the head-decomposed transcoder offline on the cached
| Model | Variant | RTA | Disent. | PAINT | IN100-T | Clean | |
|---|---|---|---|---|---|---|---|
| nTAS selection | |||||||
| ViT-B/16 | Static | – | +12.3 | +40.6 | +11.8 | +20.0 | -1.2 |
| Gated | 0.25 | +11.1 | +40.0 | +11.8 | +19.6 | -0.6° | |
| ViT-L/14 | Static | – | +13.1 | +18.1 | +4.5 | +16.1 | -0.0° |
| Gated | 1.0 | +11.0 | +16.2 | +2.7 | +16.0 | +0.0° | |
| ViT-H/14 | Static | – | +22.2 | +40.0 | +27.3 | +22.6 | -0.4° |
| Gated | 0.5 | +21.3 | +38.1 | +25.5 | +21.5 | -0.1° | |
| ViT-g/14 | Static | – | +15.7 | +27.5 | +19.1 | +19.6 | -0.2° |
| Gated | 0.25 | +13.5 | +20.6 | +18.2 | +18.7 | -0.1° | |
| ViT-bigG/14 | Static | – | +14.9 | +24.4 | +20.0 | +18.5 | -0.3° |
| Gated | 0.25 | +14.4 | +21.9 | +19.1 | +17.8 | -0.2° | |
| CS selection | |||||||
| ViT-B/16 | Static | – | +9.7 | +40.0 | +8.2 | +19.2 | -0.6° |
| Gated | 1.0 | +9.9 | +38.8 | +8.2 | +18.9 | -0.2° | |
| ViT-L/14 | Static | – | +11.6 | +23.8 | +6.4 | +14.5 | -0.6° |
| Gated | 1.5 | +10.1 | +21.2 | +4.5 | +14.5 | +0.1° | |
| ViT-H/14 | Static | – | +21.8 | +46.9 | +25.5 | +23.4 | -0.6° |
| Gated | 1.0 | +18.4 | +38.1 | +20.9 | +21.3 | +0.2° | |
| ViT-g/14 | Static | – | +17.0 | +32.5 | +18.2 | +19.9 | -0.8 |
| Gated | 0.25 | +15.0 | +27.5 | +17.3 | +19.1 | +0.1° | |
| ViT-bigG/14 | Static | – | +13.8 | +40.6 | +20.9 | +12.0 | -2.9 |
| Gated | 1.5 | +9.9 | +31.9 | +15.5 | +14.4 | -0.4° | |
Table 12: Adaptive gating details. Five models reported, on both selection signals, with tuned per configuration, under the tuning-split protocol. Cells are accuracy deltas (points) against each run’s paired un-intervened baseline.
activations; once trained, circuit mining only consumes the precomputed nTAS and CS scores and incurs no further ViT compute. The head-wise factorization in Section 3.2 further reduces the encoder parameter count by times.
O.2 Infrastructure and Evidence Map
All experiments ran on a single node with 8× NVIDIA RTX A6000 (48 GB) GPUs, 503 GB RAM, Linux 5.15; PyTorch 2.7.0+cu126, open_clip, pytorch-lightning, numpy/scipy (exact versions pinned in the code supplement’s environment file). Dictionary training uses cached activations; all evaluation is inference-only.


Figure 21: CKA across normalized depth. The horizontal axis is normalized depth (block index divided by model depth, so all five backbones share one axis). Left: mean pairwise CKA between the output representations of the heads within a block — falling values toward the right mean late-layer heads compute increasingly dissimilar functions. Right: CKA between each head's output and the model's final [cls] image embedding — rising values mean individual late heads each carry final-representation content. Together: late layers host specialized, individually influential heads, the regime the per-head dictionary is built for.
Table 13: Computational cost. Per-image cost decomposed across ViT forward (Fwd), ViT backward (Bwd), and head-decomposed transcoder forward+backward (Dict. F+B). is the size of the training set; and are the training epochs of the ViT and the dictionary, respectively; L and H are the number of ViT layers and per-layer attention heads.
| ViT Fwd | ViT Bwd | Dict. F+B | |
|---|---|---|---|
| Defense-Prefix (Azuma and Matsui 2023) | — | ||
| Dyslexify (Hufe et al. 2025) | — | — | |
| Ours | — |
O.3 Signal Degradation from Concept Entanglement
Encoder Definitions. Let a latent have a head support , defined as the set of attention heads whose value subspaces contribute nonzero weight to 's encoder direction. We contrast two architectures based on this support:
- Monolithic encoders map the concatenated output of all attention heads to latent activations. Nothing in this architecture constrains the size of the support, allowing .
• Per-head encoders isolate feature learning by restricting each latent to a single head's value subspace, guaranteeing by construction for every latent.
Assumption: Head Division of Labor. We assume the underlying transformer distributes distinct functional mechanisms across different attention heads. Formally, let a generalized semantic concept comprise orthogonal sub-features (e.g., visual versus lexical mechanisms). Under the head division of labor, these structurally distinct sub-features are isolated within non-overlapping heads and . Consequently, to successfully represent the full semantic breadth of , the monolithic encoder's optimal projection must draw from these disjoint specialized heads, structurally forcing its support size to be strictly greater than one: .
Activating Set Contamination and Clarity Score. The interpretability of a latent is fundamentally tied to its activating set: the subset of tokens across a dataset that cause the latent to fire. In a monolithic architecture, because latent is a mixture of orthogonal mechanisms, its activating set becomes contaminated. The latent will fire both when head detects a visual shape and when head detects a lexical string.
Consequently, the activating set for latent is a heterogeneous mixture of functionally distinct tokens. Because the Clarity Score (CS) evaluates the purity and quality of the conceptual cluster formed by a latent's activations, this contamination severely degrades the score. The latent fails to carve out a clean, monosematic cluster, rendering it mathematically polysemantic under CS evaluation.
Per-Head Resolution. The per-head encoder resolves this contamination by enforcing . By strictly preventing cross-head signal summation during training, distinct semantic concepts cannot be optimized into the same latent space, even under sparsity pressure. A per-head latent tracks either the visual mechanism of head i or the lexical mechanism of head k, but never both. Consequently, its activating set remains strictly homogeneous. This structural isolation guarantees a pure conceptual cluster, preserving the latent's Clarity Score and ensuring true monosemicity.