论文标题

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

HDAM: Heuristic Difference Attention Module for Convolutional Neural Networks

论文作者

Xue, Yu, Yuan, Ziming

论文摘要

注意机制是增强卷积神经网络的最重要的先验知识之一。大多数注意机制都与卷积层结合,并使用局部或全局上下文信息来重新校准输入。这是一种流行的关注策略设计方法。全球上下文信息可帮助网络考虑整体分布,而本地上下文信息则更笼统。上下文信息使网络注意特定接受场的平均值或最大值。与最关注机制不同,本文提出了一种新型的注意机制,其启发式差异注意模块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.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源