Learning to ignore: rethinking attention in CNNs

Firas Laakom, Kateryna Chumachenko, Jenni Raitoharju, Alexandros Iosifidis, Moncef Gabbouj

Abstract

Traditional attention mechanisms in Convolutional Neural Networks (CNNs) are designed to explicitly highlight discriminative features—the "needle in the haystack." This paper proposes a paradigm shift: "Learning to Ignore." By training models to identify and suppress irrelevant features (the "haystack"), which are often easier to learn early in training, the researchers achieve superior performance and more stable training. This approach, implemented as a "plug-and-play" modification to existing modules like Squeeze-and-Excitation (SE) and Convolutional Block Attention Module (CBAM), shows consistent gains across image classification and multimodal fusion tasks.

Introduction: The Challenge of Attention

In computer vision, attention mechanisms help models focus on salient regions of an image, such as the texture of an object rather than a generic background. Traditionally, these mechanisms are explicit: they are optimized to directly identify and highlight discriminative features. However, the authors of this paper argue that this is inherently difficult. Discriminative features—the subtle differences that separate similar classes—are often complex and only fully learned in the later stages of training.

Conversely, irrelevant features, such as image borders, lighting artifacts, or generic backgrounds, are often much easier to identify and are learned early on. The paper poses a fundamental question: Is it more efficient to optimize a network to suppress the "easy-to-find" noise than to highlight the "hard-to-find" signal?

The "Learning to Ignore" Framework

The researchers introduce a framework called Implicit Attention. While standard attention calculates a mask to keep features, implicit attention calculates a mask to discard them. This is achieved by applying an inversion function $T(\cdot)$ to existing attention modules. Instead of the model outputting an "importance score," it outputs an "irrelevance score," which $T(\cdot)$ then flips to create a final attention mask.

The authors proposed three variants for this inversion:

  1. Linear ($T_1$): A simple subtraction ($1 - \alpha x$), where $\alpha$ is a tunable hyperparameter.
  2. Sigmoid-Inverse ($T_2$): Applying a sigmoid function to the reciprocal of the score.
  3. Sigmoid-Negative ($T_3$): Applying a sigmoid to the negative of the pre-activation score.

This approach is designed to be "plug-and-play," allowing for easy modification of widely used blocks like the Squeeze-and-Excitation (SE) block and the Convolutional Block Attention Module (CBAM).

Experimental Setup and Datasets

The "Learning to Ignore" paradigm was validated on four major benchmarks:

  • CIFAR-10 & CIFAR-100: Standard datasets for small-scale image classification.
  • ImageNet: The industry-standard large-scale visual recognition dataset.
  • NTU-RGBD: A multimodal dataset for human action recognition, used to test how the framework handles data fusion from different sensors (RGB and depth).

Key Results and Performance Gains

The proposed methods consistently outperformed standard attention mechanisms across all tested benchmarks. On CIFAR-100, using a ResNet50 architecture, the "Learning to Ignore" variant (SE-Ign3) improved accuracy by 1% over the standard baseline and 0.3% over the original SE-block. On DenseNet, the improvement over the baseline was even more pronounced at 1.85%.

Performance comparison of standard SE and the proposed SE-Ign variants on CIFAR-10 and CIFAR-100.

The framework also demonstrated significant effectiveness in multimodal fusion. On the NTU-RGBD dataset, the "ignore" variants outperformed the state-of-the-art Multimodal Transfer Module (MMTM), proving that the paradigm is adept at filtering out confusing information when combining disparate data types.

Accuracy on the NTU-RGBD dataset and training loss/accuracy curves showing improved stability.

Insights: Why "Ignoring" Works

The success of this approach is attributed to several key factors:

  • The "Low-Hanging Fruit" Hypothesis: Irrelevant patterns are often shared across many different classes. Because the network encounters these patterns frequently, it can learn to identify and suppress them much faster than it can learn class-specific details.
  • Training Stability: Visualizing the loss curves revealed that "learning to ignore" leads to fewer fluctuations and more stable convergence compared to standard attention. This suggests that suppressing noise provides a smoother optimization landscape.
  • Broader Focus: Grad-CAM visualizations showed that "ignoring" models tend to produce broader attention masks. While standard attention might hyper-fixate on a tiny, specific part of an object, the "ignore" approach captures the whole object more effectively by simply carving away the background.
  • Data Scarcity: The approach showed significant gains on CIFAR-100, suggesting that when examples per class are limited, it is easier for a model to learn what a class is not than to perfectly define what it is.

Limitations and Future Directions

While the empirical results are strong, the authors note a few areas for future work. The linear inversion variant ($T_1$) requires tuning the hyperparameter $\alpha$, adding complexity to the training process. Additionally, the study focused on CNNs; as the field moves toward Vision Transformers (ViTs), exploring whether this logic applies to self-attention mechanisms is a critical next step. Finally, a deeper mathematical analysis of gradient flow could provide further theoretical grounding for the observed training stability.

Summary updated

BibTeX
@inproceedings{laakom2021learning,
  author = {Firas Laakom and Kateryna Chumachenko and Jenni Raitoharju and Alexandros Iosifidis and Moncef Gabbouj},
  title = {{Learning to ignore: rethinking attention in CNNs}},
  booktitle = {BMVC},
  year = {2021},
}
Figure