Improving Multi-Task Generalization via Regularizing Spurious Correlation

Ziniu Hu, Zhe Zhao, Xinyang Yi, Tiansheng Yao, Lichan Hong, Yizhou Sun, Ed H. Chi

Overview

Multi-Task Learning (MTL) is a powerful paradigm designed to improve generalization by sharing knowledge across tasks. In theory, training one model on multiple tasks should yield a richer, shared representation. However, in practice, MTL often performs worse than training separate models for each task (Single-Task Learning), especially when the tasks are loosely correlated.

This paper identifies a primary culprit for this failure: spurious correlation. Models often latch onto features that appear predictive during training but lack a true causal relationship with the task. To address this, the authors introduce Multi-Task Causal Representation Learning (MT-CRL), a framework utilizing disentangled neural modules and invariant regularization to ensure tasks only share truly relevant, causal knowledge. Experiments show MT-CRL improves generalization by an average of 5.5% across major benchmarks.

The Problem with Multi-Task Learning

In an MTL setup, the risk of relying on non-causal knowledge is effectively doubled compared to single-task models.

First, the shared model must encode features for all tasks. A feature that is genuinely causal for Task A (e.g., "grass" in an outdoor scene recognition task) might be mistakenly adopted as a shortcut for Task B (e.g., "cow" classification). Because the shared encoder acts as a pool of potential spurious features, a task is more likely to "borrow" a non-causal feature from a neighboring task than to learn the harder, underlying causal truth.

Causal graph illustrating how Multi-Task Learning models encode factors from multiple tasks, increasing the risk of cross-task spurious correlations.

Second, task labels themselves are often correlated in training data (e.g., "action" movies frequently feature "explosions"). If these label-label correlations shift in the real world, the model's performance degrades. The authors theoretically and empirically demonstrate that MTL is inherently more prone to falling into these non-causal traps.

Methodology: Multi-Task Causal Representation Learning (MT-CRL)

To solve this, the authors propose MT-CRL, which transitions away from a single "black box" encoder toward a modular, causal architecture. The framework relies on four key components:

  1. Modular Architecture: The base model uses a Multi-gate Mixture-of-Experts (MMoE) design, consisting of $K$ separate neural modules (experts).
  2. Disentanglement Regularization: To prevent modules from learning a messy mix of features, a decorrelation loss ($L_{decor}$) based on the Pearson correlation between module outputs is applied. This ensures each module learns a distinct "factor" of the data (e.g., shape, color, or background).
  3. Causal Routing Graph: Instead of forcing every task to use every module, MT-CRL learns a sparse "routing graph" that connects tasks only to the specific modules they require.
  4. Graph-Invariant Risk Minimization (G-IRM): This is the core innovation. Inspired by Invariant Risk Minimization (IRM), the model regularizes the gradient of the routing graph across different "environments" (e.g., training vs. validation sets). If a module's contribution to a task fluctuates across different data distributions, the model learns to sever that connection, effectively discarding shortcuts and noise.

Datasets and Evaluation

The framework was rigorously evaluated on a mix of synthetic and high-complexity real-world datasets:

  • Synthetic: Multi-SEM and Multi-MNIST (modified to include known spurious features).
  • Real-World:
  • MovieLens: Predicting multiple movie genres and ratings.
  • Taskonomy: A massive vision dataset featuring tasks like depth estimation and edge detection.
  • CityScape & NYUv2: Standard computer vision benchmarks for semantic segmentation and surface normals.

To test robustness, the authors split these datasets using specific attributes (like movie release year or building location) to simulate real-world distribution shifts.

Key Results

MT-CRL demonstrated superior generalization, improving performance by 5.5% on average over vanilla MTL across all five benchmarks. Furthermore, it consistently outperformed popular MTL optimization methods (like PCGrad and GradVac) and general robust learning methods (like IRM and DANN).

Heatmap and keyword analysis demonstrating MT-CRL's ability to ignore spurious correlations (e.g., the word 'die') when predicting the 'Children's' movie genre.

Qualitative results strongly supported the quantitative gains. In a MovieLens case study, a standard MTL model used the word "die" to predict "Children's" movies—a spurious correlation present in the training set. MT-CRL successfully ignored these spurious words, focusing instead on causal keywords like "Parenthood" and "Alice."

Limitations and Future Directions

Like many causal methods, MT-CRL's performance relies heavily on the ability to clearly define different "environments" or data slices. In many real-world scenarios, these distribution shifts are latent and difficult to label. Additionally, managing multiple modules and calculating second-order gradients for the G-IRM penalty introduces computational overhead.

Future work will focus on developing more sophisticated methods to automatically discover latent distribution shifts within a dataset, allowing the G-IRM regularizer to operate effectively without requiring explicit environment labels.

Summary updated

BibTeX
@inproceedings{hu2022improving,
  author = {Ziniu Hu and Zhe Zhao and Xinyang Yi and Tiansheng Yao and Lichan Hong and Yizhou Sun and Ed H. Chi},
  title = {{Improving Multi-Task Generalization via Regularizing Spurious Correlation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=5HrAHTwWBd},
}
Figure