Introduction
In modern machine learning, transfer learning has become a cornerstone technique: models are pre-trained on massive datasets (the source) and then fine-tuned for specific downstream applications (the target). However, the selection of an appropriate source model remains largely heuristic. Does a model trained on automotive data necessarily improve performance on a truck-recognition task? While intuition suggests yes, the field lacks a formal, statistically grounded metric to evaluate the utility of an auxiliary dataset before committing to expensive computational resources.
This research introduces Task Similarity (TS), a principled metric designed to quantify the relationship between classification tasks. The authors propose a measure that is label-invariant, flexible across varying numbers of classes, and highly interpretable, providing a mathematical framework to predict transfer learning success.
Quantifying Similarity via Partitions
The core theoretical contribution of this work is the conceptualization of classification as a partitioning of the input space. Any classification rule effectively carves the input space into distinct regions. Task Similarity (TS) measures how well an optimally re-labeled version of a source task's partition performs on a target task.
To make this metric practical, the authors define several variants:
- Adjusted Task Similarity (ATS): A refinement that accounts for chance performance, ensuring that a vague or uninformative source partition results in a similarity score of zero.
- Empirical Task Similarity (ETS): A version designed for real-world scenarios where true distributions are unknown. ETS is estimated by taking a model trained on source data, "re-voting" its predictions using a small subset of target data, and comparing the result to a model trained exclusively on the target.
Theoretical Insights and the Over-partitioning Trap
The paper argues that the "representation" learned by a neural network is essentially a geometric carving of the input space. If two tasks require the space to be carved in similar ways, they are fundamentally similar. However, the authors identify a critical theoretical challenge: over-partitioning. As models become increasingly complex (e.g., very deep decision trees), the empirical similarity tends toward 1 regardless of the underlying task relationship. This highlights the necessity of using appropriate model complexity when estimating similarity to avoid misleadingly high scores.
Experimental Validation
The researchers validated their metric across three distinct environments: synthetic toy distributions, image classification (CIFAR-100), and natural language processing (Tatoeba multi-language dataset).
Predicting Transfer Success
In experiments using CIFAR-100, the authors demonstrated that source tasks with higher ETS consistently led to superior fine-tuning accuracy on target tasks. This confirms that ETS serves as a reliable proxy for transfer efficiency. Furthermore, tasks that humans consider "semantically similar" (such as different subsets of animal categories) exhibited significantly higher ETS than dissimilar tasks.
Linguistic Mapping
One of the most compelling applications of the metric was in language detection. Using the Tatoeba dataset, the authors showed that ETS could recover etymological relationships. The metric naturally grouped linguistically related languages together—for instance, identifying that Spanish is more similar to Portuguese than to Finnish—simply by analyzing how a classifier partitions sentence embeddings.
Discussion and Future Directions
While Task Similarity provides a robust framework for evaluating task relationships, some limitations remain. Currently, the method requires the source and target tasks to share the same input space (e.g., identical image dimensions). Additionally, the computational cost of training models on both datasets to estimate ETS can be significant.
Future work aims to extend this framework to disparate input spaces using projections and to explore its application in regression and ranking tasks. By grounding transfer learning in the geometry of partitions, this research moves the field closer to a predictable and automated approach to model selection.
Summary updated