Towards Semantic Equivalence of Tokenization in Multimodal LLM

Shengqiong Wu, Hao Fei, Xiangtai Li, Jiayi Ji, Hanwang Zhang, Tat-Seng Chua, Shuicheng Yan

TL;DR

Existing multimodal large language models (MLLMs) typically slice images into arbitrary, fixed-size grids, which fragments objects and disrupts visual semantics. This paper introduces SeTok, a tokenizer that dynamically groups visual features into semantically coherent units (like whole objects) based on image complexity. Built on top of this, their unified model SETOKIM achieves state-of-the-art performance across image understanding, generation, editing, and segmentation tasks while significantly reducing computational overhead.

What Problem Does This Paper Address?

When we say the word "dog," it represents a complete, discrete semantic concept. However, in the visual domain, standard Multimodal Large Language Models (MLLMs) process images by aggressively chopping them into a rigid grid of square patches (e.g., $14 \times 14$). This patch-level fragmentation breaks apart visual objects across multiple tokens, destroying high-frequency details like edges and contours, and creating a fundamental semantic mismatch between discrete text tokens and arbitrary image patches.

While some methods use a fixed number of learnable query tokens to abstract the image, they still struggle to align cleanly with actual visual objects and lack interpretability. This paper addresses this bottleneck by asking: Can we create a vision tokenizer where visual tokens naturally correspond to complete semantic concepts, just like words do in language?

Figure 1: Comparison between existing MLLMs in tokenized visual inputs: (a) patch-level continuous token, (b) patch-level discrete token, (c) learnable query token, and (d) semantic-equivalent continuous token (ours). In (e), we show four language-driven vision tasks enhanced with semantic-equivalent vision tokens, with token masks showing regions of the same color representing a single vision token.

Methods

The authors propose the Semantic-Equivalent Tokenizer (SeTok) and integrate it into a unified MLLM called SETOKIM.

The core architecture consists of three main components:

  1. Token Cluster: Instead of a fixed grid, SeTok applies a dynamic clustering algorithm based on density peaks. It automatically groups patch embeddings from a vision encoder (like SigLIP) into a variable number of concept masks ($M$). This allows the model to dynamically allocate more tokens to complex scenes and fewer tokens to simple ones.
  2. Token Merger: To prevent information loss from simply using cluster centers, a token merger integrates 2D positional encodings and applies inner-cluster Transformer layers to aggregate features within each semantic unit. It then uses inter-cluster Transformer layers to model relationships between different semantic tokens.
  3. Dual-Loss Training: SeTok is optimized using a combination of an image reconstruction loss ($\mathcal{L}_{rec}$) via a detokenizer to retain pixel-level details, and a novel concept-level image-text contrastive loss ($\mathcal{L}_{citc}$) to explicitly align visual concepts with textual labels.
Figure 2: Overview of SeTok. SeTok tokenizes visual features extracted from an image by a vision encoder into semantically equivalent vision tokens, which then are fed into a detokenizer to reconstruct the image and meanwhile employed to perform the concept-level image-text alignment.

The resulting semantic-equivalent tokens are concatenated with text tokens and fed into a pre-trained LLM (LLaMA-2-7B) for autoregressive understanding and generation. A lightweight mask decoder is also attached to handle fine-grained segmentation tasks.

Datasets

The model underwent a rigorous two-stage training process using several large-scale datasets:

  • Tokenizer Pre-training: ImageNet-1K and OpenImages for reconstruction and concept alignment.
  • Stage-I (Multimodal Pretraining): A massive 28M text-image pair dataset (including CC12M, LAION-aesthetics, ALLaVA-Caption, LLaVA-595K, MSCOCO, and Visual Genome) alongside the English text corpus SlimPajama to preserve language reasoning capabilities. MSCOCO was also used to train the mask decoder.
  • Stage-II (Instruction Tuning): Task-specific datasets including ALLaVA-Instruct, ShareGPT4V, LLaVA-v1.5-mix-665K, VQAv2, GQA, OK-VQA, AOKVQA, RefCOCO/+/g, InstructPix2Pix, and MagicBrush.

Key Insights and Ideas

  • Dynamic Token Counts Matter: Slicing every image into the same number of tokens is inefficient. Complex images naturally require more semantic tokens than simple ones. SeTok's dynamic clustering handles this variance gracefully.
  • Hard Clustering Wins Over Soft Clustering: The authors found that hard-clustering (assigning a patch strictly to one cluster) yields more stable visual tokens and better overall performance than soft-clustering, which produces blurred attention masks.
  • Reconstruction Alone is Not Enough: Ablation studies showed that relying solely on image reconstruction loss causes the tokenizer to prioritize low-level pixel details at the expense of high-level semantic insights. The concept-level contrastive loss ($\mathcal{L}_{citc}$) is vital for downstream understanding tasks.

Key Results

SETOKIM demonstrates a "grand slam" capability across four major vision-language task groups:

  • Visual Understanding: On the GQA benchmark, SETOKIM scored 65.6%, outperforming LLaVA-1.5 (62.0%) by 3.6%, showcasing superior reasoning over complex object relationships.
  • Image Generation & Editing: SETOKIM achieved an impressive zero-shot FID of 8.5 on MS-COCO, outperforming larger models like SEED-X (14.9) and matching specialized diffusion-based editing frameworks.
  • Referring Segmentation: On RefCOCO+, the model achieved a 61.2% cIoU, significantly outperforming LISA (58.1%), proving that its tokens inherently preserve high-frequency boundary information.
  • Efficiency: Because it condenses images into fewer, high-quality semantic tokens, SeTok operates at just 8.2 TFLOPs, nearly half the computational cost of standard MLP patch connectors (15.8 TFLOPs).

Limitations and Future Work

The authors note a few constraints in their current implementation:

  • Model Scale: The backbone is currently limited to a 7B parameter configuration; scaling up to 65B or 130B models remains unexplored.
  • Image Resolution: The tokenizer is capped at a resolution of $384 \times 384$. Handling higher-resolution images for fine-grained visual reasoning remains a challenge.
  • Hallucinations: While semantic-equivalent tokenization mitigates object hallucination (as shown on the POPE dataset), hallucinations are still an inevitable challenge for the generative model.

Summary updated

Abstract

Multimodal Large Language Models (MLLMs) have demonstrated exceptional capabilities in processing vision-language tasks. One of the crux of MLLMs lies in vision tokenization, which involves efficiently transforming input visual signals into feature representations that are most beneficial for LLMs. However, existing vision tokenizers, essential for semantic alignment between vision and language, remain problematic. Existing methods aggressively fragment visual input, corrupting the visual semantic integrity. To address this, this paper proposes a novel dynamic Semantic-Equivalent Vision Tokenizer (SeTok), which groups visual features into semantic units via a dynamic clustering algorithm, flexibly determining the number of tokens based on image complexity. The resulting vision tokens effectively preserve semantic integrity and capture both low-frequency and high-frequency visual features. The proposed MLLM (Setokim) equipped with SeTok significantly demonstrates superior performance across various tasks, as evidenced by our experimental results. The project page is at https://chocowu.github.io/SeTok-web/.
BibTeX
@inproceedings{wu2025towards,
  author = {Shengqiong Wu and Hao Fei and Xiangtai Li and Jiayi Ji and Hanwang Zhang and Tat-Seng Chua and Shuicheng Yan},
  title = {{Towards Semantic Equivalence of Tokenization in Multimodal LLM}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=n64NYyc6rQ},
}
Figure