{'fraction_non_alphanumeric': 0.03725294056776241, 'fraction_numerical': 0.01724673174433445, 'mean_word_length': 4.859337105901374, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 1, '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}}
X-model: Improving Data Efficiency in Deep Learning with A Minimax Model

To mitigate the burden of data labeling, we aim at improving data efficiency for both classification and regression setups in deep learning. However, the current focus is on classification problems while rare attention has been paid to deep regression, which usually requires more human effort to labeling. Further, due to the intrinsic difference between categorical and continuous label space, the common intuitions for classification, e.g., cluster assumptions or pseudo labeling strategies, cannot be naturally adapted into deep regression. To this end, we first delved into the existing data-efficient methods in deep learning and found that they either encourage invariance to data stochasticity (e.g., consistency regularization under different augmentations) or model stochasticity (e.g., difference penalty for predictions of models with different dropout). To take the power of both worlds, we propose a novel X-model by simultaneously encouraging the invariance to {data stochasticity} and {model stochasticity}. Further, the X-model plays a minimax game between the feature extractor and task-specific heads to further enhance the invariance to model stochasticity. Extensive experiments verify the superiority of the X-model among various tasks, from a single-value prediction task of age estimation to a dense-value prediction task of keypoint localization, a 2D synthetic, and a 3D realistic dataset, as well as a multi-category object recognition task.


INTRODUCTION
In the last decade, deep learning has become the de facto choice for numerous machine learning applications in the presence of large-scale labeled datasets. However, collecting sufficient labeled data through manual labeling, especially for deep regression tasks such as keypoint localization and age estimation, is prohibitively time-costly and labor-expensive in real-world scenarios. To mitigate the requirement of labeled data, great effort (Lee, 2013;Laine & Aila, 2017;Grandvalet & Bengio, 2005;Chen et al., 2020b) has been made to improve data efficiency in deep learning from the perspectives of simultaneously exploring both labeled and unlabeled data based on the intuitions for classification, e.g. cluster assumptions, pseudo labeling strategies, or consistency regularization under different data augmentations.
However, most of the existing methods of improving data efficiency focus on classification setup while rare attention has been paid to the other side of the coin, i.e. deep regression which usually requires more human effort or expert knowledge to labeling. Moreover, due to the intrinsic difference between categorical and continuous label space, the methods based on the cluster or low-density separation assumptions (Lee, 2013;Grandvalet & Bengio, 2005) for data-efficient classification tasks cannot be directly adapted into deep regression. Meanwhile, existing data-efficient regression methods adopt k-nearest neighbor (kNN) (Zhou & Li, 2005;Yu-Feng Li, 2017), decision tree (Levati et al., 2017) or Gaussian Process (Srijith et al., 2013) as regressors on a fixed and shallow feature space, causing them difficult to be extended into deep learning problems.
To develop a general data-efficient deep learning method for both classification and regression setups, we first delved into the existing methods and found that they can be briefly grouped into  To enhance the invariance to data stochasticity, strong data augmentation has been proposed. Similarly, can we propose a novel approach to further enhance the invariance to model stochasticity? two categories: 1) Encourage invariance to data stochasticity with consistency regularization to make the predictions of the model invariant to local input perturbations, such as Π-model (Laine & Aila, 2017), UDA  and FixMatch ; 2) Encourage invariance to model stochasticity with difference penalty for predictions of models generated from different dropout (Laine & Aila, 2017) or initialization (Zhou & Li, 2005), as well as models exponentially averaged from history models, such as Mean Teacher (Tarvainen & Valpola, 2017).
Through the success of these above two strategies of consistency regularization that encourages invariance under data and model transformations respectively, it is intuitive to draw a conclusion that the invariance to stochasticity matters for improving data efficiency in deep learning. To take the power of both worlds, we propose a novel χ-model by simultaneously encouraging the invariance to data stochasticity and model stochasticity. First, instead of the weak augmentations (e.g., flip and crop) adopted in Π-model, we utilize the strong augmentations (e.g., cutout and contrast) adopted in FixMatch  to enhance invariance to data stochasticity, as shown in Figure 1 with some example images tailored from Jung et al. (2020). A natural question arises: Can we further enhance the invariance to model stochasticity similar to that of data stochasticity? This paper gives a positive answer by introducing a minimax game between the feature extractor and task-specific heads. Compared to the manually designed strategy of adding a dropout layer, this novel approach directly optimizes a minimax loss function in the hypothesis space. By maximizing the inconsistency between task-specific heads, more diverse learners are generated to further enhance the invariance to model stochasticity and thus fully explore the intrinsic structure of unlabeled data.
In short, our contributions can be summarized as follows: • We propose the χ-model that jointly encourages the invariance to data stochasticity and model stochasticity to improve data efficiency for both classification and regression setups.
• We make the χ-model play a minimax game between the feature extractor and task-specific heads to further enhance invariance to model stochasticity.
• Extensive experiments verify the superiority of the χ-model among various tasks, from an age estimation task to a dense-value prediction task of keypoint localization, a 2D synthetic and a 3D realistic dataset, as well as a multi-category object recognition task.

