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

HDAM:卷积神经网络的启发式差分注意模块

HDAM: Heuristic Difference Attention Module for Convolutional Neural Networks

Yu Xue, Ziming Yuan

摘要:

注意力机制是增强卷积神经网络的重要先验知识之一。大多数注意力机制都绑定到卷积层,并使用局部或全局上下文信息来重新校准输入。这是一种流行的注意力策略设计方法。全局上下文信息有助于网络考虑整体分布,而局部上下文信息则更一般。上下文信息使网络关注特定感受野的平均值或最大值。与大多数注意力机制不同,本文提出了一种新的基于启发式差异注意力模块的注意力机制HDAM。HDAM的输入重新校准是基于局部和全局上下文信息之间的差异,而不是平均值和最大值。同时,为了使不同层次的局部感受野具有更合适的大小,增加局部感受野设计的灵活性,我们采用遗传算法来启发式地产生局部感受野。首先,HDAM提取整体和局部感受野的平均值作为相应的上下文信息。然后计算全局和局部上下文信息之间的差异。最后,HDAM使用此差异来重新校准输入。此外,我们利用遗传算法的启发式能力来搜寻每一层的局部感受野大小。我们在CIFAR-10和CIFAR-100上的实验表明,HDAM可以使用比其他注意力机制更少的参数来实现更高的准确性。我们使用Python库Pytorch实现HDAM,代码和模型将公开提供。

英文摘要:

The attention mechanism is one of the most important priori knowledge to enhance convolutional neural networks. Most attention mechanisms are bound to the convolutional layer and use local or global contextual information to recalibrate the input. This is a popular attention strategy design method. Global contextual information helps the network to consider the overall distribution, while local contextual information is more general. The contextual information makes the network pay attention to the mean or maximum value of a particular receptive field. Different from the most attention mechanism, this article proposes a novel attention mechanism with the heuristic difference attention module, HDAM. HDAM's input recalibration is based on the difference between the local and global contextual information instead of the mean and maximum values. At the same time, to make different layers have a more suitable local receptive field size and increase the exibility of the local receptive field design, we use genetic algorithm to heuristically produce local receptive fields. First, HDAM extracts the mean value of the global and local receptive fields as the corresponding contextual information. Then the difference between the global and local contextual information is calculated. Finally HDAM uses this difference to recalibrate the input. In addition, we use the heuristic ability of genetic algorithm to search for the local receptive field size of each layer. Our experiments on CIFAR-10 and CIFAR-100 show that HDAM can use fewer parameters than other attention mechanisms to achieve higher accuracy. We implement HDAM with the Python library, Pytorch, and the code and models will be publicly available.

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

↑