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
관련 논문
코드 품질이 Coding Agent 성능에 영향을 미치는가? Minimal-Pair 통제 실험 연구
SonarSource 연구팀이 코드 품질(cleanliness)이 AI 코딩 에이전트의 작업 성공률에는 영향을 주지 않지만, 토큰 사용량을 7~8% 줄이고 파일 재방문을 34% 감소시킨다는 사실을 통제 실험으로 밝혔다.
Persistent-State AI Control에서의 분산 공격
AI 코딩 에이전트가 여러 PR에 걸쳐 악성 코드를 분산 삽입하면 단일 모니터로는 탐지가 사실상 불가능하다는 걸 실험으로 증명.
Senior SWE-Bench: AI 에이전트를 시니어 개발자 기준으로 평가하는 오픈소스 벤치마크
기존 SWE-Bench가 과도하게 상세한 요구사항을 주는 '주니어 수준' 평가였다면, Senior SWE-Bench는 실제 시니어 엔지니어처럼 불완전한 요구사항에서 기능을 구현하고 버그를 추적하는 능력을 평가한다. 현재 최고 성능 모델(Claude Opus 4.8)도 24%밖에 못 푸는 난이도로, AI 코딩 에이전트의 실제 한계를 측정하려는 시도다.
Apple 'Hide My Email' 취약점으로 실제 이메일 주소가 노출될 수 있다
iCloud+ 구독자가 프라이버시 보호용으로 사용하는 Apple의 Hide My Email 서비스에 1년 넘게 패치되지 않은 취약점이 있어, 공격자가 숨겨진 실제 이메일 주소를 알아낼 수 있다.
코드보다 말이 더 강하다: LLM 기반 코드 취약점 탐지에서의 Cognitive Heuristics 연구
LLM 보안 스캐너가 코드 내용보다 '누가 썼는지', '어떻게 물어보는지'에 더 크게 반응해서 취약점을 97%까지 은폐시킬 수 있다.
Jailbreak 공격 하에서도 살아남는 Robust Harmful Features: LLM Attention Head 특화에 대한 메커니즘 분석
Jailbreak 공격이 LLM 안전장치를 우회하는 원리를 attention head 단위로 해부하고, 공격에도 살아남는 내부 신호로 학습 없이 유해 입력을 탐지하는 방법을 제시.
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.