DATA-EFFICENT CLASSIFICATION
In absence of abundant labeled data, it is reasonable to further explore the additional unlabeled data. A popular approach among these algorithms is Pseudo Labeling (Lee, 2013) which leverages the model itself to generate labels for unlabeled data and uses generated labels for training. Besides Pseudo Labeling, there is another family of algorithms under the umbrella of "self-training", which has received much attention both empirically  and theoretically (Wei et al., 2021). They either enforce stability of predictions under different data augmentations (Tarvainen & Valpola, 2017; (also known as input consistency regularization) or fit the unlabeled data on its predictions generated by a previously learned model (Lee, 2013;Chen et al., 2020b). It is interesting that UDA  reveals the crucial role of noise produced by advanced data augmentation methods. FixMatch  uses two versions of augmentation (weak augmentation and strong augmentation) and argues that predictions from weakly-augmented images can be used to supervise the output of strongly augmented data. SimCLRv2 (Chen et al., 2020b) first fine-tunes the pre-trained model from the labeled data and then distills on the unlabeled data. Self-Tuning (Wang et al., 2021) further improves data efficiency by a pseudo group contrast (PGC) mechanism but limited on classification setup. Moreover, various recent methods (van den Oord et al., 2018;He et al., 2020;Hadsell et al., 2006;Tian et al., 2019;Chen et al., 2020a) improve data efficiency by self-supervised learning. However, most existing data-efficient methods focus on classification setup while rare attention has been paid to deep regression.

DATA-EFFICIENT REGRESSION
Data-efficient regression methods mainly fall into three categories: Co-Training (Blum & Mitchell, 1998) paradigm, kernel regression paradigm, and graph Laplacian regularization paradigm. COREG (Zhou & Li, 2005), as well as its following work (Yu-Feng Li, 2017), is a classic algorithm for regression method for improving data efficiency with two regressors (kNNs) learned by different distance metrics. It employs the Co-Training paradigm by predicting unlabeled data and using the most promising predictions to train the rest regressors. Transductive Regression (Cortes & Mohri, 2007) exploits local linear regression for unlabeled data, takes those with relatively close neighbors, and trains a kernel regressor to produce the final prediction. Graph Laplacian regularization is a commonly used manifold regularization technique (Belkin et al., 2006). It is reasonable to assume that data points with close input values should have similar output values, thereby regularizing the model output with respect to the unlabeled data. Levati et al. (2017) and Srijith et al. (2013) adopt decision tree and Gaussian Process as regressors respectively. However, these existing data-efficient regression methods are mainly designed for shallow regression, which requires closed-form or convex-solvers to solve the problem, causing them not suitable for deep regression problems. The comparison of various methods for improving data efficiency in deep learning is shown in Table 1.  (Grandvalet & Bengio, 2005) VAT  weak Π-model (Laine & Aila, 2017) weak weak Data Distillation  weak Mean Teacher (Tarvainen & Valpola, 2017) weak weak UDA  strong FixMatch  strong Self-Tuning (Wang et al., 2021) strong Confidence Threshold: c > * + ,

PRELIMINARIES
with n U unlabeled samples. Usually, the size n L of L is much smaller than that n U of U and we define the the label ratio as n L /(n L + n U ). Denote θ the feature generator network, and φ the successive task-specific head network. We aim at improving data efficiency in deep learning by fully exploring the labeled and unlabeled data from the perspective of stochasticity.

INVARIANCE TO DATA STOCHASTICITY
Data-efficient methods with the insight of invariance to data stochasticity aim at making the predictions of the model invariant to local input perturbations by a consistency regularization term. As shown in Figure 2(a), Π-model (Laine & Aila, 2017;Sajjadi et al., 2016) first generates two examples with different stochastic data augmentations and then introduces a loss term to minimize the distance between their predictions. With the strategy of invariance to data stochasticity, Π-model is believed to augment the model with information about the intrinsic structure ("manifold") of U, avoiding overfitting to the labeled data L. Realizing that training a model on its own predictions (e.g., Π-model) often provides no meaningful information, Data Distillation  extends the dual-copies of Π-model to multiple transformations as shown in Figure 2(c). It first generates an ensembled prediction for each unlabeled input from the predictions of a single model run on different transformations (e.g., flipping and scaling), and then uses it to guide the training of this input. In summary, the training loss of invariance to data stochasticity can be formalized as where (·, ·) is a proper loss function for the target task. For clarity, we focus on a particular data example x i here and the superscript U is omitted. Recently, instead of the weak augmentations (e.g., flip and crop) adopted in Π-model, many strong augmentations (e.g., cutout and contrast) are adopted in FixMatch  to further enhance invariance to data stochasticity.

INVARIANCE TO MODEL STOCHASTICITY
Another strategy encourages invariance to model stochasticity with difference penalty for predictions of models generated from different dropout (Laine & Aila, 2017) or network initialization (Zhou & Li, 2005), as well as models exponentially averaged from history models. For example, Mean Teacher (Tarvainen & Valpola, 2017) uses the prediction of an unlabeled sample from the teacher model to guide the learning of a student model as where ) are the current model and the exponential moving averaged model respectively.
Similarly, the strategy of the invariance to model stochasticity tries to improve the quality of the teacher prediction to guide the training of the student model.

