Year: 2021

Abstract:
For self-supervised contrastive learning, models can easily collapse and generate trivial constant solutions. The issue has been mitigated by recent improvement on objective design, which however often requires square complexity either for the size of instances (O(N)) or feature dimensions (O(d)). To prevent such collapse, we develop two novel methods by decorrelating on different dimensions on the instance embedding stacking matrix, i.e., Instance-wise (ICL) and Featurewise (FCL) Contrastive Learning. The proposed two methods (FCL, ICL) can be combined synthetically, called Zero-CL, where “Zero” means negative samples are zero relevant, which allows Zero-CL to completely discard negative pairs i.e., with zero negative samples. Compared with previous methods, Zero-CL mainly enjoys three advantages: 1) Negative free in symmetric architecture. 2) By whitening transformation, the correlation of the different features is equal to zero, alleviating information redundancy. 3) Zero-CL remains original information to a great extent after transformation, which improves the accuracy against other whitening transformation techniques. Extensive experimental results on CIFAR-10/100 and ImageNet show that Zero-CL outperforms or is on par with state-of-the-art symmetric contrastive learning methods.

heading: 1 INTRODUCTION
text: One of the current main bottlenecks in deep network training is the dependence on heavy annotated training data, and this motivates the recent surge of interests in unsupervised (Donahue & Simonyan, 2019) and self-supervised (Chen & He, 2021; Chen et al., 2020) methods. Specifically, in self-supervised representation learning (SSL), a network is pre-trained without any form of manual annotation, thus providing a means to extract information from unlabeled data sources (e.g., text corpora, videos, images from the Internet, etc.). In self-supervision, label-based information is replaced by a prediction problem using a certain context or using a pretext task. Pretext task in SSL can mainly be divided into three categories: 1) Generative based approaches (Donahue & Simonyan, 2019) learn to generate or otherwise model pixels in the input space. However, pixel-level generation is computationally expensive and may not be necessary for representation learning. 2) Contextual based methods (Vincent et al., 2008; Pathak et al., 2016; Ye et al., 2019) design pretext tasks (denoising auto-encoders (Vincent et al., 2008), context auto encoders (Zhang et al., 2016; 2017), etc). 3) Contrastive based methods (Chen et al., 2020; Grill et al., 2020; Caron et al., 2020; Asano et al., 2019) take augmented views of the same image as positive pair and others as negative pairs. Generally, one positive sample corresponds to lots of negative samples. In recent works, contrastive based methods have shown great promise, achieving state-of-the-art results in image classification (Chen et al., 2020), video classification (Han et al., 2020) and other downstream tasks (Chen & He, 2021).
However, trivial constant solutions (different samples get the same representation) is easily happening without the proper design of architecture and objective function. The well-known solutions to avoid this problem can be summarized into two parts: asymmetric model architecture and proper objective function. 1) Model architecture: MoCo (He et al., 2020), BYOL (Grill et al., 2020) update encoders separately and stopping gradient operation is adopted to avoid such problem. Then, BYOL and SimSiam (Chen & He, 2021) introduce a predictor module to avoid collapse, which is composed by MLP (Goodfellow et al., 2016). Current mainstream interpretation is using the predic-
tor to construct an asymmetric structure, which is useful to alleviate trivial solutions. 2) Objective function: SimCLR uses symmetric framework in contrastive learning. They prevent trivial solutions by using negative pairs and InfoNCE, where InfoNCE can be divided into an alignment term and a uniformity term (Arora et al., 2019). The uniformity term pulls different samples to a hyper-sphere uniformly, forcing obtaining different representations and avoiding trivial solutions. Recently, Barlow Twins (Zbontar et al., 2021) designs a new objective function from the information redundancy perspective, which also has two terms (an invariance term and a redundancy reduction term). The invariance term maximizes the correlation of the same feature across different views, and the redundancy term reduces information redundancy. However, for the symmetric framework, both SimCLR and Barlow Twins require square order complexity in objective functions, and the main complexity comes from the uniformity and redundancy term. In this paper, we propose two methods, named Zero-ICL and Zero-FCL, where Zero-ICL discards the uniformity term and only requires O(N) complexity by instance-wise whitening. Correspondingly, Zero-FCL discards the redundancy term by feature-wise whitening and only requires O(d) complexity. Our contributions are: 1) We propose a new contrastive learning framework to prevent trivial solutions, Zero-CL, which includes two parts, i.e., Zero-ICL (instance-wise) and Zero-FCL (feature-wise), either of which can work independently and only requires linear order complexity (objective function).
2) To our best knowledge, Zero-ICL is the first attempt of instance-wise whitening, which is conceptually comprehensible for preventing collapses in contrastive learning. Note that most previous methods (including other domains beyond vision) e.g. (Eldar & Oppenheim, 2003; Kessy et al., 2018) only use whitening transformation to reduce the information redundancy on feature-wise.
3) We give empirical analysis on the relationship between previous methods and our Zero-CL, where previous negative sample consuming methods (Zbontar et al., 2021; Chen et al., 2020) can be regarded as our method with Lagrangian transformation. Then, we theoretically introduce ZCA-based whitening from the maximal correlation (Kessy et al., 2018) perspective.
4) Experimental results on standard image benchmarks (CIFAR-10/100 and ImageNet-100/1k) show our method achieves new state-of-the-art results for symmetric contrastive learning compared with (Chen et al., 2020; Zbontar et al., 2021), especially for small hidden dimension and batch size.

