LA-layer: General local attention layer for full attention networks
Authors:
- 1 July 2023
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 2057-2062
Abstract
Attention layers have contributed to state-of-the-art results on vision tasks. Still, they leave room for improvement because position information is used in a fixed manner, and the computation cost is typically high. To mitigate both issues, we propose a convolution-style local attention layer (LA-layer) as a replacement for traditional attention layers. LA-layers not only encode the position information of pixels in a convolutional manner, but also produce position offsets following a novel constrained rule so that keys will deform and result in larger receptive fields. Query and keys are processed by a novel aggregation function that outputs attention weights for the values. In our experiments with different types of ResNets, we replace convolutional layers with LA-layers and address image recognition, object detection and instance segmentation tasks. We consistently demonstrate performance gains, despite having fewer FLOPs and training parameters. Our code is available at: https://github.com/hotfinda/LA-layer.Keywords
Funding Information
- China Scholarship Council
This publication has 19 references indexed in Scilit:
- Attention Augmented Convolutional Networks2019
- Cascade R-CNN: Delving Into High Quality Object Detection2018
- Deformable Convolutional Networks2017
- Mask R-CNN2017
- Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization2017
- Xception: Deep Learning with Depthwise Separable Convolutions2017
- Scene Parsing through ADE20K Dataset2017
- Aggregated Residual Transformations for Deep Neural Networks2017
- Deep Residual Learning for Image Recognition2016
- ImageNet Large Scale Visual Recognition ChallengeInternational Journal of Computer Vision, 2015