Table of Contents
Fetching ...

Phase Diagram of Vision Large Language Models Inference: A Perspective from Interaction across Image and Instruction

Houjing Wei, Yuting Shi, Naoya Inoue

TL;DR

The paper addresses how image and instruction tokens interact inside Vision-Language Models during inference and proposes measuring cross-modal contextualization with the cross-modal similarity $s^{(l)}$ across Transformer layers. It combines cosine-similarity analysis, norm-based attention visualization, and LogitLens verbalization to diagnose multimodal interaction in two VLLMs, InstructBLIP and LLaVA-1.5, on COCO Captions and Winoground. The results reveal a robust four-phase inference dynamics across depth—Phase I Alignment in early layers, Phase II Intra-modal Encoding, Phase III Inter-modal Encoding, and Phase IV Output Preparation. This work advances interpretability of multimodal reasoning in VLLMs and suggests practical directions such as early-exit decoding and broader evaluation across more VLLMs.

Abstract

Vision Large Language Models (VLLMs) usually take input as a concatenation of image token embeddings and text token embeddings and conduct causal modeling. However, their internal behaviors remain underexplored, raising the question of interaction among two types of tokens. To investigate such multimodal interaction during model inference, in this paper, we measure the contextualization among the hidden state vectors of tokens from different modalities. Our experiments uncover a four-phase inference dynamics of VLLMs against the depth of Transformer-based LMs, including (I) Alignment: In very early layers, contextualization emerges between modalities, suggesting a feature space alignment. (II) Intra-modal Encoding: In early layers, intra-modal contextualization is enhanced while inter-modal interaction is suppressed, suggesting a local encoding within modalities. (III) Inter-modal Encoding: In later layers, contextualization across modalities is enhanced, suggesting a deeper fusion across modalities. (IV) Output Preparation: In very late layers, contextualization is reduced globally, and hidden states are aligned towards the unembedding space.

Phase Diagram of Vision Large Language Models Inference: A Perspective from Interaction across Image and Instruction

TL;DR

The paper addresses how image and instruction tokens interact inside Vision-Language Models during inference and proposes measuring cross-modal contextualization with the cross-modal similarity across Transformer layers. It combines cosine-similarity analysis, norm-based attention visualization, and LogitLens verbalization to diagnose multimodal interaction in two VLLMs, InstructBLIP and LLaVA-1.5, on COCO Captions and Winoground. The results reveal a robust four-phase inference dynamics across depth—Phase I Alignment in early layers, Phase II Intra-modal Encoding, Phase III Inter-modal Encoding, and Phase IV Output Preparation. This work advances interpretability of multimodal reasoning in VLLMs and suggests practical directions such as early-exit decoding and broader evaluation across more VLLMs.

Abstract

Vision Large Language Models (VLLMs) usually take input as a concatenation of image token embeddings and text token embeddings and conduct causal modeling. However, their internal behaviors remain underexplored, raising the question of interaction among two types of tokens. To investigate such multimodal interaction during model inference, in this paper, we measure the contextualization among the hidden state vectors of tokens from different modalities. Our experiments uncover a four-phase inference dynamics of VLLMs against the depth of Transformer-based LMs, including (I) Alignment: In very early layers, contextualization emerges between modalities, suggesting a feature space alignment. (II) Intra-modal Encoding: In early layers, intra-modal contextualization is enhanced while inter-modal interaction is suppressed, suggesting a local encoding within modalities. (III) Inter-modal Encoding: In later layers, contextualization across modalities is enhanced, suggesting a deeper fusion across modalities. (IV) Output Preparation: In very late layers, contextualization is reduced globally, and hidden states are aligned towards the unembedding space.

Paper Structure

This paper contains 12 sections, 1 equation, 5 figures.

Figures (5)

  • Figure 1: Magnitude of inter-modal contextualization against layer depth. Four monotonical intervals indicate our proposed four-phase inference dynamics. A higher value indicates more aggressive multimodal interaction.Left: InstructBLIP. Right: LLaVA-v1.5.
  • Figure 2: A four-phase diagram of feed-forward dynamics of LMs in VLLMs. (I) Alignment of two different feature spaces occurs. (II) Intra-modal Encoding is enhanced while cross-modal encoding is inhibited. (III) Inter-modality Encoding appears and strengthens. (IV) Output Preparation requires hidden states to be aligned toward output embedding space.
  • Figure 3: Intra-modal contextualization of visual tokens and instruction tokens, respectively. Similarity values are averaged over randomly chosen $400$ images for each dataset.Left: InstructBLIP. Right: LLaVA-1.5
  • Figure 4: Visualization of norm-based attention analysis (id_$323$ refers to a randome chosen image). Above: Heatmaps showcase norm-based attention of the last text token to other tokens across layers. The more the darkness, the more it draws attention. Below: Norm-based attention of last text token to specific tokens over layers.
  • Figure 5: Averaged recall of decoded LogitLens words. Results are averaged over 2 datasets, each of which consists of randomly chosen 400 images.