A Unified Masked Jigsaw Puzzle Framework for Vision and Language Models
In federated learning, Transformer, as a popular architecture, faces critical challenges in defending against gradient attacks and improving model performance in both Computer Vision (CV) and Natural Language Processing (NLP) tasks. It has been revealed that the gradient of Position Embeddings (PEs) in Transformer contains sufficient information, which can be used to reconstruct the input data. To mitigate this issue, we introduce a Masked Jigsaw Puzzle (MJP) framework. MJP starts with random token shuffling to break the token order, and then a learnable unknown (unk) position embedding is used to mask out the PEs of the shuffled tokens. In this manner, the local spatial information which is encoded in the position embeddings is disrupted, and the models are forced to learn feature representations that are less reliant on the local spatial information. Notably, with the careful use of MJP, we can not only improve models' robustness against gradient attacks, but also boost their performance in both vision and text application scenarios, such as classification for images (e.g., ImageNet-1 K) and sentiment analysis for text (e.g., Yelp and Amazon). Experimental results suggest that MJP is a unified framework for different Transformer-based models in both vision and language tasks.
Authors
- Nicu Sebe (ORCID: https://orcid.org/0000-0002-6597-7248)
- Rita Cucchiara (ORCID: https://orcid.org/0000-0002-2239-283X)
- Weixin Ye
- Yue Song (ORCID: https://orcid.org/0000-0003-1573-5643)
- Yahui Liu (ORCID: https://orcid.org/0000-0003-4398-8867)
- Wei Bi (ORCID: https://orcid.org/0000-0001-8457-0630)
- Bin Ren (ORCID: https://orcid.org/0000-0002-9790-1504)
- Wei Wang
Institutions
- University of Modena and Reggio Emilia (IT)
- California Institute of Technology (US)
- University of Trento (IT)
- Hong Kong University of Science and Technology (HK)
- Beijing Jiaotong University (CN)
Publication Details
- Journal
- IEEE Transactions on Pattern Analysis and Machine Intelligence
- Published
- 2025-10-14
- DOI
- https://doi.org/10.1109/tpami.2025.3621246
- Primary Topic
- Image Processing and 3D Reconstruction
- Type
- article
- Field-Weighted Citation Impact
- 0.00