TL;DR
Xiaomi-Lens-0 makes a 4B multimodal LLM predict segmentation masks from its own vision-encoder patches and language-model hidden states, so pixel-level loss flows into the shared backbone and improves not just segmentation but also counting, color, and spatial-relation question answering.
Why It Matters
Multimodal LLMs answer questions about whole images well, but they routinely miscount nearby objects, confuse attributes of small regions, and pick wrong referents in crowded scenes. The authors argue this is because training signal comes only from the text answer: the image is a conditioning input, and nothing in the loss tells the model which pixels support the answer.
Prior fixes bolt a dedicated segmentation network onto the MLLM. LISA and Sa2VA attach a Segment Anything Model-style segmentation encoder; Qwen3-VL-Seg fuses features from an extra image encoder. These systems can produce masks, but the mask loss trains the add-on, not the MLLM’s shared visual features. Other work (PixelLM, MLLMSeg) decodes masks from the MLLM’s own features but keeps the vision encoder frozen, so again the mask loss never reaches the representations used for language generation. Both lines evaluate only on segmentation, leaving open whether mask supervision could also sharpen regular text answers.
How It Works
The core idea: let the language model emit a special <|mask|> token during generation. The hidden state at that token position (the authors call it a visual latent) becomes a query that a small decoder uses to pick out pixels from the vision encoder’s patch grid. Because this latent lives inside the LM and the patch grid lives inside the shared vision encoder, backpropagating the mask loss updates both.
•
The vision encoder (from the Qwen3.5 4B backbone) produces a patch feature grid. The LM sees a downsampled version via a spatial merger, but the mask decoder reads the pre-merger grid, preserving fine detail.
•
When the LM generates <|mask|>, its contextual state at that position is projected into a query vector. The decoder computes a dot-product compatibility between that query and each patch feature, reshapes the scores into a 2D map, and upsamples with two transposed convolutions to get a dense mask.
•
Training combines next-token loss with a mask loss (pixel-wise cross-entropy plus Dice loss). The mask gradient flows into both the patch features and the LM hidden states.
•
Because the decoder works for any visual latent, the LM can sprinkle multiple <|mask|> tokens into a chain-of-thought. Each one grounds an intermediate reasoning step to a specific region, a setup the authors call thinking with visual latents.
# per generation step
token = lm.sample(context)
if token == MASK_TOKEN:
q = project(lm.hidden_state) # visual latent
scores = (q @ patch_features.T) / sqrt(d)
grid = reshape(scores, (h_v, w_v))
mask = sigmoid(upsample(grid)) # H x W
emit(mask)
context.append(token) # masks are NOT fed back
Training has two stages. Stage 1 freezes the backbone and trains only the decoder on standard segmentation corpora (Objects365, LVIS v1, RefCOCO, etc.). Stage 2 unfreezes everything and mixes in-house grounded reasoning traces, where a reasoning model has written out a CoT with <bbox> references, each later paired with a mask (existing instance masks when available, otherwise masks generated by SAM 3).
What They Found
Segmentation (RES). On all eight splits of RefCOCO, RefCOCO+, and RefCOCOg, Xiaomi-Lens-0 posts the highest cIoU among compared models, averaging 81.4 vs 78.6 for the strongest baseline (Qwen3-VL-Seg 4B). It beats the dedicated segmenter SAM 3 by 7 to 13 cIoU points on these splits.
Referring comprehension (REC). Average Prec@0.5 improves over the Qwen3.5 backbone by +5.6 points across the eight splits, with the biggest jump (+9.4) on RefCOCO+ TestB, which forbids absolute-location words and forces discrimination by appearance.
Fine-grained perception, with no mask or box output. The payoff the paper really cares about: on text-only benchmarks like MME-RealWorld, CV-Bench, V*, HR-Bench, CountQA, and ColorBench, the model beats its Qwen3.5 backbone on every one. CountQA rises from 43.8 to 50.6, HR-8K from 75.6 to 80.6.
Ablations attribute the gains. A box-only variant (same data, mask loss turned off) already beats the backbone, confirming the training data helps. Adding mask loss on top lifts REC by another 1.1 to 2.4 points and perception by 0.2 to 1.4 points. Dropping the grounded reasoning traces (keeping mask supervision) costs 0.5 to 0.8 cIoU on RES validation splits. So both ingredients contribute, and the fact that text benchmarks move when only the mask loss toggles is the paper’s cleanest evidence that pixel supervision reshapes the shared representation, not just the output head.
New benchmark, LensBench. The authors built a 4,800-sample evaluation crossing single/multiple targets with explicit/implicit instructions across general, aerial, driving, and panoramic imagery. Xiaomi-Lens-0 leads cIoU on aerial, driving, and panoramic domains but trails frontier closed models (Qwen3.8-Max, GPT-5.6-Sol, Gemini-3.6-Flash) on implicit instructions, especially for picking multiple targets in panoramas (cIoU falls from 71.8 explicit to 48.9 implicit).
What’s Useful
•
If you train or fine-tune a multimodal LLM and care about counting, attribute recognition, or small-region questions, this paper is evidence that adding a mask-prediction head on the shared vision features (not a bolted-on segmenter) can improve plain-text answers. Worth testing whether a similar auxiliary loss helps your own perception failures.
•
If you consume MLLMs through a hosted API, the finding does not transfer directly. The technique requires editing the backbone and the training loss, and the paper does not claim prompt-level tricks reproduce the effect.
•
The thinking with visual latents idea offers an interpretability angle: because every intermediate <|mask|> decodes to a visible region, you can inspect which pixels the model’s CoT was “looking at” during each step. The paper shows this via replaying stored completions. Useful for debugging grounding failures in your own agent, if you can get the model to emit similar tokens.
•
Grounded reasoning traces as a data recipe (synthesize QA, verify answers independently, then generate CoT with box references, then attach masks) is reusable even without the full architecture; the paper’s data pipeline sections are reasonably detailed.
Caveats
•
The paper doesn’t release code or weights in the supplied text, so reproducing the architecture requires reimplementation.
•
Implicit referring remains hard. On LensBench implicit instructions, the 4B model trails frontier proprietary models by roughly 7 to 10 cIoU points, and the gap widens further for implicit multi-target panoramic scenes.
•
Gains on perception benchmarks are consistent but modest (often 1 to 7 points). The biggest wins are on tasks closest to the training signal (counting, high-resolution region recognition). The paper does not test whether the effect holds for a non-Qwen backbone or at larger scales.
•
Comparisons to “strongest baselines” mix models of different sizes and training budgets; the headline RES and REC wins are relative to similarly-sized 4B models, not to the largest systems in each table.