arXiv:2609.06460cs.LGSep 2026

Manuscript Offprint

arXiv:2609.06460

A Theoretical Framework for Masked Pretraining (MPT)

Qi Zhang, Runyu Zhou, Yifei Wang, Yisen Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Recently, Masked Pretraining (MPT) based on reconstruction pretraining tasks has risen to a promising self-supervised learning paradigm across various domains and achieves remarkable performance in multiple downstream tasks. However, the theoretical understanding of the working mechanism behind MPT is still limited. In this paper, we introduce a new theoretical framework to analyze MPT and understand the crucial role of masking in extracting meaningful representations. We establish theoretical connections between MPT and another popular self-supervised paradigm: contrastive learning. We prove that the masking technique implicitly creates positive pairs that are semantically similar and the reconstruction loss pulls them together in the feature space. Besides, as a result of the implicit alignment, we point out the dimensional collapse issue of MPT and propose a Uniformity-enhanced MPT (U-MPT) loss that can effectively address this issue and bring significant improvements in downstream tasks including linear evaluation, cross-dataset fine-tuning and out-of-distribution generalization on real-world data sets. Furthermore, we establish downstream guarantees of U-MPT and theoretically analyze the influence of masking strategies. Based on the theoretical analysis, we propose a new masking strategy which enhances the downstream performance of MPT and explains current improvements of masking strategies with our theoretical perspective.

Keywords: masked pretraining, dimensional collapse, masking strategy, representation learning theory

1 Introduction

In recent years, self-supervised learning (SSL) has emerged as a promising paradigm for learning meaningful representations without the need for labeled data. SSL methods can be broadly categorized into two types: contrastive pretraining and masked pretraining. Contrastive pretraining methods (Chen et al., 2020a; He et al., 2020) apply data augmentation on natural samples and train neural networks by aligning different augmented views

*. Equal Contribution

†. Corresponding Author

©2026 Qi Zhang, Runyu Zhou, Yifei Wang and Yisen Wang.

License: CC-BY 4.0, see https://creativecommons.org/licenses/by/4.0/. Attribution requirements are provided at http://jmlr.org/papers/v27/25-0477.html.

of the same sample in the feature space. On the other hand, masked pretraining methods (Devlin et al., 2019; He et al., 2022) apply masks to samples and predict the masked portions based on the unmasked views. Although contrastive and masked pretraining differ in their objectives, both approaches have demonstrated impressive performance across various domains, including vision (He et al., 2022; Chen et al., 2020a), language (Devlin et al., 2019; Zhang et al., 2022b), and multi-modal tasks (Radford et al., 2021; Khan and Fu, 2021; Zhang et al., 2023).

Due to the remarkable empirical success of self-supervised learning, researchers try to theoretically analyze the working mechanism behind these paradigms. Various theoretical frameworks have been proposed to analyze contrastive pretraining from different perspectives. For example, Saunshi et al. (2019) establish the connection between the pretraining contrastive objective and downstream classification error. HaoChen et al. (2021) observe that the contrastive loss is equal to a matrix decomposition objective, and Hjelm et al. (2019) understand the contrastive pretraining process with the information theory. However, the theoretical analysis of masked pretraining is still relatively underexplored.

