Interpreting the Second-Order Effects of Neurons in CLIP

Link
Abstract

We interpret the function of individual neurons in CLIP by automatically describing them using text. Analyzing the direct effects (i.e. the flow from a neuron through the residual stream to the output) or the indirect effects (overall contribution) fails to capture the neurons' function in CLIP. Therefore, we present the "second-order lens", analyzing the effect flowing from a neuron through the later attention heads, directly to the output. We find that these effects are highly selective: for each neuron, the effect is significant for <2% of the images. Moreover, each effect can be approximated by a single direction in the text-image space of CLIP. We describe neurons by decomposing these directions into sparse sets of text representations. The sets reveal polysemantic behavior - each neuron corresponds to multiple, often unrelated, concepts (e.g. ships and cars). Exploiting this neuron polysemy, we mass-produce "semantic" adversarial examples by generating images with concepts spuriously correlated to the incorrect class. Additionally, we use the second-order effects for zero-shot segmentation, outperforming previous methods. Our results indicate that an automated interpretation of neurons can be used for model deception and for introducing new model capabilities.

Synth

Problem:: 뉴런의 직접적인 영향은 너무 미미하고, 하나를 꺼도 다른 뉴런이 역할을 보완해버려(Self-Repair) 기능이 가려지기 때문에 CLIP 모델 내 개별 뉴런의 진짜 역할을 파악하기 어려움

Solution:: 뉴런의 영향을 Residual Stream만 고려 (First-Order)하거나 최종 출력 (Indirect)만 고려하는게 아닌 MSA도 함께 고려하는 Second-Order Lens 제안 / 뉴런의 영향을 CLIP Image-Text Embedding으로 프로젝션해 개별 뉴런의 영향을 해석 가능하도록 함

Novelty:: 기존의 직접/간접 분석법을 넘어선 '2차 효과 렌즈'라는 새로운 뉴런 분석 프레임워크 / 하나의 뉴런은 소수의 이미지에 대해서만 반응함을 경험적으로 발견 / 뉴런의 다의성(Polysemantic)을 이용해 의미론적 적대적 공격(Semantic Adversarial Attack)을 자동 생성하는 방법론 제안 / 해석 결과를 바탕으로 기존 SOTA를 능가하는 새로운 제로샷 분할(Zero-Shot Segmentation) 제안

Note:: 이미지에 정답 클래스를 의미하는 오브젝트가 있음에도 오분류를 하는 공격 방식은 신선함 → 언어적 다의성이 이미지 분류에 혼동을 주는 방식이므로, 언어적 불분명함이 CLIP 임베딩의 약점으로 작용할수도?

Motivation

Method

file-20250627182607432.png
file-20250627173355751.png|475

rnlr^nl=j=1Mγjl,nMtext(tj)

Method 검증

실험 1: Mean-Ablation of Second-Order Effects

실험 2: Accuracy for Neuron Reconstructed from Sparse Text Representations

실험 3: Automatic Generation of Adversarial Examples

file-20250627180346665.png

c1은 고양이, c2는 강아지인 경우

실험 4: Zero-Shot Segmentation