Rethinking Efficacy of Softmax for Lightweight Non-Local Neural Networks
Yooshin Cho, Youngsoo Kim, Hanbyel Cho, Jaesung Ahn, Hyeong Gwon Hong,, Junmo Kim

TL;DR
This paper critically examines the softmax normalization in non-local blocks, revealing its inefficacy and proposing a simple scaling alternative that improves performance and robustness in lightweight neural networks.
Contribution
The paper identifies the limitations of softmax in non-local blocks and introduces a scaling method that enhances efficiency and effectiveness without extra computation.
Findings
Replacing softmax with scaling improves accuracy on multiple datasets
The method is robust to channel reduction and initialization
Enables multi-head attention without additional cost
Abstract
Non-local (NL) block is a popular module that demonstrates the capability to model global contexts. However, NL block generally has heavy computation and memory costs, so it is impractical to apply the block to high-resolution feature maps. In this paper, to investigate the efficacy of NL block, we empirically analyze if the magnitude and direction of input feature vectors properly affect the attention between vectors. The results show the inefficacy of softmax operation which is generally used to normalize the attention map of the NL block. Attention maps normalized with softmax operation highly rely upon magnitude of key vectors, and performance is degenerated if the magnitude information is removed. By replacing softmax operation with the scaling factor, we demonstrate improved performance on CIFAR-10, CIFAR-100, and Tiny-ImageNet. In Addition, our method shows robustness to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Neural Network Applications · Brain Tumor Detection and Classification · Domain Adaptation and Few-Shot Learning
MethodsLinear Layer · Softmax
