Unsupervised Domain Adaptation for Segmentation with Black-box Source Model

Unsupervised domain adaptation (UDA) has been widely used to transfer knowledge from a labeled source domain to an unlabeled target domain to counter the difficulty of labeling in a new domain. The training of conventional solutions usually relies on the existence of both source and target domain data. However, privacy of the large-scale and well-labeled data in the source domain and trained model parameters can become the major concern of cross center/domain collaborations. In this work, to address this, we propose a practical solution to UDA for segmentation with a black-box segmentation model trained in the source domain only, rather than original source data or a white-box source model. Specifically, we resort to a knowledge distillation scheme with exponential mixup decay (EMD) to gradually learn target-specific representations. In addition, unsupervised entropy minimization is further applied to regularization of the target domain confidence. We evaluated our framework on the BraTS 2018 database, achieving performance on par with white-box source model adaptation approaches.


INTRODUCTION
Accurate tumor segmentation is an important prerequisite for early diagnosis and treatment planning, which has been substantially improved with advances in deep learning approaches. The performance of a pre-trained model, however, can be severely degraded, when a source distribution differs from a target distribution. For example, tumors with different grades are likely to yield different distributions, which hampers the application of a single segmentation model in segmenting tumors of varying degrees of severity and growth. 1 In addition, it is costly to annotate high-quality labeled data in the new target domain. Unsupervised domain adaptation (UDA) has been proposed to address the problem of domain shift. 2 In UDA, a segmentation model is typically trained using both source and target data, but only the source data are labeled.
Although UDA offers a promising solution to the problem of domain shift, due to the concerns over leakage of sensitive information contained in the patient data, it is often challenging to access source data, when deploying the developed model in the target domain. 3 To address this, Liu et al. proposed a source-free or source-relaxed UDA (i.e., white-box domain adaptation) for segmentation. 3 In that work, an off-the-shelf segmentation model was adapted to a target domain via a pre-trained model in a source domain, by transferring its batch normalization statistics. Recently, a deep inversion technique, 4 however, has shown that original training data can be recovered from knowledge used during white-box domain adaptation, which may leak confidential information. 5 Accordingly, this work aims to address the limitation, by developing a black-box domain adaptation approach that further restricts the use of knowledge from a source segmentation model.
To our knowledge, this is the first attempt at achieving UDA for a deep segmentation network using blackbox domain adaptation. The black-box setting provides a more effective way to protect privacy, compared with white-box domain adaptation approaches 3 or conventional UDA approaches. 6 Recently, Zhang et al. 5 proposed to use the black-box UDA for classification, with the class-wise noise rate estimation and category-wise sampling. However, that work is not applicable to the segmentation task to carry out pixel-wise classification. In previous works, segmentation based on the black-box domain adaptation was largely ignored, although it could be used in a more realistic and challenging scenario.

RELATED WORK
Unsupervised domain adaptation 2, 7-9 has been an important technology to address the difficulties such as domain shift and costly labeling in the new domains. Conventional approaches utilized both source and target domain data for training. 1,[10][11][12][13] Recently, source-free UDA [14][15][16] has been proposed to only use the pre-trained model rather than co-training the network with source and target domain data. A recent study 17 explored the shared or domain-specific batch-normalization statistics to achieve domain alignment. We note that domain generalization, 18 a closely related but different task, assumes that there are no target domain data in its training.
In this work, we target to tackle a more restrictive scenario, in which we only use a black-box pre-trained model, and do not rely on the network parameters. As stated above, a deep inversion technique, 4 has shown that original training data can be recovered from knowledge during white-box domain adaptation. 5 A contemporary work 5 proposed to adapt a black-box classification model to a target domain without both source domain data and the model structure. That work proposed iterative learning with noisy labels, which regarded the blackbox predictions as noisy labels. To the best of our knowledge, black-box UDA for segmentation has not been investigated. The semantic segmentation 19-24 makes pixel-wise classification and provides more explainable results for the subsequent decision making process.

