---
title: 'OV-RefOD: Open Vocabulary Referring Detection'
url: https://www.emergentmind.com/topics/open-vocabulary-referring-object-detection-ov-refod
type: topic
---

# OV-RefOD: Open Vocabulary Referring Detection

Searching arXiv for the two specified papers to ground the article.
arXiv search: 2312.02103
arXiv search: 2507.19891
Open Vocabulary Referring Object Detection (OV-RefOD) denotes object localization conditioned on text queries that are not restricted to a fixed detector label set. In the reported literature, this setting appears both as zero-shot localization from rich referring expressions and as prompt-based extraction of object boxes from open-source vision-language models (VLMs). The supplied sources describe two distinct mechanisms for this problem: learning region-text alignment for arbitrary concepts through pseudo-labeling in a CLIP-based detector, and modifying final-layer cross-modal attention at inference time to improve localization and interpretability without retraining [2312.02103] [2507.19891].

## 1. Scope and task formulation

Open-vocabulary object detection (OVOD) is described as extending target vocabulary from pre-defined categories to open-world by transferring knowledge of arbitrary concepts from vision-language pre-training models to detectors. Within that framing, prior OVOD methods are characterized as suffering from indirect supervision or limited transferable concepts, and the PLAC formulation is introduced to directly learn region-text alignment for arbitrary concepts [2312.02103].

For referring-object localization, the reported RefCOCOg protocol uses the validation split with approximately \(47\text{K}\) expressions, where queries describe individual objects with rich attributes, including color, relationships, and text. Evaluation is zero-shot: no fine-tuning on referring-expression-comprehension data is performed. Given each image-query pair, the OVOD model scores regions against a single text embedding and returns the top-\(k\) regions, with \(k \in \{1,5,10\}\) [2312.02103].

A second formulation treats OV-RefOD as prompt-conditioned box prediction in general-purpose VLMs. The reported benchmark uses the COCO val 2017 novel split with 2,064 \((\text{image}, \text{query})\) pairs. Queries take the form: “Give the normalized bounding box coordinates in \([x1,y1,x2,y2]\) of all instances of \(\{cls\}\) in the image.” Ground truth is drawn from the COCO base-vocabulary subset [2507.19891].

These protocols indicate that OV-RefOD, as represented here, covers both arbitrary-concept grounding from free-form language and open-vocabulary localization from explicit detection prompts.

## 2. PLAC: pseudo-labeling for arbitrary concepts

The PLAC method uses Deformable DETR with a Swin-Transformer backbone, either Tiny or Base. The detector outputs \(N\) object queries, each decoded into a region embedding \(o_i \in \mathbb{R}^D\), a bounding box \(b_i\), and a classification score. For any text concept \(c\), whether a base class name or a pseudo-label, a frozen CLIP text embedding \(e_c^t \in \mathbb{R}^D\) is obtained via \(\mathrm{CLIP}_T(x^t)\). Region-text alignment is scored by
\[
p_{i,c} = \sigma\!\left(\alpha \cdot (e_c^t)^\top o_i + \beta\right),
\]
with fixed \(\alpha = 25\) and \(\beta = -0.25\). At inference, a free-form query text \(x^q\) is encoded as \(e_q^t = \mathrm{CLIP}_T(x^q)\), each region embedding \(o_i\) is scored by \(p_{i,q}\), and the top-\(k\) regions are selected [2312.02103].

The pseudo-label generator itself is trained on CC3M, consisting of \(3\) million web image-alt-text pairs, while CLIP encoders remain frozen. For each pair \((x^i, x^t)\),
\[
e^i = \mathrm{CLIP}_I(x^i), \qquad e^t = \mathrm{CLIP}_T(x^t).
\]
The PLAC module is a 3-layer MLP with GeLU mapping \(\mathbb{R}^D \rightarrow \mathbb{R}^D\):
\[
e^p = \mathrm{PLAC}(e^i).
\]
Training combines mean-squared error,
\[
L_{\mathrm{MSE}} = \frac{1}{|B|}\sum_k \|e_k^t - e_k^p\|_2^2,
\]
with Relational KD (RKD),
\[
L_{\mathrm{RKD}} = \sum_{j \ne k} \mathrm{smooth}_1\!\big(\psi(e_j^t,e_k^t)-\psi(e_j^p,e_k^p)\big),
\]
where
\[
\psi(u,v)=\frac{\|u-v\|_2}{\mu},
\]
and \(\mu\) is the average distance over the batch. The overall objective is
\[
L_{\mathrm{PLAC}} = L_{\mathrm{MSE}} + \lambda_{\mathrm{RKD}} L_{\mathrm{RKD}},
\]
with \(\lambda_{\mathrm{RKD}} = 20\). Optimization uses AdamW with learning rate \(10^{-3}\), batch size \(8192\), for \(4\) epochs [2312.02103].