heading: 2 RELATED WORK
text: We review recent contrastive learning works. We mainly divide the previous contrastive methods into feature-wise and instance-wise according to different contrastive dimensions. We particularly discuss the similarity and differences of some most related methods in Section 5 in detail.
instance-wise contrastive learning. instance-wise contrastive learning aims to attract positive pairs and repulse negative pairs (Chen et al., 2020; He et al., 2020), where each pair is composed of two instance views. One of the widely used objective functions in instance-wise learning is InfoNCE, and extensive experiments in (Oord et al., 2018) show that InfoNCE requires negative pairs to avoid trivial solutions. SimCLR (Chen et al., 2020) regards views augmented from different images in a mini-batch as negative pairs. However, SimCLR requires a large batch size to improve the accuracy, which is GPU intensive. To address this issue, MoCo (He et al., 2020) proposes storing negative samples in the memory bank and updates the bank by the first-in-first-out principle. MoCo further proposes two operations to prevent trivial solutions, i.e., momentum update key encoder and stop gradient. In recent works (Chen et al., 2020; Grill et al., 2020), the mainstream explanation of the two operations is they construct an asymmetric framework, which can avoid trivial solutions. Inspired by this, BYOL (Grill et al., 2020) adopts stop gradient operation and EMA algorithm to update target encoder. Further, BYOL introduces a predictor module to build a more asymmetric framework. Then, SimSiam (Chen & He, 2021) empirically shows that stop gradient and the predictor is the key component to avoid trivial solutions. Another approach to preventing such solutions is introduced in W-MSE (Ermolov et al., 2021). Different from previous works (Chen et al., 2020; Chen & He, 2021; He et al., 2020), W-MSE requires multiple augmented views to improve the accuracy. Besides, WMSE simply borrows Cholesky-based whitening transformation in SSL and the multi-view objective requires O(NM2) complexity, where M is the number of views. feature-wise contrastive learning. Different from instance-wise learning, feature-wise methods contrast on feature dimension. Barlow Twins (Zbontar et al., 2021) is the first feature-wise method, which pushes the cross-correlation matrix to identity matrix I. Its objective includes both invariance
term and redundancy reduction term, where the latter term can avoid trivial solutions. Inspired by Barlow Twins, VICReg (Bardes et al., 2021) proposes a new regularization term named invariancecovariance on feature dimension, and achieves similar results to Barlow Twins. However, both Barlow Twins and VICReg require large contrastive dimensions and the covariance regularization requires O(d2) complexity, which could be also regarded as requiring negative pairs on feature dimension (each negative pair is composed of features in different dimensions across images).
Whitening transformation. Whitening, or sphering, is a common pre-processing step to transform random variables to orthogonality. However, due to rotational freedom, there are infinitely many possible whitening procedures. There is a diverse range of sphering methods, e.g. principal component analysis (PCA) (Jégou & Chum, 2012), Cholesky matrix decomposition (Higham, 1990) and zero-phase component analysis (ZCA) (Bell & Sejnowski, 1997). Compared with other whitening methods, ZCA remains maximal correlation of original data, which we will clarify in Sec. 3.6.

