{"url":"/method/bam","slug":"bam","name":"BAM","full_name":"Bottleneck Attention Module","full_name_withheld":false,"description_markdown":"Park et al. proposed the bottleneck attention module (BAM), aiming\r\nto efficiently improve the representational capability of networks. \r\nIt 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.\r\n\r\nFor a given input feature map $X$, BAM infers the channel attention $s_c \\in \\mathbb{R}^C$ and spatial attention $s_s\\in \\mathbb{R}^{H\\times W}$ in two parallel streams, then sums the two attention maps after resizing both branch outputs to $\\mathbb{R}^{C\\times H \\times 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\r\n\\begin{align}\r\n    s_c &= \\text{BN}(W_2(W_1\\text{GAP}(X)+b_1)+b_2)\r\n\\end{align}\r\n\r\n\\begin{align}\r\n    s_s &= BN(Conv_2^{1 \\times 1}(DC_2^{3\\times 3}(DC_1^{3 \\times 3}(Conv_1^{1 \\times 1}(X))))) \r\n\\end{align}\r\n\\begin{align}\r\n    s &= \\sigma(\\text{Expand}(s_s)+\\text{Expand}(s_c)) \r\n\\end{align}\r\n\\begin{align}\r\n    Y &= s X+X\r\n\\end{align}\r\nwhere $W_i$, $b_i$ denote  weights and biases of fully connected layers respectively, $Conv_{1}^{1\\times 1}$ and $Conv_{2}^{1\\times 1}$ are convolution layers  used for channel reduction. $DC_i^{3\\times 3}$ denotes a dilated convolution with $3\\times 3$ kernel,  applied to utilize contextual information effectively. $\\text{Expand}$ expands the attention maps $s_s$ and $s_c$ to $\\mathbb{R}^{C\\times H\\times W}$.\r\n\r\nBAM 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.","description_state":"present","introduced_year":null,"introduced_by":{"title":"BAM: Bottleneck Attention Module","paper":"/paper/bam-bottleneck-attention-module","first_author":"Jongchan Park","n_authors":4,"url_abs":null,"archive_paper_url":"https://paperswithcode.com/paper/bam-bottleneck-attention-module"},"source":{"url":"http://arxiv.org/abs/1807.06514v2","title":"BAM: Bottleneck Attention Module","url_on_a_paper_host":true},"code_snippet_url":null,"code_snippet_url_on_a_code_host":false,"categories":[{"area":"General","area_id":"general","collection":"Attention Mechanisms","url":"/methods/category/attention-mechanisms","pwc_aliases":["attention-mechanisms-1"]}],"n_papers_tagged":33,"archive_num_papers":33,"papers_newest_first":[{"paper":null,"title":"Synthesizing Images on Perceptual Boundaries of ANNs for Uncovering and Manipulating Human Perceptual Variability","date":"2025-05-06","arxiv_id":"2505.03641","n_code_links":0,"syntology":null},{"paper":null,"title":"Reliability Assessment of Low-Cost PM Sensors under High Humidity and High PM Level Outdoor Conditions","date":"2025-04-09","arxiv_id":"2504.06615","n_code_links":0,"syntology":null},{"paper":"/paper/adacs-adaptive-normalization-for-enhanced","title":"AdaCS: Adaptive Normalization for Enhanced Code-Switching ASR","date":"2025-01-13","arxiv_id":"2501.07102","n_code_links":1,"syntology":null},{"paper":null,"title":"Scale-wise Bidirectional Alignment Network for Referring Remote Sensing Image Segmentation","date":"2025-01-01","arxiv_id":"2501.00851","n_code_links":0,"syntology":null},{"paper":null,"title":"Greenback Bears and Fiscal Hawks: Finance is a Jungle and Text Embeddings Must Adapt","date":"2024-11-11","arxiv_id":"2411.07142","n_code_links":0,"syntology":null},{"paper":"/paper/batch-match-and-patch-low-rank-approximations","title":"Batch, match, and patch: low-rank approximations for score-based variational inference","date":"2024-10-29","arxiv_id":"2410.22292","n_code_links":1,"syntology":null},{"paper":null,"title":"BAM! Just Like That: Simple and Efficient Parameter Upcycling for Mixture of Experts","date":"2024-08-15","arxiv_id":"2408.08274","n_code_links":0,"syntology":null},{"paper":"/paper/2408-02014","title":"Unsupervised Representation Learning by Balanced Self Attention Matching","date":"2024-08-04","arxiv_id":"2408.02014","n_code_links":1,"syntology":null},{"paper":null,"title":"Mitigating Catastrophic Forgetting in Language Transfer via Model Merging","date":"2024-07-11","arxiv_id":"2407.08699","n_code_links":0,"syntology":null},{"paper":null,"title":"BAM: Box Abstraction Monitors for Real-time OoD Detection in Object Detection","date":"2024-03-27","arxiv_id":"2403.18373","n_code_links":0,"syntology":null},{"paper":null,"title":"Methylation Operation Wizard (MeOW): Identification of differentially methylated regions in long-read sequencing data","date":"2024-02-27","arxiv_id":"2402.17182","n_code_links":0,"syntology":null},{"paper":"/paper/batch-and-match-black-box-variational","title":"Batch and match: black-box variational inference with a score-based divergence","date":"2024-02-22","arxiv_id":"2402.14758","n_code_links":2,"syntology":{"ran":7,"of":10,"unverified":3,"pointer_only":0}},{"paper":"/paper/ms-former-memory-supported-transformer-for","title":"MS-Former: Memory-Supported Transformer for Weakly Supervised Change Detection with Patch-Level Annotations","date":"2023-11-16","arxiv_id":"2311.09726","n_code_links":1,"syntology":null},{"paper":"/paper/bias-amplification-enhances-minority-group","title":"Bias Amplification Enhances Minority Group Performance","date":"2023-09-13","arxiv_id":"2309.06717","n_code_links":1,"syntology":{"ran":7,"of":9,"unverified":2,"pointer_only":9}},{"paper":null,"title":"Bias-Aware Minimisation: Understanding and Mitigating Estimator Bias in Private SGD","date":"2023-08-23","arxiv_id":"2308.12018","n_code_links":0,"syntology":null},{"paper":null,"title":"Boundary Attention Mapping (BAM): Fine-grained saliency maps for segmentation of Burn Injuries","date":"2023-05-24","arxiv_id":"2305.15365","n_code_links":0,"syntology":null},{"paper":"/paper/a-convolutional-transformer-network-for-crack","title":"A Convolutional-Transformer Network for Crack Segmentation with Boundary Awareness","date":"2023-02-23","arxiv_id":"2302.11728","n_code_links":1,"syntology":null},{"paper":null,"title":"Interpretable Diabetic Retinopathy Diagnosis based on Biomarker Activation Map","date":"2022-12-13","arxiv_id":"2212.06299","n_code_links":0,"syntology":null},{"paper":null,"title":"Reinforcement Learning Agent Design and Optimization with Bandwidth Allocation Model","date":"2022-11-23","arxiv_id":"2211.12987","n_code_links":0,"syntology":null},{"paper":null,"title":"Thermodynamics of bidirectional associative memories","date":"2022-11-17","arxiv_id":"2211.09694","n_code_links":0,"syntology":null},{"paper":null,"title":"Identifying OCRs in cfDNA WGS Data by Correlation Clustering","date":"2022-02-19","arxiv_id":"2202.09618","n_code_links":0,"syntology":null},{"paper":null,"title":"BAM: Bayes with Adaptive Memory","date":"2022-02-04","arxiv_id":"2202.02405","n_code_links":0,"syntology":null},{"paper":null,"title":"BAM: Bayes Augmented with Memory","date":"2021-09-29","arxiv_id":null,"n_code_links":0,"syntology":null},{"paper":"/paper/few-shot-fine-grained-action-recognition-via","title":"Few-Shot Fine-Grained Action Recognition via Bidirectional Attention and Contrastive Meta-Learning","date":"2021-08-15","arxiv_id":"2108.06647","n_code_links":1,"syntology":null},{"paper":"/paper/bam-a-lightweight-and-efficient-balanced","title":"BAM: A Balanced Attention Mechanism for Single Image Super Resolution","date":"2021-04-15","arxiv_id":"2104.07566","n_code_links":1,"syntology":null},{"paper":"/paper/lrez-c-api-and-toolkit-for-analyzing-and","title":"LRez: C++ API and toolkit for analyzing and managing Linked-Reads data","date":"2021-03-26","arxiv_id":"2103.14419","n_code_links":1,"syntology":null},{"paper":null,"title":"Blind Mask to Improve Intelligibility of Non-Stationary Noisy Speech","date":"2020-08-20","arxiv_id":"2008.09175","n_code_links":0,"syntology":null},{"paper":"/paper/bilateral-attention-network-for-rgb-d-salient","title":"Bilateral Attention Network for RGB-D Salient Object Detection","date":"2020-04-30","arxiv_id":"2004.14582","n_code_links":1,"syntology":null},{"paper":"/paper/bim-towards-quantitative-evaluation-of","title":"Benchmarking Attribution Methods with Relative Feature Importance","date":"2019-07-23","arxiv_id":"1907.09701","n_code_links":2,"syntology":{"ran":1,"of":6,"unverified":5,"pointer_only":0}},{"paper":null,"title":"Interactive Learning of Environment Dynamics for Sequential Tasks","date":"2019-07-19","arxiv_id":"1907.08478","n_code_links":0,"syntology":null}],"papers_shown":30,"tasks":[{"task":"/task/decision-making","name":"Decision Making","papers":2},{"task":"/task/decoder","name":"Decoder","papers":2},{"task":"/task/object","name":"Object","papers":2},{"task":"/task/object-detection","name":"Object Detection","papers":2},{"task":"/task/specificity","name":"Specificity","papers":2},{"task":"/task/variational-inference","name":"Variational Inference","papers":2},{"task":"/task/object-detection-1","name":"object-detection","papers":2},{"task":"/task/action-recognition-in-videos","name":"Action Recognition","papers":1},{"task":"/task/action-understanding","name":"Action Understanding","papers":1},{"task":"/task/automatic-speech-recognition-2","name":"Automatic Speech Recognition","papers":1},{"task":"/task/automatic-speech-recognition","name":"Automatic Speech Recognition (ASR)","papers":1},{"task":"/task/benchmarking","name":"Benchmarking","papers":1},{"task":"/task/change-detection","name":"Change Detection","papers":1},{"task":"/task/classification-1","name":"Classification","papers":1},{"task":"/task/clustering","name":"Clustering","papers":1},{"task":"/task/crack-segmentation","name":"Crack Segmentation","papers":1},{"task":"/task/deep-learning","name":"Deep Learning","papers":1},{"task":"/task/feature-importance","name":"Feature Importance","papers":1},{"task":"/task/fine-grained-action-recognition","name":"Fine-grained Action Recognition","papers":1},{"task":null,"name":"GPU","papers":1}],"tasks_shown":20,"n_tasks":55,"usage_by_year":[{"year":"2018","papers":1},{"year":"2019","papers":4},{"year":"2020","papers":2},{"year":"2021","papers":4},{"year":"2022","papers":5},{"year":"2023","papers":5},{"year":"2024","papers":8},{"year":"2025","papers":4}],"row_source":"methods_table","archive":{"source":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","archive_url":"https://paperswithcode.com/method/bam"},"syntology_read_at":"2026-09-24T18:15:14+00:00"}