Meta-learning with Heterogeneous Tasks

Zhaofeng Si, Shu Hu, Kaiyi Ji, Siwei Lyu2024

Abstract

Meta-learning is a general approach to equip machine learning models with the ability to handle few-shot scenarios when dealing with many tasks. Most existing meta-learning methods work based on the assumption that all tasks are of equal importance. However, real-world applications often present heterogeneous tasks characterized by varying difficulty levels, noise in training samples, or being distinctively different from most other tasks. In this paper, we introduce a novel meta-learning method designed to effectively manage such heterogeneous tasks by employing rank-based task-level learning objectives, Heterogeneous Tasks Robust Meta-learning (HeTRoM). HeTRoM is proficient in handling heterogeneous tasks, and it prevents easy tasks from overwhelming the meta-learner. The approach allows for an efficient iterative optimization algorithm based on bi-level optimization, which is then improved by integrating statistical guidance. Our experimental results demonstrate that our method provides flexibility, enabling users to adapt to diverse task settings and enhancing the meta-learner's overall performance.

Introduction

Standard meta-learning algorithms, such as Model-Agnostic Meta-Learning (MAML), typically operate under the assumption that all training tasks are of equal importance. However, in real-world scenarios, training data is rarely uniform. It is often "heterogeneous"—a mixture of easy, hard, noisy, and outlier tasks.

Visualizing heterogeneous task types and the selection of informative tasks based on loss rank.

Easy tasks can "overwhelm" the learner, leading to a model that fails to capture complex features. Conversely, noisy tasks (with corrupted labels) or outlier tasks (from different distributions) provide misleading gradients that can pull the meta-model away from the target domain. While previous research has focused on sample-level noise, this paper argues for a task-level approach to robust meta-learning.

Methodology: HeTRoM

We propose Heterogeneous Tasks Robust Meta-learning (HeTRoM), which utilizes a rank-based task-level learning objective. Instead of averaging loss across all tasks in a batch, HeTRoM dynamically selects a subset of "informative" tasks.

Task Selection Mechanism

For a batch of $n$ tasks, HeTRoM sorts them by individual loss and optimizes only for tasks ranked from $m+1$ to $k$. This selection strategy serves two primary purposes:

  1. Robustness: By dropping the top-$m$ tasks (highest loss), the model filters out outliers and heavily noisy tasks.
  2. Efficiency: By dropping the bottom-$(n-k)$ tasks (lowest loss), the model avoids redundant updates from "too easy" tasks, focusing instead on "hard task mining."

Statistical Guidance (sg-HeTRoM)

To reduce the need for manual hyperparameter tuning of $m$ and $k$, we introduce sg-HeTRoM. This variant models task losses as a log-normal distribution during a warm-up phase. It then automatically determines optimal thresholds ($\lambda$ and $\hat{\lambda}$) to identify the informative task range, providing a principled way to handle diverse data distributions.

Experimental Evaluation

HeTRoM was evaluated on Mini-ImageNet and Tiered-ImageNet benchmarks. To simulate real-world heterogeneity, we introduced synthetic label noise and cross-domain outlier tasks.

Loss distributions and performance impact across clean, noisy, and outlier task scenarios.

Performance Results

  • Clean Data Accuracy: On Mini-ImageNet (5-way 5-shot), HeTRoM achieved 70.45% accuracy, significantly outperforming MAML's 63.11%.
  • Resilience to Noise: In scenarios where 60% of tasks were noisy, HeTRoM maintained a high performance of approximately 68%, demonstrating its robustness against gradient corruption.
  • Outlier Robustness: HeTRoM effectively ignored tasks from non-overlapping categories, maintaining a 3-8% lead in accuracy over robust baselines like ATS and Eigen-Reptile.
  • Computational Efficiency: Despite the sorting and modeling steps, HeTRoM remains efficient. Its average iteration time of 1.36s is only slightly higher than MAML (1.22s) and much faster than Eigen-Reptile (3.59s).

Conclusion

HeTRoM identifies a "Goldilocks zone" of learning by focusing on tasks that are neither too easy nor too noisy. By operating at the task level, the method achieves significant gains in robustness and accuracy with minimal computational overhead. Future work will investigate theoretical generalization bounds and the application of HeTRoM to online meta-learning environments.

Summary updated

BibTeX
@misc{si2024meta,
  author = {Zhaofeng Si and Shu Hu and Kaiyi Ji and Siwei Lyu},
  title = {{Meta-learning with Heterogeneous Tasks}},
  year = {2024},
  eprint = {2410.18894},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.18894},
}
Figure