heading: 3 THE PROPOSED ZERO-CL
text: In this section, we present the framework of Zero-CL in detail, starting with the whitening transformation procedure, followed by the model’s framework as well as the objective function. At last, we provide theoretical analysis on whitening from maximal correlation perspective.

heading: 3.1 WHITENING TRANSFORMATION
text: Given a set of images {x}Ni=1, we extract an embedding in contrastive space zi = g(f(xi, θ), γ) using an encoder network (He et al., 2016) f(·, θ) and a MLP module g(·, γ), where zi ∈ R1×d. Denote the set of embeddings as Z ∈ RN×d, whitening transformation can be formulated as:
H = (h1,h2, · · · ,hN ) = WZ> (1)
where H ∈ Rd×N is the whitened embedding matrix. The square matrix W ∈ Rd×d is the socalled whitening matrix. Since var(H) = I, it follows that WΣW = I and thus W(ΣW>W) = W, which is fulfilled if W satisfies W>W = Σ−1. However, the constraint does not uniquely determine the whitening matrix W. Specifically, for any Wrot = RW with orthogonal matrix, R will also be a whitening transformation matrix. Here we present ZCA whitening matrix in detail.
ZCA-based whitening takes E (stacks together eigenvectors of the covariance matrix) as the orthogonal matrix R. Then ZCA whitening matrix can be written as:
WZCA = EΛ−1/2E> (2)
By rotation matrix E, the whitened data will be as close as possible to original data (see Theorem 1). Note that in low-rank conditions, i.e., some eigenvalues equal to 0, a common approach is replacing Λ−1/2 with (Λ + λI)−1/2 to prevent zero division, where λ = 1e− 4 as default.

heading: 3.2 SYMMETRIC OBJECTIVE FUNCTION BACKGROUND
text: For instance-wise contrastive learning, to avoid trivial solutions in the symmetric framework, the objective function usually can be divided into alignment and uniformity terms (Arora et al., 2019).
We now review the loss formulated in SimCLR (Chen et al., 2020) as:
Linfo = E(x,x+)∼ppos [−f(x) >f(x+)/τ ]︸ ︷︷ ︸
alignment
+E (x,x+)∼ppos {x−
i }N i=1 ∼pdata
[ log(ef(x)>f(x
+)/τ + ∑ i ef(x) >f(x−i )/τ ) ] ︸ ︷︷ ︸
uniformity (3)
where τ is the temperature hyper-parameter. x+ and x− are positive and negative samples, respectively. The first term is the so-called alignment, which maximizes the similarity between positive pairs. The second term is the key to prevent trivial solution, pushing all the data points on a unit hyper-sphere uniformly. Then, we rewrite the feature-wise objective of Barlow Twins as:
LBT = ∑ i
(1−Cii)2︸ ︷︷ ︸ invariance
+λ ∑ i ∑ j 6=i
C2ij︸ ︷︷ ︸ redundancy reduction
(4)
where C ∈ Rd×d is the covariance matrix. The first term encourages correlation of the same feature across different views, while the second term minimizes correlation of different features. We can observe that the objective of both instance-wise and feature-wise methods requires square order calculation complexity, where the first term (alignment, invariance) requires linear order complexity and the second term (uniformity, redundancy reduction) requires square order complexity. We wonder if we can discard the second term, i.e., completely discard negative pairs.

heading: 3.3 INSTANCE-WISE AND FEATURE-WISE WHITENING
text: Inspired by W-MSE (Ermolov et al., 2021), we propose two efficient methods in SSL, which are named Zero-ICL and Zero-FCL. Zero-ICL can replace the uniformity term in Eq. 3, while ZeroFCL can replace the redundancy reduction term in Eq. 4.
Instance-wise whitening. Given a set of centered embeddings Z ∈ RN×d, different from traditional whitening methods, we calculate the affinity matrix by S = ZZ>, where S ∈ RN×N . Then the ZCA whitening matrix WI−ZCA can be calculated by:
WI−ZCA = EΛ −1/2 S E > (5)
where E ∈ RN×N stacks eigenvector of the affinity matrix and ΛS represents the diagonal variance matrix. One of the questions is how this transformation replaces the uniformity term. We denote the whitened embedding matrix as H, we have:
E [ HH> ] = E [ (EΛ
−1/2 S E TZ)(EΛ −1/2 S E
TZ)> ]
(6)
where E is a rotation orthogonal matrix, i.e., E>E = EE> = I. Thus, the result of Eq. 6 is I ∈ RN×N , which means embeddings of different samples are strictly orthogonal. Then, we can replace the second part in InfoNCE with instance-wise whitening transformation.
Feature-wise whitening. Similar to instance-wise whitening transformation, it is calculated by:
WF−ZCA = EΛ −1/2 C E > (7)
where C is the covariance matrix, ΛC and E ∈ Rd×d are the diagonal variance matrix and eigenmatrix of C, respectively. Denote whitened embedding matrix as H ∈ RN×d, we have E[H>H] = I, i.e., the correlation of the different features is equal to 0. Hence, redundancy reduction term in Eq. 4 can be replaced with feature-wise whitening transformation.

heading: 3.4 FRAMEWORK AND OBJECTIVE FUNCTION
text: Like other methods in SSL (Chen et al., 2020; Zbontar et al., 2021; Chen & He, 2021), given a batch {Xi}Ki=1 sampled from a dataset, we first augment data via a distribution of data augmentation T . We term the two views as XA and XB . The two batches are then fed to an encoder (He et al., 2016; Kipf & Welling, 2016) f(·, θ), producing batches of embeddings TA and TB . Then, a projector module g(·, γ) is used to map representation to contrastive space. The two batches of embeddings are then fed into projector g, producing ZA ∈ RK×d and ZB ∈ RK×d. Since whitening transformation requires centered vector, we use standard scaling method to each batch of embeddings. Note that to calculate instance-wise and feature-wise whitening transformation matrix, we must center embeddings on feature dimension and instance dimension, respectively. We denote feature-wise and instance-wise centered embeddings as ZFea and ZIns as follow:
Z A(B),Ins i,· = Z A(B) i − µi√ σ2i + 1 ≤ i ≤ d, ZA(B),Fea·,i = Z A(B) i − µi√ σ2i + 1 ≤ i ≤ K (8)
where Zi,· is the i-th vector in Z and Z·,i is the vector composed of each value at dimension i in all embeddings in Z. µ and σ are mean and variance of one vector. is set 1e-4 as default.
Instance-wise objective. Now we have two batches of instance-wise centered embeddings ZA,Ins and ZB,Ins. By Eq. 5, we can obtain instance-wise whitened embeddings HA,Ins and HB,Ins. Then, the instance-wise objective can be formulated as:
LIns = K∑ i
( 1−
∑ d HA,Insi,d ·H B,Ins i,d
)2 (9)
where Hi,d represents the d-th feature value of the i-th instance.
Feature-wise objective. Similar to Eq. 9, we can obtain feature-wise whitened embeddings HA,C−ZCA and HB,C−ZCA via Eq. 7. Then the feature-wise objective can be formulated as:
LFea = ∑ d
( 1−
K∑ i HA,Feai,d ·H B,Fea i,d
)2 (10)
where K denotes the batch size. The overall loss can be formulated as:
min θ,γ J = LIns + λ · LFea (11)
We set the hyper-parameter λ = 1 in this paper. Note that both two losses can work independently and we term LIns only as Zero-ICL (instance-wise) and LFea only as Zero-FCL (feature-wise).

heading: 3.5 EMPIRICAL ANALYSIS
text: Here for simplicity, we discuss feature-wise whitening. From the redundancy reduction perspective, high-quality self-supervised embeddings require that: 1) embeddings are in a non-trivial constant distribution, where trivial distribution means all the embeddings collapse to a single point; 2) positive image pairs share similar semantics; and 3) correlation of the different feature should be zero. Considering feature-wise SSL, for simplicity, denote i-th feature in Z as Z·,i, where Z ∈ RN×d and Z·,i ∈ RN×1, we can formulate this problem as follows:
min θ,γ
E [ dist(ZA·,i,Z B ·,i) ] s.t. cov(ZA) = cov(ZB) = I (12)
where dist(·, ·) can be quantified as any similarity metric. To solve the conditional optimization problem, previous works (Zhang et al., 2021a; Zbontar et al., 2021) transform the hard condition to soft condition via the Lagrangian multiplier. The objective becomes:
min θ,γ
E [ dist(ZA·,i,Z B ·,i) ] + λ · ( ‖(ZA)>ZA − I‖2 + ‖(ZB)>ZB − I‖2 ) (13)
However, the second term of the above objective function requires square order complexity. Hence, we propose another approach to solve this hard conditional optimization problem, i.e., whitening transform the representations before calculating loss. Then the objective of Eq. 12 is equal to
min θ,γ
E [ dist(HA·,i,H B ·,i) ]
(14)
where H is the whitened embeddings. Finally, our objective only usesO(d) complexity to solve the conditional problem, which is similar to the instance-wise branch.

heading: 3.6 THEORETICAL ANALYSIS ON WHITENING
text: By Eq. 1, for any Wrot = RW, which satisfies R>R = I, Wrot can be a whitening matrix. For SSL, whitening transformation aims to make different instances or features orthogonal, and also remains as much original information as possible. The problem can be formulated as:
min R
E[(H− Z)>(H− Z)] s.t. H>H = I, R>R = I, W>W = Σ−1 (15)
where R, Σ are the rotation matrix and covariance matrix. Z and H are embeddings before and after whitening, respectively. Since H and Z are two centered scaling matrices, we can rewrite the constraint as follows, and thus minimizing the variance between whitened data and original data equals to maximizing the second term:
E [ (H− Z)>(H− Z) ] = 2I− 2tr ( REΛ−1/2E> ) (16)
Theorem 1 Maximization of tr(REΛ−1/2E>) uniquely determines the rotation matrix R to be the identity matrix I.
Proof 1 Since Λ is a diagonal matrix, we can write Eq. 16 as: tr(REΛ−1/2E>) = tr(Λ−1/2E>RE) = ∑ i Λ −1/2 ii Aii (17)
where A = E>RE. Since R and E are both orthogonal, A is also an orthogonal matrix. So we have Aii ≤ 1. Note that E is a rotation matrix, i.e., E>E = I. Thus, if and only if R = I, we can obtain the maximum of Eq. 17. Then, we can complete the proof.

heading: 4 EXPERIMENTS
text: We use the following datasets. The implementation and protocol details are given in Appendix.
1) CIFAR-10 and CIFAR-100 (Krizhevsky et al., 2009), two small-scale datasets, are composed of 32 × 32 images with 10 and 100 classes, respectively.
2) ImageNet-100 and ImageNet-1k (Deng et al., 2009) sets include 100 and 1k classes, respectively. The datasets are well-balanced in class distribution and the images contain an iconic view of objects, which are the commonly used benchmark in SSL (Zbontar et al., 2021).
Main comparison. We mainly conduct experiments on CIFAR-10/100 and ImageNet-100/1k datasets. For fair comparison, we set batch size as 128 on ImageNet-100, 1024 on ImageNet-1k, and 256 on CIFAR-10/100. Table 1 and 2 show the best results on different datasets across different methods, where our method outperforms most of the prior arts with symmetric architecture and less complexity. We modify our code based on Barlow Twins, and the reported results are strictly followed official code in this site1. Note that on CIFAR-10 and CIFAR-100 datasets, we remove the first maxpool layer and modify the first convolutional layer with kernel size 3 and strides 1 in ResNet-18, which are commonly used tricks in low-resolution datasets (Chen et al., 2020). The MLP
1https://github.com/facebookresearch/barlowtwins
(Projector) in our methods is quantified as three linear layers with two BNs (Ioffe & Szegedy, 2015) and ReLU activation function. Table 2 shows the results on CIFAR and ImageNet-100 datasets. We compare our Zero-FCL with Barlow Twins with the same hidden dimension. With 256 hidden dimension, Zero-FCL outperforms Barlow Twins by 8.89% and 8.46% in top-1 accuracy on CIFAR-100 and ImageNet-100, respectively. For hidden dimension 2048, Zero-FCL outperforms Barlow Twins 1.07% and 0.7% top-1 accuracy on CIFAR-100 and ImageNet-100 datasets. Note that although Zero-ICL is an instance-wise method and the batch size is set only 128 or 256, Zero-ICL still gets 69.33% top-1 accuracy on CIFAR-100, which is 3.94% higher than SimCLR.
Convergence rate. Many experiments (Gutmann & Hyvärinen, 2010; Chen et al., 2020) have shown that contrasting on high dimension sphere converge faster than low dimension sphere. Hence, to explore if our methods can converge fast on a low contrastive dimension, we conduct extensive experiments with 100 and 1000 epochs on CIFAR-10 dataset. For fair comparisons, we choose two symmetric methods, i.e., SimCLR (instance-wise) and Barlow Twins (feature-wise) as baselines. Table 3 illustrates our method outperforms the mentioned two methods. Specifically, Zero-FCL outperforms Barlow Twins and SimCLR by a large range (4.36%, 6.63% top-1 accuracy) with 100 epochs, while the improvement decreases after 1000 epochs. We conjecture the reason may be that
Barlow Twins and SimCLR have two terms to optimize, where the first term is the key to learn good embeddings (Arora et al., 2019), and the second term (uniformity or redundancy reduction) is the key to prevent trivial solutions. However, the second term is hard to converge (Wang & Isola, 2020). In contrast, our methods exactly discard the second term via whitening transformation. Thus, our method converges at a faster speed. We also report the results of different whitening transformation methods, i.e., Cholesky and ZCA. We find that for instance-wise contrastive learning, Choleskybased decomposition gets much lower accuracy scores rather than the ZCA-based method. For feature-wise contrastive learning, Cholesky gets a slightly lower accuracy than ZCA-based. We conjecture this is because ZCA-based whitening remains maximal information of original data (see Theorem 1), which is important for instance-wise learning (slight rotation on instance dimension will heavily influence linear evaluation), while for feature-wise learning, when the features are permuted or rotated, it may not cause serious influence for linear evaluation (Mitra et al., 2002). Sensitivities to batch size. To explore our method’s sensitiveness to batch size, we conduct experiments with different batch sizes from 32∼ 1024. For a fair comparison, each method with a different batch size is trained with 50K iterations. Fig. 3(c) shows the results on CIFAR-100. We can observe SimCLR and Zero-ICL get lower accuracy when batch size is small and this phenomenon is not surprising since instance-wise contrastive learning methods usually require a large batch size to create negative pairs (SimCLR) or exact statistics (Zero-ICL). Another observation is the accuracy of Zero-FCL saturates when BatchSize = 256, which is consistent with the results in (Zbontar et al., 2021). Note that under 1024 batch size, Zero-ICL outperforms SimCLR by about 3.1% top-1 accuracy and Zero-FCL outperforms Barlow Twins 3.8% top-1 accuracy. We guess that’s because of the diagonal property of whitened embeddings, which makes our methods robust to batch size. Sensitivities to hidden dimensions. We also explore the sensitivity of our method to hidden dimensions, which are set from 32 ∼ 4096. Note that the three linear layers in projection MLP g are set as the same input and output dimension. For feature-wise methods (Barlow Twins, Zero-FCL), the batch size is set as 256 (best hyper-parameter in Fig. 3(c)). For instance-wise methods (SimCLR, Zero-ICL), we set batch size as 1024. All the results are get by 50K iterations. Fig. 3(a) shows classification accuracy with different hidden dimensions. For Barlow Twins and Zero-FCL, both two methods are heavily influenced by hidden dimensions and Zero-FCL outperforms Barlow Twins under all hidden dimensions settings. Oppositely, because the objective functions of SimCLR and Zero-ICL are instance wise, making them more robust to hidden dimensions than Barlow Twins. Ablation to negatives. To show Zero-CL is indeed a negative-free method, we conduct an ablation study w/ and w/o negative samples and compare our methods with SimCLR, Barlow Twins. For our methods w/ negatives, we add the off-diag entry of cross-correlation matrix in our objective function, which is followed Barlow Twins (Zbontar et al., 2021). Table 4 shows results of four symmetric methods w/ and w/o negatives pairs. Performance of Barlow Twins significantly decreases and SimCLR directly crashes w/o negative pairs. Zero-FCL and Zero-ICL do not require negatives and perform the best without negatives. After adding negatives, both Zero-ICL and Zero-FCL lose some accuracy. We analyze that is because whitening transformation can be regarded as a constraint, while using negatives in the objective function is also a constraint. Such two constraints will trade off the weight of alignment part (Arora et al., 2019), where the alignment part is the key to learn representations in contrastive learning (Grill et al., 2020; Wang & Isola, 2020). Thus, the accuracy of Zero-ICL and Zero-FCL w/ negatives is lower than those w/o negatives. Breaking Symmetry. In line with Barlow Twins (Zbontar et al., 2021), we conduct extensive experiments with different asymmetric methods, i.e., stop-gradient and predictor. For Zero-ICL, the objective only has an alignment part, which has been shown easily to collapse without the asym-
metric framework (Grill et al., 2020; Chen & He, 2021), while the proposed instance whitening can solve this problem well. Table 5 gives classification accuracy on ImageNet-100 with ResNet-18 backbone. In our experiments, the predictor module is composed of two linear layers with batch normalization. Similar to Barlow Twins, we find these asymmetries slightly decrease the performance of our network. For stop gradient, it is easy to understand the accuracy dropping, i.e., without considering collapse, the information provided by two views will be more precise than single view (Caron et al., 2020; Ermolov et al., 2021), while for predictor, we guess that’s because overfitting by the non-linear transformation power of deep MLP (Goodfellow et al., 2016).

heading: 5 FURTHER DISCUSSION
text: We further compare our work with some existing decorrelation methods and highlight our differences to better elaborate on the contributions and discuss the broad impacts. Relation to CCA-SSG (Zhang et al., 2021a). Inspired by classical Canonical Correlation Analysis, CCA-SSG proposes a new loss function for graph data learning, which is similar to Barlow Twins.
LCCA = ‖ZA − ZB‖2︸ ︷︷ ︸ invariance +λ ‖(ZA)>ZA − I‖2 + ‖(ZB)>ZB − I‖2︸ ︷︷ ︸ decorrelation  (18) where the first term is similar to LBT . However, the decorrelation term of LCCA aims to minimize the intra-correlation of different features, while the redundancy term of LBT minimizes cross-correlation of different features. Our feature-wise whitening with LFea only requires the invariance term of CCA-SSG or Barlow Twins, while the other term of LCCA is replaced by intra-feature-wise whitening, i.e., whitening transformation is conducted inside each batch view. Inspired by Barlow Twins, We expect out method can perform whitening transformation across two batch views, which we leave for future work.
Method SG Pred. Top-1 Top-5
Zero-FCL % % 79.32 94.94 % " 76.57 94.18 " % 77.81 94.22 " " 74.81 92.81
Zero-ICL % % 78.02 94.11 % " 75.12 93.18 " % 74.87 92.72 " " 72.19 91.95
jective function with feature-wise whitening, which is meaningful and more comprehensible. Such methods also leverage the performance (See Table 2). 2) Technology. Instead of directly using Cholesky or PCA-based whitening, we first analyze which whitening transformation method is we really need. Then, we theoretically analyze why ZCA whitening can remain maximal information. 3) SSL settings. W-MSE requires multiple views to boost the accuracy (the version with two views gets much lower accuracy), while Zero-CL can get higher accuracy with only two views.

heading: 6 CONCLUSION
text: We have proposed two new methods to prevent degenerate solutions in the symmetric architecture of SSL. We first analyze existing objective functions in SSL (LInfo, LBT and LCCA). Then, we show why Zero-FCL and Zero-ICL can replace the uniformity term of LInfo and redundancy term of LBT , respectively. We further give theoretical analysis on how ZCA based whitening remains maximal information rather than other whitening transformation methods. Finally, we conduct experiments on three image benchmarks and results show that our methods can outperform or be on par with prior arts. Further, to the best of our knowledge, Zero-ICL is the first attempt for instance-wise whitening and we hope it can bring more inspiration to other tasks.

heading: A APPENDIX
text: A.1 IMPLEMENTATION IN VISION Image augmentations. Each input image is transformed twice to generate two different views mentioned before. The image augmentation pipeline follows Barlow Twins (Zbontar et al., 2021), composed of: random cropping, resizing to 224 × 224 (32 × 32 for CIFAR), horizontal flipping, color jittering, converting to gray-scale, Gaussian blurring, and solarization. The last five are applied randomly on two views with different probabilities.
Architecture. Followed by recent works (Chen et al., 2020; Zbontar et al., 2021), the encoder consists of ResNet-50 and ResNet-18 (He et al., 2016) (without the final classification layer, 2048, 512 output units, respectively) followed by a MLP module. In line with Barlow Twins (Zbontar et al., 2021), the MLP module contains three linear layers, each with the same output units. The first two layers of the MLP are followed by a BatchNorm layer (Ioffe & Szegedy, 2015).
Optimization. Similar to previous works (Grill et al., 2020; Zbontar et al., 2021), we use the LARS optimizer (You et al., 2017) on both three image datasets. We use a learning rate of 0.2 for the weights and 0.005 for the biases and batch normalization parameters. We multiply the learning rate by batch size and divide it by 256. We use a learning rate warm-up period of the first 10 epochs, after which we reduce the learning rate by a factor of 1000 using a cosine decay scheduler (Loshchilov & Hutter, 2016). For CIFAR-10 and CIFAR-100, we use single 1080 GPU. For ImageNet-100, the batch size is set as 128 as default, and we use 8 Tesla V100 16G GPUs. For ImageNet, we use 64 1080Ti GPUs.
Evaluation. We train a linear classifier on three vision datasets on top of fixed representations of ResNets pre-trained by Zero-CL. Specifically, the linear classifier is trained for 100 epochs with a learning rate of 0.3 and a cosine learning rate scheduler. We minimize the cross-entropy loss with SGD optimizer with momentum 0.9 and weight decay 1e-6. In line with previous arts (Zbontar et al., 2021; Chen et al., 2020), we set batch size 256. At the inference stage, we resize the image to 256 × 256 and center crop it to a size of 224 × 224.

Review summaries:
This paper presents a new self-supervised learning objective that aims to further adapt the previous decorrelation-based [1] contrastive learning method [Bardes, 2021], which largely alleviates the trivial solutions in SSL. Compared with prior arts, the proposed Zero-ICL/FCL are constructed from mainly the aspects of instance and feature-wise. In particular, Zero-CL requires no negative samples; feature-wise FCL discards the redundancy term by feature-wise whitening, and the proposed ICL prevents the collapse of contrastive learning effectively. Quantitative evaluations validate that Zero-CL leads to on-par performances with previous state-of-the-art results.  

The paper is concerned with preventing the model collapse in the self-supervised learning scenario using contrastive losses. The main addition is an adaptation to the existing formulations that performs instance or feature whitening, avoiding the use of negative examples than can be expensive to store and to compute the similarity. Experiments on the selected datasets show that the method generally matches the current top-performing methods.

This paper addresses the collapse problem during self-supervised contrastive learning. ICL and FCL methods are proposed to decorrelate instances and features. Zero-Contrastive Learning can discard negative pairs with advantages in negative free, reducing correlation of different features to zero and retaining information during transformation. Promising experimental results are demonstrated on CIFAR and ImageNet.