Embedding Human Knowledge into Deep Neural Network via Attention Map

Masahiro Mitsuhara, Hiroshi Fukui, Yusuke Sakashita, Takanori Ogata, Tsubasa Hirakawa, Takayoshi Yamashita, Hironobu FujiyoshiarXiv 2019

TL;DR

This paper introduces a "human-in-the-loop" fine-tuning method that allows experts to manually edit neural network attention maps to correct model behavior. By training an Attention Branch Network (ABN) to match these human-refined maps, the authors demonstrate significant improvements in both classification accuracy and the interpretability of visual explanations across general, fine-grained, and medical imaging datasets.

What Problem Does This Paper Address?

Deep neural networks are often criticized as "black boxes." While tools like Grad-CAM provide visual explanations by highlighting discriminative regions (attention maps), these maps frequently reveal that the model is looking at the wrong things. For instance, a model might correctly identify a "Lakeland terrier" but only because it focused on a "French bulldog" elsewhere in the frame.

Figure 1. Adjustment of recognition result by editing an attention map on visual explanation.

Embedding human knowledge—like "look at the ears to distinguish these two birds"—is difficult in deep learning due to the massive number of parameters. The authors address this gap by treating the attention map not just as a post-hoc explanation, but as a steerable mechanism to inject human intuition directly into the training process.

Methods

The researchers leverage the Attention Branch Network (ABN) architecture. Unlike standard CNNs where attention is calculated after the fact, an ABN has a dedicated "attention branch" that generates a map used to weight features for the final "perception branch."

The core of their proposal is a three-step fine-tuning process:

  1. Collect: Identify samples where the model fails or focuses on irrelevant regions.
  2. Edit: A human expert uses a custom tool to manually add or remove attention regions, creating a "gold standard" map ($M'$).
  3. Fine-tune: The network is retrained using a new loss function. In addition to standard classification loss, they introduce an Attention Map Loss ($L_{map}$), which is the L2 norm between the model’s generated map and the human-edited map.
Figure 4. Process flow of the proposed method.

Crucially, during this fine-tuning, the backbone feature extractor is frozen; only the attention and perception branches are updated to align with the new human-provided guidance.

Datasets

The authors evaluated their method on three distinct types of challenges:

  • ImageNet: A subset of 100 "difficult" categories to test general object recognition.
  • CUB-200-2010: A fine-grained bird classification dataset. Here, they used "bubble" data (human-annotated circular regions used to distinguish species) to generate the edited maps.
  • IDRiD (Indian Diabetic Retinopathy Image Dataset): A medical dataset where expert-annotated segmentation masks of lesions served as the ground-truth attention maps.

Key Insights and Ideas

  • Attention as an Interface: The most powerful idea here is that attention maps are an intuitive "language" for human-machine cooperation. A human doesn't need to understand weights or gradients to tell a model, "Stop looking at the background and look at the bird's wing."
  • Fixing Multi-Object Confusion: The method is particularly effective when images contain multiple objects. By removing attention from a distractor (like a "Bottle cap") and adding it to the target (an "Eft"), the model's internal logic is successfully re-routed.
  • Regularizing with Intuition: Human-edited maps act as a strong regularizer. In medical contexts (IDRiD), forcing the model to look only at actual lesions (and ignoring healthy tissue) significantly boosted reliability.
Figure 3. Example of conventional and edited attention maps.

Key Results

The results show that "teaching" the model where to look pays off in raw performance:

  • ImageNet: For ResNet18+ABN, the top-1 error on the selected categories dropped from 8.40% to 6.20%.
  • CUB-200-2010: Top-1 accuracy improved by as much as 7.16% when training from scratch.
  • IDRiD: Accuracy for ResNet50+ABN reached a staggering 99.17%, up from 97.22%.
  • Quantitative Interpretability: Using "Deletion" and "Insertion" metrics (which measure how quickly confidence drops/rises as pixels are removed/added based on the attention map), the proposed method consistently outperformed Grad-CAM and standard ABN, proving the resulting maps are more faithful to the actual objects.

Limitations and Future Work

The primary limitation is the cost of human labor. Manually editing tens of thousands of maps (as done for the ImageNet experiments with 43 users) is not scalable for every new task. The authors also note that their current maps are single-channel and relatively low-resolution ($14 \times 14$ pixels).

Future work aims to explore multi-resolution attention maps, which could allow for even finer-grained human intervention, potentially correcting models at the level of specific textures or small anatomical features in medical scans.

Summary updated

BibTeX
@misc{mitsuhara2019embedding,
  author = {Masahiro Mitsuhara and Hiroshi Fukui and Yusuke Sakashita and Takanori Ogata and Tsubasa Hirakawa and Takayoshi Yamashita and Hironobu Fujiyoshi},
  title = {{Embedding Human Knowledge into Deep Neural Network via Attention Map}},
  year = {2019},
  eprint = {1905.03540},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.03540},
}
Figure