Object-ABN: Learning to Generate Sharp Attention Maps for Action Recognition

Tomoya Nitta, Tsubasa Hirakawa, Hironobu Fujiyoshi, Toru TamakiarXiv 2022 · DOI

TL;DR

Object-ABN improves the explainability of video action recognition models by using off-the-shelf instance segmentation to guide attention maps. By introducing a novel mask loss, multi-head attention, and Prototype Conformity loss, it generates significantly sharper, human-interpretable attention maps while maintaining or even improving classification accuracy.

What Problem Does This Paper Address?

In explainable AI (XAI), saliency and attention maps (like Grad-CAM) are widely used to visualize what a deep learning model is "looking at" when making a prediction. However, when applied to video action recognition, these maps are notoriously blurry, speckled, and ambiguous.

Instead of focusing tightly on the person or object performing the action, models often suffer from representation bias—relying heavily on broad background context (like a basketball court or a swimming pool) to guess the action. Existing attempts to sharpen these maps either rely on post-hoc gradient methods (which are computationally expensive for video volumes) or human intervention (which doesn't scale). The authors of this paper tackle the challenge of generating sharp, object-focused attention maps in an end-to-end, self-supervised manner.

Methods

The authors introduce Object-ABN, an extension of the Attention Branch Network (ABN). A standard ABN uses an attention branch to generate a map that weights the feature maps before they hit the final classifier. Object-ABN introduces three key innovations to sharpen this map:

  1. Self-Supervised Mask Loss ($\mathcal{L}_{mask}$): The core idea is to leverage a pre-trained, off-the-shelf instance segmentation model. For each video frame, the model extracts masks for all detected objects and people, combining them via a logical OR operation into an "all object mask." The network is then trained using a Mean Squared Error (MSE) loss to force its internal attention map ($M_o$) to match these object boundaries.
  2. Multi-Head Attention ($\mathcal{L}_{mha}$): To allow the network to look at different concepts simultaneously, the authors implement multi-head attention with three distinct heads: an unconstrained map ($M_u$), an object-constrained map ($M_o$), and a background-constrained map ($M_b$).
  3. Prototype Conformity Loss ($\mathcal{L}_{PC}$): To mitigate potential trade-offs between model accuracy and explainability, the authors introduce PC loss in the attention branch. This forces latent features of the same action category to cluster tightly together around trainable centroids, facilitating cleaner feature separation and naturally sharper maps.
Figure 1. Overview of models of (a) ABN for action recognition, and (b) the proposed Object-ABN.

Datasets

The method was evaluated on two prominent video action recognition benchmarks:

  • UCF101: A classic dataset containing 101 human action classes (e.g., sports, instruments) across roughly 13,300 YouTube videos.
  • Something-Something v2 (SSv2): A large-scale dataset (~220,000 videos) focused on fine-grained human-object interactions (e.g., "Dropping something into something"). This dataset is particularly well-suited for Object-ABN because the background is often irrelevant; the action is defined entirely by how an object is manipulated.

Key Insights and Ideas

  • Quantifying Sharpness via Entropy: To move beyond purely qualitative visual checks, the authors propose using the Shannon entropy of normalized attention map histograms as a metric for sharpness. Lower entropy indicates that the attention values are highly polarized (closer to 0 or 1), signaling sharp boundaries between the foreground and background.
  • Dataset-Dependent Trade-offs: The impact of forcing a model to ignore the background depends heavily on the dataset. On UCF101, where background context is highly predictive, restricting attention solely to objects can slightly degrade accuracy. On SSv2, where background is noise and object interaction is key, object-constrained attention actually boosts classification performance.
  • Latent Clustering Regularizes Attention: Integrating Prototype Conformity (PC) loss acts as an effective regularizer. By organizing the latent space into distinct category clusters, the model naturally produces less noisy, more distinct attention maps.

Key Results

Qualitative Improvements

Visually, the difference is striking. While the original ABN produces blurry, scattered attention blobs, Object-ABN generates clean silhouettes that perfectly trace the actors and objects in motion.

Visualization of attention maps on UCF101, comparing the blurry baseline (b) to the sharp object-constrained maps (c, d).

Quantitative Performance

  • UCF101: The baseline ABN achieved a top-1 accuracy of 93.96% with an attention map entropy of 3.064 (close to the maximum possible randomness of 3.332). Object-ABN with mask loss and PC loss maintained a comparable accuracy of 93.80% while slashing the entropy to 1.469, demonstrating a massive gain in sharpness.
  • Something-Something v2: The baseline top-1 accuracy was 54.63% with an entropy of 2.887. Incorporating the mask loss, multi-head attention, and PC loss simultaneously improved the top-1 accuracy to 55.05% and reduced the object map entropy to 2.236.
Visualization of attention maps on the SSv2 dataset.

Limitations and Future Work

  • The UCF101 Accuracy Drop with MHA: When using multiple attention maps ($\mathcal{L}_{mha}$) on UCF101, top-1 accuracy dropped by about 5%. This indicates that explicitly separating foreground and background can confuse the model when background context is a valid shortcut for classification.
  • Dependency on Pre-trained Segmentors: Object-ABN's self-supervision is entirely bound to the quality of the off-the-shelf instance segmentation model. If the segmentor fails to detect a crucial object or suffers from frame-to-frame inconsistency, the mask loss will inadvertently train the attention branch on incorrect boundaries. Future work could explore joint training or more robust temporal smoothing for the target masks.

Summary updated

BibTeX
@misc{nitta2022object,
  author = {Tomoya Nitta and Tsubasa Hirakawa and Hironobu Fujiyoshi and Toru Tamaki},
  title = {{Object-ABN: Learning to Generate Sharp Attention Maps for Action Recognition}},
  year = {2022},
  eprint = {2207.13306},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.13306},
}
Figure