Deep Model Transferability from Attribution Maps

Jie Song, Yixin Chen, Xinchao Wang, Chengchao Shen, Mingli Song

Overview

This paper introduces an "embarrassingly simple" yet highly effective method to estimate how well deep learning models can transfer knowledge between different visual tasks. By comparing the attribution maps (which highlight where a network "looks" in an image) of pre-trained models on a small set of unlabeled images, the authors can predict task relationships and transferability. This approach is several orders of magnitude faster than previous state-of-the-art methods like Taskonomy, and it requires absolutely no human annotations.

The Challenge of Transfer Learning

In deep learning, "transfer learning"—taking a model trained on one task (like object recognition) and fine-tuning it for another (like depth estimation)—is a standard practice to save time and data. However, not all tasks are inherently related. Transferring knowledge from a completely unrelated task can lead to poor performance, a phenomenon known as "negative transfer."

The landmark 2018 Taskonomy project attempted to map these relationships by training thousands of individual transfer models to empirically determine what worked best. While groundbreaking, Taskonomy is computationally prohibitive: it requires thousands of GPU hours and massive amounts of labeled data. The authors of this paper tackle the challenge of estimating this "task-transferability" graph much more efficiently, using only pre-trained models and a handful of unlabeled images.

Methodology: Estimating Transferability via Attribution

The core idea is to project deep networks into a "model space" where each network is represented as a single point. The distance between two points represents their relatedness.

Pipeline for estimating model transferability

The process follows four main steps:

  1. Probe Dataset: The researchers gather a small set of roughly 1,000 unlabeled images, referred to as "probe data."
  2. Attribution Maps: They feed these images into pre-trained models and generate attribution maps (also known as saliency or attention maps). These maps highlight which pixels in the input image are most important for the model's internal representations. The team tested three methods for generating these maps: simple Saliency Maps, Gradient*Input, and $\epsilon$-Layer-wise Relevance Propagation ($\epsilon$-LRP).
Examples of attribution maps across various tasks
  1. Distance Calculation: For any two models, the system calculates the cosine similarity between their attribution maps across the entire probe dataset. If two models consistently "attend" to the same regions of an image (e.g., both focus heavily on object edges or surface textures), they are considered highly related.
  2. Transferability Estimation: These calculated distances are then used to rank which source models are most likely to benefit a specific target task.

Crucially, this method is architecture-agnostic (it works even if the models have entirely different layers or designs) and unsupervised (it does not need to know the ground-truth labels of the images).

Validation Datasets

The authors validated their approach using several datasets:

  • Taskonomy Dataset: Used as the "ground truth" or oracle to verify if their fast method could replicate the expensive, compute-heavy results of the original Taskonomy study.
  • Indoor Scene (MIT67) & COCO: Used as probe datasets to test if the method remains robust across different image domains.
  • Online Model Zoo: To test the method beyond the Taskonomy ecosystem, they collected 18 diverse models including VGG, ResNet, Inception, and MobileNet, alongside specialized models for face detection and inpainting.

Key Insights

  • Attention as a Proxy for Knowledge: The fundamental insight of the paper is that if two models focus on similar regions of an image to solve their respective tasks, they likely share a similar underlying "logic" or feature set.
  • Robustness to Data Domain: Surprisingly, the method works well even when the probe images come from a different domain than the training data. For example, using complex COCO images to estimate the transferability of models trained on Taskonomy's indoor data actually yielded better results. The authors hypothesize that COCO's complex textures "stress-test" the attribution maps more effectively.
  • Symmetry vs. Asymmetry: Real-world transferability is often asymmetric (Task A might help Task B more than Task B helps Task A). While the authors' distance metric is inherently symmetric, they found that the relative ranking of source tasks remains highly accurate, making it a viable and efficient substitute for asymmetric measures.

Results and Performance

  • Massive Speedup: The proposed method took about 20 GPU hours to compute relationships for 20 tasks on a single card. In contrast, Taskonomy took thousands of GPU hours on a massive cloud cluster to achieve the same result.
  • High Accuracy: When predicting the top-3 best source tasks for a target, the method achieved approximately 85% precision on the COCO probe set using $\epsilon$-LRP.
  • Topological Similarity: The "Task Similarity Tree" (dendrogram) generated by this method almost perfectly matches the one from Taskonomy, correctly clustering 3D, 2D, geometric, and semantic tasks together.
  • Scalability: The method successfully clustered ImageNet-trained classification models together and inpainting models together, even when they utilized wildly different architectures (e.g., comparing a VGG16 directly to a ResNet152).

Limitations and Future Directions

  • Symmetric Constraint: Because the distance metric is symmetric, the model cannot distinguish hierarchical relationships, such as whether "Task A is a subset of Task B" versus "Task B is a subset of Task A."
  • Dependence on Attribution Quality: The accuracy of the results varies depending on which attribution method is used. While $\epsilon$-LRP performed best in this study, devising even better attribution methods specifically tailored for transferability estimation is a promising future direction.
  • Task Scope: The study focuses primarily on computer vision. It remains an open question whether this "attention-based" similarity holds up in other domains, such as Natural Language Processing (NLP).

Summary updated

BibTeX
@inproceedings{song2019deep,
  author = {Jie Song and Yixin Chen and Xinchao Wang and Chengchao Shen and Mingli Song},
  title = {{Deep Model Transferability from Attribution Maps}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure