multimodal-llm multimodal-generation causal-intervention token-level-analysis llm-interpretability task-transition attention-dynamics semantic-role
Abstract
Multimodal large language models (MLLMs) generate responses autoregressively, integrating visual and linguistic information in an evolving context. Prior work on interpretability has focused on individual layers and circuits (where), leaving the token-level dynamics of multimodal computation during generation (when) underexplored. We address this gap and study attention shifts as per semantic role; tracking model attention to image, text, instruction, and previously generated tokens, One Token at a Time (OTaT). We introduce multimodal tasks that require explicit switching between visual and textual context within a single response. Across two mainstream model families and four open-weight MLLMs of varying sizes, we establish consistent patterns: attention to image peaks at tokens requiring image-derived information, instruction tokens are revisited during task transitions, and attention to previously generated tokens increases as the generation progresses. Causal attention blocking interventions validate the functional role of these trends. We profile model behavior under disrupted attention and observe responses falling back to language priors, or exhibiting cross-modal leakage, denial, or recovery. Finally, informed of the attention dynamics through our novel analysis, we propose a simple test-time intervention to boost attention to the relevant modality at the right time, significantly improving multimodal task performance.
한국어 요약
한 줄 요약
이 연구는 MLLMs의 토큰별 주의 흐름을 분석하여 멀티모달 생성 과정을 실질적으로 해석하고 성능 개선 방법을 제시한다.
핵심 기여도
- OTaT(One Token at a Time) 분석을 통해 토큰 단위로 주의 흐름을 추적함.
- 이미지, 텍스트, 지시문, 이전 생성 토큰에 대한 주의 패턴을 4개의 오픈웨이트 MLLMs에서 일관성 있게 관찰함.
- 인과적 주의 차단 실험을 통해 주의 패턴의 기능적 역할을 검증함.
- 주의 부스팅을 통한 간단한 테스트 타임 개입으로 멀티모달 작업 성능을 크게 향상시킴.
핵심 아이디어
기존 연구는 주의가 어디에 집중되는지(‘where’)를 분석했으나, 생성 과정에서 언제 어떤 정보가 사용되는지(‘when’)는 거의 다루어지지 않았다. 본 연구는 토큰 단위로 주의 흐름을 추적하는 OTaT 접근법을 제안하며, 멀티모달 생성 시각을 시간 축에 따라 해석한다. 예를 들어, 이미지 정보가 필요한 토큰에서 주의가 최대치에 도달하고, 작업 전환 시 지시문 토큰이 다시 참조되는 현상을 관찰함으로써, 생성 과정이 동적으로 변화함을 밝혔다. 이는 MLLMs가 단순히 입력을 처리하는 것이 아니라, 생성 중에도 정보를 재조정하고 전달한다는 점을 시사한다.
기술적 접근법
- **OTaT 분석**: 토큰별 주의 점수(αₜ(cₖ))를 추적하여 이미지, 텍스트, 지시문, 이전 토큰에 대한 주의 패턴을 분석함.
- **Causal attention blocking**: 특정 토큰의 주의를 차단하여 그 영향을 평가함.
- **Attention boosting**: 테스트 시 특정 모달의 주의를 증가시키는 간단한 개입을 적용함.
- **Fruit-Math, Math-Sport 등 멀티모달 작업**: 시각적, 언어적 맥락 전환을 요구하는 작업을 사용함.
- **Qwen2-7B, LOV-7B 등 4개의 오픈웨이트 MLLMs**: 다양한 크기와 아키텍처의 모델에서 일관된 패턴을 관찰함.
주요 결과
- **이미지 주의 최대치**: 이미지 정보가 필요한 토큰에서 주의가 최대치에 도달함.
- **지시문 재참조**: 작업 전환 시 지시문 토큰이 다시 참조됨.
- **이전 토큰 주의 증가**: 생성이 진행될수록 이전 토큰에 대한 주의가 증가함.
- **주의 차단 실험**: 주의 차단 시 언어 사전(language priors), 교차 모달 누수, 부정, 회복 등의 결과가 나타남.
- **주의 부스팅**: 테스트 시 간단한 주의 부스팅을 통해 멀티모달 작업 성능이 크게 향상됨.
의의 및 한계
본 연구는 MLLMs의 생성 과정을 시간 축에 따라 해석함으로써, 기존의 정적 해석 방법을 보완하는 새로운 관점을 제시한다. 특히, 주의 부스팅을 통한 성능 개선은 실용적 가치가 있으며, MLLMs의 내부 동작 이해에 기여한다. 그러나 실험은 4개의 오픈웨이트 모델에 국한되었고, 폐쇄형 모델이나 대규모 실험 환경에서는 동일한 결과가 나타날지에 대한 검증이 필요하다. 또한, 주의 부스팅은 간단한 개입이지만, 복잡한 작업에서는 제한적일 수 있다.
실용적 활용
본 연구는 멀티모달 챗봇, 자동 번역, 시각 질의 응답 시스템 등에서 모델의 생성 과정을 이해하고 개선하는 데 활용될 수 있다. 특히, 테스트 시 주의 부스팅을 통해 성능을 향상시키는 방법은 실제 서비스 환경에서 즉각적으로 적용 가능하다.