From Patches to Codebooks: A Discrete-Continuous Spectrum of Transformer Tokenization Across Modalities

Main Article Content

Xinyuan Du

Keywords

transformer, tokenization, discrete representation, continuous representation, vector quantization, multimodality

Abstract

Since its introduction, the Transformer has expanded from text processing to multimodal fields such as images and speech. During this process, a recurring question is how to convert continuous and heterogeneous raw signals into token representations that a model can process. This tokenization process is often accompanied by varying degrees of information selection or bottlenecks, and has consequently developed into two basic routes: discrete quantization (codebook/vector quantization [VQ]) and continuous representations (patches/latent features). Several existing representative reviews mainly focus on discrete tokenization, while unified comparisons of the continuous and discrete routes remain relatively limited. Taking the discrete-continuous spectrum as its main thread, this paper reviews representative work on continuous serialization, discrete codebook quantization, discrete units in speech, latent bottlenecks, and continuous latent variables. It analyzes the respective trade-offs of discrete and continuous approaches in terms of task suitability, information efficiency, vocabulary compatibility, and other dimensions. On this basis, this paper summarizes several empirical design principles concerning when to use discrete representations and when to use continuous representations, and attempts to provide a unified analytical framework for representation design in multimodal foundation models.

Abstract 12 | PDF Downloads 4

References

  • [1]Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., ... & Polosukhin, I. (2017). Attention is all you need. Advances in neural information processing systems, 30.
  • [2]Dosovitskiy, A. (2020). An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929.
  • [3]Baevski, A., Zhou, Y., Mohamed, A., & Auli, M. (2020). wav2vec 2.0: A framework for self-supervised learning of speech representations. Advances in neural information processing systems, 33, 12449-12460.
  • [4]Hsu, W.-N., Bolte, B., Tsai, Y.-H. H., Lakhotia, K., Salakhutdinov, R., & Mohamed, A. (2021). HuBERT: Self-supervised speech representation learning by masked prediction of hidden units. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 29, 3451-3460. https://doi.org/10.1109/TASLP.2021.3122291
  • [5]Radford, A., Kim, J. W., Hallacy, C., Ramesh, A., Goh, G., Agarwal, S., ... & Sutskever, I. (2021, July). Learning transferable visual models from natural language supervision. In International conference on machine learning (pp. 8748-8763). PmLR.
  • [6]Ramesh, A., Pavlov, M., Goh, G., Gray, S., Voss, C., Radford, A., ... & Sutskever, I. (2021, July). Zero-shot text-to-image generation. In International conference on machine learning (pp. 8821-8831). Pmlr.
  • [7]Van Den Oord, A., & Vinyals, O. (2017). Neural discrete representation learning. Advances in neural information processing systems, 30.
  • [8]Li, J., Fu, Y., Liu, J., Cao, L., Ji, W., Yang, M., ... & Yang, M. H. (2026). Discrete tokenization for multimodal llms: A comprehensive survey. IEEE Transactions on Pattern Analysis and Machine Intelligence.
  • [9]Jia, J., Gao, J., Xue, B., Wang, J., Cai, Q., Chen, Q., Zhao, X., Jiang, P., & Gai, K. (2025). From principles to applications: A comprehensive survey of discrete tokenizers in generation, comprehension, recommendation, and information retrieval. arXiv. https://doi.org/10.48550/arXiv.2502.12448
  • [10]Mousavi, P., Maimon, G., Moumen, A., Petermann, D., Shi, J., Wu, H., Yang, H., Kuznetsova, A., Ploujnikov, A., Marxer, R., Ramabhadran, B., Elizalde, B., Lugosch, L., Li, J., Subakan, C., Woodland, P., Kim, M., Lee, H.-Y., Watanabe, S., ... Ravanelli, M. (2025). Discrete audio tokens: More than a survey! arXiv. https://doi.org/10.48550/arXiv.2506.10274
  • [11]Xu, P., Zhu, X., & Clifton, D. A. (2023). Multimodal learning with transformers: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(10), 12113-12132. https://doi.org/10.1109/TPAMI.2023.3275156
  • [12]Li, Y., Qian, R., Pan, B., Zhang, H., Huang, H., Zhang, B., ... & Chen, Z. (2026, April). Manzano: A simple and scalable unified multimodal model with a hybrid vision tokenizer. In International Conference on Learning Representations (Vol. 2026, pp. 32102-32118).
  • [13]Wang, Y., Lin, Z., Teng, Y., Zhu, Y., Ren, S., Feng, J., & Liu, X. (2025, October). Bridging continuous and discrete tokens for autoregressive visual generation. In 2025 IEEE/CVF International Conference on Computer Vision (ICCV) (pp. 18596-18605). IEEE.
  • [14]Jaegle, A., Gimeno, F., Brock, A., Vinyals, O., Zisserman, A., & Carreira, J. (2021, July). Perceiver: General perception with iterative attention. In International conference on machine learning (pp. 4651-4664). PMLR.
  • [15]Li, T., Tian, Y., Li, H., Deng, M., & He, K. (2024). Autoregressive image generation without vector quantization. In Advances in Neural Information Processing Systems (Vol. 37). https://doi.org/10.52202/079017-1797
  • [16]Bao, H., Dong, L., Piao, S., & Wei, F. (2021). Beit: Bert pre-training of image transformers. arXiv preprint arXiv:2106.08254.
  • [17]Yu, Q., Weber, M., Deng, X., Shen, X., Cremers, D., & Chen, L. C. (2024). An image is worth 32 tokens for reconstruction and generation. Advances in Neural Information Processing Systems, 37, 128940-128966.
  • [18]Défossez, A., Copet, J., Synnaeve, G., & Adi, Y. (2022). High fidelity neural audio compression. arXiv preprint arXiv:2210.13438.
  • [19]He, K., Chen, X., Xie, S., Li, Y., Dollár, P., & Girshick, R. (2022, June). Masked autoencoders are scalable vision learners. In 2022 IEEE/CVF conference on computer vision and pattern recognition (CVPR) (pp. 15979-15988). IEEE.
  • [20]Chameleon Team. (2024). Chameleon: Mixed-modal early-fusion foundation models. arXiv. https://doi.org/10.48550/arXiv.2405.09818
  • [21]Caron, M., Touvron, H., Misra, I., Jégou, H., Mairal, J., Bojanowski, P., & Joulin, A. (2021, October). Emerging properties in self-supervised vision transformers. In 2021 IEEE/CVF international conference on computer vision (ICCV) (pp. 9630-9640). IEEE.
  • [22]Razavi, A., Van den Oord, A., & Vinyals, O. (2019). Generating diverse high-fidelity images with vq-vae-2. Advances in neural information processing systems, 32.
  • [23]Schneider, S., Baevski, A., Collobert, R., & Auli, M. (2019). wav2vec: Unsupervised pre-training for speech recognition. arXiv preprint arXiv:1904.05862.
  • [24]Lu, J., Clark, C., Zellers, R., Mottaghi, R., & Kembhavi, A. (2022). Unified-io: A unified model for vision, language, and multi-modal tasks. arXiv preprint arXiv:2206.08916.
  • [25]Mentzer, F., Minnen, D., Agustsson, E., & Tschannen, M. (2024, May). Finite scalar quantization: Vq-vae made simple. In International Conference on Learning Representations (Vol. 2024, pp. 51772-51783).