METHOD
Through the success of the above strategies, it is intuitive that the invariance to stochasticity matters for improving data efficiency. To this end, we propose a novel χ-model with two new designs: 1) Simultaneously encourage the invariance to data stochasticity and model stochasticity, detailed in Section 4.1 and 2) Enhance model stochasticity via a minimax model, detailed in Section 4.2.

DATA STOCHASTICITY MEETS MODEL STOCHASTICITY
To take the power of both worlds, we propose a novel χ-model by simultaneously encouraging the invariance to data stochasticity and model stochasticity for improving data efficiency in deep learning. Given an input x i , we first transform it with two different data augmentations as aug 1 (x i ) and aug 2 (x i ) respectively. After that, they will pass the same feature extractor θ and two different task-specific heads φ 1 and φ 2 to attain predictions y i,1 and y i,2 with both data stochasticity and model stochasticity as where φ 1 and φ 2 are two randomly initilized heads with different parameters. For each example , we focus on a particular data example x L i and omit superscript L. When the invariance to data stochasticity meets with the invariance to model stochasticity, the supervised learning loss on the labeled data L can be formalized as where s (·, ·) is a proper loss function for the target task, e.g. L1 or L2 loss for regression tasks and cross-entropy loss for classification tasks. Similarly, a direct form of unsupervised loss is where u [·, ·] is a proper loss function to quantify the difference of these predictions, e.g. L1 or L2 loss for regression tasks and the symmetric Kullback-Leibler divergence for classification tasks. Different from the strategy that only applies data stochasticity or model stochasticity, this strategy will greatly increase the invariance to stochasticity by unifying the benefit of both worlds.
Note that, instead of the weak augmentations (e.g., flip and crop) adopted in Π-model, we utilize the strong augmentations (e.g., cutout and contrast) adopted in FixMatch  to enhance invariance to data stochasticity, as shown in Figure 1. A natural question arises: Can we further enhance the invariance to model stochasticity similar to that of data stochasticity?

