Multi-Task Processes

Donggyun Kim, Seongwoong Cho, Wonkwang Lee, Seunghoon Hong

TL;DR

Multi-Task Neural Processes (MTNPs) extend the flexibility of Neural Processes to settings where multiple, correlated tasks must be modeled simultaneously. By using a hierarchical latent variable model, MTNPs can "transfer knowledge" between tasks, allowing them to make accurate predictions even when data for a specific task is incomplete or missing.

What Problem Does This Paper Address?

Neural Processes (NPs) are a powerful class of meta-learning models that represent a "distribution over functions." They can adapt to new, unseen tasks with a single forward pass, providing both predictions and uncertainty estimates without the need for expensive retraining.

However, standard NPs have a major blind spot: they assume each task is independent. In the real world, data is rarely so isolated. Think of a weather station measuring temperature, humidity, and precipitation; these variables are physically correlated. If the humidity sensor fails, a smart model should be able to use the temperature data to help "fill in the blanks" for humidity. Standard NPs cannot do this. Furthermore, real-world data is often "incomplete"—different sensors might have different sampling rates, meaning we rarely have a perfectly aligned dataset where every attribute is measured at every time point.

Methods

The authors introduce Multi-Task Neural Processes (MTNPs) to bridge this gap. The core innovation is a hierarchical Latent Variable Model (LVM).

Standard NPs use a single latent variable to describe a function. MTNPs split this into two levels:

  1. Global Latent Variable ($z$): This captures the shared "context" or underlying correlation across all tasks. It looks at the "big picture" of all available data.
  2. Task-Specific Latent Variables ($v^t$): These capture the unique stochastic factors for each individual task, conditioned on the global "big picture."
Graphical models comparing STNP, JTNP, and MTNP

To implement this, the authors build on the Attentive Neural Process (ANP) architecture. They use a sophisticated encoder-decoder setup:

  • Latent Encoder: Uses self-attention to aggregate information within a task and then across different tasks to sample the global and per-task latents.
  • Deterministic Encoder: Provides local, high-resolution representations for each task using cross-attention, which helps prevent the "underfitting" issues common in vanilla NPs.
  • Decoder: Combines the global context, the task-specific latent, and the local deterministic representation to produce a predictive distribution (e.g., mean and variance for regression).

Datasets

The researchers evaluated MTNPs across three distinct domains:

  • 1D Synthetic Curve Regression: Correlated functions generated using different activation functions (Sine, Tanh, etc.) but shared underlying parameters.
  • 1D Weather Time-Series: Real-world data from the Dark Sky API, featuring six physically correlated attributes (TempMin, TempMax, Humidity, Precip, Cloud, Dew) across 266 cities.
  • 2D Image Completion (Face Data): A multi-modal task using the CelebA HQ dataset. The model had to jointly predict four pixel-aligned modalities: the RGB image, a semantic segmentation map, Sobel edges, and a 3D coordinate map (PNCC).

Key Insights and Ideas

  • Knowledge Transfer via Hierarchy: The hierarchical structure is the "secret sauce." By conditioning task-specific latents on a global variable, the model can perform "internal knowledge transfer." If the model sees a "Cloud" task measurement, it uses its learned correlation to reduce uncertainty in the "Precipitation" task, even in regions where precipitation wasn't measured.
  • Robustness to Incompleteness: MTNPs are specifically designed for "incomplete context." Unlike previous joint-modeling attempts (like JTNP) that require all tasks to share the same input points, MTNPs can handle asynchronous data where different tasks are observed at different locations.
  • Avoiding Negative Transfer: A common risk in multi-task learning is that unrelated tasks might "confuse" the model. The authors' ablation studies showed that their hierarchical approach is robust; even when tasks are independent, the per-task latents allow the model to maintain performance without being dragged down by the global variable.

Key Results

MTNPs consistently outperformed single-task baselines (STNP) and naive joint-modeling baselines (JTNP) across all datasets:

1D Synthetic Curve Regression Results
  • Synthetic Data: MTNP achieved significantly lower Mean Squared Error (MSE), especially when context points were sparse. The model successfully captured correlations across different function types.
  • Weather Data: MTNP showed superior accuracy and better uncertainty calibration (measured by Negative Log-Likelihood). Qualitatively, the model demonstrated it could "transfer" information from one weather attribute to another to improve predictions.
  • Face Data: In the 2D task, MTNP produced much more coherent results. While baselines might predict a head pose in the RGB image that didn't match the pose in the segmentation map, MTNP ensured all four modalities were physically and logically aligned.

Limitations and Future Work

While MTNPs represent a significant step forward, the authors note a few areas for growth:

  • Scaling: The current architecture needs to be tested on even larger, more complex datasets to see how the attention mechanisms scale.
  • Unseen Task Spaces: Currently, the model is trained on a fixed set of tasks. Future work could explore generalizing to entirely new task spaces (zero-shot task transfer).
  • Empty Contexts: The model still struggles if a task has zero context points, suggesting a need for even stronger prior-sharing mechanisms.

Summary updated

BibTeX
@inproceedings{kim2022multi,
  author = {Donggyun Kim and Seongwoong Cho and Wonkwang Lee and Seunghoon Hong},
  title = {{Multi-Task Processes}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=UfkcdH-jzvt},
}
Figure