Can Discrete Codes Become a General Visual Representation? Meituan LongCat Open-Sources dNaViT

Meituan LongCat's dNaViT combines a frozen visual encoder, residual modulation and grouped quantization to retain semantics and pixel detail. The team reports reconstruction, understanding, generation and editing through one encoding interface, with task-specific models and decoding branches.
Compressing an image into discrete codes is not difficult. The challenge is making the same set of codes support high-quality understanding, generation and reconstruction at the same time.
A visual tokenizer's goal is not merely to compress images into a finite set of discrete IDs, but to make those IDs a reusable, general-purpose representation. The problem is that understanding relies on high-level semantics such as objects and relationships, while generation and reconstruction depend on low-level details such as character strokes, textures and colors. Preserving both kinds of information within a limited discrete bottleneck, while achieving high quality across all three task categories with the same representation, is not something that follows automatically.
The Meituan LongCat team's latest technical report, dNaViT, addresses this question head-on. The team proposes the Discrete Native-resolution Vision Transformer, which encodes native-resolution images into discrete visual primitives resembling language tokens. Within a unified discrete bottleneck, the same encoding supports reconstruction, understanding, generation and editing. According to the team, it is the first general-purpose visual tokenizer to achieve high-quality understanding, generation and reconstruction using the same discrete visual representation.
The paper's results are quite direct: for ImageNet reconstruction at 512×512 resolution, dNaViT-G64 reaches 28.12 dB PSNR with f=32 compression; Qwen3-8B-dNaViT scores 885 on OCRBench and 86.5 on CharXiv DQ; in generation tasks, it achieves 49.5 on GenEval2 GM and 52.2 on Qwen-Image-Bench.

Figure 1: dNaViT aims to establish a general-purpose discrete representation for images, analogous to a language vocabulary. The same visual tokens preserve both high-level semantics and low-level pixel information.
- Paper: https://arxiv.org/abs/2611.12426
- Code and models: https://github.com/meituan-longcat/LongCat-Next/tree/main/dNaViT
Why Do Visual Tokenizers Always Have to Choose One or the Other?
Previous visual tokenizers have broadly developed along two routes.
One category is designed for image generation. These tokenizers preserve local colors, textures and edges as much as possible so that a decoder can reconstruct realistic images. But such representations do not necessarily have a semantic structure suited to understanding tasks. The other category comes from pretrained visual encoders, which can extract objects, scenes and relationships but often discard the details needed for precise reconstruction.
The problem thus becomes clear: if visual understanding and visual generation use two separate representations, a multimodal model still needs two encoding interfaces, two training objectives, and even two sets of data and infrastructure. Vision may have been connected to the language model, but it has not truly been modeled in the same way as language.
dNaViT revolves around three questions:
- Can vision, like language, use discrete IDs as a general-purpose representation and approach task-specific models across different tasks?
- Can information loss from quantization cease to impose a hard ceiling on understanding tasks?
- Can high-level semantics and low-level pixel details enter the same discrete bottleneck?
First Freeze the Semantics, Then Add Back the Pixel Details
Rather than training a visual tokenizer from scratch, dNaViT starts with a frozen pretrained visual encoder. The purpose is to preserve the existing semantic space first, preventing the reconstruction objective from pulling the visual representation back toward the pixel level.
But freezing the encoder alone is not enough. High-level visual features usually lack the local information needed for precise reconstruction. To address this, the team adds a lightweight residual modulation module after the encoder: the Residual Modulator, or ResMod. It aggregates information from several intermediate layers of the frozen encoder, then injects reconstruction-related details into the final semantic features through a zero-initialized scale-and-shift path.

Figure 2: The dNaViT architecture. A frozen representation encoder provides the semantic foundation; ResMod adds reconstruction information; and the same set of quantized features receives supervision for both pixel reconstruction and semantic reconstruction.
The key to this design is to "supplement" rather than "rewrite." ResMod's output head is initialized to zero, so it does not disrupt the pretrained encoder's features at the start of training. As training progresses, it gradually learns to extract information useful for pixel recovery from the intermediate layers.
The shared representation after quantization is supervised by two branches. One uses a semantic decoder to reconstruct pretrained features, constraining the discrete representation to retain high-level semantics; the other uses a pixel decoder to reconstruct the image, requiring it to retain details. The team also adopts three-stage progressive training: first learning continuous pixel reconstruction, then discrete semantic reconstruction, and finally jointly optimizing both branches to alleviate gradient conflicts between the two objectives.
How Can Discrete Capacity Grow Without Increasing Spatial Sequence Length?
Even after resolving the conflict between training objectives, the discrete bottleneck itself remains. If the codebook is too small, the information will not fit; simply increasing the number of spatial visual tokens quickly lengthens the sequence and raises the cost of autoregressive modeling.
dNaViT uses grouped product quantization. The channel features at each spatial location are divided into multiple groups, each using an independent codebook to produce a discrete ID. Increasing the number of groups increases the information carried at each location without increasing the length of the H/32×W/32 spatial grid.

