Element-Wise Attention Layers: an option for optimization

Giovanni Araujo Bacochina, Rodrigo Clemente Thom de Souza
2/10/2023
cs.LGcs.AIcs.CV

No confident code implementation found for this paper.

Abstract

The use of Attention Layers has become a trend since the popularization of the Transformer-based models, being the key element for many state-of-the-art models that have been developed through recent years. However, one of the biggest obstacles in implementing these architectures - as well as many others in Deep Learning Field - is the enormous amount of optimizing parameters they possess, which make its use conditioned on the availability of robust hardware. In this paper, it's proposed a new method of attention mechanism that adapts the Dot-Product Attention, which uses matrices multiplications, to become element-wise through the use of arrays multiplications. To test the effectiveness of such approach, two models (one with a VGG-like architecture and one with the proposed method) have been trained in a classification task using Fashion MNIST and CIFAR10 datasets. Each model has been trained for 10 epochs in a single Tesla T4 GPU from Google Colaboratory. The results show that this mechanism allows for an accuracy of 92% of the VGG-like counterpart in Fashion MNIST dataset, while reducing the number of parameters in 97%. For CIFAR10, the accuracy is still equivalent to 60% of the VGG-like counterpart while using 50% less parameters.

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{bacochina2023elementwise,
  title  = {Element-Wise Attention Layers: an option for optimization},
  author = {Giovanni Araujo Bacochina and Rodrigo Clemente Thom de Souza},
  year   = {2023},
  eprint = {2302.05488},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.05488v1}
}

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/2302.05488.svg)](https://codeofpaper.com/paper/2302.05488)

Discussion