arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.05488cs.LGcs.AIcs.CV
收藏

全元素注意力层:一种优化选项

Element-Wise Attention Layers: an option for optimization

Federal University of Paraná(巴拉那联邦大学)

Giovanni Araujo Bacochina, Rodrigo Clemente Thom de Souza

摘要:

自从基于transformer的模型普及以来,使用注意力层已经成为一种趋势,是近年来开发的许多最先进模型的关键要素。然而,实现这些架构以及深度学习领域的许多其他架构的最大障碍之一是它们拥有大量的优化参数,这使得其使用取决于强大硬件的可用性。本文提出了一种新的注意力机制方法,将矩阵乘法的点积注意力通过数组乘法变为元素级注意力。为了测试这种方法的有效性,使用Fashion MNIST和CIFAR10数据集在分类任务中训练了两个模型(一个具有类似VGG的架构,一个具有所提出的方法)。每个模型都在来自Google Colaboratory的单个Tesla T4 GPU中训练了10个epoch。结果表明,该机制允许在时尚MNIST数据集上的VGG类对应物的92%的准确性,同时减少了97%的参数数量。对于CIFAR 10,准确度仍相当于类似VGG的对应方的60%,但使用的参数减少了50%。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