← Latest papers
💻 computer science

MergeTok: Unified Continuous and Discrete Visual Tokenization via Token Merging

MergeTok introduces a unified visual tokenizer that bridges continuous VAEs and discrete VQ models by leveraging token merging to establish a structural prior, thereby achieving high-fidelity reconstruction, stable training, and semantically organized representations suitable for both diffusion and autoregressive image generation.

Original authors: Luyuan Zhang, Siyuan Li, Zedong Wang, Qingsong Xie, Cheng Tan, Anna Wang, Yanhao Zhang, Chen Chen, Haonan Lu, Haoqian Wang

Published 2026-06-01
📖 4 min read☕ Coffee break read

Original authors: Luyuan Zhang, Siyuan Li, Zedong Wang, Qingsong Xie, Cheng Tan, Anna Wang, Yanhao Zhang, Chen Chen, Haonan Lu, Haoqian Wang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a robot to draw pictures. To do this, the robot needs a "dictionary" to understand what an image is made of. In the world of AI image generation, this dictionary is called a tokenizer.

For a long time, researchers had to choose between two very different types of dictionaries, and neither was perfect:

  1. The "Smooth" Dictionary (Continuous/VAE): Think of this like a watercolor painting. It's incredibly detailed and smooth, capturing every tiny nuance of the image. However, the colors are all mixed together in a big puddle. If you want the robot to change just the "sky" without messing up the "grass," it's hard because the information is all tangled up.
  2. The "Blocky" Dictionary (Discrete/VQ): Think of this like a LEGO set. It breaks the image into distinct, separate blocks (codes). This is great for the robot to learn patterns and build things step-by-step (like writing a story). But, the blocks are often unstable. Sometimes the robot forgets how to use certain blocks, or the blocks clump together in a way that makes the picture look blurry or "collapsed."

The Big Idea: MergeTok

The authors of this paper, MergeTok, asked: "Why can't we have the smoothness of watercolors AND the structure of LEGOs in the same dictionary?"

They built a new system that acts like a bilingual translator who speaks both "Smooth" and "Blocky" languages simultaneously. They didn't just glue two systems together; they created a bridge between them using a clever trick called Token Merging.

How It Works: The "Grouping" Analogy

Imagine you are organizing a massive party with 1,000 guests (the pixels of an image).

  • The Problem: If you try to talk to every single guest individually, it's chaotic and inefficient. If you just group them randomly, you lose the important details.
  • The MergeTok Solution: The system has a smart bouncer (the Token Merging algorithm) who looks at the guests and says, "You three look like you're all wearing red shirts and talking about sports. Let's group you together as one 'Sports Team' unit."

This grouping happens in two ways to help the robot learn:

  1. For the Smooth Side (VAE): The system tells the watercolor painter, "Hey, these three people are a 'Sports Team.' When you paint them, make sure they look like a cohesive team, not just random red blobs." This forces the smooth painting to organize itself logically, making it easier to control later.
  2. For the Blocky Side (VQ): The system tells the LEGO builder, "Since we know these three people are a team, give them three different LEGO bricks so they don't all look the same, but make sure no other team gets those specific bricks." This stops the LEGO blocks from collapsing or repeating themselves too much.

The Magic Bridge

The secret sauce is that the "Sports Team" list (called a Source Map) is created once and shared.

  • It helps the Smooth side learn to be organized.
  • It helps the Blocky side learn to be stable and diverse.

The best part? The robot that actually draws the pictures (the generator) doesn't even know this grouping happened. It just sees a neat list of 256 tokens, ready to be used. It's like the bouncer did all the heavy lifting behind the scenes, so the artist can just focus on painting.

What They Found

The researchers tested this on a huge dataset of images (ImageNet). Here is what happened:

  • Better Pictures: The system reconstructed images with higher quality (lower "rFID" scores) than the best previous "Smooth" or "Blocky" systems alone.
  • Smarter Organization: The tokens it created were much better at understanding the meaning of the image (like distinguishing a cat from a dog) compared to older methods.
  • Versatile: Because it's a unified system, it works perfectly with two different types of AI artists: those who build images step-by-step (Autoregressive) and those who build them by cleaning up noise (Diffusion).

The Takeaway

MergeTok is like a master organizer who takes a chaotic crowd, groups them logically, and hands the result to an artist. It solves the old problem of having to choose between "smooth but messy" and "structured but unstable." By merging similar pieces of information together during the learning process, it creates a single, super-efficient dictionary that is both high-quality and easy for AI to control.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →