SCARF: SELF-SUPERVISED CONTRASTIVE LEARNING USING RANDOM FEATURE CORRUPTION
Year: 2021

Abstract:
Self-supervised contrastive representation learning has proved incredibly successful in the vision and natural language domains, enabling state-of-the-art performance with orders of magnitude less labeled data. However, such methods are domainspecific and little has been done to leverage this technique on real-world tabular datasets. We propose SCARF, a simple, widely-applicable technique for contrastive learning, where views are formed by corrupting a random subset of features. When applied to pre-train deep neural networks on the 69 real-world, tabular classification datasets from the OpenML-CC18 benchmark, SCARF not only improves classification accuracy in the fully-supervised setting but does so also in the presence of label noise and in the semi-supervised setting where only a fraction of the available training data is labeled. We show that SCARF complements existing strategies and outperforms alternatives like autoencoders. We conduct comprehensive ablations, detailing the importance of a range of factors.

heading: 1 INTRODUCTION
text: In many machine learning tasks, unlabeled data is abundant but labeled data is costly to collect, requiring manual human labelers. The goal of self-supervised learning is to leverage large amounts of unlabeled data to learn useful representations for downstream tasks such as classification. Selfsupervised learning has proved critical in computer vision (Grill et al., 2020; Misra & Maaten, 2020; He et al., 2020; Tian et al., 2019) and natural language processing (Song et al., 2020; Wang et al., 2019; Raffel et al., 2019). Some recent examples include the following: Chen et al. (2020) showed that training a linear classifier on the representations learned by their proposed method, SimCLR, significantly outperforms previous state-of-art image classifiers and requires 100x fewer labels to achieve state of art results; Brown et al. (2020) showed through their GPT-3 language model that by pre-training on a large corpus of text, only few labeled examples were required for task-specific fine-tuning for a wide range of tasks.
A common theme of these advances is learning representations that are robust to different views or distortions of the same input; this is often achieved by maximizing the similarity between views of the same input and minimizing those of different inputs via a contrastive loss. However, techniques to generate views or corruptions have thus far been, by and large, domain-specific (e.g. color distortion (Zhang et al., 2016) and cropping (Chen et al., 2020) in vision, and token masking (Song et al., 2020) in NLP). Despite the importance of self-supervised learning, there is surprisingly little work done in finding methods that are applicable across domains and in particular, ones that can be applied to tabular data.
In this paper, we propose SCARF, a simple and versatile contrastive pre-training procedure. We generate a view for a given input by selecting a random subset of its features and replacing them by random draws from the features’ respective empirical marginal distributions. Experimentally, we test SCARF on the OpenML-CC18 benchmark (Vanschoren et al., 2013; Bischl et al., 2017; Feurer et al., 2019), a collection of 72 real-world classification datasets. We show that not only does SCARF pre-training improve classification accuracy in the fully-supervised setting but does so also in the presence of label noise and in the semi-supervised setting where only a fraction of the available training data is labeled. Moreover, we show that combining SCARF pre-training with other solutions to these problems further improves them, demonstrating the versatility of SCARF and its ability to learn effective task-agnostic representations. We then conduct extensive ablation studies, showing the

heading: Classification head
text: effects of various design choices and stability to hyperparameters. Our ablations show that SCARF’s way of constructing views is more effective than alternatives. We show that SCARF is less sensitive to feature scaling and is stable to various hyperparameters such as batch size, corruption rate, and softmax temperature.

