Towards Source-Free Domain Adaption of Neural Networks in an Open World

CVC has a new PhD on its record!

Pioneer Award 2023

Shiqi Yang successfully defended his dissertation on Computer Science on July 03, 2023, and he is now Doctor of Philosophy by the Universitat Autònoma de Barcelona. Dr. Yang was recognized with a Pioneer Award for the commercial orientation of his thesis by the CERCA Institute – Centres de Recerca de Catalunya – on December 20, 2023.

What is the thesis about?

Though they achieve great success, deep neural networks typically require a huge amount of labeled data for training. However, collecting labeled data is often laborious and expensive. It would, therefore, be ideal if the knowledge obtained from label-rich datasets could be transferred to unlabeled data. However, deep networks are weak at generalizing to unseen domains, even when the differences are only subtle between the datasets. In real-world situations, a typical factor impairing the model generalization ability is the distribution shift between data from different domains, which is a long-standing problem usually termed as (unsupervised) domain adaptation.

A crucial requirement in the methodology of these domain adaptation methods is that they require access to source domain data during the adaptation process to the target domain. Accessibility to the source data of a trained source model is often impossible in real-world applications, for example, when deploying domain adaptation algorithms on mobile devices where the computational capacity is limited or in situations where data privacy rules limit access to the source domain data. Without access to the source domain data, existing methods suffer from inferior performance. Thus, in this thesis, we investigate domain adaptation without source data (termed as source-free domain adaptation) in multiple different scenarios that focus on image classification tasks.

We first study the source-free domain adaptation problem in a closed-set setting, where the label space of different domains is identical. Only accessing the pretrained source model, we propose to address source-free domain adaptation from the perspective of unsupervised clustering. We achieve this based on nearest neighborhood clustering. In this way, we can transfer the challenging source-free domain adaptation task to a type of clustering problem. The final optimization objective is an upper bound containing only two simple terms, which can be explained as discriminability and diversity. We show that this allows us to relate several other methods in domain adaptation, unsupervised clustering and contrastive learning via the perspective of discriminability and diversity.

Following the source-free domain adaptation setting, we also investigate the catastrophic forgetting issue after adaptation, where the adapted model should keep good performance on the source or all trained domains. To address the forgetting issue, we propose to use randomly generated domain attention masks to regularize the model updating during adaptation. This succeeds to keep the knowledge on old domains while not influence adaptation to new target domains.

In real-world applications, there could be some unseen categories in the target data; without extra processing, the model cannot handle these open classes. To prepare the method to generalize to target environments where there may exist unseen categories, we propose an elegant and simple solution by inserting an additional dimension into the classifier head. Together with an additional cross-entropy loss during source pretraining, the model is empowered with strong open-set recognition performance, which could be directly used for target adaptation and excels at distinguishing open classes during adaptation.

Keywords: source-free domain adaptation, generalized source-free domain adaptation, continual source-free domain adaptation, source-free open-partial domain adaptation.