TL;DR
Teaching Multimodal Large Language Models (MLLMs) to point at objects in an image usually forces a tough trade-off: treat coordinates as plain text (which confuses the model about geometry) or add thousands of dedicated location tokens to the vocabulary (which destabilizes training). HiLoc solves this by mimicking human vision—locating a rough region on a coarse grid first, then zooming into a fine-grained cell, reusing the exact same tiny set of special tokens for both steps. Paired with a new dataset that teaches the model when to say "nothing is there," this simple hierarchical trick dramatically boosts precision, especially for tiny objects.
What Problem Does This Paper Address?
When we want a unified MLLM to both chat and draw bounding boxes around objects, we usually frame object detection as sequence generation—predicting box coordinates one token at a time. Currently, there are two standard ways to do this, and both are flawed:
- Plain-text coordinates: Outputting strings like
"199"or"200". Because language tokenizers chop numbers into arbitrary symbols,"199"and"200"look completely unrelated to the model. Standard cross-entropy loss treats predicting"200"instead of"199"just as harshly as predicting"999", completely ignoring true spatial distance. - Flat special tokens: Adding 1,000+ learnable tokens (
<0>through<999>) to represent normalized grid positions. While this preserves some spatial order, getting finer resolution requires linearly expanding the vocabulary. A massive output space dilutes gradients, slows convergence, and makes training unstable.
Furthermore, MLLMs are notorious "yes-men"—if you ask them to find a "purple giraffe" in a photo of a kitchen, they will often hallucinate a box rather than reject the premise, largely because training datasets lack negative examples.
Methods
Built on top of Qwen3-VL-4B-Instruct, HiLoc replaces flat coordinates with Hierarchical Spatial Indexing:
- Coarse-to-Fine Factoring: Instead of slicing an image into a flat $4096 \times 4096$ grid (which would require 4,096 tokens), HiLoc imposes a coarse $M \times M$ grid (e.g., $64 \times 64$), and subdivides each grid square into $N \times N$ fine cells (also $64 \times 64$).
- Shared Vocabulary: Crucially, both levels share the same 64 special index tokens (
<0>to<63>). Every point is predicted as a coarse<grid>pair followed by a fine<cell>pair, wrapped in a clean markup grammar alongside a dedicated<no_box>token to explicitly reject absent targets. - Two-Stage Training: After standard Supervised Fine-Tuning (SFT) to learn the syntax and basic localization, the authors apply Group Relative Policy Optimization (GRPO)—a reinforcement learning technique. Candidate predictions are scored using a custom reward that balances syntax compliance, box overlap (IoU), and explicit rewards/penalties for properly handling absent objects.
Datasets
- Training: Supervised fine-tuning spans ~4.4M samples across general detection (COCO, LVIS, Objects365-v2, OpenImages-v7, V3Det, PACO, etc.), grounding (RefCOCO/+/g, Ref-L4), and aerial imagery (VisDrone, DOTA-v2, FAIR1M), followed by an 80K subset for GRPO.
- Introducing HiRef-500K: To cure hallucinated boxes and boost complex reasoning, the authors used
Qwen3-VL-32Bto generate ~500,000 referring expressions on existing detection images. Unlike older benchmarks with simple phrases, HiRef-500K covers five rich categories: attributes, states, spatial relations, set logic, and non-existent objects (negative samples). - Evaluation: Tested across COCO, LVIS, RefCOCOg, VisDrone, OmniLabel, and $D^3$ (the last two specifically test complex descriptions and negative-sample rejection).
Key Insights and Ideas
- Quadratic Resolution Scaling: By reusing $L$ tokens across two levels, effective resolution scales as $L^2$. Just 64 learnable tokens give HiLoc a crisp $4096 \times 4096$ resolution—over $4\times$ finer than a 1,000-token flat vocabulary, with $15\times$ fewer tokens to learn.
- Graceful Error Degradation: If a flat-text model flubs the first digit of
"537"and outputs"637", the box jumps by 10% of the image width, tanking accuracy. In HiLoc, if the model flubs a fine<cell>token, the error is strictly trapped inside a single coarse grid square (a tiny $<1.6\%$ drift). - Smoother Optimization: Choosing among 64 options per step instead of 1,024 prevents gradient dilution. In controlled tests at identical $1024 \times 1024$ resolutions, HiLoc's coordinate gradient norms decreased steadily during training while flat tokens plateaued early.
Key Results
HiLoc consistently outperforms strong MLLM baselines (like Rex-Omni and SEED1.5-VL), with gains magnifying as localization requirements get stricter:
- High-Precision & Small Objects: On COCO, HiLoc edges out Rex-Omni at standard IoU$_{0.5}$ (73.1 vs. 72.0 F1), but crushes it under strict IoU$_{0.95}$ (21.3 vs. 15.9 F1). On VisDrone (dense, tiny aerial targets), HiLoc achieves 2.6$\times$ Rex-Omni's strict F1 score (3.9 vs. 1.5).
- Complex Grounding: On RefCOCOg (val/test) at strict IoU$_{0.95}$, HiLoc hits 55.6 / 53.9 F1, leaping past Rex-Omni by +20.3 / +17.3 points.
- Knowing When to Say "None": On $D^3$, which heavily tests absent targets, HiLoc achieves a Full AP of 53.1 (and 46.6 Absence AP), more than doubling Rex-Omni's 21.5 Full AP.
Limitations and Future Work
The main text of the paper does not feature a dedicated limitations or future work section (noting only that additional theoretical assumptions and corrections are housed in Appendix H, which is outside this document). However, one practical trade-off apparent from the method's design is sequence length: while a flat special-token model encodes a point in 2 tokens, HiLoc's markup grammar (<point> <grid> i j </grid> <cell> u v </cell> </point>) requires more tokens per bounding box, trading slightly longer autoregressive generation sequences for vastly superior vocabulary efficiency and spatial precision.
Summary updated