[Paper Review] Guarding Barlow Twins Against Overfitting with Mixed Samples
This paper proposes Mixed Barlow Twins, a regularization method that mitigates overfitting in the Barlow Twins self-supervised learning framework by applying MixUp data augmentation in the input space, inducing linear interpolation in feature space. The method improves downstream performance on CIFAR-10, CIFAR-100, TinyImageNet, STL-10, and ImageNet by reducing representation overfitting and enhancing generalization through an additional regularization loss based on cross-correlation alignment of mixed samples.
Self-supervised Learning (SSL) aims to learn transferable feature representations for downstream applications without relying on labeled data. The Barlow Twins algorithm, renowned for its widespread adoption and straightforward implementation compared to its counterparts like contrastive learning methods, minimizes feature redundancy while maximizing invariance to common corruptions. Optimizing for the above objective forces the network to learn useful representations, while avoiding noisy or constant features, resulting in improved downstream task performance with limited adaptation. Despite Barlow Twins' proven effectiveness in pre-training, the underlying SSL objective can inadvertently cause feature overfitting due to the lack of strong interaction between the samples unlike the contrastive learning approaches. From our experiments, we observe that optimizing for the Barlow Twins objective doesn't necessarily guarantee sustained improvements in representation quality beyond a certain pre-training phase, and can potentially degrade downstream performance on some datasets. To address this challenge, we introduce Mixed Barlow Twins, which aims to improve sample interaction during Barlow Twins training via linearly interpolated samples. This results in an additional regularization term to the original Barlow Twins objective, assuming linear interpolation in the input space translates to linearly interpolated features in the feature space. Pre-training with this regularization effectively mitigates feature overfitting and further enhances the downstream performance on CIFAR-10, CIFAR-100, TinyImageNet, STL-10, and ImageNet datasets. The code and checkpoints are available at: https://github.com/wgcban/mix-bt.git
Motivation & Objective
- To address the issue of feature overfitting in Barlow Twins, which degrades downstream performance despite strong pre-training.
- To investigate whether MixUp regularization—commonly used in supervised learning—can be effectively adapted to non-contrastive, InfoMax-based SSL methods like Barlow Twins.
- To enhance sample interaction and representation generalization in Barlow Twins by introducing a linear interpolation-based regularization term in the feature space.
- To empirically validate the effectiveness of the proposed method across diverse datasets and backbone architectures.
- To provide a minimal-code extension to Barlow Twins that achieves consistent performance gains with minimal hyperparameter tuning.
Proposed method
- The method introduces a MixUp-based regularization loss that assumes linear interpolation in the input space leads to linear interpolation in the feature space.
- For each batch, two random samples are mixed using a beta-distributed mixing coefficient α, generating a mixed input y_m = α * y_a + (1 - α) * y_b.
- The network produces embeddings z_m for the mixed sample, and the cross-correlation matrices of z_m with the original views z_a and z_b are computed.
- A ground-truth cross-correlation matrix is constructed as a weighted average of the original cross-correlations, assuming linear interpolation in feature space.
- The regularization loss is defined as the L2 distance between the predicted and ground-truth cross-correlation matrices, added to the original Barlow Twins loss.
- The method requires only minor code changes to the standard Barlow Twins implementation, primarily adding the MixUp forward pass and the additional loss term.
![Figure 1 : Assessing the representation quality via $k$ -NN accuracy on the test-set during SSL training on train-set for information maximization-based Barlow Twins [ 74 ] vs. contrastive learning-based SimCLR [ 14 ] , on CIFAR-10 [ 42 ] dataset.](https://ar5iv.labs.arxiv.org/html/2312.02151/assets/figs/bt-vs-simclr.png)
Experimental results
Research questions
- RQ1Does the Barlow Twins objective suffer from overfitting during pre-training, particularly as embedding dimensionality increases?
- RQ2Can MixUp regularization, typically used in supervised learning, be effectively adapted to non-contrastive, InfoMax-based self-supervised learning?
- RQ3Does inducing linear interpolation in the input space lead to improved feature generalization and reduced overfitting in Barlow Twins?
- RQ4What hyperparameter configurations yield optimal performance across diverse datasets like CIFAR-10, ImageNet, and TinyImageNet?
- RQ5Does the proposed Mixed Barlow Twins method consistently improve downstream k-NN and linear probing accuracy across multiple benchmarks?
Key findings
- On CIFAR-10 and CIFAR-100, Mixed Barlow Twins achieves a 0.9% absolute improvement in k-NN accuracy over standard Barlow Twins when using ResNet-18 and a projector dimension of 1,024.
- On TinyImageNet, the method improves k-NN accuracy by 1.2% compared to the baseline, with optimal performance at a projector dimension of 1,024 and λ_reg = 4.0.
- On STL-10, Mixed Barlow Twins achieves a 1.0% improvement in k-NN accuracy, with λ_reg = 2.0 yielding the best results.
- On ImageNet, the method improves linear probing accuracy by 0.8% over the original Barlow Twins, with λ_reg = 1.0 and a projector dimension of 8192.
- The method consistently prevents performance degradation in later training epochs, which is observed in standard Barlow Twins on smaller datasets.
- The optimal projector dimension across all datasets is 1,024, with λ_BT set to 1/d or 0.0078125 depending on the dataset.
![Figure 2 : Schematic of the proposed Mixed Barlow Twins. (a) Original Barlow Twins Algorithm [ 74 ] . (b) Proposed MixUp regularization technique to prevent Barlow Twins from overfitting and to further enhance the representation quality.](https://ar5iv.labs.arxiv.org/html/2312.02151/assets/x1.png)
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.