Training-free Concept Localization으로 Typographic Attack에 강건한 Vision-Language Model 만들기
Towards Robustness against Typographic Attack with Training-free Concept Localization
TL;DR Highlight
이미지에 텍스트를 덧붙여 AI를 속이는 Typographic Attack을 추가 학습 없이 Attention Head 분석만으로 막는 방법
Who Should Read
CLIP 기반 Vision-Language Model을 프로덕션에 배포하거나 자율주행·의료 등 안전이 중요한 환경에서 멀티모달 AI를 사용하는 ML 엔지니어. 모델 보안 취약점을 파악하고 방어 전략을 고민하는 AI 안전 연구자.
Core Mechanics
- Typographic Attack(이미지에 가짜 텍스트를 써넣어 모델을 속이는 공격)은 CLIP의 Vision Transformer 내 특정 Attention Head가 시각 정보 대신 텍스트 정보에 과도하게 집중하기 때문에 발생한다.
- Linear Representation Hypothesis(잠재 표현이 개념 벡터의 선형 조합이라는 가설)를 활용해 랜덤 벡터를 샘플링하는 '확률적 복권(Stochastic Lottery)' 방식으로 어떤 Attention Head가 텍스트를 읽는지 추가 학습 없이 찾아낸다.
- 전체 모델 크기(dmodel) 대신 각 Attention Head의 작은 부분공간(dhead)에서 샘플링하면 노이즈 간섭이 줄어 개념 벡터를 훨씬 적은 샘플로 찾을 수 있다.
- 취약한 Attention Head를 찾은 뒤, 해당 Head의 Attention Weight를 재조정(Reweighting)하거나 출력을 0으로 만드는(Zero Ablation) 간단한 개입만으로 공격 방어가 가능하다.
- 회로(Circuit) 추출에 필요한 데이터는 ImageNet 학습셋의 0.1%(약 1,280장)뿐이며, A100 GPU 한 장으로 ViT-B/16은 7.5초, 가장 큰 ViT-bigG/14도 45.7초면 완료된다.
- LLaVA, Qwen-VL, InternVL 같은 LVLM들이 사용하는 ViT 인코더에도 동일한 방법을 적용해 VQA 정확도를 향상시킬 수 있다.
Evidence
- ViT-H/14 기준 RTA-100 데이터셋에서 Object Classification Accuracy가 53.4% → 76.2%(+22.8%p) 향상, Text Confusion Rate는 42.0% → 14.4%(-27.6%p) 감소했다.
- 5개 ViT 모델 평균 OCA(Object Classification Accuracy)에서 기존 최고 방법인 Dyslexify(68.5%) 대비 우리 방법(71.7%)이 평균 +3.2%p 높았으며, 클린 이미지 정확도 손실은 평균 -0.54%로 Dyslexify와 동일 수준이었다.
- Qwen3-VL-8B에서 RIO-Bench Typographic Attack VQA 정확도가 70.11% → 71.69%(+1.58%p) 향상되었고, Gemma3-12B는 48.24% → 49.78%(+1.53%p) 향상되었으며 클린 이미지 VQA 영향은 -0.3%~+0.6% 수준으로 미미했다.
- 랜덤 시드 4개로 반복 실험한 결과 OCA 표준편차가 ViT-B/16에서 ±0.0, ViT-H/14에서 ±0.1 수준으로 매우 안정적이며, 샘플 수(expansion ratio) 8 이상이면 모든 ViT 크기에서 수렴했다.
How to Apply
- CLIP 기반 이미지 분류 서비스에서 이미지에 텍스트가 겹치는 환경(영수증, 간판, 문서 스캔 등)을 처리할 때, GitHub 코드로 ViT의 마지막 20% 레이어 Attention Head에 nTAS 스코어를 계산하고 높은 점수의 Head에만 Attention Reweighting(a=1)을 적용하면 재학습 없이 텍스트 혼동을 줄일 수 있다.
- Qwen3-VL, InternVL, Gemma3 같은 LVLM을 VQA 서비스에 쓰는 경우, 이미지에 텍스트가 포함된 입력이 자주 들어온다면 비전 인코더 부분에 Zero Ablation 방식 회로 개입을 추가해 정확도를 높일 수 있다. 클린 이미지 성능 손실은 ±0.6% 이내로 매우 작다.
- 자율주행이나 의료 이미징처럼 안전이 중요한 환경에서 adversarial text가 포함된 이미지가 입력될 수 있다면, 모델 배포 전에 1,280장의 텍스트 주입 이미지로 취약 회로를 1회 추출해두고 추론 시 고정된 Head 인덱스에만 개입하는 방식으로 사실상 추론 오버헤드 없이 방어 레이어를 추가할 수 있다.
Code Example
Terminology
관련 논문
Mindwalk – 코딩 에이전트 세션을 코드베이스 3D 맵 위에서 재생하는 시각화 도구
Claude Code나 Codex 같은 AI 코딩 에이전트가 세션 중 코드베이스의 어떤 파일을 탐색하고 수정했는지를 3D 지도 형태로 시각화해서 재생해주는 로컬 도구다. 에이전트가 작업을 어떻게 이해했는지 한눈에 파악할 수 있다.
Ghost Font: 사람은 읽을 수 있지만 AI는 읽기 어려운 안티-AI 폰트 실험
움직임(모션)을 이용해 글자를 표현해서 AI 모델이 정적 이미지 분석으로는 메시지를 해독하지 못하게 막는 실험적 프로젝트인데, 커뮤니티에서는 이미 GPT-5.6, Claude Opus 등으로 해독에 성공한 사례가 속출해 실효성 논쟁이 뜨겁다.
GPT-5.6, Grok 4.5, Claude, Muse Spark 등 12개 모델이 동일한 앱 4개를 빌드한 결과 비교
12개 LLM 모델에게 레이캐스터 미로, 루빅스 큐브, 계산기, Game of Life 앱을 각각 5번씩 만들게 해서 성공률·비용·속도를 비교한 실전 벤치마크다. GPT-5.6 Sol이 전반적으로 가장 일관된 결과를 냈고, Grok 4.5는 가성비 면에서 눈에 띄었다.
Databricks가 수백만 라인 실제 코드베이스로 Coding Agent를 벤치마킹한 결과
Databricks가 자사 실제 코드베이스를 기반으로 여러 AI 코딩 에이전트의 성능과 비용을 직접 측정했고, 모델 토큰 가격과 실제 태스크 비용이 전혀 다르다는 점, 그리고 오픈소스 모델이 이제 최상위 수준에 도달했다는 점을 확인했다.
Reasoning에서 Uncertainty 추정하기: LLM의 다국어 및 교차언어 MCQA 성능 대규모 연구
LLM이 저자원 언어 질문을 받을 때 영어로 추론하게 하면 불확실성 추정 성능이 고자원 언어 수준으로 올라온다.
LLM-as-a-Verifier: 범용 Verification 프레임워크
LLM의 토큰 확률 분포를 활용해 discrete 점수 대신 continuous 점수를 뽑아내면, 추가 학습 없이 코딩·로봇·의료 에이전트 평가 정확도를 SOTA로 끌어올릴 수 있다.
Related Resources
Original Abstract (Expand)
Models trained via Contrastive Language-Image Pretraining (CLIP) serve as the foundational vision encoders for most modern Large Vision Language Models (LVLMs). Despite their widespread adoption, CLIP models exhibit a critical yet underexplored failure mode: irrelevant text appearing within images confounds visual representations, biasing them toward lexical meaning rather than true visual semantics. This robustness issue, commonly described as a Typographic Attack (TA), exposes a vulnerability that poses a significant risk to safety-critical applications such as autonomous driving. To achieve interpretable and effective robustness against TA, we propose a novel, training-free mechanistic interpretability method. Our method provides sampling-based interpretations of hidden state representations and quantitatively attributes semantic versus lexical focus to individual attention heads. Through probabilistic analysis and circuit mining, we isolate specific Vision Transformer (ViT) components that disproportionately encode lexical information, thereby identifying the mechanistic source of TA. We further show that simple interventions applied directly to the identified circuits, without any additional training, can substantially improve robustness against Typographic Attacks in object classification. These interventions, such as selective adjustment of attention weights, also outperform both supervised and training-free defense methods. Our experiments demonstrate that applying the proposed intervention to the vision encoders of several state-of-the-art LVLMs yields substantial gains in Visual Question Answering accuracy under Typographic Attack interference on RIO-Bench. These results confirm both the efficacy and the generalizability of our mechanistic approach. Code is released at https://github.com/Liu-524/SamplingTAR.