ENHANCE MODEL STOCHASTICITY VIA A MINIMAX MODEL
By minimizing L s (x, L) on the labeled data and L u (x, U) on the unlabeled data using a proper trade-off hyper-parameter η, L s + ηL u is an intuitive and effective way to simultaneously encourage the invariance to data stochasticity with model stochasticity. However, since the dropout or random initialization is a kind of weak stochasticity, only posing a minimization loss function between predictions of two task-specific heads may make them generate similar outputs, causing a degeneration problem and providing little meaningful information. To further enhance model stochasticity, we propose a minimax game between the feature extractor and task-specific heads as In this minimax game, the inconsistency between the predictions of φ 1 and φ 2 on unlabeled data is maximized while the feature extractor is designed to make their predictions as similar as possible. As shown in Figure 3, the blue lines denote the back-propagation of the minimization of loss function while the red ones denote the maximization ones. In the implementation, we can update all parameters simultaneously by multiplying the gradient of the feature extractor θ with respect to the loss on unlabeled data by a certain negative constant during the backpropagation-based training.
By this minimax strategy, the task-specific heads are believed to capture meaningful information from complementary perspectives to avoid the degeneration problem. Providing more diverse information, the minimax model can further enhance the invariance to model stochasticity. Compared to the manually designed strategy of adding a dropout layer to models or just applying random initialization, this novel approach directly optimizes a minimax loss function in the hypothesis space to fully explore the intrinsic structure of unlabeled data. In this way, χ-model further enhances invariance to stochasticity from two comprehensive perspectives: data and model.
The comparison between χ-model with other baselines is summarized in Figure 2. As shown in Figure 2(e), aug 1 (x i ) and aug 2 (x i ) can be regarded as the corners of "χ" on the upper left and lower left respectively, and φ 1 and φ 2 can be denoted by the corners on the upper right and lower right respectively. Inspired by the name of Π-model that has a shape of "Π", the proposed strategy with both data stochasticity and model stochasticity is more like a "χ", so we call it χ-model.  Table 7. We adopt position X and position Y and scale as deep regression tasks while excluding the tasks of classification and orientation regression.
Since recently proposed methods such as UDA, FixMatch, and Self-Tuning adopt pseudo-labels that cannot be exactly defined in deep regression. We did not report their results and these methods are omitted in the following tables. As shown in Table 2, χ-model achieves the best performance . across various label ratios from 1% to 50% over all baselines, evaluated on the commonly-used MAE measure. It is noteworthy that χ-model achieves a MAE of 0.092 provided with only 5% labels, which is even lower than that of the labeled-only method (0.097) using 50% labels, indicating a large improvement of data efficiency (10×). Meanwhile, the ablation studies in Table 2 and other ablation studies, verify the effectiveness of both minimax strategy and data augmentation.

3D REALISTIC DATASET: MPI3D-Realistic
MPI3D 2 (Gondal et al., 2019) is a simulation-to-real dataset for 3D object. It has three subsets: Toy, Realistic and Real, in which each contains 1, 036, 800 images. Here, since we have used the synthetic dataset above, we select the Realistic subset here to demonstrate the performance of χmodel. Example images of Realistic are shown in Figure 7(b). In each image, there are 7 factors of variations each with a definite value, detailed in Table 8. In MPI3D-Realistic, there are two factors that can be employed for regression tasks: Horizontal Axis (a rotation about a vertical axis at the base) and Vertical Axis (a second rotation about a horizontal axis). The goal of this task is to predict the value of the Horizontal Axis and the Vertical Axis for each image via less labeled data. Following the previous setup, we evaluate our χ-model on various label ratios including 1%, 5%, 20% and 50%.As shown in Table 3, χ-model beats the strong competitors of data stochasticity and model stochasticity-based methods by a large margin when evaluated on the commonly-used MAE measure. It is noteworthy that on this difficult task, some data-efficient methods underperform than the vanilla label-only model (e.g. Data Distillation (0.044) and VAT (0.046) achieves a higher MAE than label-only method (0.042) when provided with a label ratio of 50%), while our χ-model always benefits from exploring the unlabeled data.

