Ensemble Prediction of Task Affinity for Efficient Multi-Task Learning

Afiya Ayman, Ayan Mukhopadhyay, Aron Laszka

TL;DR

ETAP (Ensemble Task Affinity Predictor) is a novel framework designed to predict which machine learning tasks should be trained together to maximize overall performance. By combining "white-box" gradient analysis with a two-stage "black-box" refinement process, ETAP identifies optimal task groupings with significantly higher accuracy and up to 71% less computational overhead than current state-of-the-art methods.

The Challenge of Multi-Task Learning

In Multi-Task Learning (MTL), the goal is to train a single model to handle multiple tasks simultaneously—for example, a self-driving car model that identifies pedestrians and reads traffic signs. While this approach can improve computational efficiency and model generalization, it often suffers from negative transfer. This is a phenomenon where tasks interfere with one another during training, ultimately degrading performance compared to training them individually.

The "holy grail" of MTL is finding the perfect subsets of tasks that actively benefit from joint training. However, this presents a massive combinatorial problem. If a system has just 20 tasks, there are over a million possible ways to group them. Training every combination to find the best one is computationally impossible. Existing solutions typically fall into two extremes: "white-box" methods that analyze training dynamics but are often too slow or simplistic, and "data-driven" methods that require massive amounts of data to guess optimal groupings.

Methods: The ETAP Pipeline

The authors introduce ETAP, a framework that bridges the gap between principled theory and data-driven flexibility through a highly efficient three-step pipeline.

The ETAP pipeline: combining gradient-based affinity scores with non-linear B-Spline transformations and residual correction.
  1. White-Box Affinity Scoring: During a single "baseline" MTL training run, ETAP monitors how the gradient updates for one task affect the loss of other tasks. If Task A’s update consistently reduces Task B’s loss, they are deemed to have high "affinity."
  2. Non-Linear Mapping (Stage 1): Raw gradient affinities don't always translate linearly to actual performance gains. ETAP uses B-Splines (piecewise polynomials) to map these raw scores into initial gain predictions, effectively capturing complex, non-linear relationships.
  3. Residual Correction (Stage 2): To account for specific task-to-task interactions that a general formula might miss, ETAP employs a Ridge Regression model. This model learns to "fix" the residual errors of the first stage by looking at which specific tasks are present in a group (using multi-hot encoding).

By starting with a strong "physics-based" guess (gradients) and then refining it with data, ETAP requires far fewer training samples than purely black-box models.

Datasets

The researchers evaluated ETAP across four diverse domains to prove its versatility:

  • CelebA: Computer vision (9 facial attribute classification tasks).
  • ETTm1: Time-series forecasting (7 electricity transformer temperature tasks).
  • Chemical (MHC-I): Molecular biology (10 tasks classifying peptide binding affinities).
  • Ridership: A newly introduced real-world dataset for transit demand prediction in a U.S. city (10 tasks across different bus routes).

Key Insights

  • Gradients are a "Cheap" Signal: You don't need to finish training a model to see if tasks are fighting; their gradients tell the story early on. ETAP leverages this "free" information already computed during backpropagation.
  • The Stability of Time-Averaging: Per-step gradients are noisy. The authors found that averaging affinity scores over the entire training process provides a remarkably stable and low-variance estimate of task relationships.
  • Residuals are Easier to Learn: It is much easier for a model to learn how to correct a decent prediction than to learn the entire complex mapping of MTL gains from scratch. This is the secret behind ETAP's data efficiency.

Key Results

ETAP consistently outperformed baselines like MTGNet and TAG in predicting MTL gains, demonstrating both superior accuracy and remarkable robustness.

Performance comparison (R^2) of ETAP vs. MTGNet across four datasets as the number of training groups (Cost) increases.
  • Superior Accuracy & Robustness: As seen in the performance charts across all four datasets, ETAP (blue) maintains a high and stable $R^2$ score even when the training budget (Cost) is extremely low. In contrast, purely data-driven methods like MTGNet (red) show high instability and "wild" negative predictions when training data is scarce. On the ETTm1 dataset, ETAP achieved a Pearson correlation of 0.84, compared to just 0.47 for TAG.
  • Massive Speedups: ETAP reduced the runtime required to estimate task affinities by 46% on CelebA and 71% on ETTm1 compared to the popular TAG method.
  • Near-Optimal Grouping: When used to actually pick task groups, ETAP's selections resulted in total model losses very close to the "ground truth" optimal groups found via exhaustive search (which is only possible to verify on small task sets).

Limitations and Future Work

While highly effective, the current framework is designed for the common "shared encoder, task-specific decoders" architecture. Its performance on more complex architectures (like Cross-Stitch or Sluice networks) remains an open question. Additionally, while ETAP is efficient, it still requires training one baseline MTL model and a handful of sample groups to calibrate the ensemble.

Future directions include exploring more sophisticated non-linear mappings beyond B-Splines and testing the framework on even larger task sets (e.g., 50+ tasks), where the combinatorial explosion makes efficient grouping even more critical.

Summary updated

BibTeX
@inproceedings{ayman2026ensemble,
  author = {Afiya Ayman and Ayan Mukhopadhyay and Aron Laszka},
  title = {{Ensemble Prediction of Task Affinity for Efficient Multi-Task Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=RuVT3PeX1M},
}
Figure