M2T: Masking Transformers Twice for Faster Decoding
Fabian Mentzer, Eirikur Agustsson, Michael Tschannen
Abstract
We show how bidirectional transformers trained for masked token prediction can be applied to neural image compression to achieve state-of-the-art results. Such models were previously used for image generation by progressivly sampling groups of masked tokens according to uncertainty-adaptive schedules. Unlike these works, we demonstrate that predefined, deterministic schedules perform as well or better for image compression. This insight allows us to use masked attention during training in addition to masked inputs, and activation caching during inference, to significantly speed up our models (≈4× higher inference speed) at a small increase in bitrate.1
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0c0478de-7c35-499e-ad85-2f9bd098681bCited by top-tier papers6
- Causal Context Adjustment Loss for Learned Image CompressionMinghao Han, Shiyin Jiang, Shengxi Li, Xin Deng et al.NeurIPS 2024 · 31 citations
- Learned Image Compression with Hierarchical Progressive Context ModelingYuqi Li, Haotian Zhang, Li Li, Dong LiuICCV 2025 · 8 citations
- Differentiable Vector Quantization for Rate-Distortion Optimization of Generative Image CompressionShiyin Jiang, Wei Long, Minghao Han, Zhenghao Chen et al.CVPR 2026 · 3 citations
- Context Guided Transformer Entropy Modeling for Video CompressionJunlong Tong, Wei Zhang, Yaohui Jin, Xiaoyu ShenICCV 2025
- Learned Image Compression with Dictionary-based Entropy ModelJingbo Lu, Leheng Zhang, Xingyu Zhou, Mu Li et al.CVPR 2025
Builds on14
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng et al.ICML 2020 · 1,388 citations
- High-Fidelity Generative Image CompressionFabian Mentzer, George Toderici, Michael Tschannen, Eirikur AgustssonNeurIPS 2020 · 675 citations
- Generative Adversarial Networks for Extreme Learned Image CompressionEirikur Agustsson, Michael Tschannen, Fabian Mentzer, Radu Timofte et al.ICCV 2019 · 648 citations
- ELIC: Efficient Learned Image Compression with Unevenly Grouped Space-Channel Contextual Adaptive CodingDailan He, Ziming Yang, Weikun Peng, Rui Ma et al.CVPR 2022 · 363 citations
Related papers
- Flow to the Mode: Mode-Seeking Diffusion Autoencoders for State-of-the-Art Image TokenizationKyle Sargent, Kyle Hsu, Justin Johnson, Li Fei-Fei et al.ICCV 2025 · 1 citation
- Spectral Image TokenizerCarlos Esteves, Mohammed Suhail, Ameesh MakadiaICCV 2025 · 1 citation
- MaskGIT: Masked Generative Image TransformerHuiwen Chang, Han Zhang, Lu Jiang, Ce Liu et al.CVPR 2022 · 346 citations
- Autoregressive Image Generation with Masked Bit ModelingQihang Yu, Qihao Liu, Ju He, Xinyang Zhang et al.ICML 2026 · 5 citations
- HybridFlow: Infusing Continuity into Masked Codebook for Extreme Low-Bitrate Image CompressionLei Lu, Yanyue Xie, Wei Jiang, Wei Wang et al.ACM MM 2024 · 9 citations
