Manuscript Offprint

arXiv:2610.10991

Region-Aware CLS Token Augmentation for Fine-Grained Image Retrieval

Ian de Holanda Cavalcanti Bezerra, Vivek Trivedy, Lucas Pascotti Valem, Longin Jan Latecki

Ian de Holanda Cavalcanti Bezerra*, Vivek Trivedy†, Lucas Pascotti Valem*, and Longin Jan Latecki†

*Institute of Mathematics and Computer Science (ICMC), University of São Paulo (USP), São Carlos, Brazil

†Department of Computer and Information Science, Temple University, Philadelphia, PA, USA

Email: idhcb.ian@usp.br, vivek.trivedy@temple.edu, lucas@icmc.usp.br, latecki@temple.edu

Abstract—Image retrieval methods often rely on a single global semantic descriptor extracted from an image, e.g., the [CLS] token in vision transformers. However, trying to squeeze all the semantic information of an image into a single descriptor can hurt downstream retrieval performance, especially for fine-grained retrieval tasks. In this work, we augment the semantic tokens in the newer visual transformers, the global [CLS] token and the four register tokens, with a carefully selected collection of spatial tokens, aiming to capture the spatial region representation that characterizes the contents captured in each of the semantic tokens. We leverage the DINOv2-reg model, which includes register tokens that emergently learn object and part-based representations. For each “cue” token ([CLS] and each register token), we find a “buddy” image patch token and extract an N×NN \times N patch region to produce a set of localized ROI tokens. Our approach automatically captures important regions of interest without any external bounding boxes or saliency modules, purely by matching semantic tokens with their spatial representation regions. Furthermore, we incorporate these tokens into a multi-vector retrieval framework inspired by ColBERT, enabling fine-grained matching via a per-token alignment mechanism while avoiding the large storage cost of keeping all patch embeddings. Through extensive experiments, we find that (1) register tokens encode useful fine-grained details that can complement the [CLS] token; (2) automatically pooled ROI tokens further improve fine-grained discrimination; and (3) multi-vector retrieval with a small set of tokens improves over a DINOv2-reg single-vector baseline while remaining tractable for large-scale search. The code is available at https://github.com/IdhcbIan/Augmenting_CLS_with_ROI_tokens.

I. INTRODUCTION

The task of image retrieval aims to retrieve the k most relevant images from a database for a given query, often by comparing learned semantic global descriptors in a shared embedding space [1]. With large-scale vision transformers (ViTs) [2], [3], a common practice is to prepend a token at position zero of the patch sequence so that, after the self-attention layers, it attends to all parts of the image and represents the global semantic content with a single token (the [CLS] token). While effective for broad semantic matching, a single vector may struggle to capture the subtle, localized details crucial for fine-grained retrieval [4]. Such limitations follow from fundamental theoretical constraints on the representational capacity of single-vector embeddings, which cannot express all possible retrieval relations regardless of model size or training data [5].

An intuitive strategy for capturing richer details is to use multiple tokens per image [1], [6]. In NLP, ColBERT [6] matches all query tokens against those of the database, improving fine-grained retrieval. However, comparing entire sets of image patch tokens is computationally and storage-wise prohibitive.

Classical region-of-interest (ROI) methods relied on key-point detectors such as SIFT [7] or saliency maps, and later on CNN-based part detection and attention [8], [9] that highlight discriminative regions without bounding-box annotations. Vision transformers add a new perspective: self-attention and special tokens (e.g., [CLS]) reveal local semantics, segmenting objects or parts even without explicit supervision [3], [10].

In line with these developments, we propose an efficient multi-vector retrieval framework that automatically discovers discriminative local regions within a single forward pass. We build on DINOv2-reg [11], which augments the ViT with register tokens: extra learnable tokens that act as “attention sinks”, absorbing global context so that patch embeddings remain faithful to their local regions. The original authors discard these tokens after training; we instead retain them as additional descriptors that capture object- and part-level features. Fig. 1 motivates this choice: even among images of the same class, a query [CLS] token is frequently more similar (by dot product) to a register token of another image than to that image’s [CLS] token.

That register tokens carry part-level semantics exploitable for retrieval is a non-obvious finding that challenges prevailing practice, in which they are typically overlooked in downstream use [11]. This is analogous to how ColBERT [6] repurposed BERT's existing token representations for late interaction rather than designing new encoders. Crucially, unlike approaches that add external modules [8], [9], learned queries [12], or explicit supervision, register tokens are already produced by the standard forward pass at a small inference cost. Concurrent work corroborates this: register neurons encode meaningful information even without register training [13], and DINOv3 [14] keeps registers as a core architectural element.

Figure

Fig. 1. Distribution of most similar tokens of the database images for any given [CLS] token from queries of images in COCO's dog class [15]. Interestingly, a [CLS] token from a query image is often most similar to one of the four register tokens of other images (64%), not their [CLS] token (36%).

We further extend each image’s token set with a small number of ROI tokens, each summarizing a localized region around a “cue” token (the [CLS] and register tokens). For every cue token we locate its most similar patch, its “buddy”, and mean-pool a small region around it, capturing parts such as a bird’s head or a car’s headlight without any external proposals, bounding boxes, or saliency modules (Section III-B). Fig. 2 illustrates the selected buddy tokens, which focus on

Figure

Fig. 2. For each cue token (the [CLS] and register tokens), the location of its corresponding buddy token is shown by the black max box. They focus on different parts of the semantic input: dog's head, dog's paw, cat's ear, and ball.

different parts of the semantic input. Our experiments show that matching registers alongside the [CLS] token already improves retrieval, and that adding ROI tokens improves it further (Section IV).

For matching, we adopt a per-token, max-sim alignment inspired by ColBERT [6]; because each image carries only ∼\sim10 tokens, the similarity computation and storage remain tractable, and retrieval can be further accelerated with single-vector approximations of multi-vector search [16] (Section III-C).

Our main contributions are summarized as follows:

  • A buddy token mechanism conditioned on the cue tokens that exploits the existing DINov2-reg representations to select and spatially ground a compact set of ROI descriptors. These descriptors are then combined using matching inspired by ColBERT. The resulting representation improves over the corresponding baseline that uses only a single vector while limiting computational and memory costs.

  • Observation and experiments showing that a small number of cue-conditioned ROI tokens can improve retrieval accuracy, particularly for fine-grained class differences. These ROI tokens are selected from internal DINov2-reg representations without external proposals or manual bounding boxes.

• Observation and experiments showing that register tokens carry meaningful information for image retrieval.

References (47)