EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

FlashAttention-Compatible Modality-Mutual Attention with Virtual Reordering

Jeong Woo Seo, Ho-Young Jung

Mathematics · 22.10.2026 · 14 (21) · 3852

DOI: 10.3390/math14213852 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Mathematics, online erschienen am 22.10.2026. Verfasst von Jeong Woo Seo und 1 weiteren Autor:innen. Die Arbeit nennt 42 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Korean government, Commercialization Promotion Agency for R&D Outcomes (COMPA) grant funded by the Korea government.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Multimodal large language models (MLLMs) process an interleaved image–text sequence with a single autoregressive backbone under causal attention. Since the causal mask prevents image tokens from attending to the question that follows them, their representations are computed without access to the query, which has been identified as a source of visual hallucination. Modality-mutual attention (MMA) mitigates this issue by unlocking the image-to-question region of the causal mask, and dual-order training (DOT) mitigates it by additionally training on the reversed text-first order. However, MMA turns the global causal mask into a sample-dependent dense mask. Consequently, attention cannot be executed via FlashAttention, which is the most efficient attention path, and falls back to a slower implementation. Furthermore, the positional information in the unlocked region does not match that of the reversed input order that motivates the unlock, that is, the positional semantics are inconsistent. To address both problems, we propose FlashAttention-compatible MMA with virtual reordering (FMMA-VR), which repairs the positional information of the unlocked region as if the two modalities were reordered, without physically reordering the sequence. The proposed method is implemented as a Triton-based region-aware FlashAttention-style kernel. On identically pretrained models, it accelerates the attention path by up to 3.59× over conventional MMA for long sequences during supervised fine-tuning (SFT). In post-SFT evaluations, it stays on par with conventional MMA across ten benchmark metrics under full fine-tuning. Under low-budget LoRA adaptation, where the positional shift of conventional MMA is not absorbed, FMMA-VR additionally improves the hallucination-sensitive metrics by large margins.

Förderung

  • Korean government
  • Commercialization Promotion Agency for R&D Outcomes (COMPA) grant funded by the Korea government

Zitieren

APA

Seo, J. W., & Jung, H. (2026). FlashAttention-Compatible Modality-Mutual Attention with Virtual Reordering. Mathematics, 14(21), 3852. https://doi.org/10.3390/math14213852

Vancouver

Seo JW, Jung H. FlashAttention-Compatible Modality-Mutual Attention with Virtual Reordering. Mathematics. 2026;14(21):3852. doi:10.3390/math14213852

BibTeX
@article{Seo2026,
  author = {Seo, Jeong Woo and Jung, Ho-Young},
  title = {FlashAttention-Compatible Modality-Mutual Attention with Virtual Reordering},
  journal = {Mathematics},
  year = {2026},
  volume = {14},
  number = {21},
  pages = {3852},
  doi = {10.3390/math14213852}
}
Kostenlos starten →