ControlMLLM: Training-Free Visual Prompt Learning for Multimodal Large Language Models
Mingrui Wu, Xinyue Cai, Jiayi Ji, Jiale Li, Oucheng Huang, Gen Luo, Hao Fei, Guannan Jiang, Xiaoshuai Sun, Rongrong Ji
TL;DR
This paper tackles the challenge of enabling region-level referring reasoning in Multimodal Large Language Models without costly retraining. It introduces a training-free method that injects visual prompts by optimizing a learnable latent variable added to visual tokens at test time, guided by energy-based objectives to strengthen attention on referring regions. The approach supports four visual prompt types (box, mask, scribble, point) and demonstrates improved referring performance across ROC/RTC tasks, out-of-domain OCR and screenshot tasks, and across multiple MLLMs, while also enhancing interpretability and potentially reducing hallucinations. By avoiding fine-tuning and leveraging attention dynamics, the method offers a flexible, scalable path to grounded multimodal reasoning with notable out-of-domain robustness. The work provides a practical framework for adding referring capabilities to existing MLLMs with modest computational overhead and clear guidelines for stability via EMA and early stopping.
Abstract
In this work, we propose a training-free method to inject visual prompts into Multimodal Large Language Models (MLLMs) through test-time optimization of a learnable latent variable. We observe that attention, as the core module of MLLMs, connects text prompt tokens and visual tokens, ultimately determining the final results. Our approach involves adjusting visual tokens from the MLP output at test time, controlling the attention response to ensure text prompt tokens attend to visual tokens in referring regions. We optimize a learnable latent variable based on an energy function, enhancing the strength of referring regions in the attention map. This enables detailed region description and reasoning without the need for substantial training costs or model retraining. Our method offers a promising direction for integrating referring abilities into MLLMs, and supports referring with box, mask, scribble and point. The results demonstrate that our method exhibits out-of-domain generalization and interpretability.
