{'fraction_non_alphanumeric': 0.033041877588587204, 'fraction_numerical': 0.015232397606994939, 'mean_word_length': 4.829130901287554, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Disjoint Contrastive Regression Learning for Multi-Sourced Annotations

Large-scale datasets are important for the development of deep learning models. Such datasets usually require a heavy workload of annotations, which are extremely time-consuming and expensive. To accelerate the annotation procedure, multiple annotators may be employed to label different subsets of the data. However, the inconsistency and bias among different annotators are harmful to the model training, especially for qualitative and subjective tasks.To address this challenge, in this paper, we propose a novel contrastive regression framework to address the disjoint annotations problem, where each sample is labeled by only one annotator and multiple annotators work on disjoint subsets of the data. To take account of both the intra-annotator consistency and inter-annotator inconsistency, two strategies are employed.Firstly, a contrastive-based loss is applied to learn the relative ranking among different samples of the same annotator, with the assumption that the ranking of samples from the same annotator is unanimous. Secondly, we apply the gradient reversal layer to learn robust representations that are invariant to different annotators. Experiments on the facial expression prediction task, as well as the image quality assessment task, verify the effectiveness of our proposed framework.


INTRODUCTION
Large-scale labeled datasets are in heavy demand to boost the performance of deep learning models. Such datasets often require a high cost of annotations, which are extremely timeconsuming and expensive. Moreover, a large-scale dataset is usually labeled by multiple annotators. Due to individual preferences, the labeled results are not always consistent among different annotators, especially for qualitative and subjective tasks. As a result, to reduce the annotator bias, each sample is often required to be labeled by multiple annotators, followed by an average or a majority vote to obtain the final labels, which leads to a heavier cost of annotation. To alleviate the labeling effort, it is more efficient to assign disjoint subsets of the data to individual annotators for labeling. Fig. 1. Example of the intra-annotator consistency and interannotator inconsistency phenomenon. Each box represents a sample from the dataset. The blue color from dark to light represents the score from low to high. After labeling, the intra-annotator consistency remains, while the inter-annotator consistency is violated.
Therefore, how to address the challenge resulting from the inconsistency and bias among different annotators becomes a tough task.
Some approaches [1,2,3,4,5,6] deal with the noisylabel issue or labeling biases from crowd-sourced annotations. Many advances [7,8,9,10] have been made in recent years, especially for classification tasks with crowd-sourced labels. For regression tasks, except for the inconsistency among multiple annotators, the intra-annotator consistency also needs to be considered, in which the labeled rankings of samples from the same annotator usually align well with the rankings of the latent ground truth scores. An example of this phenomenon is shown in Fig. 1. How to take account of both intra-annotator consistency and inter-annotator inconsistency for regression tasks is still underexplored.
In this paper, we present a novel approach for regression tasks from disjoint annotations with the designed disjoint margin ranking loss and gradient reversal layer (GRL) [11]. Specifically, We extend the margin ranking loss based on the facts of disjoint annotations, with both the intra-annotator consistency and inter-annotator inconsistency adopted, leading to a robust embedding framework. Besides that, regu-larization of the batch distribution is employed to avoid the collapse to naive solutions. To learn annotator invariant representations, GRL is further adopted in the model training. All these make up the entire framework of our proposed Disjoint Contrastive Regression (DCR). A demonstration of the framework is shown in Fig. 2. The main contributions of this paper are summarized as follows: • We present a novel contrastive learning framework for regression tasks with disjoint annotations. • We extend the margin ranking loss and resolve the intra-annotator consistency and inter-annotator inconsistency. • We adopt GRL in the model training for learning annotator invariant embeddings. • We conduct experiments on the facial expression prediction task and image quality assessment task, demonstrating the effectiveness of the proposed DCR.

RELATED WORK
Crowd-Sourced Annotations. The inter-and intra-observer variations among experts due to intrinsic differences in human annotators widely occur in computer vision tasks. Many approaches [1,2,3,4,5,6,12] have been proposed to deal with the inconsistent label problems from the crowd-sourced annotations. For example, [13] proposes an EM algorithm and a crowd layer to deal with the crowd-sourcing problems. To solve the noise and inconsistency in some limitedsized datasets from multiple annotators, [2] proposes a crowdsourced representation learning framework that generates a large number of training instances from only small-sized labeled sets. However, most existing works focus on classification tasks. How to deal with inconsistent annotations with numerical labels for regression tasks is still underexplored. Cross-Dataset Adaptation. Since data from source and target domains have different distributions, the key challenge for domain adaptation [14,15,16,17,18,19,20] is to address the domain shift between them. Fine-tuning [21,22], which diminishes the shift between the two domains, is a typical way for domain adaptation with transfer learning [23,24]. For instance, [22] proposes an adaptive fine-tuning approach to find the optimal strategy per image for the target data. Transfer learning with triplet loss [24] is employed for bridging the gap between different domains. Adversarial learning is another essential way for domain adaptation [14,15,25,26,27]. For example, [15] presents a partial adversarial domain adaptation approach to alleviate negative transfer by reducing the weights of outliers and promote positive transfer. A multiadversarial domain adaptation approach [14] is proposed to capture multi-mode structures to ensure fine-grained alignment of distributions. The domain-symmetric network [25] is presented on a symmetric design of source and target classifiers with adversarial training. However, such domain adap-tation approaches cannot directly address the inconsistency annotation problem raised from multi-sourced data.

Problem Description
Assume the whole dataset X are labeled by K annotators. Denote the subset annotated by the k-th annotator as X k and different subsets are disjoint with each other, i.e., X k ∩ X j = Ø if j = k and X = ∪ K k=1 X k . Given the set of labeled samples, we aim to learn a robust embedding network f θ : x → z, as well as a regression head g φ : z → y, based on the supervision of the disjoint and inconsistent annotationỹ, where x, z and y are the input sample, representation, and label, respectively.

Preliminary on Margin Ranking Loss
Margin ranking loss is commonly used for contrastive regression problems, which is defined as follows, where N is the batch size; y is the prediction; γ is a pre-defined margin, and [·] + clamps values to be nonnegative. By minimizing the margin ranking loss in the training, the predicted scores should follow the pairwise relative rankings of the labeled scores.

Disjoint Contrastive Regression (DCR)
There are three drawbacks of the commonly used margin ranking loss. First, it omits the issue caused by inter-annotator inconsistency. It is harmful to optimize the relative ranking when two samples are labeled by different annotators. Second, it can easily collapse to naive solutions by only calculating the relative order with no absolute scores as reference. Third, it does not consider the domain shift coming from different subsets. To deal with the issues above, we firstly extend the margin ranking loss to the proposed disjoint ranking loss with conditional annotator indicators, to avoid the direct comparison across annotators. Then, regularization on the batch predictions is employed to ensure relative ranking following a certainly designed distribution. Thirdly, we reduce the preference bias across annotators with the gradient reversal layer (GRL) with adversarial training, leading to more biasinvariant representations. The proposed disjoint contrastive regression (DCR) framework is shown in Fig. 2. The details are demonstrated as follows. 1) Disjoint Margin Ranking Loss. Given a sample x i annotated by the k-th annotator, denote the annotated label as y k i , and the latent unbiased true label as y * i . Usually, y * i is The framework of disjoint contrastive regression (DCR). The input data is first fed to the embedding net f θ . The score is then predicted by the regression head g φ . The pairwise distance of the prediction is optimized by the supervision of disjoint ranking loss. In the meanwhile, the embeddings are fed to a second classification branch h ψ that aims to classify different annotators. We adopt the gradient reversal layer (GRL) to learn the robust annotator-invariant embeddings.
not accessible. Considering regression tasks, due to the preference bias of different annotators, it is quite common that, for two samples annotated by different annotators, we havẽ y k i <ỹ l j while the latent true label is y * i > y * j in some situations. Such inconsistency among disjoint annotations can be harmful to the model training. Meanwhile, we assume the ranking of labels within the same annotator usually keeps consistent. Based on the above two phenomenons, we should alleviate the inconsistency for inter-annotator labels, and utilize the consistency of intra-annotator labels for representation learning.
To this end, we extend the margin ranking loss Eq. (1) to the proposed disjoint margin ranking loss as follows, and M i,j is defined as, where 1 [i∈A k ] is the indicator function and returns 1 if the sample i is from the k-th annotator A k , otherwise it returns 0. M i,j is the judgment of whether the sample i and the sample j are labeled by the same annotator. In other words, M i,j ensures that the loss is optimized within the same annotator. As a result, Eq. (2) will generate a penalty if the predicted pairwise relative ranking is conflicted with the annotated pairwise relative ranking. With Eq.
(2), we can avoid cross-annotator inconsistency and utilize the intra-annotator consistency at the same time.
2) Regularize on the Relative Ranking. Eq. (2) only compares the relative order given two samples, which is unstable and easy to collapse to extreme naive solutions. To address such a problem, we constrain the predictions to follow the normal distributions N (0, 1) within batch samples, i.e., where the first term constrains the distribution to be zeromean, while the second term regularizes the variance to be close to 1. With the normal distribution as a reference, the regularization term stabilizes the training, which is verified in the experiment section.
3) Invariant Learning with GRL. To further improve the robustness of regression performance across multiple biased disjoint annotations, bias-invariant learning is crucial to ensure that the latent representations are not annotatordependent. As a result, we adopt one commonly used domain adaptation strategy with the gradient reversal layer (GRL) [28] for learning the latent embeddings. In addition to the embedding network f θ : x → z and the regression head g φ : z → y, we consider another annotator classifier h ψ : z → p, where p is the predicted probability for classifying annotators after the soft-max operation. We consider two loss functions, where p * ∈ R K is the one-hot vector as the annotator indicator;θ andψ denote the frozen version of the parameters. In Eq. (5), we freeze the embedding network and learn the classification head to minimize the cross-entropy, while in Eq. (6), we freeze the classification head and optimize the embedding network. Such adversarial training strategy learns bias-invariant representations. 4) Combined Loss for Representation Learning. We summarize the total loss of the proposed DCR as follows, where λ 1 ∼ λ 3 are the weights of individual losses, all set to 0.2 as default.