Pseudo-label extraction on detection images proceeds by training a Region Proposal Network using Deformable DETR as RPN on LVIS-base annotations only. From each training image, up to approximately \(300\) proposals are extracted. Proposals are discarded if they have IoU \(>0.7\) against any base annotation or objectness \(<0.2\). For each remaining proposal \(b_{\mathrm{RPN}}\), the image crop is encoded with \(\mathrm{CLIP}_I\), projected through PLAC, and the resulting \(e^p\) is stored as the region’s pseudo-text embedding [2312.02103].

## 3. Detector training and zero-shot OV-RefOD with PLAC

Full OVOD training uses two-stage bipartite matching. In Stage 1, object queries are matched to annotated base-class text embeddings \(\{e_c^t \mid c \in C_{\mathrm{base}}\}\). In Stage 2, leftover queries are matched to PLAC pseudo-labels \(\{e^p\}\) on proposals. Matching uses the Hungarian algorithm with a cost combining classification and, for base annotations, box regression [2312.02103].

For each matched pair \((i,c)\), the binary target is \(y_{i,c}=1\), and for all other \((i,c')\), \(y=0\). The classification loss is binary cross entropy,
\[
L_{\mathrm{cls}} = -\sum_{i,c}\left[y_{i,c}\log p_{i,c} + (1-y_{i,c})\log(1-p_{i,c})\right].
\]
The box loss, applied only for Stage 1 base matches, is
\[
L_{\mathrm{box}} = \sum_i \left[L_1(b_i,b_i^{gt}) + L_{\mathrm{GIoU}}(b_i,b_i^{gt})\right].
\]
The total OVOD loss is
\[
L_{\mathrm{OVOD}} = L_{\mathrm{cls}} + \lambda_{\mathrm{box}} L_{\mathrm{box}},
\]
with \(\lambda_{\mathrm{box}}=5\) in Deformable DETR [2312.02103].

On LVIS rare classes, the reported AP\(_r\) values are as follows. In the controlled setting with fewer than \(30\) million backbone parameters: ViLD (RN50) achieves \(16.7\), RegionCLIP \(17.1\), VLDet (Swin-T) \(24.1\), and PLAC (Swin-T) \(24.3\), which is reported as \(+5.2\) over base-only. In the large-scale setting with more than \(30\) million parameters: OWL-ViT (ViT-L) achieves \(25.6\), VLDet (Swin-B) \(27.6\), and PLAC (Swin-B) \(27.0\) [2312.02103].

For RefCOCOg zero-shot Precision@\(\!k\), the reported values are:

- VLDet T: \(32.4\) at @1, \(46.4\) at @5, \(56.3\) at @10  
- PLAC T: \(41.2\) at @1, \(74.1\) at @5, \(84.3\) at @10, with increases of \(8.8\), \(27.7\), and \(28.0\)  
- VLDet B: \(35.3\) at @1, \(50.5\) at @5, \(61.5\) at @10  
- PLAC B: \(40.2\) at @1, \(73.9\) at @5, \(82.9\) at @10, with increases of \(4.9\), \(23.4\), and \(21.4\) [2312.02103]

A common misconception is that open-vocabulary referring localization is confined to noun concepts. The RefCOCOg results are reported specifically for arbitrary concepts, and the source explicitly distinguishes noun-concept benchmarks from referring-expression evaluation with richer linguistic content [2312.02103].

## 4. Reverse Contrast Attention as an inference-time intervention

Reverse Contrast Attention (RCA) is formulated for vision-language transformers at the final transformer layer. Hidden states \(Z=\{z_i\}_{i=1}^n\) are produced from value vectors \(V=\{v_j\}\) via attention distribution \(A=\{\alpha_{ij}\}\):
\[
z_i = \sum_{j=1}^n \alpha_{ij} v_j.
\]
RCA reweights each \(\alpha_{ij}\) so that mid-range activations near a central value \(m\) are amplified while extreme high or low activations are suppressed. Two equivalent options are given:
\[
\alpha'_{ij} = \frac{1}{1+\gamma |\alpha_{ij}-m|},
\]
or
\[
\alpha'_{ij} = \exp\!\big(-\gamma [\alpha_{ij}-m]^2\big).
\]
The parameter \(\gamma\) has default value \(1\), and \(m\) is chosen as the mean of the column-wise max attention across heads [2507.19891].

The modified weights are renormalized by
\[
\hat{\alpha}_{ij} = \frac{\max(\alpha'_{ij},0)}{\sum_{k=1}^n \max(\alpha'_{ik},0)}.
\]
The method can also be viewed as an element-wise flooring of hidden states,
\[
\hat{Z}=\{\max(z_i,\vartheta)\mid z_i\in Z,\ \vartheta\in\mathbb{R}\},
\]
with threshold \(\vartheta\) tied to \((m,\gamma)\). The RCA-modified hidden state is
\[
\hat{z}_i = \sum_{j=1}^n \hat{\alpha}_{ij} v_j.
\]
For each dimension \(d\), using
\[
J_{\downarrow}=\{j \mid v_j(d)<\vartheta\}, \qquad J_{\uparrow}=\{j \mid v_j(d)\ge \vartheta\},
\]
the decomposition
\[
\hat{z}_i(d)=\sum_{j\in J_{\downarrow}}\hat{\alpha}_{ij}v_j(d) + \sum_{j\in J_{\uparrow}}\hat{\alpha}_{ij}v_j(d)
\]
leads to the flooring inequality
\[
\hat{z}_i(d) \ge \vartheta + (v^- - \vartheta)\sum_{j\in J_{\downarrow}} \hat{\alpha}_{ij},
\]
where \(v^-\) is the minimal subthreshold component. When \(\sum_{j\in J_{\downarrow}}\hat{\alpha}_{ij}\) is small, \(\hat{z}_i(d)\approx \vartheta\), enforcing the flooring operation [2507.19891].

Algorithmically, RCA is inserted after the final-layer unnormalized attention scores \(QK^\top\) are scaled by \(1/\sqrt{d_k}\) and softmaxed. Per-query \(\alpha_{ij}\) is computed by taking cross-head maxima, \(m\) is computed as \(\mathrm{mean}_j(\max_h A_{ij}^{(h)})\), \(\alpha'_{ij}\) is formed by one of the two reweighting rules, the result is renormalized, and final hidden states are recomputed. No fine-tuning is required [2507.19891].

## 5. Metrics and experimental protocols

The PLAC-based RefCOCOg evaluation uses Precision@\(\!k\), defined as the fraction of queries whose ground-truth box appears in the top-\(k\). The protocol is explicitly zero-shot, with the model run directly on image-query pairs and regions ranked by the single query text embedding [2312.02103].

The RCA study introduces FitAP because many VLMs do not supply usable confidence scores for conventional object-detection AP. FitAP is defined as
\[
\mathrm{FitAP} = \frac{1}{10}\sum_{i=1}^{10} AP(\Theta_i),
\]
where \(\Theta_i \in \{0.50, 0.55, \ldots, 0.95\}\). For each threshold \(\Theta\), detections are ranked by
\[
s_k = A_{\mathrm{box},k} \times \mathrm{IoU}_k,
\]
where \(A_{\mathrm{box},k}\) is normalized box area and \(\mathrm{IoU}_k\) is computed against the closest unmatched ground-truth box at threshold \(\Theta\). Precision-recall curves are then formed in the standard way over this ranking, and the area under the curve gives \(AP(\Theta)\) [2507.19891].

The RCA evaluation covers fifteen open-source VLMs. Reported late-fusion or modular models are Ovis2-34B, SAIL-VL-1.6-8B, Qwen2.5-VL-7B, MiniCPM-o-2.6, Kimi-VL-A3B, Gemma3-27B, VARCO-VISION-14B, PaliGemma2-3B-mix-448, and Moondream2. Reported early-fusion or tightly integrated models are DeepSeek-VL2, Valley-Eagle, WeThink-Qwen2.5VL-7B, POINTS1.5-Qwen2.5-7B, valley2_dpo, and Ristretto-3B. All checkpoints come from HuggingFace, LLM size is below \(35\)B, model outputs are parsed with regex to extract boxes normalized to \([0,1]\), and attention is extracted at the final cross-modal layer [2507.19891].

A second common misconception is that confidence-based AP is the only valid way to evaluate detection quality. The FitAP construction is an explicit counterexample: it replaces detector confidence with the product of normalized box area and IoU when model outputs do not expose a conventional confidence channel [2507.19891].

## 6. Empirical patterns, interpretability, and reported directions

For RCA, the reported FitAP table shows that \(11\) of \(15\) models improved. Qwen2.5-VL-7B increases from \(37.00\) to \(46.85\), a reported \(+26.6\%\), and MiniCPM-o-2.6 increases from \(0.03\) to \(0.07\), a reported \(+139\%\). Other positive changes include SAIL-VL-1.6-8B from \(4.85\) to \(5.67\) \((+17.0)\), DeepSeek-VL2 from \(3.39\) to \(4.00\) \((+18.0)\), PaliGemma2-3B-mix from \(38.80\) to \(41.12\) \((+5.98)\), and Moondream2 from \(47.00\) to \(47.08\) \((+0.17)\). Negative cases include WeThink-Qwen2.5VL-7B \((-5.51)\), Ristretto-3B \((-13.0)\), POINTS1.5-Qwen2.5-7B \((-3.03)\), and Valley-Eagle \((-4.36)\) [2507.19891].

The interpretability analysis ties performance to attention sharpness and fusion timing. The sharpness measure \(m\) is the mean column-max of multi-head attention, and \(|S|\) is the number of hidden-state dimensions below \(\vartheta\). Pearson correlations between \(m\) and \(|S|\) are reported as \(r=-0.09, p=4\times10^{-5}\) for Qwen2.5-VL-7B, \(r=-0.73, p<10^{-5}\) for DeepSeek-VL2, and \(r=-0.02\) (not significant) for WeThink. In the two benefit cases, increasing \(m\) correlates with decreasing \(|S|\), which is reported as supporting the flooring inequality. The same analysis states that late-fusion models benefit most from RCA, while DeepSeek-VL2, despite being an early-fusion Mixture-of-Experts model, also improves, suggesting that internal disentanglement can arise under early fusion if capacity and gating permit [2507.19891].

Qualitative visualizations are consistent with the quantitative results. Reported examples include recovery of missed boxes for bus, elephant, and small objects in Qwen2.5-VL-7B, sharper localization of elephants, cups, umbrellas, and airplanes in PaliGemma2-3B-mix and valley2_dpo, and a “kite” case in which previously subdued token patches become prominent after RCA, leading to correct detection [2507.19891].

For PLAC, practical recommendations emphasize training the PLAC MLP on large-scale image-text datasets such as CC3M, COYO-700M, and LAION-400M; keeping CLIP encoders frozen; and using two-stage Hungarian matching so that true base annotations are matched first and noisy pseudo-labels do not overwhelm learning. Suggested extensions include adding a cross-modal contrastive loss, hard-negative mining, end-to-end PLAC integration into DETR’s decoder, and leveraging relation phrases such as verbs and adjectives through soft templates or multi-sentence descriptions [2312.02103].

Taken together, the reported literature indicates two non-exclusive trajectories for OV-RefOD. One trajectory expands detector supervision beyond noun concepts by generating pseudo-text embeddings for arbitrary regions and training a CLIP-based detector against them. The other trajectory modifies cross-modal attention at inference time to expose semantically relevant but previously subdued evidence in multimodal transformers. This suggests that OV-RefOD can be advanced either by strengthening the training signal for arbitrary concepts or by rebalancing inference-time attention in already trained VLMs [2312.02103] [2507.19891].

Source: https://www.emergentmind.com/topics/open-vocabulary-referring-object-detection-ov-refod