TL;DR
Generative Multitask Learning (GMTL) is a simple yet powerful tweak to the inference objective of multitask models that significantly improves their robustness to "target shift." By shifting from a purely discriminative approach to a generative-inspired one, the authors show how to mitigate spurious correlations caused by unobserved variables, all without requiring any additional model training.
What Problem Does This Paper Address?
Deep learning models are notorious for picking up on statistical "shortcuts"—correlations that work well on the training data but fail in the real world. In Multitask Learning (MTL), where a model predicts multiple labels (like "wearing a hat" and "wearing a scarf") from one input (an image), a specific type of bias called target-causing confounding often creeps in.
Imagine a dataset of indoor photos. The "season" (an unobserved variable, $U$) might cause people to wear both hats and scarves in winter. A standard model learns that if it sees a scarf, there’s probably a hat, even if the hat itself is hard to see. However, if the test data comes from a different "season" or context where these items aren't paired, the model’s performance tanks. This is because the model relied on a "backdoor path" of correlation rather than the actual causal relationship between the image pixels and the labels.
Methods: Generative Multitask Learning (GMTL)
The authors propose Generative Multitask Learning (GMTL).
Standard Discriminative MTL (DMTL) tries to find the labels $y$ that maximize the probability $p(y|x)$. This assumes that given the input $x$, the different tasks are independent. GMTL flips this logic. It looks for the labels that maximize $p(x|y, y')$, essentially asking: "Which set of labels is most likely to have generated this specific input?"
The "Bayes' Rule" Trick: Estimating $p(x|y, y')$ directly is hard because $x$ (like an image) is high-dimensional. The authors use Bayes' rule to rewrite the objective into something manageable:
$$\text{argmax}_{y,y'} [\log p(y | x) + \log p(y' | x) - \alpha \log p(y, y')]$$
- The $\alpha$ Hyperparameter: This is the "secret sauce." It ranges from 0 to 1.
- At $\alpha = 0$, you have standard MTL.
- At $\alpha = 1$, you completely remove the influence of the joint distribution of labels, making the model invariant to how labels were paired in the training set.
- No Retraining Required: Because this change happens only during the inference (prediction) phase, you can apply GMTL to existing, pre-trained multitask models.
Datasets
The researchers validated their approach on three main setups:
- Toy Problem: A synthetic dataset with a mixture of Gaussians to prove the causal theory.
- Attributes of People: A dataset of ~8,000 images where the model predicts binary attributes (e.g., hat, long hair, glasses).
- Taskonomy: A massive dataset of 4 million indoor scenes. The authors focused on a subset, tasking the model with simultaneous object classification (100 classes) and scene classification (64 classes).
Key Insights and Ideas
- Closing the Backdoor: In causal terms, conditioning on all targets simultaneously "d-separates" the input from the unobserved confounder. This effectively blocks the flow of spurious information.
- Anticausal Learning: The paper leans into the idea that for many tasks (like image classification), the labels actually "cause" the pixels. By treating the objective as generative, the model better respects this causal direction.
- The Robustness Trade-off: There is a natural trade-off between in-distribution (ID) accuracy and out-of-distribution (OOD) robustness. The $\alpha$ parameter allows practitioners to tune the model based on how much they expect the test environment to differ from the training environment.
- Simulating Shift: Since it's hard to find "naturally" shifted datasets, the authors used importance sampling to simulate a wide range of target shifts, allowing for a rigorous stress test of the GMTL method.
Key Results
- Monotonic Improvement: As the "target shift" (the difference between training and test label distributions) becomes more severe, the optimal value of $\alpha$ increases.
- Consistent Gains: Across all four MTL architectures tested (including Shared Trunk and Cross-stitch networks), GMTL consistently outperformed standard DMTL in shifted environments.
- Strong Correlation: The authors found a very high correlation (-0.847) between the severity of the shift and the optimal $\alpha$, suggesting that if you can estimate the shift, you can easily find the best $\alpha$.
- Accuracy Boost: In severe shift scenarios, GMTL provided a significant delta in accuracy (up to 10-20% in some toy/attribute scenarios) compared to the baseline.
Limitations and Future Work
- Tuning $\alpha$: Currently, finding the "perfect" $\alpha$ requires some knowledge of the test distribution (oracle access). Developing a heuristic to tune $\alpha$ automatically for unknown distributions is a key next step.
- Label Sparsity: GMTL requires estimating the joint distribution of targets $p(y, y')$. If you have dozens of tasks, the number of possible label combinations explodes, making it hard to estimate this distribution accurately (the "curse of dimensionality").
- Missing Labels: The current counting method for $p(y, y')$ struggles if the training data has many missing labels for certain tasks.
Overall, the paper provides a mathematically grounded yet practically simple way to make multitask models more reliable in the messy, unpredictable real world.
Summary updated