MAGMA: Manifold Regularization for MAEs
Alin Dondera, Anuj Singh, Hadi Jamali-Rad
TL;DR
MAGMA addresses the lack of regularization in transformer-based Masked Autoencoders by introducing a batch-wide, layer-wise manifold regularization that enforces cross-layer representational consistency. Formulated as $L = L_{SSL} + \lambda L_{Reg}$ with $L_{Reg}$ computed via a normalized Laplacian of a batch-wide RBF affinity on a reference layer, MAGMA pulls together target-layer representations when they are similar in the reference layer but divergent in the target layer. Empirically, MAGMA yields significant gains on MAE and U-MAE across CIFAR-100, STL-10, Tiny-ImageNet, and ImageNet-100, and provides improvements to other SSL baselines like SimCLR and VICReg, supported by training-dynamics analyses and qualitative visualizations. The approach is efficient, scalable, and broadly applicable to SSL with Transformer backbones, offering a practical path to stronger self-supervised representations with minimal architectural changes.
Abstract
Masked Autoencoders (MAEs) are an important divide in self-supervised learning (SSL) due to their independence from augmentation techniques for generating positive (and/or negative) pairs as in contrastive frameworks. Their masking and reconstruction strategy also nicely aligns with SSL approaches in natural language processing. Most MAEs are built upon Transformer-based architectures where visual features are not regularized as opposed to their convolutional neural network (CNN) based counterparts, which can potentially hinder their performance. To address this, we introduce MAGMA, a novel batch-wide layer-wise regularization loss applied to representations of different Transformer layers. We demonstrate that by plugging in the proposed regularization loss, one can significantly improve the performance of MAE-based models. We further demonstrate the impact of the proposed loss on optimizing other generic SSL approaches (such as VICReg and SimCLR), broadening the impact of the proposed approach. Our code base can be found at https://github.com/adondera/magma.