METHOD
In the black-box UDA segmentation task, we have a network f s trained with the labeled source domain sample {x s , y s }, where f s is fixed and accessed only through a nontransparent API at the adaptation stage. At the adaptation stage, we only have access to the black-box f s and the unlabeled target domain sample {x t } to train a target domain network f t to achieve a good segmentation performance in the target domain. In this work, we propose a practical solution to the black-box UDA for segmentation with a noise-aware knowledge distillation scheme using pseudo label with exponential mixup decay (EMD). The framework is shown in Fig. 1.
Following the knowledge distillation, 4 the well-trained source model can act as a teacher to provide its pixelwise softmax histogram prediction of each image. The target domain model is trained to imitate the source model. The consistency of their prediction can be enforced with the Kullback-Leibler (KL) divergence between their pixel-wise softmax histogram distributions. However, due to the domain shift, the prediction of f s can be noisy. Accordingly, we resort to a self-training scheme 1 to construct the pseudo label for target domain training. Specifically, to achieve the gradual translation to the target domain, we mix up the source and target domain predictions, i.e., f s (x t ) and f t (x t ), and adjust their ratio for the pseudo label y t with EMD: where n indexes the pixel, and f s (x t ) n and f t (x t ) n are the histogram distributions of the softmax output of the n-th pixel of the predictions f s (x t ) and f t (x t ), respectively. λ = λ 0 exp(−I) is a target adaptation momentum parameter with an exponential decay w.r.t. the iteration I. λ 0 is the initial weight of f s (x t ), which is empirically set to 1. The loss knowledge distillation with the EMD pseudo label can be formulated as: where H 0 and W 0 are the height and width of the image. Therefore, the weight of λ can be smoothly decreased along with the training, and f t gradually represents the target data. In addition, an unsupervised training scheme, e.g., entropy minimization, 25 can be added on top of our framework. For implementation, the entropy for pixel segmentation can be formulated as an averaged entropy of the pixel-wise softmax prediction, given by Minimizing L Ent leads to the output f t (x t ) n close to a one-hot distribution, i.e., confident prediction.
In summary, our training objective can be formulated as where α is used to balance between the knowledge distillation with the EMD pseudo label and entropy minimization. We note that a trivial solution to entropy minimization is that all unlabeled target data could have the same one-hot encoding. 25 Thus, in order to stabilize the training, we linearly change the hyper-parameter α from 5 to 0.

RESULTS
We evaluated our approach on the BraTS2018 database, comprising a total of 210 high-grade glioma (HGG) subjects and a total of 75 low-grade glioma (LGG) subjects. 26 Each subject has T1-weighted (T1), T1-contrast enhanced (T1ce), T2-weighted (T2), and T2 Fluid Attenuated Inversion Recovery (FLAIR) Magnetic Resonance Imaging (MRI) volumes with voxel-wise labels for the enhancing tumor (EnhT), the peritumoral edema (ED), and the necrotic and non-enhancing tumor core (CoreT). We denote the sum of EnhT, ED, and CoreT as the whole tumor. More information about the database can be found in. 26 Training was performed on four NVIDIA TITAN Xp GPUs with the PyTorch deep learning toolbox, 27 which took about 5 hours.
Following the previous white-box source free UDA 3 and UDA with source data, 28 we used HGG subjects as the source domain and the LGG subjects as the target domain, which have different size and position distributions. 28 We trained f s using the prior work, 3 and did not have access to its network parameters at the adaptation stage. For simplicity, we used the same 2D U-Net backbone for f s and f t as in. 28 Specifically, we used U-Net 29 as our segmentation network with 15 layers, batch normalization, and dropout. The network was trained using Adam as an optimizer with β 1 = 0.9 and β 2 = 0.99.
The slices of four modalities were concatenated as a 4-channel input with the spatial size of 128×128. The training of adaptation used the LGG training set. The evaluation was implemented in the LGG testing set. For Figure 2. Comparison with the other UDA methods, and an ablation study of entropy minimization for HGG to LGG UDA. We use white, dark gray, and gray to indicate the CoreT, EnhT and ED, respectively. OSUDA 3 with the white-box source model for UDA training is regarded as an "upper bound." evaluation, we adopted the two metrics, including Dice similarity coefficient (DSC) and Hausdorff distance (HD) metrics. 30 We used BBUDA to denote our black-box UDA framework, and BBUDA-Ent indicates the ablation study without entropy minimization. An illustration of the segmentation results is shown in Fig. 2. We can see that the predictions of our proposed BBUDA are better than the no adaptation model. The better performance of BBUDA over BBUDA-Ent demonstrates the effectiveness of our entropy minimization.
The quantitative evaluation results are shown in Table 1. Our proposed BBUDA achieved the state-of-theart performance for the black-box source-free UDA segmentation, approaching performance of the white-box OSUDA 3, 16 with the source model parameters, which can be considered an "upper-bound." We note that the label ratio consistency assumption in CRUDA 16 does not hold for this HGG to LGG transfer task, which thus led to an inferior performance.
In addition to the HGG to LGG setting, we also proposed to adapt from LGG to HGG. Similar to the HGG to LGG task, there was also the domain gap w.r.t. tumor types and the label proportion of each class. The results are shown in Table 2. Our proposed BBUDA achieved superior segmentation performance consistently.

CONCLUSION
In this work, we tackled the problem of black-box UDA for segmentation under a realistic and meaningful scenario, and proposed a practical and efficient knowledge distillation scheme with EMD pseudo label. Specifically, we were able to smoothly transfer the segmentation in the source domain to the target domain with EMD to construct the pseudo label. In addition, unsupervised entropy minimization was added on top of our model to further boost the performance. Experimental results, carried out with the HGG to LGG adaptation task, showed that our proposed BBUDA outperformed the source model, by a large margin, and importantly, the DSC and HD metrics were comparable to the white-box UDA approaches. In this work, we only investigated the adaptation between HGG and LGG data, while the model can be general for any segmentation UDA tasks. In addition, more advanced knowledge distillation and unsupervised learning methods can be added on to further boost the performance, which is subject to our future work.