In this paper, we introduce a new theoretical framework for masked pretraining (MPT). Taking the representative masked pretraining method Masked Autoencoder (MAE) (He et al., 2022) as an example, we note that there are two core components: autoencoders and masking. As vanilla autoencoders exhibit much inferior performance than contrastive paradigms (Chen et al., 2020a), there exists a common belief that masking is the key factor for the success of MPT. To understand the role of masking in MPT, we first establish a close connection between contrastive and masked pretraining. Specifically, we prove that the masking technique creates implicit positive pairs that are semantically similar and the reconstruction loss pulls these positive pairs together. In contrastive pretraining, merely aligning positive pairs can lead to feature collapse, as the alignment loss can be minimized by mapping different inputs to a constant value. Given the connection between contrastive and masked pretraining, we wonder whether MPT also faces this collapse issue. Our findings show that while MPT avoids the trivial constant solution, it still suffers from dimensional collapse, where the effective dimensions of the learned representations are quite limited. To address this problem, we draw inspiration from contrastive learning and add a uniformity regularizer into the MPT objective. Specifically, we propose Uniformity-enhanced MPT (U-MPT), which calculates the feature similarity between independent samples and encourages them to be pushed apart. Empirically, we observe that U-MPT effectively resolves the dimensional collapse and significantly boosts MPT performance on downstream linear evaluation, cross-dataset fine-tuning and out-of-distribution generalization tasks.

Built on the connection between contrastive pretraining and masked pretraining, we then establish theoretical guarantees for U-MPT's downstream generalization performance. Our theoretical bounds demonstrate that the generalization performance of MPT is decided by two factors: first, the unmasked views should preserve the core semantics of natural samples (like label information), and second, semantically similar unmasked views should be selected as an implicit positive pair. With a toy model, we prove that a lower mask ratio helps the unmasked views retain label information while a higher mask ratio increases the probability that semantically similar unmasked views are selected as implicit positive pairs. This introduces a trade-off in selecting the optimal mask ratio. Based on this insight, we propose a surrogate metric to estimate downstream guarantees on real-world data sets, and we confirm that it can reliably estimate the optimal mask ratio in practice (75%). Furthermore, with the theoretical analysis of masking operation in MPT, we propose an improved masking strategy, which exhibits better downstream classification performance than random masking. Meanwhile, we observe that many of the recent advancements in masking strategies and objective designs can be analyzed and explained through our theoretical framework, which further verifies the generality of our proposed analysis. The contents of the paper are organized as follows:

  • In Section 2, we summarize the related work of understanding self-supervised learning and further introduce the mathematical problem setup in Section 3.

  • In Section 4, we establish theoretical connections between masked pretraining and contrastive pretraining, showing that the masking operation implicitly creates positive pairs that are semantically similar and the reconstruction objectives align them in the feature space.

  • In Section 5, we propose the uniformity-enhanced MPT (U-MPT) objective, which alleviates the dimensional collapse issue in MPT and significantly improves the downstream performance of MPT in downstream tasks including linear evaluation, cross-dataset fine-tuning, and out-of-distribution generalization on real-world data sets.

  • In Section 6, we establish theoretical guarantees on the downstream performance of MPT. With a toy model, we theoretically analyze the influence of mask ratio on the downstream error of MPT. Furthermore, we propose a metric to estimate MPT's downstream performance, which accurately predicts the optimal mask ratio.

  • In Section 7, we improve the masking strategy in MPT based on our theoretical analysis. Besides, we also find that many of the current improvements can be explained with our theoretical framework.

Remark. A preliminary work was published at NeurIPS 2022 as a Spotlight paper (Zhang et al., 2022a), while we add substantially new results, both theoretically and empirically, in this manuscript, aiming to provide a more comprehensive and in-depth analysis of the generalization property of masked pretraining. Specifically, we add the following key results:

  • In Sections 3 and 4, we incorporate cross-entropy (CE) loss-based MPT methods into our theoretical framework alongside the reconstruction loss-based approaches, thereby enhancing the comprehensiveness of our analysis.

  • In Section 5, we verify our proposed U-MPT objectives in more downstream scenarios, including cross-dataset fine-tuning and out-of-distribution generalization, which further verify the effectiveness and advantages of U-MPT.

  • In Section 6, we theoretically analyze the influence of mask ratio on downstream guarantees with a toy model. We also propose a new metric to estimate the theoretical bounds.

  • In Section 7, we propose new masking and reconstruction strategies based on our theoretical analysis. Besides, we explain the current improvements of MPT with our theoretical framework.

References (59)