Figure 3: Grouped quantization and downstream interfaces. Understanding tasks feed discrete IDs into the language model; reconstruction, generation and editing perform lookup and decoding through the same tokenizer.
These codes have a consistent meaning across tasks. For visual understanding, the discrete IDs enter the LLM through newly learned group-specific embedding tables. For reconstruction, the same IDs look up the frozen tokenizer's codebook embeddings, which are then passed to the pixel decoder. For generation and editing, the language model predicts multiple groups of IDs and restores them to images through the same decoding interface.

Figure 4: G-STAR combines reconstruction quality and generation efficiency at higher compression ratios through group-spatial co-scaling, lossless packing and a Semi-AR Head.
The team has pursued two further lines of work around dNaViT. The first is G-STAR (https://arxiv.org/abs/2611.13004), which focuses on discrete visual generation at higher compression ratios: it achieves lossless packing by splitting sub-codes along the channel dimension, and uses a Semi-AR Head to handle within-group dependencies, increasing compression and reducing inference latency without sacrificing reconstruction or generation quality.
The second is Can Discrete Tokens Serve as Semantically Lossless Representations of Visual Signals? (https://arxiv.org/abs/2610.37662), which examines the semantic ceiling of discrete tokens from the understanding side. The paper finds that quantization error is not a reliable indicator of understanding capability; what really matters is the effective bit budget of the discrete indices. With industrial-scale training, FVQ achieves state-of-the-art results among discrete-representation models and becomes, to the authors' knowledge, the first discrete model competitive with strong continuous-representation models such as Qwen3-VL, including on fine-grained OCR.

One Encoding for Reconstruction, Understanding, Generation and Editing
Whether a representation is general-purpose ultimately depends on results across tasks. dNaViT's experiments cover 12 visual-understanding evaluations, four generation evaluations and image-editing evaluations.

For reconstruction, dNaViT-G64 achieves 28.12 dB PSNR and 0.81 SSIM on the ImageNet validation set at 512×512. This result uses all 50,000 validation images and a ViT pixel decoder without refinement. When the resolution increases to 1024×1024, PSNR rises further to 32.90 dB.
For understanding, the team combines the frozen dNaViT-G16 tokenizer with Qwen3-8B to train dNaViT-8B. The model scores 885 on OCRBench, 86.5 on CharXiv DQ, 96.2 on DocVQA and 79.2 on InfoVQA. Text and document evaluations depend on fine visual information, so these results also indicate that the quantized tokens retain more than just coarse-grained semantics.
For generation and editing, dNaViT-8B scores 49.5 on GenEval2 GM and 52.17 on Qwen-Image-Bench, and reaches 0.94 in both Chinese and English on LongText-Bench. Its overall score on the full English set of GEdit-Bench is 7.30.

Figure 5: The same discrete visual representation covers reconstruction, generation, editing and understanding. Examples include image generation, handwritten OCR, understanding dense infographics and local editing.
What Really Needs Unifying Goes Beyond Model Architecture
The value of dNaViT is not just obtaining an image tokenizer with a higher compression ratio. More importantly, it gives vision an interface similar to language: images can be converted into discrete IDs in advance, and model training can directly consume integer sequences.
This changes the engineering form of multimodal training. Visual tokens can be preprocessed, cached and packed just like text tokens; sequence lengths for different modalities can be determined before scheduling; and the training graph need not always retain a large visual encoder. Vision therefore has an opportunity to directly reuse language models' mature infrastructure for data processing, parallel training and inference.
This approach has already been validated in LongCat-Next. LongCat-Next adopts the DiNA paradigm, organizing text, vision and audio within a unified autoregressive framework. Related methods were subsequently used for native discrete visual modeling in LongCat-2.5, with 1.6T total parameters, further testing their ability to scale.
Of course, discretization is not without costs. Codebook capacity, quantization levels, compression ratio and sequence length still require trade-offs; understanding and reconstruction objectives do not become compatible automatically either. dNaViT's more important contribution is moving the discussion from "whether discrete vision can support understanding" to "how to design a truly general-purpose visual vocabulary."
How Far Is Vision from Language?
From continuous pixels to discrete tokens, fundamental differences between vision and language remain. But dNaViT demonstrates a clearer route: first preserve the pretrained encoder's semantic structure, then add the pixel information needed for reconstruction, and bring both into a unified discrete representation through grouped, multilevel quantization.
When vision can be stably represented as IDs, understanding and generation no longer need completely separate interfaces. Vision may also become "another language" that language models can process, sharing the same next-token prediction methodology and infrastructure.
In the team's words, they hope vision and language will "arrive at the same destination by different paths." This work also serves as an interim synthesis of the past year's work on native discrete multimodal modeling.
This article comes from "Synced," written by "Synced."
Related topics
After reading
Join the AINRK community
Read how to join the community and connect with people working in AI.




