TL;DR
Most multimodal large language models (MLLMs) see images as either a blurry global summary or a rigid grid of patches, making it hard for them to reason about or edit individual objects. Slot-MLLM fixes this by introducing Slot Q-Former, a visual tokenizer that uses Slot Attention to carve an image into discrete, object-centric tokens—like words in a visual language. Plugged into a standard LLM (Vicuna-7B), this approach significantly boosts performance on object-level understanding, text-to-image generation, and precise image editing, marking the first time Slot Attention has been scaled to real-world natural images with MLLMs.
What Problem Does This Paper Address?
To let a single LLM both understand and generate images, researchers often convert images into discrete "visual tokens" so the model can process text and images in one unified next-token prediction framework.
However, existing visual tokenizers have a blind spot:
- Global tokenizers (like SEED) compress an entire image into high-level semantic tokens, losing fine-grained local details and spatial layout.
- Patch-based or ad-hoc clustering tokenizers (like LaViT or SeTok) either chop images into uniform grids or rely on heuristic merging, which struggles to cleanly separate distinct objects.
Because of this, MLLMs often stumble when asked to count objects, describe spatial relationships, or edit one specific item in a scene without accidentally altering the background.
Methods
The authors propose Slot Q-Former, an object-centric visual tokenizer trained independently from the LLM, and Slot-MLLM, which integrates those tokens into a generative LLM.
- Slot Q-Former: Starting with image features from a frozen DINOv2 vision encoder, the authors replace the standard cross-attention in a Q-Former with Slot Attention. Here, a fixed set of learnable queries ("slots") compete with one another via softmax attention to claim different regions of the image, naturally grouping pixels into distinct objects. A causal self-attention layer is also included to preserve token-level causality for the LLM.
- Two-Stage Tokenizer Training:
- Continuous Slot Training: Slot Q-Former is trained jointly with a Visual Decoder (a Transformer block, MLP, and an unCLIP Stable Diffusion UNet). The model learns to reconstruct the original image using diffusion and CLIP losses while simultaneously aligning slot embeddings with text using contrastive ($\mathcal{L}_{itc}$) and image-grounded text generation ($\mathcal{L}_{i2t}$) losses.
- Discrete Quantization: Slot Q-Former and the Visual Decoder are frozen, and a Residual Vector Quantizer (RVQ) with a shared codebook is trained to discretize the continuous slot embeddings into discrete tokens.
- Slot-MLLM: The discrete slot tokens are flattened and added to the LLM's vocabulary (wrapped in
<boi>and<eoi>tags). Using LoRA, Vicuna-7B is pre-trained on paired and interleaved image-text data and then instruction-tuned (SFT) using standard next-token prediction.
Datasets
- Tokenizer Training: 70 million image-text pairs from CC3M, CC12M, a subset of LAION-COCO, MSCOCO, and Unsplash.
- MLLM Pre-training & SFT: Image-text paired datasets (with randomized modality order), the interleaved MMC4 dataset, and publicly available multimodal instruction-following datasets.
- Evaluation Benchmarks:
- Reconstruction: COCO Karpathy test set.
- Understanding: COCO Caption, GQA, MME-P, SEED-Bench (Img), POPE, MM-Vet, MMMU (val), and NaturalBench.
- Generation & Editing: T2I-Compbench, Geneval, GenAI-Bench, MagicBrush, and EVR.
No new benchmarks were introduced.
Key Insights and Ideas
- Unsupervised object discovery scales to the wild: Slot Attention has historically been tested on synthetic or toy datasets. By pairing it with DINOv2 features and a diffusion decoder, the authors show it cleanly segments complex, real-world natural images into object-centric tokens.
- Both diffusion and text alignment are non-negotiable: Ablation studies reveal that removing the diffusion reconstruction loss causes image fidelity to collapse (LPIPS worsens from
0.5559to0.782), while removing the image-text alignment losses leaves reconstruction intact but tanks downstream MLLM understanding (MME-P drops from1202.6to961.6). - Fewer tokens, better spatial control: Because each slot maps to an object or coherent region, Slot Q-Former needs only 32 tokens per image—far fewer than LaViT (avg. 94) or VILA-U (256)—while preserving object positions much more faithfully.
Key Results
- Image Reconstruction: On the COCO Karpathy test set, Slot Q-Former outperforms SEED across all metrics (e.g., LPIPS
0.5559vs.0.7741; PSNR12.14vs.9.51) and beats LaViT on DreamSIM, LPIPS (0.5559vs.0.6558), and PSNR (12.14vs.10.76). - Multimodal Understanding: Trained under identical conditions, Slot-MLLM outperforms SEED-LLaMA and a non-slot baseline (
Slot-MLLM-base) on most benchmarks, including COCO Caption (126.8vs.122.5), GQA (58.1vs.52.4), MME-P (1202.6vs.1123.9), and NaturalBench (60.5vs.57.5).
- Generation & Editing: Slot-MLLM beats SEED-LLaMA and
Slot-MLLM-baseacross all generation and editing benchmarks. On MagicBrush, it achieves a CLIP-I score of82.2(vs.77.9) and an L1 error of18.6(vs.28.8), qualitatively preserving backgrounds while editing target objects.
Limitations and Future Work
- Fixed token budget: Slot Q-Former currently uses a fixed number of visual tokens regardless of whether an image is a simple portrait or a crowded street scene. Dynamically adjusting the number of slots based on image complexity is a promising next step.
- Static images only: The current framework only handles single images; extending object-centric slot tokenization to video could enable richer temporal reasoning and object tracking over time.
Summary updated