Can We Characterize Tasks Without Labels or Features?

Bram Wallace, Ziyang Wu, Bharath Hariharan

Abstract: The problem of expert model selection deals with choosing the appropriate pretrained network ("expert") to transfer to a target task. Methods, however, generally depend on two separate assumptions: the presence of labeled images and access to powerful "probe" networks that yield useful features. In this work, we demonstrate the current reliance on both of these aspects and develop algorithms to operate when either of these assumptions fail. In the unlabeled case, we show that pseudolabels from the probe network provide discriminative enough gradients to perform nearly-equal task selection even when the probe network is trained on imagery unrelated to the tasks. To compute the embedding with no probe network at all, we introduce the Task Tangent Kernel (TTK) which uses a kernelized distance across multiple random networks to achieve performance over double that of other methods with randomly initialized models. Code is available at https://github.com/BramSW/task_characterization_cvpr_2021/.

Introduction

In transfer learning, the goal is to take a model trained on one task (an "expert") and apply its knowledge to a new "target" task. However, selecting the optimal expert is challenging; a model trained on birds might be an excellent expert for identifying drones but a poor choice for medical X-rays. Existing state-of-the-art methods for expert selection, such as Task2Vec, typically require labeled datasets for the target task and a high-quality pretrained "probe" network to extract meaningful features.

This work addresses "cold-start" scenarios where these requirements are not met: specifically, when labels are unavailable for a new domain or when the domain is so unique that standard ImageNet-pretrained features are ineffective.

Methods

We propose two distinct approaches to lift traditional restrictions on task characterization.

1. PseudoTask: Characterizing without Labels

PseudoTask enables task characterization without human-provided labels by utilizing a "teacher" network trained on a generic dataset (e.g., ImageNet or Places365) to generate soft pseudolabels for target images. While these labels may be semantically incorrect for the specific task, they provide a consistent structure. Following the Task2Vec framework, we calculate the Fisher Information Matrix to identify weight sensitivity, replacing standard cross-entropy loss with a KL-divergence loss against the teacher's soft predictions.

2. Task Tangent Kernel (TTK): Characterizing without Features

When a high-quality pretrained probe is unavailable, we cannot rely on feature embeddings. TTK instead analyzes the gradients of the model. Inspired by Neural Tangent Kernel (NTK) theory, TTK measures task similarity by observing how a randomly initialized network updates its weights after seeing a data batch. To handle the "noise" of random classifier heads, we employ the Maximal Coding Rate Reduction ($MCR^2$) loss, which measures data compression into discriminative clusters without requiring a classifier. Averaging these gradient similarities across multiple random initializations yields a robust signal of task similarity.

Comparison of task characterization methods: (A) Supervised Task2Vec, (B) PseudoTask using soft labels, and (C) Task Tangent Kernel (TTK) using random stems and MCR² loss.

Experimental Results

We evaluated our methods on several benchmarks, including CUB+iNat (50 fine-grained classification tasks) and Stanford Cars.

Key Findings

  • Labels are Optional for Domain Mapping: PseudoTask performs nearly as well as supervised Task2Vec. On the CUB+iNat benchmark, PseudoTask (using a Places365 teacher) achieved a mean relative error increase of only 10.0%, compared to 8.9% for the fully supervised baseline. This suggests that input image distribution is often more critical for task selection than specific labels.
  • The Power of Randomness: TTK demonstrates that "smart" networks are not required to understand task geometry. In scenarios restricted to random initializations, TTK achieved an error increase of 21.4%—more than twice as accurate as Task2Vec with random initialization (48.7%) and significantly outperforming the ImageNet Initialization baseline (30.2%).
  • Taxonomical Alignment: Distances calculated by PseudoTask showed higher correlation with actual biological taxonomies than the original supervised Task2Vec, indicating that soft labels can capture more nuanced relationships.
Test error across 50 fine-grained classification tasks for various expert selection methods.

Discussion and Limitations

While TTK represents a significant advancement for random-initialization scenarios, a performance gap remains compared to methods using high-quality pretrained probes. Additionally, TTK's reliance on computing gradients across multiple networks introduces computational overhead. PseudoTask remains dependent on a teacher model; if the teacher's domain is too distant from the target, the discriminative power of pseudolabels may diminish. Future work will explore extending these zero-label and zero-initialization methods to non-image data forms, such as 3D shapes and natural language.

Summary updated

BibTeX
@inproceedings{wallace2021can,
  author = {Bram Wallace and Ziyang Wu and Bharath Hariharan},
  title = {{Can We Characterize Tasks Without Labels or Features?}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  url = {https://openreview.net/forum?id=UE7uVNu8GTc},
}
Figure