Datasets
We evaluate the performance of our method on two regression tasks, namely facial expression score prediction task with AFEW-AV [29] and Aff-Wild [30] datasets, and image quality assessment (IQA) task with CSIQ [31] and TID2013 [32,33] datasets. For all these four datasets, 80% samples are used for training, while the remaining samples are used for testing. Some examples from the datasets are shown in Fig. 3. We present the details of these four datasets as follows. AFEW-AV is a subset of the Acted Facial Expressions in the Wild (AFEW) [34] dataset, focusing on 7 basic facial expressions, namely disgust, fear, anger, sadness, happiness, surprised and neural. Apart from these classification labels, AFEW-AV provides the discrete valence and arousal scores, ranging from -10 to 10. This dataset contains 600 "in-thewild" video clips with variations of backgrounds and poses of the subjects. For simplicity, we use the individual frames as distinct samples for the regression task.
Aff-Wild dataset consists of around 300 videos with 200 subjects, including 130 males and 70 females. This dataset also provides two continuous emotion dimensions, in terms of valence and arousal, which range from -1 to 1.
CSIQ dataset is based on 30 raw clean images. Six different types of distortions are added to the clean images, resulting in 866 distorted images in total. The quality score of each sample is also provided. TID2013 is an expansion of Tampere Image Dataset 2008 (TID2008) [35], based on LIVE dataset [36], with the increase of distorted level to 5 and type to 24. Thus, 3000 distorted image samples are generated from 25 original samples.