heading: 2 RELATED WORKS
text: A number of self-supervised learning techniques have been proposed in computer vision (Zhai et al., 2019; Tung et al., 2017; Jing & Tian, 2020). One framework involves learning features based on generated images through various methods, including using a GAN (Goodfellow et al., 2014; Donahue et al., 2016; Radford et al., 2015; Chen et al., 2018), predicting pixels (Larsson et al., 2016), predicting colorizations (Zhang et al., 2016; Larsson et al., 2017), ensuring local and global consistency (Iizuka et al., 2017), and learning synthetic artifacts (Jenni & Favaro, 2018). Another line of work involves training on generated labels with semantic meanings that can be obtained without any human labelers (e.g. using segmentation masks) (Ren & Lee, 2018; Li et al., 2016; Pathak et al., 2017). Leveraging the spatial relations of image patches and temporal ones of videos has also been successful. Such approaches include the image jigsaw puzzle (Noroozi & Favaro, 2016; Ahsan et al., 2019), context prediction (Doersch et al., 2015), clustering (Xie et al., 2016; Caron et al., 2018; Yang et al., 2016), and geometric transformation recognition (Lee et al., 2017; Xu et al., 2019). Finally, most related to our approach, are the similarity-based approaches that contrast different views of the image (Tian et al., 2019; Hassani & Khasahmadi, 2020; Oord et al., 2018; Henaff, 2020; Li et al., 2016; He et al., 2020; Bojanowski & Joulin, 2017; Wang & Gupta, 2015; Gidaris et al., 2018). In particular, our framework is similar to SimCLR (Chen et al., 2020), which involves generating views of a single image via image-based corruptions like random cropping, color distortion and blurring; however, we generate views that are applicable to tabular data.
Self-supervised learning has had an especially large impact in language modeling (Qiu et al., 2020). One popular approach is masked language modeling, wherein the model is trained to predict input
Algorithm 1 SCARF pre-training algorithm.
1: input: unlabeled training data X ⊆ RM , batch size N , temperature τ , corruption rate c, encoder network f , pre-train head network g.
2: let X̂j be the uniform distribution over Xj = {xj : x ∈ X}, where xj denotes the j-th coordinate of x. 3: let q = bc ·Mc be the number of features to corrupt. 4: for sampled mini-batch { x(i) }N i=1 ⊆ X do 5: for i ∈ [N ], uniformly sample subset Ii from {1, ...,M} of size q and define x̃(i) ∈ RM as follows: x̃(i)j = xj if j 6∈ Ii, otherwise x̃ (i) j = v, where v ∼ X̂j . # generate corrupted view.
6: let z(i) = g ( f ( x(i) )) , z̃(i) = g ( f ( x̃(i) )) , for i ∈ [N ]. # embeddings for views.
7: let si,j = z(i) > z̃(j)/ ( ‖z(i)‖2 · ‖z̃(j)‖2 ) , for i, j ∈ [N ]. # pairwise similarity.
8: define Lcont := 1N ∑N i=1− log ( exp(si,i/τ)
1 N ∑N k=1 exp(si,k/τ)
) .
9: update networks f and g to minimize Lcont using SGD. 10: end for 11: return encoder network f .
tokens that have been intentionally masked out (Devlin et al., 2018; Raffel et al., 2019; Song et al., 2019) as well as enhancements to this approach (Liu et al., 2019; Dong et al., 2019; Bao et al., 2020; Lample & Conneau, 2019; Joshi et al., 2020) and variations involving permuting the tokens (Yang et al., 2019; Song et al., 2020). Denoising autoencoders have been used by training them to reconstruct the input from a corrupted version (produced by, for example, token masking, deletion, and infilling) (Lewis et al., 2019; Wang et al., 2019; Freitag & Roy, 2018). Finally, most related to our approach, is contrastive learning, which involves learning based on similarity of pairs of inputs. Such approaches include randomly replacing words and distinguishing between real and fake phrases (Collobert et al., 2011; Mnih & Kavukcuoglu, 2013), random token replacement (Mikolov et al., 2013; Clark et al., 2020), and adjacent sentences (Joshi et al., 2020; Lan et al., 2019; de Vries et al., 2019).
Recently, Yao et al. (2020) adapted the similarity-based contrastive framework to large-scale recommendation systems in a similar way to our approach. The key difference is in the way the methods generate multiple views. Yao et al. (2020) proposes masking random features in a correlated manner and applying a dropout for categorical features, while our approach involves randomizing random features based on the features’ respective marginal training distribution (in an uncorrelated way). Generating such views for a task is a difficult problem: there has been much work done in understanding and designing them (Wu et al., 2018; Purushwalkam & Gupta, 2020; Gontijo-Lopes et al., 2020; Lopes et al., 2019; Perez & Wang, 2017; Park et al., 2019) and learning them (Ratner et al., 2017; Cubuk et al., 2020; Ho et al., 2019; Lim et al., 2019; Zhang et al., 2019b; Tran et al., 2017; Tamkin et al., 2020). In this work, we present a simple method to generate multiple views that’s effective for unsupervised representation learning of tabular data, which may be of interest to other applications that benefit from such data augmentation.
Within the contrastive learning framework, the choice of loss function is significant. InfoNCE (Gutmann & Hyvärinen, 2010; Oord et al., 2018), which can be interpreted as a non-parametric estimation of the entropy of the representation (Wang & Isola, 2020), is a popular choice. Since then there have been a number of proposals (Zbontar et al., 2021; Grill et al., 2020; Hjelm et al., 2018); however, we show that InfoNCE is effective for our framework.

heading: 3 SCARF
text: We now describe our proposed method (Algorithm 1), which is also described in Figure 1. For each mini-batch of examples from the unlabeled training data, we generate a corrupted version x̃(i) for each example x(i) as follows. We sample some fraction of the features uniformly at random and replace each of those features by a random draw from that feature’s empirical marginal distribution,
which is defined as the uniform distribution over the values that feature takes on across the training dataset. Then, we pass both x(i) and x̃(i) through the encoder network f , whose output we pass through the pre-train head network g, to get z(i) and z̃(i) respectively. Note that the pre-train head network `2-normalizes the outputs so that they lie on the unit hypersphere – this has been found to be crucial in practice (Chen et al., 2020; Wang & Isola, 2020). We train on the InfoNCE contrastive loss, encouraging z(i) and z̃(i) to be close for all i and z(i) and z̃(j) to be far apart for i 6= j, and we optimize over the parameters of f and g via SGD.
Then, to train a classifier for the task via fine-tuning, we take the encoder network f and attach a classification head h which takes the output of f as its input and predicts the label of the example. We optimize the cross-entropy classification loss and tune the parameters of both f and h.
While pre-training can be run for a pre-determined number of epochs, much like normal supervised training, how many is needed largely depends on the model and dataset. To this end, we propose using early stopping on the validation InfoNCE loss. Given unlabeled validation data, we cycle through it for some number of epochs, running our proposed method to generate ( x(i), x̃(i) ) pairs. Once built, the loss on this static set is tracked during pre-training. Prototypical loss curves are shown in the Appendix.

heading: 4 EXPERIMENTS
text: We evaluate the impact of SCARF pre-training on test accuracy after supervised fine-tuning in three distinct settings: on the full dataset, on the full dataset but where only 25% of samples have labels and the remaining 75% do not, and on the full dataset where 30% of samples undergo label corruption.
Datasets. We use 69 datasets from the public OpenML-CC18 benchmark1 under the CC-BY licence. It consists of 72 real-world classification datasets that have been manually curated for effective benchmarking. Since we’re concerned with tabular datasets in this work, we remove MNIST, FashionMNIST, and CIFAR10. For each OpenML dataset, we form 70%/10%/20% train/validation/test splits, where a different split is generated for every trial and all methods use the same splits. The percentage used for validation and test are never changed and only training labels are corrupted for the label noise experiments.
Dataset pre-processing. We represent categorical features by a one-hot encoding, and most of the corruption methods explored in the ablations are on these one-hot encoded representations of the data (with the exception of SCARF, where the marginal sampling is done before one-hot encoding). We pre-process missing data as follows: if a feature column is always missing, we drop it. Otherwise, if the feature is categorical, we fill in missing entries with the mode, or most frequent, category computed over the full dataset. For numerical features, we impute it with the mean. We explore scaling numerical features by z-score, min-max, and mean normalization. We find that for a vanilla network (i.e. control), z-score normalization performed the best for all but three datasets (OpenML dataset ids 4134, 28, and 1468), for which no scaling was optimal. We thus do not scale these three datasets and z-score normalize all others.
Model architecture and training. Unless specified otherwise, we use the following settings across all experiments. As described earlier, we decompose the neural network into an encoder f , a pretraining head g, and a classification head h, where the inputs to g and h are the outputs of f . We choose all three component models to be ReLU networks with hidden dimension 256. f consists of 4 layers, whereas both g and h have 2 layers. Both SCARF and the autoencoder baselines use g (for both pre-training and co-training, described later), but for autoencoders, the output dimensionality is the input feature dimensionality, and the mean-squared error reconstruction loss is applied. We train all models and their components with the Adam optimizer using the default learning rate of 0.001. For both pre-training and fine-tuning we use 128 batch size. Unsupervised pre-training methods all use early stopping with patience 3 on the validation loss, unless otherwise noted. Supervised fine-tuning uses this same criterion (and validation split), but classification error is used as the validation metric for early stopping, as it performs slightly better. We set a max number of fine-tune epochs of 200 and pre-train epochs of 1000, We use 10 epochs to build the static validation set. Unless otherwise noted, we use a corruption rate c of 0.6 and a temperature τ of 1, for SCARF-based methods. All runs are
1https://docs.openml.org/benchmark/
repeated 30 times using different train/validation/test splits. Experiments were run on a cloud cluster of CPUs, and we used about one million CPU core hours in total for the experiments.
Evaluation methods. We use the following to effectively convey the results across all datasets.
Win matrix. Given M methods, we compute a “win” matrix W of size M ×M , where the (i, j) entry is defined as:
Wi,j = ∑69 d=1 1[method i beats j on dataset d]∑69
d=1 1[method i beats j on dataset d] + 1[method i loses to j on dataset d] .
“Beats” and “loses” are only defined when the means are not a statistical tie (using Welch’s t-test with unequal variance and a p-value of 0.05). A win ratio of 0/1 means that out of the 69 (pairwise) comparisons, only one was significant and it was a loss. Since 0/1 and 0/69 have the same value but the latter is more confident indication that i is worse than j, we present the values in fractional form and use a heat map. We add an additional column to the matrix that represents the minimum win ratio across each row.
Box plots. The win matrix effectively conveys how often one method beats another but does not capture the degree by which. To that end, for each method, we compute the relative percent improvement over some reference method on each dataset. We then build box-plots depicting the distribution of the relative improvement across datasets, plotting the observations as small points. We only consider datasets where the means of the method and the reference are different with p-value 0.20. We use a larger p-value here than when computing the win ratio because otherwise some methods would not have enough points to make the box-plots meaningful.
Baselines. We use the following baselines:
• Label smoothing (Szegedy et al., 2016), which has proved successful for accuracy (Müller et al., 2019) and label noise (Lukasik et al., 2020). We use a weight of 0.1 on the smoothing term. • Dropout. We use standard dropout (Srivastava et al., 2014) using rate 0.04 on all layers.
Dropout has been shown to improve performance and robustness to label noise (Rusiecki, 2020). • Mixup (Zhang et al., 2017), using α = 0.2. • Autoencoders (Rumelhart et al., 1985). We use this as our key ablative pre-training baseline.
We use the classical autoencoder (“no noise AE”), the denoising autoencoder (Vincent et al., 2008; 2010) using Gaussian additive noise (“add. noise AE”) as well as SCARF’s corruption method (“SCARF AE”). We use MSE for the reconstruction loss. We try both pre-training and co-training with the supervised task, and when co-training, we add 0.1 times the autoencoder loss to the supervised objective. We discuss co-training in the Appendix as it is less effective than pre-training. • SCARF data-augmentation. In order to isolate the effect of our proposed feature corruption
technique, we skip pre-training and instead train on the corrupted inputs during supervised fine-tuning. We discuss results for this baseline in the Appendix as it is less effective than the others. • Discriminative SCARF. Here, our pre-training objective is to discriminate between original
input features and their counterparts that have been corrupted using our proposed technique. To this end, we update our pre-training head network to include a final linear projection and swap the InfoNCE with a binary logistic loss. We use classification error, not logistic loss, as the validation metric for early stopping, as we found it to perform slightly better. • Self-distillation (Hinton et al., 2015; Zhang et al., 2019a). We first train the model on the
labeled data and then train the final model on both the labeled and unlabeled data using the first models’ predictions as soft labels for both sets. • Deep k-NN (Bahri et al., 2020), a recently proposed method for label noise. We set k = 50. • Bi-tempered loss (Amid et al., 2019), a recently proposed method for label noise. We use 5
iterations, t1 = 0.8, and t2 = 1.2. • Self-training (Yarowsky, 1995; McClosky et al., 2006). A classical semi-supervised method
– each iteration, we train on pseudo-labeled data (initialized to be the original labeled dataset) and add highly confident predictions to the training set using the prediction as the label. We then train our final model on the final dataset. We use a softmax prediction threshold of 0.75 and run for 10 iterations.
• Tri-training (Zhou & Li, 2005). Like self-training, but using three models with different initial labeled data via bootstrap sampling. Each iteration, every model’s training set is updated by adding only unlabeled points whose predictions made by the other two models agree. It was shown to be competitive in modern semi-supervised NLP tasks (Ruder & Plank, 2018). We use same hyperparameters as self-training.

heading: 4.1 SCARF PRE-TRAINING IMPROVES PREDICTIVE PERFORMANCE
text: Figure 2 shows our results. From the first win matrix plot, we see that all five pre-training techniques considered improve over no pre-training (control), and that SCARF outperforms the others and has more statistically significant wins. The second win matrix shows that SCARF pre-training boosts the performance of mixup, label smoothing, distillation, and dropout, and it does so better than
alternatives. In other words, pre-training complements existing solutions, suggesting that a distinct mechanism is at play here. The box plots expand on the second win matrix, showing the relative improvement that each of the pre-training strategies confers over the baselines. Table 1 summarizes the box-plots by the average relative gain. We observe that SCARF generally outperforms the alternatives and adds a 1-2% relative gain across the board.

heading: 4.2 SCARF PRE-TRAINING IMPROVES PERFORMANCE IN THE PRESENCE TO LABEL NOISE
text: To show how pre-training improves model robustness when the data’s labels are unreliable, we do as follows. Firstly, label noise robustness is often studied in two distinct settings - (1) when some subset of the training data is guaranteed to be uncorrupted and that set is known in advance, (2) when the entire dataset is untrustworthy. For simplicity, we consider setting 2 in our experiments. We corrupt labels as follows: leaving the validation and test splits uncorrupted, we select a random 30% percent of the training data to corrupt and for each datapoint, we replace its label by one of the classes, uniformly over all classes (including the datapoint’s true class). Results are shown in Figure 3 and Table 1. Again, we see SCARF outperforms the rest and boosts all baselines by 2-3%.

heading: 4.3 SCARF PRE-TRAINING IMPROVES PERFORMANCE WHEN LABELED DATA IS LIMITED
text: To show how pre-training helps when there is more unlabeled data than labeled ones, we remove labels in the training split so that only 25% of the original split remains labeled. Autoencoders,
SCARF, self-training and tri-training all leverage the unlabeled remainder. Results are shown in Figure 4 (placed in the Appendix due to space constraints) and Table 1. SCARF outperforms the rest, adding a very impressive 2-4% to all baselines.

heading: 4.4 ABLATIONS
text: We now detail the importance of every factor in SCARF. Due to space, we can only show some of the results here and the rest are in the Appendix.
Other corruption strategies are less effective and are more sensitive to feature scaling. Here, we ablate the marginal sampling corruption technique we proposed, replacing it with the following other promising strategies, while keeping all else fixed.
1. No corruption. We do not apply any corruption - i.e. x̃(i) = x(i), in Algorithm 1. In this case, the cosine similarity between positive pairs is always one and the model is learning to make negative pairs as orthogonal as possible. Under the recent perspective (Wang & Isola, 2020) that the contrastive loss comprises two terms – one that encourages alignment between views of the same example – and one that encourages the hypersphere embeddings to be uniformly spread out – we see that with no corruption, pre-training may just be learning to embed input examples uniformly on the hypersphere.
2. Mean corruption. After determining which features to corrupt, we replace their entries with the empirical marginal distribution’s mean.
3. Additive Gaussian noise. We add i.i.d N (0, 0.52) noise to features.
4. Joint sampling. Rather than replacing features by random draws from their marginals to form x̃(i), we instead randomly draw x̂(i) from training data X – i.e. we draw from the empirical (joint) data distribution – and then set x̃(i)j = x̂ (i) j ∀j ∈ Ii.
5. Missing feature corruption. We mark the selected features as “missing” and add one learnable value per feature dimension to our model. When a feature is missing, it’s filled in with the corresponding learnable missing value.
6. Feature dropout. We zero-out the selected features.
We also examine the corruption strategies under different ways of scaling the input features. To that end, in addition to z-score scaling, we look at:
1. Min-max scaling. Here, xj = [xj −min (Xj)] / [max (Xj)−min (Xj)].
2. Mean scaling. xj = [x−mean (Xj)] / [max (Xj)−min (Xj)].
Figure 6 (placed in the Appendix due to space constraints) shows the results for z-norm and min-max scaling. SCARF marginal sampling generally outperforms the other corruption strategies for different types of feature scaling. Marginal sampling is neat in that in addition to not having hyperparameters, it is invariant to scaling and preserves the “units” of each feature. In contrast, even a simple multiplicative scaling requires the additive noise to be scaled in the same way.
SCARF is not sensitive to batch size. Contrastive methods like SimCLR (Chen et al., 2020) have shown consistent improvements upon increasing the batch size, N . There is a tight coupling between the batch size and how hard the contrastive learning task is, since, in our case, the loss term for each example i involves 1 positive and N − 1 negatives. The need for large (e.g. 5000) batch sizes has motivated engineering solutions to support them (Gao & Zhang, 2021) and have been seen as grounds for adopting other loss functions (Zbontar et al., 2021). Figure 5 (placed in the Appendix due to space constraints) compares a range of batch sizes. We see that increasing the batch size past 128 did not result in significant improvements. A reasonable hypothesis here is that higher capacity models and harder tasks benefit more from negatives.
SCARF is fairly insensitive to the corruption rate and temperature. We study the effect of the corruption rate c in Figure 5 (placed in the Appendix). We see that performance is stable when the rate is in the range 50% − 80%. We thus recommend a default setting of 60%. We see a similar stability with respect to the temperature hyperparameter (see the Appendix for more details). We recommend using a default temperature of 1.
Tweaks to the corruption do not work any better. The Appendix shows the effect of four distinct tweaks to the corruption method. We do not see any reason to use any of them.
Alternatives to InfoNCE do not work any better. We investigate the importance of our choice of InfoNCE loss function and see the effects of swapping it with recently proposed alternatives Alignment and Uniformity (Wang & Isola, 2020) and Barlow Twins (Zbontar et al., 2021). We found that these alternative losses almost match or perform worse than the original and popular InfoNCE in our setting. See the Appendix for details.

heading: 5 CONCLUSION
text: Self-supervised learning has seen profound success in important domains including computer vision and natural language processing, but little progress has been made for the general tabular setting. We propose a self-supervised learning method that’s simple and versatile and learns representations that are effective in downstream classification tasks, even in the presence of limited labeled data or label noise. Potential negative side effects of this method may include learning representations that reinforce biases that appear in the input data. Finding ways to mitigate this during the training process is a potential direction for future research.

heading: A APPENDIX
text: We now present findings held out from the main text. Unless noted otherwise, we use the same hyper-parameters (i.e. c = 0.6, temperature τ = 1, etc.).

heading: A.1 RESULTS FOR DATA-LIMITED EXPERIMENTS
text: Figure 4 presents the results for the case when only 25% of the training labels are available. We see that SCARF outperforms the rest here as well.

heading: A.2 PRE-TRAINING LOSS CURVES
text: Figure 7 shows prototypical pre-training training and validation loss curves for SCARF. We see that both losses tend to decrease rapidly at the start of training and then diminish slowly until the early stopping point. We also notice the noisy (high variance) nature of the training loss - this is due to the stochasticity of our corruption method.

heading: A.3 ABLATIONS CONTINUED
text: We present more ablation results, where the metric is accuracy using 100% of the labeled data.

heading: IMPACT OF BATCH SIZE AND CORRUPTION RATES
text: Figure 5 examines the impact of the batch size and corruption rate for the fully labeled, noiseless setting.

heading: IMPACT OF CORRUPTION STRATEGIES
text: Figure 6 shows the performance of a variety of alternative corruption strategies for SCARF under z-score and min-max feature normalization. Results for mean scaling are shown in Figure 12.

heading: IMPACT OF TEMPERATURE
text: Figure 8 shows the impact of the temperature term. While prior work considers temperature an important hyperparameter that needs to be tuned, we see that a default of 1 (i.e. just softmax) works the best in our setting.

heading: MORE CORRUPTION ABLATIONS
text: Figure 11 shows the following points.
• Corrupting one view is better than corrupting both the views. The likely explanation for this is that at a corruption rate of 60%, corrupting both views i.i.d means that the fraction of feature indices that contain the same value for both views is small - in other words, there is less information between the two views and the contrastive task is harder.
• Corrupting the same set of feature indices within the mini-batch performs slightly worse than random sampling for every example in the mini-batch.
• An alternative way to select feature indices to corrupt is to use Bernoulli’s: for each feature index, corrupt it with probability (corruption rate) c, ensuring that at least one index is corrupted. In the selection method we describe in Algorithm 1, a constant number of indices are corrupted, whereas here it is variable. This alternative way of selecting indices performs roughly the same.
• Once the feature indices to corrupt are determined, rather than corrupting them by drawing from the empirical marginal distribution, we can instead draw a random example from the training set and use its feature entries for corrupting all views for the mini-batch. This performs worse.

heading: ALTERNATIVE LOSSES
text: Figure 8 shows the impact of using two recently-proposed alternatives to the InfoNCE loss: Uniform and Align (Wang & Isola, 2020) and Barlow Twins (Zbontar et al., 2021). We use 5e-3 for the hyperparameter in Barlow, and equal weighting between the align and uniform loss terms. We find no benefit in using these other losses.

heading: SCARF PRE-TRAINING OUTPERFORMS SCARF CO-TRAINING
text: Here we address the question: is it better to pre-train using SCARF or to apply it as a term in the supervised training loss? In particular, Lco-train = Lsupervised + λcontLcont, where Lcont is as described in Algorithm 1. Figure 9 shows that pre-training outperforms co-training for a range of different λcont. We see this is also the case for additive noise autoencoders.

heading: SCARF PRE-TRAINING OUTPERFORMS SCARF DATA AUGMENT
text: Figure 10 shows that using SCARF only for data augmentation during supervised training performs far worse than using it for pre-training.
USING INFONCE ERROR AS THE PRE-TRAINING VALIDATION METRIC IS WORSE
SCARF uses the same loss function (InfoNCE) for training and validation. If we instead use the InfoNCE error for validation - where an error occurs when the model predicts an off-diagonal entry of the batch-size by batch-size similarity matrix - downstream performance degrades, as shown in Figure 10.

heading: MORE ON UNIFORM-ALIGN LOSS
text: Figure 12 compares SCARF using the uniform-align loss, for different weights between the align and uniform loss terms. The best performance is achieved with equal weight between the two, and Figure 8 shows that this underperforms vanilla InfoNCE. We thus recommend using the vanilla InfoNCE loss.

heading: ABSOLUTE PERFORMANCE
text: We have thus far presented results in terms of relative improvement over control since relative gain is easier to summarize across the many datasets we consider. In this section, we present the absolute test accuracy for all methods and datasets, for the keen reader. We also add a gradient-boosted decision tree baseline using the XGBoost package, since decision trees are common among practitioners working with tabular data. We use the Python API 2, version 0.6, and choose the default settings for XGBClassifier (max depth of 3, 100 estimators, learning rate of 0.1).
Tables 2, 3, 4 show the absolute test accuracies (averaged over the 30 trials) for each dataset and baseline for the 100% training data, the 30% label noise, and the 25% (semi-supervised) training data settings respectively.

heading: TRAINING SPEED
text: We use an early stopping criteria when fine-tuning SCARF and baselines. Table 5 shows the number of actual training epochs used (averaged over the 30 trials) for each dataset and baseline for the 100% training data setting.
2https://xgboost.readthedocs.io/en/latest/python/python_api.html

Review summaries:
The paper presents a method for self-supervised pre-training on tabular data to improve the performance in supervised transfer. The method adapts the successful contrastive learning framework to tabular data by defining “augmentations” of the data wherein randomly chosen feature columns are replaced by sampling from their corresponding marginal distribution. The method is evaluated on tabular classification tasks of the OpenML-CC18 benchmark, both in the fully supervised setting and in the semi-supervised setting and under 30% label noise.  The method outperforms several baselines. 

This paper proposes a data augmentation method (SCARF) used for self-supervised learning for tabular data. SCARF generates different views by corrupting a random subset of features (via sampling from the marginal distribution). The experimetanl results demonstrate that SCARF not only improves accuracy in the fully-supervised setting but also in the presence of label noise and in the semi-supervised setting. The authors also conduct ablation studies and compare with various methods.  I think adapting SSL to tabular data is a very important direction and I thank the authors for their efforts in this direction. 

This work proposes a good method to use SSL methods on tabular datasets. They achieve this by randomly corrupting a subset of the features. They show comprehensive results and improved performances on 69 real-world, tabular classification datasets from the OpenML-CC18 benchmark. 

This paper proposes SCARF, which is a contrastive pretraining procedure for tabular data. SCARF generates an augmentation of a data point by selecting a random subset of features and replace them with their marginal distributions. Unsupervised pre-training is done by update networks consists of an encoder and pretraining head. Contrastive InfoNCE loss is used to pull the original input and its perturbed version, while pushing it away from other data points in mini-batch. On 69 datasets from OpenML-CC18 benchmarks, SCARF is compared with dozens of baselines and showed its efficacy. SCARF pretraining improves model robustness in label-corrupted settings and also helps classification in partially-labeled settings.