AGE ESTIMATION DATASET: IMDB-WIKI
IMDB-WIKI 3 (Rasmus Rothe, 2016) is a face dataset with age and gender labels, which can be used for age estimation. It contains 523.0K face images and the corresponding ages. After splitting, there are 191.5K images for training and 11.0K images for validation and testing. For data-efficient deep regression, we construct 5 subsets with different label ratios including 1%, 5%, 10%, 20% and 50%. For evaluation metrics, we use common metrics for regression, such as the mean-average-error (MAE) and another metric called error Geometric Mean (GM) (Yang et al., 2021) which is defined as (Π n i=1 e i ) 1 n for better prediction fairness, where e i is the prediction error of each sample i. As reported in Table 4, no matter evaluated by MAE or GM, χ-model achieves the best performance across various label ratios from 1% to 50% over all baselines. It is noteworthy that the value of the unlabeled data is highlighted in this dataset since all baselines that try to explore the intrinsic structure of unlabeled data work much better than the vanilla one: labeled-only method.

KEYPOINT LOCALIZATION DATASET: Hand-3D-Studio
Hand-3D-Studio (H3D) 4 (Zhao et al., 2020) is a real-world dataset containing 22k frames in total. These frames are sampled from videos consisting of hand images of 10 persons with different genders and skin colors. We use the Percentage of Correct Keypoints (PCK) as the measure of evaluation. A keypoint prediction is considered correct if the distance between it with the ground truth is less than a fraction α = 0.05 of the image size. PCK@0.05 means the percentage of keypoints that can be considered as correct over all keypoints.
As shown in Table 5, most baselines that explore unlabeled data show competitive performance and the proposed χ-model still consistently improves over these baselines. For example, when provided with 1% labels, χ-model achieves an average PCK of 73.6, which has an absolute improvement of 3.4 over the strongest baseline. Meanwhile, we provide a qualitative analysis between χ-model with other baselines in Figure 4, showing that the predictions of χ-model are the most similar ones compared to the ground-truth labels.

EXPERIMENTS ON CLASSIFICATION TASKS
We adopt the most difficult CIFAR-100 dataset (Krizhevsky et al.) with 100 categories among the famous data-efficient classification benchmarks including CIFAR-100, CIFAR-10, SVHN, and STL-10, where the last three datasets have only 10 categories. As shown in Figure 6, χ-model not only performs well on deep regression tasks but also outperforms other baselines on classification tasks.

INSIGHT ANALYSIS
An Analysis on Two-Moon We use the classical Two-Moon dataset with scikit-learn (Pedregosa et al., 2011) to visualize decision boundaries of various data-efficient learning methods on a binary classification task with only 5 labels per class (denoted by "+"). As shown in Figure 5, from the label-only method to χ-model, the decision boundary is more and more discriminable and a more accurate hyperplane between two classes is learned.  Feature Visualization via t-SNE We use the t-SNE tool (Maaten & Hinton, 2008) to visualize the features of several models on a regression task named dSprites-Scream with 5% labels. As shown in Figure 6, from the label-only method to χ-model, the intrinsic structure ("manifold") of the unlabeled data is more discriminable and much more similar to that of the fully-supervised ground-truth one.

CONCLUSION
We propose the χ-model, which unifies the invariance to data stochasticity and model stochasticity to take the power of both worlds with a form of "χ". We make the χ-model play a minimax game between the feature extractor and task-specific heads to further enhance invariance to stochasticity.
Extensive experiments demonstrate the superior performance of the χ-model among various tasks.

A EXPERIMENT DETAILS
We empirically evaluate χ-model in several dimensions: • Task Variety: four regression tasks with various dataset scales including single-value prediction task of age estimation, to dense-value prediction ones of keypoint localization, as well as a 2D synthetic dataset and a 3D realistic dataset. We further include a multi-category object recognition task to verify the effectiveness of χ-model on classfication setup.
• Label Proportion: the proportion of labeled dataset ranging from 1% to 50% following the popular protocol of data-efficient deep learning.
Baselines We compared χ-model against three types of baselines: (1) Data Stochasticity: Πmodel (Laine & Aila, 2017), VAT , and Data Distillation ; (2) Model Stochasticity: Mean Teacher (Tarvainen & Valpola, 2017); (3) Label-Only Models: a task-specific model trained on only the labeled data is provided. For example, Simple Baseline (Xiao et al., 2018) with a ResNet101 pre-trained backbone trained on only the labeled data is used a strong baseline for keypoint localization.