Training Details
To mimic the annotated scores generated from multiple annotators with different biases, we randomly shift the mean of provided ground truth scores for individual annotators. Meanwhile, we also perturb scores locally with the relative pairwise ranking unchanged. We normalize the scores in the range [-1, 1] for the face expression score prediction task and [0, 1] for the IQA task as the final annotated scores, respectively. We show an example of the augmented score distributions from four annotators of the TID2013 dataset in Fig. 4. We can see that there are large biases among different annotators.
For the face expression prediction task, we apply ResNet-50 [37] as our backbone and use the stochastic gradient descent (SGD) optimizer with a momentum of 0.9 and a weight decay of 5×10 −4 . For both datasets, scores of valence are used for regression. To avoid the influence by the background, for the AFEW-AV dataset, face images are cropped and aligned by the landmarks provided by the dataset, and then resized to 112 × 112, while the detected and aligned face samples in the Aff-Wild dataset are applied directly. During the training phase, we rotate the input images within ±45 • for augmentation. We train ResNet-50 on AFEW-AV for 400 epochs with an initial learning rate of 10 −3 , and for 800 epochs with the same initial learning rate on Aff-Wild. For both datasets, we use a batch size of 512.
For the image quality assessment task, samples are randomly cropped and resized to 224 × 224 with a batch size of 64 for training, while the testing samples are resized to 256 × 256 and centrally cropped to 224 × 224. During the training phase, we augment the input samples within ±45 • rotation. The same as that in facial expression prediction tasks, we also apply ResNet-50 as our backbone and use SGD optimizer with a momentum of 0.9 and a weight decay of 5 × 10 −4 . The initial learning rates for the CSIQ dataset and TID2013 are both 10 −3 for 300 epochs. For both of the two tasks, one Nvidia RTX 3090 GPU is used for training. The method is implemented with the Pytorch toolbox [38].

