Test-Time Computing for Referring Multimodal Large Language Models

Mingrui Wu, Hao Chen, Jiayi Ji, Xiaoshuai Sun, Zhiyuan Liu, Liujuan Cao, Ming-Ming Cheng, Rongrong JiarXiv 2026

TL;DR

ControlMLLM++ is a training-free, test-time adaptation framework that enables frozen Multimodal Large Language Models (MLLMs) to perform fine-grained, region-based visual reasoning. By optimizing a latent visual token modifier during inference to steer cross-modal attention, it supports diverse visual prompts (boxes, masks, points) and achieves exceptional out-of-domain generalization without any retraining.

What Problem Does This Paper Address?

Standard MLLMs (like LLaVA) are excellent at understanding whole images but lack fine-grained, region-level comprehension. If a user wants to ask a question about a specific object or text snippet within a complex scene, text prompts alone often fail to convey the exact area of interest.

Existing "Referring MLLMs" solve this by fine-tuning models on massive datasets of region-text pairs. However, this approach is computationally expensive, binds the capability to a specific architecture, and generalizes poorly to out-of-domain data. The authors tackle a compelling alternative question: Can we give any pre-trained, frozen MLLM region-awareness at inference time without changing a single model weight?

Comparison between traditional training methods and the proposed training-free test-time computing method.

Methods

The authors introduce ControlMLLM++, which treats region-based reasoning as a test-time optimization problem executed at the very first decoding step:

  1. Latent Variable Learning: Instead of directly overwriting attention maps (which degrades the LLM's language capabilities), the framework appends a zero-initialized learnable latent variable ($p_v$) to the visual token embeddings.
  2. Energy-Based Guidance: They define a task-specific energy function based on the model's cross-modal attention maps. For bounding boxes or masks, a hard mask-based energy function forces attention inside the region. For scribbles or points, a soft mask-based energy function uses a distance transform to pull attention toward the prompt.
  3. Optim++: To accelerate convergence and stability, the authors restrict optimization to the attention maps of the answer-start token and focus exclusively on the middle layers of the decoder (layers 14-26 in LLaVA), where text-visual alignment primarily occurs. They also replace standard SGD with the Adam optimizer.
  4. PromptDebias: MLLMs often suffer from language bias, hallucinating answers based on text priors rather than visual cues. PromptDebias introduces a contrastive decoding strategy, subtracting the output logits generated without the visual prompt from those generated with it, forcing the model to rely heavily on the specified region.
Overview of the ControlMLLM framework, illustrating latent variable optimization via an energy function on pooled attention maps.

Datasets

The framework was evaluated across several tasks and datasets:

  • LVIS: Used for the in-domain Referring Object Classification (ROC) task.
  • COCO-Text: Used for the Referring Text Classification (RTC) task to test out-of-domain generalization.
  • RefCOCOg: Used for evaluating in-domain box-level referring descriptions.
  • Screenshot: An out-of-domain dataset used to evaluate referring descriptions on user interfaces.

Key Insights and Ideas

  • Attention Maps as Semantic Bridges: Cross-modal attention maps intrinsically encode the relationship between text tokens and visual regions. Rather than training new projection layers, we can simply "steer" existing attention maps to achieve spatial grounding.
  • The Middle-Layer Sweet Spot: Text-visual interaction is not uniform across the LLM decoder. The authors discovered that attention maps in the middle layers are the most critical for capturing these relationships. Restricting optimization here drastically reduces complexity while boosting performance.
  • Language Bias Mitigation: Test-time visual prompting can still be overridden by strong linguistic priors in the LLM. Contrastive decoding (PromptDebias) is essential to ensure the model actually "looks" at the prompt instead of guessing based on text context.

Key Results

  • Zero-Shot Region Awareness: On the LVIS (ROC) task, LLaVA-1.5 + ControlMLLM++ boosted accuracy from a baseline of 54.72% to 71.19%, performing on par with Ferret-7B (71.71%), which was explicitly trained on region-text data.
  • Superior Out-of-Domain Generalization: On the out-of-domain COCO-Text (RTC) task, ControlMLLM++ achieved 74.66% accuracy, vastly outperforming the fully-trained Ferret-7B (58.70%), demonstrating the robust transferability of test-time computing.
  • Universal Plug-in Capability: It consistently improves performance across various architectures, including grounding-agnostic models (LLaVA-1.5, LLaVA-HR) and even models with native referring capabilities like Qwen2.5-VL (improving its RTC score from 81.91% to 88.23%).

Limitations and Future Work

  • Inference Overhead: Because it relies on gradient-based optimization at test time, it introduces latency. For short outputs, latency increases from 0.94s to 2.54s, and GPU memory consumption jumps from 7.6G to 21.3G.
  • White-Box Requirement: The method requires access to internal representations and gradients, meaning it cannot be applied to closed-source, commercial APIs like GPT-4V or Claude.
  • Single-Region Limit: The current implementation only supports referencing one image region at a time. Extending this to handle multi-region interactions and resolving gradient conflicts remains an open challenge for future research.

Summary updated

BibTeX
@misc{wu2026test,
  author = {Mingrui Wu and Hao Chen and Jiayi Ji and Xiaoshuai Sun and Zhiyuan Liu and Liujuan Cao and Ming-Ming Cheng and Rongrong Ji},
  title = {{Test-Time Computing for Referring Multimodal Large Language Models}},
  year = {2026},
  eprint = {2602.19505},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.19505},
}
Figure