Skip to main navigation Skip to search Skip to main content

ELFATT: Efficient Linear Fast Attention for Vision Transformers

Research output: Chapters, Conference Papers, Creative and Literary WorksRGC 32 - Refereed conference paper (with host publication)peer-review

Abstract

The attention mechanism is the key to the success of transformers in different machine learning tasks. However, the quadratic complexity with respect to the sequence length of the vanilla softmax-based attention mechanism becomes the major bottleneck for the application of long sequence tasks, such as vision tasks. Although various efficient linear attention mechanisms have been proposed, they need to sacrifice performance to achieve high efficiency. What's more, memory-efficient methods, such as FlashAttention-1-3, still have quadratic computation complexity which can be further improved. In this paper, we propose a novel efficient linear fast attention (ELFATT) mechanism to achieve low memory input/output operations, linear computational complexity, and high performance at the same time. ELFATT offers 4-7x speedups over the vanilla softmax-based attention mechanism in high-resolution vision tasks without losing performance. ELFATT is FlashAttention friendly. Using FlashAttention-2 acceleration, ELFATT still offers 2-3x speedups over the vanilla softmax-based attention mechanism on high-resolution vision tasks without losing performance. Even in some non-vision tasks of long-range arena, ELFATT still achieves leading performance and offers 1.2-2.3x speedups over FlashAttention-2. Even on edge GPUs, ELFATT still offers 1.6x to 2.0x speedups compared to state-of-the-art attention mechanisms in various power modes from 5W to 60W. Furthermore, ELFATT can be used to enhance and accelerate diffusion tasks directly without training. © 2025 held by the owner/author(s). Publication rights licensed to ACM.
Original languageEnglish
Title of host publicationMM '25
Subtitle of host publicationProceedings of the 33rd ACM International Conference on Multimedia
Place of PublicationNew York, NY
PublisherAssociation for Computing Machinery
Pages9140-9149
Number of pages10
ISBN (Electronic)979-8-4007-2035-2
DOIs
Publication statusPublished - Oct 2025
Event33rd ACM International Conference on Multimedia (MM '25) - Royal Dublin Convention Centre, Dublin, Ireland
Duration: 27 Oct 202531 Oct 2025
https://acmmm2025.org/

Conference

Conference33rd ACM International Conference on Multimedia (MM '25)
Abbreviated titleACM Multimedia 2025
PlaceIreland
CityDublin
Period27/10/2531/10/25
Internet address

Funding

This work is supported by the Hong Kong Innovation and Technology Commission (InnoHK Project CIMDA), the Institute of Digital Medicine, City University of Hong Kong (Project 9229503), and the Natural Science Special Project Research Fund of Guizhou University (No. 2025-06).

UN SDGs

This output contributes to the following UN Sustainable Development Goals (SDGs)

  1. SDG 7 - Affordable and Clean Energy
    SDG 7 Affordable and Clean Energy
  2. SDG 9 - Industry, Innovation, and Infrastructure
    SDG 9 Industry, Innovation, and Infrastructure
  3. SDG 12 - Responsible Consumption and Production
    SDG 12 Responsible Consumption and Production

Research Keywords

  • Efficient Attention Mechanism
  • Linear Approximation
  • Vision Transformer

RGC Funding Information

  • RGC-funded

Fingerprint

Dive into the research topics of 'ELFATT: Efficient Linear Fast Attention for Vision Transformers'. Together they form a unique fingerprint.

Cite this