Evaluation Criteria
We adopt three evaluation metrics, namely pairwise ranking accuracy (PRA), Spearman's rank order correlation coefficient (SROCC), and Pearson's linear correlation coefficient (PLCC). Since annotation is inconsistent for comparison across different annotators, we evaluate the results on individual annotators and take the average as the final results.

Pairwise Ranking Accuracy (PRA)
PRA compares the relative pairwise ranking of the predicted scores with annotated labels. For N samples, we have N (N − 1)/2 pairs in total. We treat a pair as a correct prediction if the pairwise ranking of the predicted scores from the two samples follows the same relative ranking as labeled annotations. Then the PRA is calculated as the total accuracy given all the possible pairs.

Spearman's Rank Order Correlation Coefficient (SROCC)
The SROCC is defined as follows, where d i denotes the difference between the ranks of i-th testing images in the ground truth and predicted quality scores.

Pearson's Linear Correlation Coefficient (PLCC)
PLCC calculates the linear correlation between the annotatioñ y and the predicted label y. The definition is shown as follow, where µ represents the sample mean. The range of PLCC is from -1 to 1, and higher scores mean better performance.

Main Results
Evaluation on Facial Expression Score Prediction. To validate the effectiveness of our proposed DCR framework, we compare with the regression baseline, i.e., a direct regression with mean squared error (MSE) as the loss function. The results are shown in Table 1, where the top and the bottom part shows the results on the AFEW-AV and Aff-Wild datasets, respectively. DCR [−] represents the DCR method without GRL in the training. The best results are marked in bold. As expected, DCR achieves the best performance. Evaluation on Image Quality Assessment. Two stateof-the-art (SOTA) methods for blind image quality assessment, including MetaIQA [39] and HyperIQA [40], are chosen to compare with our proposed approach. The results on the CSIQ and TID2013 datasets are shown in Table 2.
MetaIQA+DCR and HyperIQA+DCR stand for approaches with the same architecture used in the original methods with the combination of the proposed DCR framework. We can see that there is a consistent improvement on all three metrics with DCR adopted in the training.  Table 3. Regularization loss on AFEW-AV and TID2013 datasets, respectively, with the best performance marked in bold.

Ablation Study
Study on the Regularization Loss. To evaluate the effectiveness of the regularization term in DCR, we conduct experiments on AFEW-AV and TID2013 with different choices of λ 1 from 0 to 0.3. The results are shown in Table 3, where the top and the bottom part shows results on AFEW-AV and TID2013, respectively. From Table 3, we achieve significantly higher performance with the regularization term than the method without regularization, i.e., λ 1 = 0.0, on both the two datasets. This indicates that the model is easy to collapse to a naive solution without regularization. The best performance is achieved when λ 1 is around 0.1∼0.2. Study on the Number of Annotators. Table 4 shows the comparison of the AFEW-AV and TID2013 datasets between different numbers of annotators, ranging from one to four. As expected, the best performance is achieved with a single annotator since there is no inconsistent label issue with only one annotator. The performance does not degrade significantly when increasing the number of annotators, showing that it is still tolerant when combining disjoint annotations for training in practical situations. Study on the Disjoint Ranking Loss.  Table 5. Comparison between margin ranking loss L rank and disjoint margin ranking loss L d-rank on AFEW-AV and TID2013 datasets, respectively, with the best performance marked in bold.
disjoint margin ranking loss L d-rank on the AFEW-AV and TID2013 datasets, respectively. Since L rank does not consider the inter-annotator biases, it is expected that L d-rank outperforms L rank with a large margin, i.e., a 19.42% and 6.72% improvement on the PRA for the AFEW-AV and TID2013 datasets, respectively. Study on Variant Margins. We also test the role of margin in our proposed disjoint ranking loss. We vary the margin γ from 0 to 0.2 on the AFEW-AV and TID2013 datasets, as shown in Table 6. For both of the two datasets, we achieve the best results when γ = 0, i.e., no margin is used. With the increase of the margin, the performance keeps degrading. Generally, the margin is more appropriate in the classification task where samples from different classes need to be separated as much as possible. However, for regression tasks, two similar inputs should generate two similar scores, rather than intentionally enlarging the distance of the predicted scores. As a result, setting γ = 0 is more suitable for regression tasks.

CONCLUSION
In this paper, we propose a novel disjoint contrastive regression (DCR) framework to address the challenges of the inconsistent label problems due to the annotation bias. Experimental results with extensive studies demonstrate the effectiveness of our proposed DCR framework. In our future work,  Table 6. Results with variant margins in our disjoint ranking loss on the AFEW-AV and TID2013 datasets, respectively, with the best performance marked in bold.
we will consider the video-based regression tasks with weak labels for disjoint annotations.