TL;DR
This paper introduces Wasserstein Task Embedding (WTE), a novel, model-agnostic, and computationally efficient method for measuring task similarities. By embedding tasks into a vector space where Euclidean distances approximate a hierarchical optimal transport distance, WTE enables faster and more accurate task comparisons, showing strong correlations with forward and backward transferability in machine learning.
What Problem Does This Paper Address?
In machine learning, especially in multi-task, continual, and meta-learning settings, understanding the relationships between different tasks is crucial. This knowledge helps in selecting appropriate source tasks for transfer learning, preventing catastrophic forgetting in continual learning, and improving overall learning efficiency. However, existing methods for measuring task similarity often rely on specific model architectures, require extensive training, or are computationally prohibitive, especially when dealing with a large number of tasks. This paper aims to bridge this gap by proposing a method that is model-agnostic, training-free, and computationally efficient, while still accurately capturing task similarities.
Methods
The core of the proposed Wasserstein Task Embedding (WTE) framework involves two main steps:
- Label Embedding via Multidimensional Scaling (MDS): The authors first embed the label distributions of tasks into a lower-dimensional space. This is achieved by calculating the pairwise Wasserstein distances between label distributions and then applying MDS to obtain these embeddings. To simplify calculations, they leverage the Bures-Wasserstein distance, assuming Gaussian label distributions.
- Wasserstein Embedding (WE): The input data and the embedded label information are then combined. This augmented data representation is used to compute a task embedding using the Wasserstein Embedding framework. The key idea here is that the Euclidean distance between these final task embeddings approximates the hierarchical optimal transport distance between the original tasks. This approach avoids the need for pairwise optimal transport calculations between all tasks, significantly reducing computational cost.
Datasets
The authors evaluate their WTE framework on several benchmark datasets:
- *NIST task group: This includes handwritten digit datasets like MNIST, EMNIST, FashionMNIST, KMNIST, and USPS. The tasks are formed by using different subsets of these datasets, with each task typically involving 10 classes.
- Split-CIFAR100: This benchmark is created by randomly splitting the CIFAR-100 dataset into 10 smaller tasks, each consisting of 10 classes.
- Split-Tiny ImageNet: Similar to Split-CIFAR100, this involves randomly splitting the Tiny ImageNet dataset into 10 tasks, each with 20 classes.
Key Insights and Ideas
- Bridging Optimal Transport and Embeddings: The paper elegantly combines the theoretical rigor of optimal transport (specifically Wasserstein distance) with the practical efficiency of embedding methods (MDS and WE). This fusion allows for a powerful yet computationally tractable measure of task similarity.
- Model-Agnosticism is Key: By moving away from architecture-dependent methods, WTE offers a more generalizable and reusable approach to understanding task relationships, applicable across various machine learning models.
- Efficiency Through Embedding: The core innovation lies in transforming pairwise distance computations (which are expensive) into embedding computations followed by simple Euclidean distance calculations. This dramatically scales down the computational burden, especially for a large number of tasks.
- Correlation with Transferability: The strong empirical correlation between WTE distances and both forward and backward transferability is a significant finding, validating WTE as a meaningful proxy for task relatedness in practical learning scenarios.
Key Results
- Strong Correlation with Task Transferability: WTE distances show a statistically significant negative correlation with forward transfer error drop and a positive correlation with catastrophic forgetting (negative backward transfer) across multiple datasets (*NIST, Split-CIFAR100, Split-Tiny ImageNet).
- High Alignment with OTDD: The proposed WTE distances are highly correlated with the Optimal Transport Dataset Distance (OTDD), a more computationally intensive method, demonstrating the validity of the WTE approach.
- Significant Speedup: WTE is notably faster than OTDD. For instance, on the *NIST task group, WTE computation is significantly faster, and this advantage grows with the number of tasks. Figure 5 illustrates this efficiency gain, showing a linear relationship for WTE versus a quadratic fit for OTDD.
- Accuracy of Label Embedding: The MDS embedding of label distributions captures pairwise relationships with a maximum of 7.26% error, providing a solid foundation for the WTE framework.
Limitations and Future Work
- Assumptions for Label Embedding: The method relies on the assumption that label distributions can be approximated by Gaussians for the Bures-Wasserstein distance calculation. While this simplifies computation, it might limit applicability in cases where this assumption does not hold.
- Reference Distribution Choice: The performance of Wasserstein Embedding depends on the choice of a reference distribution. The paper mentions using a randomly generated reference distribution, but further exploration into optimal reference distribution selection could be beneficial.
- Future Work: The authors suggest that their WTE framework can be extended to other domains beyond supervised classification and could be further integrated into more complex learning paradigms like continual learning and meta-learning for improved performance and efficiency.
Summary updated