Label-Free Localization and Test-Time Suppression of CLIP's Typographic Circuits
Organizations: University of Virginia Charlottesville VA 22903, USA
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.
Figures & tables
| 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 |
| 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 |
Appendix figures & tables27 assets
Supplementary material from the paper’s appendix.
Appendix
| CLIP space | DINOv2 space | |||
|---|---|---|---|---|
| Corpus text | B/16 | H/14 | B/16 | H/14 |
| none (clean) | ||||
| one word | ||||
| 5-word set | ||||
| 100-word set | ||||
| scrambled glyphs | ||||
| Selector | vs. causal | Group (pt) | ||
|---|---|---|---|---|
| B/16 | H/14 | B/16 | H/14 | |
| Head-dec. nTAS | ||||
| Monolithic nTAS | ||||
| Direct grad. ratio | n/a | n/a | ||
| Head-dec. CS (50k) | ||||
| Monolithic CS | n/a | n/a | ||
| 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 |
| 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] | [ ] | [ ] | [ ] | [ ] | [ ] | |
| nTAS [CI] | [ ] | [ ] | [ ] | [ ] | [ ] | |
| CS+Adaptive [CI] | [ ] | [ ] | [ ] | [ ] | [ ] | |
| nTAS+Adaptive [CI] | [ ] | [ ] | [ ] | [ ] | [ ] | |
| L/14 | Base acc. (%) | 54.6 | 46.2 | 60.9 | 58.2 | 79.9 |
| B/16 | H/14 | Stab. (min) | |||
|---|---|---|---|---|---|
| p@ | p@ | ||||
| 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 |
| IN100-T (pts) | Clean (pts) | |||
|---|---|---|---|---|
| Model | mean sd | [min, max] | mean sd | [min, max] |
| B/16 | ||||
| L/14 | ||||
| H/14 | ||||
| g/14 | ||||
| bigG | ||||
| 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 |
| Accuracy (%) | ASR (%) | |||||
|---|---|---|---|---|---|---|
| Split | 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 |
| 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 |
| Model | Variant | RTA | Disent. | PAINT | IN100-T † | Clean | |
|---|---|---|---|---|---|---|---|
| nTAS selection | |||||||
| ViT-B/16 | Static | – | |||||
| Gated | ∘ | ||||||
| ViT-L/14 | Static | – | ∘ | ||||
| Gated | ∘ | ||||||
| ViT-H/14 | Static | – | ∘ | ||||
| ViT Fwd | ViT Bwd | Dict. F+B | |
|---|---|---|---|
| Defense-Prefix ( Azuma and Matsui 2023 ) | — | ||
| Dyslexify ( Hufe et al. 2025 ) | — | — | |
| Ours | — |
VLM Robustness
Vision-language model robustness studies whether models remain reliable under visual, textual, and distribution shifts, adversarial inputs, and safety challenges.
See all 460 papers