Learning to Mask and Permute Visual Tokens for Vision Transformer Pre-Training
Lorenzo Baraldi, Roberto Amoroso, Marcella Cornia, Lorenzo Baraldi, Andrea Pilzer, Rita Cucchiara
TL;DR
The paper tackles the challenge of noisy input and weak cross-phase alignment in Masked Image Modeling for Vision Transformers. It proposes MaPeT, a masked-and-permuted pre-training framework that uses a two-stream attention mechanism and position-aware masked tokens to capture intra-patch dependencies while preserving access to full patch sequences. A key contribution is the k-CLIP tokenizer, which discretizes CLIP features into 8192 tokens to provide semantically rich supervision without dataset-specific autoencoders. Empirical results on ImageNet-1k and ADE20K demonstrate competitive or superior performance to existing self-supervised methods under fair settings, highlighting the practical impact of improved pre-training objectives and tokenization strategies. The work also includes extensive analyses of tokenizer quality and cross-domain transfer, underscoring MaPeT’s potential for robust, generalizable representations in vision tasks.
Abstract
The use of self-supervised pre-training has emerged as a promising approach to enhance the performance of many different visual tasks. In this context, recent approaches have employed the Masked Image Modeling paradigm, which pre-trains a backbone by reconstructing visual tokens associated with randomly masked image patches. This masking approach, however, introduces noise into the input data during pre-training, leading to discrepancies that can impair performance during the fine-tuning phase. Furthermore, input masking neglects the dependencies between corrupted patches, increasing the inconsistencies observed in downstream fine-tuning tasks. To overcome these issues, we propose a new self-supervised pre-training approach, named Masked and Permuted Vision Transformer (MaPeT), that employs autoregressive and permuted predictions to capture intra-patch dependencies. In addition, MaPeT employs auxiliary positional information to reduce the disparity between the pre-training and fine-tuning phases. In our experiments, we employ a fair setting to ensure reliable and meaningful comparisons and conduct investigations on multiple visual tokenizers, including our proposed $k$-CLIP which directly employs discretized CLIP features. Our results demonstrate that MaPeT achieves competitive performance on ImageNet, compared to baselines and competitors under the same model setting. We release an implementation of our code and models at https://github.com/aimagelab/MaPeT.
