arXiv:2611.05599cs.CVNov 2026

Manuscript Offprint

arXiv:2611.05599

CAPTOR: text-encoder-free grounding by counting caption co-occurrence over the visual words of a frozen encoder

Elad Yoshai, Natan T. Shaked

Abstract

Grounding a text query in an image needs a matrix scoring every term against every patch. Vision-language models compute it with an aligned text encoder, which many image encoders, such as histopathology-related models trained on slides alone, lack. The Caption-Anchored Patch-Term Occurrence Representation (CAPTOR) estimates the matrix without a text encoder. It clusters a frozen image encoder's patch tokens into visual words and describes each captioned image by its share of patches in each word. A term signature is the standardized difference of those shares between images whose captions mention the term and the rest. The matrix factorizes into a term-by-word table and a query-independent image factor, so an image is encoded once and a new term adds one table row. Against every training-free baseline, CAPTOR leads on Common Objects in Context (COCO), Pascal Visual Object Classes (VOC) and Cityscapes. On COCO, scored on the cells one object owns, it reaches 0.565 mean intersection over union (mIoU) against 0.502. On all three, it is also level with a text alignment trained on the same backbone, which needs gradients, a text encoder and several times the captions. On held-out breast-cancer slides, it exceeds the strongest baseline scoring patches with a pathology text encoder by 0.160 mIoU. Read through CAPTOR, UNI, an encoder trained on slides alone, exceeds such baselines by 0.132 on a common grid. Counting can therefore give a text interface to any image encoder trained without language, wherever captioned images exist.

Keywords: open-vocabulary segmentation, vision-language models, visual words, concept grounding, caption supervision, computational pathology

1. Introduction

A vision and language model connects a text query to an image through a term-by-patch compatibility matrix, which holds one number for each term and each patch saying how strongly that term applies there. Segmentation maps, retrieval scores and the weights of text-image cross-attention are all readings of it. The matrix is normally produced by a text encoder that turns each term into a query vector, which is then compared with a key at every patch.

That route needs a text encoder aligned to the image encoder, and many image encoders have none. Aligning one needs large sets of paired images and text and the training to use them, which natural images supply and specialized domains often do not. Histopathology has the gap. Some pathology foundation models were trained on image and caption pairs and can be queried with text [1]. Others were trained on slide patches alone [2, 3, 4] and carry no language, so no text query can be formed against them. A trained alignment such as Talk2DINO [5] does not remove this need, since it maps a pretrained text encoder onto each image encoder and must be trained again for every encoder it serves.

In this paper, we propose a new technique that builds the matrix without a text encoder. We cluster a frozen image encoder's patch tokens into K visual words and describe each captioned image by the fraction of its patches in each word. For every term we then measure how those fractions differ between images

∗^{*}Corresponding author.

Email address: nshaked@tau.ac.il (Natan T. Shaked) whose captions mention the term and images whose captions do not. We express that difference in units of what shuffled captions produce for the same term. We call the resulting table of terms against words, and the method that builds it, the Caption-Anchored Patch-Term Occurrence Representation (CAPTOR). The compatibility matrix is that table composed with the patch-to-word assignment.

Counting how caption words co-occur with quantized image regions goes back to automatic image annotation [6, 7, 8], which named images and their regions with words before vision-language models and foundation encoders existed. CAPTOR uses counting for a different purpose, to build for a frozen foundation encoder the term-by-patch matrix that a vision-language model forms with a text encoder. It differs from that work in what it estimates, how it normalizes the estimate and what the estimate is used for. The first difference is the estimate, counted signatures that a permutation null puts on one scale across terms of very different frequency, so that the best term at a patch can be read as its label. Frequency correction, more than the choice of statistic, is what matters, and the permutation null performs it best among the corrections tried. The second is the interface. The matrix factorizes into a term-by-word table times an image factor that does not depend on the query, which is exactly the term-patch scoring half of a cross-attention layer. An image is therefore encoded once. Querying a term reads one row of a small table, and adding a term the captions support takes one counting pass rather than a pass through a text encoder. The third is where it applies. Because no text encoder enters at any stage, the construction gives a text interface to image encoders that have none.

We compare CAPTOR with the training-free methods built on Contrastive Language-Image Pre-training (CLIP) [9], which, like CAPTOR, take no gradient. Each is run from its released code and, except on VOC, also given the same propagation as a control. CAPTOR leads them on Common Objects in Context (COCO) [10], scored on the grid cells that one object owns, and on Pascal Visual Object Classes (VOC) [11]. Under the standard full-image protocol, it also leads them on Cityscapes [12] and is level with them on COCO-Object. It is also level on COCO, VOC and Cityscapes with Talk2DINO, which trains an alignment on top of CLIP's text encoder with several times the captions, while taking no gradient, consulting no text encoder and encoding each image once. In their released settings rather than the matched ones, Talk2DINO scores higher on COCO and VOC, and ProxyCLIP and Talk2DINO score higher on COCO-Object. Both build on the 400 million image-caption pairs of CLIP, where CAPTOR counts at most 30,000 COCO captions. In histopathology, on patients held out from every choice, CAPTOR on the text-trained encoder CONCH exceeds every baseline that reads CONCH's text encoder without borrowing CAPTOR's visual words, and UNI, trained on slides alone, read through CAPTOR exceeds those baselines on breast and is level with them on lung.

The contributions of this paper are the following.

  • A text-encoder-free and gradient-free estimator of the term-by-patch compatibility matrix, counted from captions and normalized by a permutation null, with joint words and joint estimation that resolve where visual words and terms overlap (Section 3).

  • The factorization A=SΨA = S\Psi, which replaces the term-patch scoring of cross-attention for the terms a caption corpus supports. An image is encoded once, a term is one row, and the hard, soft and propagated scoring rules are three choices of one image factor (Sections 3 and 5.3).

  • An evaluation against baselines reproduced to their published numbers and, except on VOC, given the same propagation, on a matched protocol and on the standard full-image protocols, with paired intervals throughout (Sections 5.1 and 5.2).

  • Text-queryable patch description for pathology encoders that have no text encoder, which on breast-cancer tissue exceeds dense scoring with a trained pathology text encoder and on lung is level with it, with a specialist vocabulary acquired from a few thousand captions (Section 5.4).

Table 1: Comparison of previous families of methods. Every method, CAPTOR included, uses development labels only to select its settings.

Method familyText encoderGradientsSegmentation labels in trainingCost of a new term
Dense CLIP scoring [14, 15]YesNoNoEncoder pass
Several backbones [16]YesNoNoEncoder pass
Trained alignment [5, 18, 20]YesYesNoEncoder pass
Mask supervised [19]YesYesYesEncoder pass
CAPTORNoNoNoCaption counting

References (36)