InterroGate: Learning to Share, Specialize, and Prune Representations for Multi-task Learning

Babak Ehteshami Bejnordi, Gaurav Kumar, Amelie Royer, Christos Louizos, Tijmen Blankevoort, Mohsen GhafoorianBMVC 2024 · DOI

TL;DR

This paper introduces InterroGate, a novel multi-task learning (MTL) architecture that dynamically learns to balance shared and task-specific parameters using a gating mechanism. This allows for efficient inference by pruning unused parameters, achieving state-of-the-art results on several benchmarks while optimizing for computational cost.

What Problem Does This Paper Address?

Multi-task learning (MTL) aims to improve model accuracy and data efficiency by training a single model on multiple related tasks simultaneously. However, a major hurdle is "task interference," where optimizing for one task can negatively impact another. A common solution is to use shared features with task-specific layers on top. The challenge lies in manually designing these architectures to balance performance across all tasks and manage the increased computational cost. This paper tackles the problem of efficiently mitigating task interference in MTL by proposing an architecture that automatically learns an optimal balance between shared and task-specific representations, leading to a static and optimized model for inference.

Methods

InterroGate introduces a novel MTL architecture that replaces standard layers with "InterroGate layers." Each layer consists of a shared branch and task-specific branches. A key component is a learnable gating mechanism that, for each task and layer, decides whether to use features from the shared branch or the task-specific branch. This gating is learned end-to-end.

Crucially, the gating patterns learned during training are fixed at inference time. This allows for structured pruning: parameters not selected by the gates are removed, resulting in a simpler, more efficient static architecture. To control the trade-off between accuracy and computational cost, a sparsity regularization term is added to the loss function, encouraging more parameter sharing. The authors also use pretrained ImageNet weights for initialization and employ a separate optimizer for the gates to improve convergence.

Datasets

The paper evaluates InterroGate on three standard multi-task learning benchmarks:

  • CelebA: A large-scale face attributes dataset. The authors use age, gender, and clothes attributes as three classification tasks.
  • NYUD-v2: A dataset for semantic segmentation and depth estimation. They also incorporate the surface normal prediction task.
  • PASCAL-Context: A comprehensive scene understanding benchmark with tasks including semantic segmentation, saliency estimation, human parts segmentation, semantic edge detection, and surface normal estimation.

Key Insights and Ideas

  • Dynamic to Static for Efficiency: The core idea of learning dynamic gating during training and then fixing it for inference is a clever way to achieve computational efficiency without sacrificing the flexibility of dynamic adaptation.
  • Pruning for Inference: By making the learned gating patterns static, the model can be pruned, leading to a significantly smaller and faster inference pipeline. This is a major advantage for real-world deployment.
  • Controlled Trade-off: The sparsity regularization allows for explicit control over the balance between multi-task performance and inference computational cost, enabling the creation of a spectrum of models tailored to different efficiency requirements.
  • Task-Specific Needs: The experiments suggest that different tasks have varying needs for shared versus specialized features, and InterroGate's gating mechanism can effectively learn these differences. For instance, some tasks might benefit more from shared representations, while others require more specialization.

Key Results

InterroGate achieves state-of-the-art (SoTA) results on all three tested benchmarks (CelebA, NYUD-v2, and PASCAL-Context).

  • On CelebA, InterroGate achieves higher overall accuracy than MTL uniform and STL baselines at a significantly lower computational cost. For example, a half-width ResNet-20 InterroGate model at 14.8 MFlops matches the performance of an STL model at 174 MFlops.
  • On NYUD-v2, InterroGate achieves positive AMTL scores (e.g., +2.06 with HRNet-18 and +2.04 with ResNet-50), indicating better overall performance compared to single-task baselines, while using less computational resources than many competing MTL methods.
  • On PASCAL-Context, InterroGate also demonstrates strong performance, outperforming STL baseline at its highest compute budget and showing a graceful decline in performance as computational cost is reduced via sparsity loss.
  • The method shows consistent performance across different backbones, including convolutional (ResNet) and transformer-based (ViT/DPT) architectures.

Limitations and Future Work

  • Training Time: While InterroGate excels at inference efficiency, it incurs a moderate increase in training time compared to some baselines.
  • Number of Tasks: The paper primarily evaluates setups with a moderate number of tasks. Further evaluation on MTL setups with a larger number of tasks is suggested.
  • Guaranteed FLOPs: While the sparsity targets and regularization weight help control the trade-off, the authors note that they cannot guarantee a specific target FLOP count.
  • Transformer Gating: The current gating mechanism operates on the channel dimension. Future work could explore integrating approaches like patch-token gating for more efficient pruning in transformer architectures.

Summary updated

BibTeX
@misc{bejnordi2024interrogate,
  author = {Babak Ehteshami Bejnordi and Gaurav Kumar and Amelie Royer and Christos Louizos and Tijmen Blankevoort and Mohsen Ghafoorian},
  title = {{InterroGate: Learning to Share, Specialize, and Prune Representations for Multi-task Learning}},
  year = {2024},
  eprint = {2402.16848},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.16848},
}
Figure