paper-with-me

Papers

DCT-Former: Efficient Self-Attention with Discrete Cosine Transform

2022-03-02 · Carmelo Scribano, Giorgia Franchini, Marco Prato, Marko Bertogna

Since their introduction the Trasformer architectures emerged as the dominating architectures for both natural language processing and, more recently, computer vision applications. An intrinsic limitation of this family of "fully-attentive" architectures arises from the computation of the dot-product attention, which grows both in memory consumption and number of operations as $O(n^2)$ where $n$ stands for the input sequence length, thus limiting the applications that require modeling very long sequences. Several approaches have been proposed so far in the literature to mitigate this issue, with varying degrees of success. Our idea takes inspiration from the world of lossy data compression (such as the JPEG algorithm) to derive an approximation of the attention module by leveraging the properties of the Discrete Cosine Transform. An extensive section of experiments shows that our method takes up less memory for the same performance, while also drastically reducing inference time. This makes it particularly suitable in real-time contexts on embedded platforms. Moreover, we assume that the results of our research might serve as a starting point for a broader family of deep neural models with reduced memory footprint. The implementation will be made publicly available at https://github.com/cscribano/DCT-Former-Public

📄 PDF Abstract BibTeX arXiv:2203.01178

Code (1)

cscribano/dct-former-public 공식 구현 pytorch

Tasks

Data Compression

Methods 이 논문이 사용한 방법론

Discrete Cosine Transform Discrete Cosine Transform (DCT) is an orthogonal transformation method that decomposes an image to its spatial frequency spectrum. It expresses a finite sequence of data…

Similar Papers 제목 키워드 기반

Discrete Cosine Transform Based Decorrelated Attention for Vision Transformers

2024-05-22 · Hongyi Pan, Emadeldeen Hamdan, Xin Zhu, Ahmet Enis Cetin 외

Central to the Transformer architectures' effectiveness is the self-attention mechanism, a function that maps queries, keys, and values into a high-dimensional vector space. However, training the attention weights of que…

Quantization

Fourier Transformer: Fast Long Range Modeling by Removing Sequence Redundancy with FFT Operator

2023-05-24 · Ziwei He, Meng Yang, Minwei Feng, Jingcheng Yin 외

The transformer model is known to be computationally demanding, and prohibitively costly for long sequences, as the self-attention module uses a quadratic time and space complexity with respect to sequence length. Many r…

Abstractive Text SummarizationDocument SummarizationLong-range modelingOpen-Domain Question Answering

Band-Attention Modulated RetNet for Face Forgery Detection

2024-04-09 · Zhida Zhang, Jie Cao, Wenkui Yang, Qihang Fan 외

The transformer networks are extensively utilized in face forgery detection due to their scalability across large datasets.Despite their success, transformers face challenges in balancing the capture of global context, w…

Explicitly Increasing Input Information Density for Vision Transformers on Small Datasets

2022-10-25 · Xiangyu Chen, Ying Qin, Wenju Xu, Andrés M. Bur 외

Vision Transformers have attracted a lot of attention recently since the successful implementation of Vision Transformer (ViT) on vision tasks. With vision Transformers, specifically the multi-head self-attention modules…

Your Attention Matters: to Improve Model Robustness to Noise and Spurious Correlations

2025-07-28 · Camilo Tamayo-Rousseau, Yunjia Zhao, Yiqun Zhang, Randall Balestriero arxiv

Self-attention mechanisms are foundational to Transformer architectures, supporting their impressive success in a wide range of tasks. While there are many self-attention variants, their robustness to noise and spurious …