$\mathcal{D}$-Attn: Decomposed Attention for Large Vision-and-Language Models

Chia-Wen Kuo, Sijie Zhu, Fan Chen, Xiaohui Shen, Long-Yin Wen
2/1/2025

No confident code implementation found for this paper.

Abstract

Large vision-and-language models (LVLMs) have traditionally integrated visual and textual tokens by concatenating them into a single homogeneous input for large language models (LLMs), thereby maximally preserving the pre-trained language capabilities. However, this constrained architecture for visual and textual tokens restricts the design space for processing visual tokens, potentially leading to suboptimal performance and efficiency.

Show full abstract

In this paper, we propose Decomposed Attention (D-Attn), a more flexible attention architecture for LVLMs, which enables modification of visual token operations without affecting textual-to-textual attention. D-Attn decomposes the 1-D causal self-attention of LVLMs into visual-to-visual, textual-to-visual, and textual-to-textual attentions, and the visual and textual output tokens from the decomposed attentions are merged with a carefully derived weighting strategy, namely $\alpha$-weighting. Taking advantage of the flexibility, we are able to introduce two critical improvements in visual token processing while maintaining the capacity of pre-trained LLMs: 1) We rectify the biased positional encoding in textual-to-visual attention to boost visual understanding performance. 2) We diagonalize visual-to-visual attention to reduce computation complexity from $\mathcal{O}\left(\vert V\vert^{2}\right)$ to $\mathcal{O}(\vert V\vert)$ for $\vert V\vert$ visual tokens without compromising performance. Extensive experiments and analysis validate the effectiveness of D-Attn, demonstrating significant improvements on multiple image benchmarks while significantly reducing computational costs (e.g., $5 \times$ faster). Code will be available at https://github.com/bytedance/DecomposedAttention.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{kuo2025mathcaldattn,
  title  = {$\mathcal{D}$-Attn: Decomposed Attention for Large Vision-and-Language Models},
  author = {Chia-Wen Kuo and Sijie Zhu and Fan Chen and Xiaohui Shen and Long-Yin Wen},
  year   = {2025},
  eprint = {2502.01906},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2502.01906},
  journal = {IEEE International Conference on Computer Vision}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.01906.svg)](https://codeofpaper.com/paper/2502.01906)

Discussion