Rethinking Homogeneity of Vision and Text Tokens in Large Vision-and-Language Models

Chia-Wen Kuo, Sijie Zhu, Fan Chen, Xiaohui Shen, Longyin Wen · Submission to ICLR 2025 · Rejected

TL;DR

Current large vision-and-language models (LVLMs) treat image and text tokens identically, concatenating them into a single 1-D sequence. This paper introduces Decomposed Attention (D-Attn), which splits multimodal attention into visual-to-visual, text-to-visual, and text-to-text components. By diagonalizing visual self-attention and debiasing cross-attention positional encodings, D-Attn cuts visual computation from quadratic to linear, trains up to $5\times$ faster, and outperforms standard self-attention across popular multimodal benchmarks.

What Problem Does This Paper Address?

Most decoder-only LVLMs (such as LLaVA) feed visual and textual tokens into an LLM as if they were homogeneous. The authors challenge this assumption based on two core realities:

  1. Pre-computed visual context: Unlike raw text tokens, visual patch embeddings already capture deep contextual relationships because they were processed by a vision transformer (e.g., CLIP or SigLIP). Recomputing full visual-to-visual attention inside the LLM is largely redundant and scales quadratically ($\mathcal{O}(|V|^2)$).
  2. Artificial 1-D positional biases: Flattening 2-D images and concatenating them with text imposes 1-D relative or rotary positional encodings (RoPE). Consequently, text queries attend less to visually distant patches solely due to sequence indexing, hurting visual-textual reasoning.

While cross-attention architectures (e.g., Flamingo) avoid quadratic visual attention, they typically insert separate modules or learnable gating parameters that disrupt pre-trained LLM weights and hurt downstream performance.

Methods

D-Attn decomposes the standard causal self-attention operation into three distinct interactions without adding new learnable parameters:

               ┌───────────────────────┐
               │    Pre-trained LLM    │
               └───────────┬───────────┘
                           │
       ┌───────────────────┼───────────────────┐
       ▼                   ▼                   ▼
  V2V Attention       T2V Cross-Attn      T2T Attention
 (Diagonalized)     (Pos-Debiased XA)    (Standard SA)
       │                   │                   │
  O(|V|) linear            └─────────┬─────────┘
  feed-forward                       │
                              α-weighting (LSE)
  1. Diagonalized Visual-to-Visual Attention (V2V Self-Attn): Because visual embeddings already contain dense mutual context from the vision encoder, the V2V attention matrix is simplified to an identity matrix ($\mathbf{I}$). Each visual token attends only to itself ($f_{co}(f_{cv}(V))$), collapsing computational complexity from $\mathcal{O}(|V|^2)$ to $\mathcal{O}(|V|)$.

  2. Debiased Text-to-Visual Cross-Attention (T2V Cross-Attn): Text queries attend to visual keys and values using existing, shared LLM attention projection weights under a non-causal mask. The authors remove rotary/relative positional encodings between text and image tokens (setting relative distances to zero) and replace them with learnable absolute positional embeddings on the vision tokens prior to the LLM.

  3. Analytic $\alpha$-Weighting: Instead of heuristic gates (like $\tanh$ or sigmoid), the outputs of T2V cross-attention and T2T self-attention are merged via an exact mathematical decomposition of standard softmax attention using LogSumExp ($S_V$ and $S_T$): $$\alpha_V = \text{Sigmoid}(S_V - S_T), \quad \alpha_T = 1 - \alpha_V$$ This retains analytical equivalence with native LLM attention, safeguarding pre-trained representations.

Datasets

  • Pre-training & Instruction Tuning:
  • Stage 1: LLaVA's filtered 58k caption dataset (LAION/CC/SBU) for adapter warm-up.
  • Stage 2: 1.25M dense captions from ShareGPT4V-PT.
  • Stage 3: Instruction tuning on 665k samples from LLaVA-1.5 combined with 102k dense captions from ShareGPT4V.
  • Evaluation Benchmarks: Evaluated on 10 standard benchmarks: VQA-v2, GQA, ScienceQA-Image (SQA-I), TextVQA (VQA-T), MME, MMBench (MMB), SEED-Bench Image (SEED-I), LLaVA-Bench (LLaVA-W), MMVP, and MMStar. No new benchmarks were introduced.

Key Insights and Ideas

  • Relearning visual relationships inside the LLM is wasteful: Vision encoders have already done the heavy lifting. Discarding non-diagonal visual-to-visual attention costs virtually nothing in downstream reasoning while freeing up massive compute.
  • RoPE harms cross-modal alignment: Rotary position encodings penalize interactions between tokens situated far apart in the token array, which is completely counterproductive when textual questions need to ground anywhere in an image. Removing RoPE in cross-attention directly rectifies this bias.
  • Principled fusion beats learnable gating: Gated adapters (e.g., Flamingo style) often degrade language performance. Deriving token fusion directly from the original softmax partition function ($\alpha$-weighting) preserves the LLM's out-of-the-box reasoning capabilities.

Key Results

  • Computational Gains: On an identical setup, V2V diagonalization allowed the model to handle up to $8\times$ more visual tokens (74k vs. 9k tokens before out-of-memory) and accelerated training by $5\times$ (from 11.25 to 2.24 sec/iter).
  • Benchmark Improvements:
  • Mistral v0.3 (7B): D-Attn outperforms its standard self-attention (S-Attn) counterpart across the board—e.g., GQA (64.4 vs. 61.8), VQA-T (68.3 vs. 62.2), MME (1598.6 vs. 1533.1), and LLaVA-W (79.8 vs. 70.7).
  • Gemma 2 (9B): D-Attn posts substantial gains, notably jumping on MMVP (45.3 vs. 29.3) and MMStar (45.0 vs. 39.2).
  • Fine-Grained Strengths: Detailed sub-category evaluations revealed the largest gains in spatial/relational reasoning (e.g., SEED Spatial Relation: 61.0 vs. 57.8) and OCR / document comprehension (e.g., SEED Text Understanding: 65.8 vs. 44.7).

Limitations and Future Work

  • Training Scope: Experiments were restricted to standard supervised fine-tuning (SFT) on public academic datasets; the authors did not test alignment techniques like RLHF or DPO.
  • Modality Scope: Although the $\mathcal{O}(|V|)$ complexity theoretically unlocks massive image resolutions and long video sequences, the paper primarily tests standard single-image benchmarks, leaving long-form video and high-resolution scaling to future studies.

Summary updated

BibTeX
@misc{kuo2025rethinking,
  author = {Chia-Wen Kuo and Sijie Zhu and Fan Chen and Xiaohui Shen and Longyin Wen},
  title = {{Rethinking Homogeneity of Vision and Text Tokens in Large Vision-and-Language Models}},
  year = {2025},
  eprint = {2502.01906},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.01906},
}
Figure