Implementation Details
We use PyTorch 5 with Titan V to implement our methods. Models pretrained on ImageNet such as ResNet-18, ResNet-50, ResNet-101 (He et al., 2016) are used for the backbones of experiments on dSprites-Scream, IMDB-WIKI, and Hand-3D-Studio respectively.
On dSprites-Scream, there are 5 factors of variations each with a definite value in each image. Among these factors, there are four factors that can be employed for regression tasks: scale, orientation, position X and position Y. Therefore, we adopt position X and position Y and scale as deep regression tasks while excluding the task of orientation regression. We treat all tasks equally and address there tasks as a multi-task learning problem with a shared backbone and different heads. Labels are all normalized to [0, 1] to eliminate the effects of diverse scale in regression values, since the activation of the regressor is sigmoid whose value range is also [0, 1].
On MPI3D-Realistic, there are two factors that can be employed for regression tasks: Horizontal Axis (a rotation about a vertical axis at the base) and Vertical Axis (a second rotation about a horizontal axis), since each object is mounted on the tip of the manipulator and the manipulator has two degrees of freedom. The goal of this data-efficient deep regression task is to train a model to accurately predict the value of the Horizontal Axis and the Vertical Axis for each image via less labeled data.
On IMDB-WIKI, following the data pre-process method of a recent work (Yang et al., 2021), we also filter out unqualified images, and manually construct balanced validation and test set over the supported ages. After splitting, there are 191.5K images for training and 11.0K images for validation and testing. For data-efficient deep regression, we construct 5 subsets with different label ratios including 1%, 5%, 10%, 20% and 50%. For evaluation metrics, we use common metrics for regression, such as the mean-average-error (MAE) and another metric called error Geometric Mean (GM) (Yang et al., 2021) which is defined as (Π n i=1 e i ) 1 n for better prediction fairness, where e i is the prediction error of each sample i.
On Hand-3D-Studio, we first randomly split the dataset into a testing set with 3.2k frames and a training set containing the remaining part. Further, we follow the setup of data-efficient learning and construct subsets with label ratios of 1% and 5%. We use the Percentage of Correct Keypoints (PCK) as the measure of evaluation. A keypoint prediction is considered correct if the distance between it with the ground truth is less than a fraction α = 0.05 of the image size. PCK@0.05 means the percentage of keypoints that can be considered as correct over all keypoints.
All images are resized to 224 × 224. The tradeoff hyperparameter η is set as 0.1 for all tasks unless specified. The learning rates of the heads are set as 10 times to those of the backbone layers, following the common fine-tuning principle (Yosinski et al., 2014). We adopt the mini-batch SGD with momentum of 0.95. Code will be made available at https://github.com.

B EXAMPLE IMAGES AND FACTORS OF DSPRITES AND MPI3D
(a) Example images of dSprites-Scream (b) Example images of MPI3D-Realistic  IMDB-WIKI 6 (Rasmus Rothe, 2016) is a face dataset with age and gender labels, which can be used for age estimation. It contains 523.0K face images and the corresponding ages. Following the data pre-process method of a recent work (Yang et al., 2021), we also filter out unqualified images, and manually construct balanced validation and test set over the supported ages. After splitting, there are 191.5K images for training and 11.0K images for validation and testing. For data-efficient deep regression, we construct 5 subsets with different label ratios including 1%, 5%, 10%, 20% and 50%. For evaluation metrics, we use common metrics for regression, such as the mean-average-error (MAE) and another metric called error Geometric Mean (GM) (Yang et al., 2021) which is defined as (Π n i=1 e i ) 1 n for better prediction fairness, where e i is the prediction error of each sample i.
As reported in Table 9, no matter evaluated by MAE or GM, χ-model achieves the best performance across various label ratios from 1% to 50% over all baselines. It is noteworthy that the value of the unlabeled data is highlighted in this dataset since all baselines that try to explore the intrinsic structure of unlabeled data works much better than the vanilla one: labeled-only method. Table 9: MAE (↓) and GM (↓) on task of age estimation in IMDB-WIKI (ResNet-50).