Cross-Stitch Networks for Multi-task Learning

Ishan Misra, Abhinav Shrivastava, Abhinav Gupta, Martial Hebert · DOI

TL;DR

This paper introduces "cross-stitch units," a novel mechanism for Convolutional Neural Networks (CNNs) that allows for principled and end-to-end learning of optimal shared and task-specific representations in multi-task learning. By automatically learning how to combine features from separate task-specific networks, cross-stitch networks outperform brute-force architecture search and significantly improve performance on "data-starved" categories.

What Problem Does This Paper Address?

Multi-task learning (MTL) in computer vision has shown great promise by leveraging shared representations across related tasks to improve performance, especially when data is scarce for some tasks. However, existing MTL approaches in CNNs often require manually designing and enumerating various network architectures (e.g., deciding where to "split" a network into shared and task-specific parts). This process is empirical, time-consuming, and lacks a principled way to determine the optimal degree of sharing for a given set of tasks. The paper aims to bridge this gap by proposing a method that can automatically learn this optimal balance.

Methods

The core contribution is the cross-stitch unit. This unit operates at each layer of a CNN and learns to combine the activation maps from two (or more) task-specific networks using linear combinations. Specifically, for two tasks A and B, the cross-stitch unit takes activation maps $X_A$ and $X_B$ from layer $l$ and produces new activation maps $X'_A$ and $X'_B$ for layer $l+1$ as follows:

$X'_A = \alpha_{AA} X_A + \alpha_{AB} X_B$ $X'_B = \alpha_{BA} X_A + \alpha_{BB} X_B$

The coefficients $\alpha_{ij}$ are learned parameters. $\alpha_{AA}$ and $\alpha_{BB}$ represent "same-task" weights, while $\alpha_{AB}$ and $\alpha_{BA}$ represent "different-task" weights. By adjusting these coefficients, the cross-stitch unit can learn to either strongly favor task-specific features (e.g., by setting $\alpha_{AB}$ and $\alpha_{BA}$ to zero) or to create more shared representations (by assigning higher values to $\alpha_{AB}$ and $\alpha_{BA}$). These units are integrated into a CNN architecture and trained end-to-end. The paper also discusses design decisions like initialization of these units and learning rates, suggesting that task-specific initialization of the base networks and higher learning rates for cross-stitch units are beneficial.

Datasets

The paper uses the following datasets:

  • NYU-v2: Used for semantic segmentation (SemSeg) and surface normal prediction (SN).
  • PASCAL VOC 2008: Used for object detection (Det) and attribute prediction (Attr).

Key Insights and Ideas

  • Principled Sharing: The cross-stitch unit provides a principled way to learn the optimal degree of feature sharing between tasks, moving beyond manual architecture search.
  • Automatic Regularization: The learned shared representations act as a form of regularization, particularly beneficial for "data-starved" tasks or categories with fewer training examples.
  • Flexibility: Cross-stitch units can learn to embody various "split architectures" (where networks are partially shared and partially task-specific) by adjusting their weights, effectively exploring a spectrum of sharing strategies.
  • Task-Specific Initialization Matters: Initializing the base networks (A and B) with models already fine-tuned on their respective tasks leads to better performance than using generic ImageNet pre-trained models.
  • Data Imbalance Benefits: The method shows significant performance gains for categories with fewer instances, highlighting its effectiveness in addressing data scarcity.

Key Results

  • Improved Performance: Cross-stitch networks consistently outperform baseline one-task networks, ensembles, and even the best manually found "split architectures" on the evaluated tasks.
  • Semantic Segmentation & Surface Normal: Achieved better results than baselines and the best split architecture on NYU-v2.
  • Object Detection & Attribute Prediction: Showed significant improvements, especially for attribute prediction, which is a more data-starved task.
  • Data-Starved Categories: Demonstrated substantial performance gains for categories with fewer training examples in both semantic segmentation and attribute prediction. For instance, the paper shows per-class gains for categories like "bag" and "whiteboard" in segmentation.

Limitations and Future Work

  • Two-Task Focus: The paper primarily focuses on multi-task learning with two tasks for simplicity, though the concept could extend to more.
  • Network Architecture Choice: While cross-stitch units learn optimal sharing, the choice of where to place these units within the network (e.g., after pooling layers vs. after every convolution) still requires some experimentation.
  • Future Directions: The authors suggest exploring where in the network cross-stitch units should be placed and how their weights could be constrained as interesting future research avenues.

Summary updated

BibTeX
@inproceedings{misra2016cross,
  author = {Ishan Misra and Abhinav Shrivastava and Abhinav Gupta and Martial Hebert},
  title = {{Cross-Stitch Networks for Multi-task Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2016},
  doi = {10.1109/cvpr.2016.433},
}
Figure