Gated Transfer Network for Transfer Learning

Yi Zhu, Jia Xue, Shawn Newsam

Abstract

Deep neural networks have led to a series of breakthroughs in computer vision given sufficient annotated training datasets. For novel tasks with limited labeled data, the prevalent approach is to transfer the knowledge learned in the pre-trained models to the new tasks by fine-tuning. Classic model fine-tuning utilizes the fact that well-trained neural networks appear to learn cross-domain features. These features are treated equally during transfer learning. In this paper, we explore the impact of feature selection in model fine-tuning by introducing a transfer module, which assigns weights to features extracted from pre-trained models. The proposed transfer module proves the importance of feature selection for transferring models from source to target domains. It is shown to significantly improve upon fine-tuning results with only marginal extra computational cost. We also incorporate an auxiliary classifier as an extra regularizer to avoid over-fitting. Finally, we build a Gated Transfer Network (GTN) based on our transfer module and achieve state-of-the-art results on six different tasks.

Introduction

Deep learning thrives on massive datasets like ImageNet, but many real-world tasks suffer from a "data hunger" problem. The standard solution is fine-tuning: taking a model pre-trained on a large source domain and slightly adjusting its weights for a smaller target domain. However, classic fine-tuning has a major blind spot: it treats all features learned from the source domain as equally important. In reality, some high-level object features might be irrelevant or even distracting for specific target tasks. Furthermore, fine-tuning on small datasets often leads to overfitting, where the model memorizes the target set instead of learning to generalize.

Methodology

The Gated Transfer Network (GTN) addresses these issues through two primary components: the Transfer Module and an Auxiliary Classifier.

The Transfer Module (Gating Mechanism)

Inspired by "Squeeze-and-Excitation" blocks, this module learns a set of weights (between 0 and 1) for each feature channel. It consists of two fully-connected layers with a bottleneck (reduction ratio of 16) to minimize parameter overhead. Using a Sigmoid function, it produces gating weights that perform point-wise multiplication ($y = F(x) \otimes x$). This allows the network to selectively "open" or "close" gates for features based on their relevance to the target task.

Auxiliary Classifier and Regularization

To combat the vanishing gradient problem and provide extra regularization, an auxiliary classification head is added at an intermediate layer. This forces lower layers to learn discriminative features specifically for the target domain. Additionally, dropout is incorporated within the transfer module to prevent the gating mechanism from overfitting to small datasets.

Architecture of the Gated Transfer Network (GTN) illustrating the pre-trained CNN, the gating mechanism within the Transfer Module, and the auxiliary classifier path.

Experimental Results

The GTN was evaluated on six diverse benchmarks, including MIT67 (indoor scenes), CUB200 (birds), and MINC-2500 (materials). The models were pre-trained on ImageNet before being transferred to these specialized domains.

Performance Gains

As shown in the table below, the addition of the Transfer Module (TM) and the Auxiliary Classifier (AUX) consistently improves performance over the baseline fine-tuning approach across multiple datasets.

Quantitative comparison of baseline fine-tuning versus the Gated Transfer Network components across MIT67, CUB200, and MINC datasets.

Key performance highlights include:

  • CUB200: Improved from a 77.64% baseline to 83.4%.
  • FashionAI: Achieved a state-of-the-art 92.0% accuracy.
  • MIT67: Reached 79.0%, outperforming specialized methods that utilized additional training data.

Discussion and Insights

  • Selection vs. Learning: When data is scarce, selecting from a rich library of pre-existing features is more effective than attempting to learn complex new features from scratch.
  • Domain Similarity Profiles: The learned weights in the transfer module provide a profile of domain similarity. For instance, in material recognition (MINC), the model assigned lower weights to high-level object features, indicating they were less useful for identifying raw materials.
  • Multiplication vs. Addition: The gating mechanism (multiplication) proved easier to optimize for transfer learning than residual learning (addition), as the model only needs to learn which features to "let through."

Conclusion

The Gated Transfer Network demonstrates that selective feature weighting is a powerful tool for transfer learning. By focusing on feature selection and incorporating auxiliary regularization, GTN achieves superior results with minimal computational cost. Future work may explore extending this gating approach to multi-source transfer learning, where features from multiple pre-trained models are selectively combined.

Summary updated

Abstract

Deep neural networks have led to a series of breakthroughs in computer vision given sufficient annotated training datasets. For novel tasks with limited labeled data, the prevalent approach is to transfer the knowledge learned in the pre-trained models to the new tasks by fine-tuning. Classic model fine-tuning utilizes the fact that well trained neural networks appear to learn cross domain features. These features are treated equally during transfer learning. In this paper, we explore the impact of feature selection in model fine-tuning by introducing a transfer module, which assigns weights to features extracted from pre-trained models. The proposed transfer module proves the importance of feature selection for transferring models from source to target domains. It is shown to significantly improve upon fine-tuning results with only marginal extra computational cost. We also incorporate an auxiliary classifier as an extra regularizer to avoid over-fitting. Finally, we build a Gated Transfer Network (GTN) based on our transfer module and achieve state-of-the-art results on six different tasks.
BibTeX
@misc{zhu2018gated,
  author = {Yi Zhu and Jia Xue and Shawn Newsam},
  title = {{Gated Transfer Network for Transfer Learning}},
  year = {2018},
  eprint = {1810.12521},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.12521},
}
Figure