FOCUS: Forcing In-Context Object Localization through Visual Support Constraints and Policy Optimization

Mohammed Asad Karim, Vinay Kumar Verma

While in-context learning has become a hallmark capability of Large Language Models (LLMs)—allowing them to adapt to new tasks given just a few prompt examples—replicating this success in Vision-Language Models (VLMs) remains a significant challenge. This is particularly true for In-Context Object Localization (ICOL), where a model is shown a few visual examples of a specific object and asked to locate that exact object in a novel scene.

The paper "FOCUS: Forcing In-Context Object Localization through Visual Support Constraints and Policy Optimization" identifies a critical flaw in current VLM architectures: they are often "lazy" thinkers. Instead of relying on strict visual evidence, they fall back on text labels and semantic priors. FOCUS introduces a two-stage training framework that forces VLMs to ignore these semantic shortcuts, proving that a targeted 7B-parameter model can outperform generalist models ten times its size.

The Problem: Category Bias and Weak Grounding

Current VLMs struggle with instance-level localization due to what the authors term category bias. For example, if a model is prompted with an image of a specific blue bowl and asked to find "the bowl" in a cluttered kitchen scene, it will frequently identify the most salient or generic bowl in the image rather than the specific blue one provided in the prompt.

The authors attribute this failure to two main factors:

  1. Semantic Shortcuts: Models over-rely on the text label (e.g., "bowl") as a prior, effectively ignoring the fine-grained visual details of the specific instance provided in the support images.
  2. Weak Grounding: Even when category names are deliberately removed from the prompt, the model's internal attention mechanisms remain diffuse. The model tends to scan the entire image generally rather than anchoring its focus on the specific regions defined by the support bounding boxes.

The FOCUS Framework

To address these shortcomings, the authors propose FOCUS (Forcing Object-level Constraints and Understanding through Support). The framework operates without category supervision and utilizes a two-stage training pipeline:

1. Category-Agnostic Attention Optimization

First, the researchers stripped all category names from the training prompts, forcing the model to rely solely on images and coordinate data. They introduced a novel Bounding Box Attention Loss ($L_{bbox}$). This loss function explicitly penalizes the model if its internal attention tokens for the query image fail to "look" at the tokens representing the support bounding boxes. Essentially, this stage trains the model's "eyes" to strictly follow the visual examples provided, establishing strong visual correspondence.

2. Policy Optimization via GRPO

Moving from "looking at the right spot" to "drawing the perfect bounding box" requires precision. To achieve this, the authors employed Group Relative Policy Optimization (GRPO)—a reinforcement learning technique notably used in reasoning models like DeepSeek-R1. The model generates a group of candidate bounding boxes and receives a reward based on the Intersection over Union (IoU) with the ground truth, alongside a formatting reward for adhering to correct coordinate syntax. This directly minimizes localization error without the need for a complex, separate critic model.

Datasets and Evaluation

The FOCUS model was rigorously evaluated across a suite of benchmarks designed to test generalization and robustness:

  • Video Benchmarks: LaSOT, GOT-10k (which enforces a strict split between seen and unseen object categories to test zero-shot capabilities), and TAO (a highly challenging multi-object tracking dataset).
  • Domain Shift Benchmarks: PerSeg (synthetic images) and PerMIRS (complex scenes containing multiple instances of the same category).

Key Insights

  • Scaling Isn't Everything: The most striking finding is that the 7B-parameter FOCUS model dramatically outperforms massive models like the 72B-parameter Qwen2-VL. This demonstrates that for specialized, visually grounded tasks, context-aware localization objectives matter far more than raw parameter count.
  • The "Where" Matters Early: Through ablation studies, the authors discovered that supervising attention in the first five layers of the model was significantly more effective than in the final five layers. This suggests that visual grounding must occur early in the processing pipeline before the model abstracts into high-level semantics.
  • Ditching Labels Improves Generalization: By removing category names during training, the model learned the underlying logic of visual matching rather than simply memorizing labels. This resulted in vastly improved performance when localizing "unseen" objects from categories absent in the training data.

State-of-the-Art Results

Empirical results highlight the efficacy of the FOCUS framework:

  • Superior Accuracy: On the challenging TAO dataset (4-shot), FOCUS achieved 68.5% mIoU, crushing the previous best model, IPLoc (56.1%), and the massive Qwen2-VL-72B (55.6%).
  • Zero-Shot Generalization: On the PerMIRS dataset, which specifically tests the ability to distinguish between multiple similar objects, FOCUS improved absolute performance by 19.1% over previous state-of-the-art methods in a 2-shot setting.
  • Inference Efficiency: Because the bounding box attention loss ($L_{bbox}$) is applied exclusively during training, the FOCUS model incurs zero extra computational overhead at inference time compared to a standard VLM.

Limitations and Future Directions

While FOCUS represents a major leap forward for ICOL, the authors note a few limitations. Retaining attention maps for supervision increases VRAM usage by approximately 12% during training. Furthermore, while the model excels at matching objects across independent frames, it does not currently integrate temporal consistency, which could improve performance on fast-moving objects or extreme occlusions in video data. Finally, like all VLMs, FOCUS retains some sensitivity to prompt phrasing, though its heavy reliance on visual constraints significantly mitigates this risk compared to prior models.

Summary updated

BibTeX
@inproceedings{karim2026focus,
  author = {Mohammed Asad Karim and Vinay Kumar Verma},
  title = {{FOCUS: Forcing In-Context Object Localization through Visual Support Constraints and Policy Optimization}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=KjKT2vzkyb},
}
Figure