TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Methods/BAM

BAM

Bottleneck Attention Module

GeneralIntroduced 200033 papers
Source Paper

Description

Park et al. proposed the bottleneck attention module (BAM), aiming to efficiently improve the representational capability of networks. It uses dilated convolution to enlarge the receptive field of the spatial attention sub-module, and build a bottleneck structure as suggested by ResNet to save computational cost.

For a given input feature map XXX, BAM infers the channel attention sc∈RCs_c \in \mathbb{R}^Csc​∈RC and spatial attention ss∈RH×Ws_s\in \mathbb{R}^{H\times W}ss​∈RH×W in two parallel streams, then sums the two attention maps after resizing both branch outputs to RC×H×W\mathbb{R}^{C\times H \times W}RC×H×W. The channel attention branch, like an SE block, applies global average pooling to the feature map to aggregate global information, and then uses an MLP with channel dimensionality reduction. In order to utilize contextual information effectively, the spatial attention branch combines a bottleneck structure and dilated convolutions. Overall, BAM can be written as \begin{align} s_c &= \text{BN}(W_2(W_1\text{GAP}(X)+b_1)+b_2) \end{align}

\begin{align} s_s &= BN(Conv_2^{1 \times 1}(DC_2^{3\times 3}(DC_1^{3 \times 3}(Conv_1^{1 \times 1}(X))))) \end{align} \begin{align} s &= \sigma(\text{Expand}(s_s)+\text{Expand}(s_c)) \end{align} \begin{align} Y &= s X+X \end{align} where WiW_iWi​, bib_ibi​ denote weights and biases of fully connected layers respectively, Conv11×1Conv_{1}^{1\times 1}Conv11×1​ and Conv21×1Conv_{2}^{1\times 1}Conv21×1​ are convolution layers used for channel reduction. DCi3×3DC_i^{3\times 3}DCi3×3​ denotes a dilated convolution with 3×33\times 33×3 kernel, applied to utilize contextual information effectively. Expand\text{Expand}Expand expands the attention maps sss_sss​ and scs_csc​ to RC×H×W\mathbb{R}^{C\times H\times W}RC×H×W.

BAM can emphasize or suppress features in both spatial and channel dimensions, as well as improving the representational power. Dimensional reduction applied to both channel and spatial attention branches enables it to be integrated with any convolutional neural network with little extra computational cost. However, although dilated convolutions enlarge the receptive field effectively, it still fails to capture long-range contextual information as well as encoding cross-domain relationships.

Papers Using This Method

Synthesizing Images on Perceptual Boundaries of ANNs for Uncovering and Manipulating Human Perceptual Variability2025-05-06Reliability Assessment of Low-Cost PM Sensors under High Humidity and High PM Level Outdoor Conditions2025-04-09AdaCS: Adaptive Normalization for Enhanced Code-Switching ASR2025-01-13Scale-wise Bidirectional Alignment Network for Referring Remote Sensing Image Segmentation2025-01-01Greenback Bears and Fiscal Hawks: Finance is a Jungle and Text Embeddings Must Adapt2024-11-11Batch, match, and patch: low-rank approximations for score-based variational inference2024-10-29BAM! Just Like That: Simple and Efficient Parameter Upcycling for Mixture of Experts2024-08-15Unsupervised Representation Learning by Balanced Self Attention Matching2024-08-04Mitigating Catastrophic Forgetting in Language Transfer via Model Merging2024-07-11BAM: Box Abstraction Monitors for Real-time OoD Detection in Object Detection2024-03-27Methylation Operation Wizard (MeOW): Identification of differentially methylated regions in long-read sequencing data2024-02-27Batch and match: black-box variational inference with a score-based divergence2024-02-22MS-Former: Memory-Supported Transformer for Weakly Supervised Change Detection with Patch-Level Annotations2023-11-16Bias Amplification Enhances Minority Group Performance2023-09-13Bias-Aware Minimisation: Understanding and Mitigating Estimator Bias in Private SGD2023-08-23Boundary Attention Mapping (BAM): Fine-grained saliency maps for segmentation of Burn Injuries2023-05-24A Convolutional-Transformer Network for Crack Segmentation with Boundary Awareness2023-02-23Interpretable Diabetic Retinopathy Diagnosis based on Biomarker Activation Map2022-12-13Reinforcement Learning Agent Design and Optimization with Bandwidth Allocation Model2022-11-23Thermodynamics of bidirectional associative memories2022-11-17