Manuscript Offprint
arXiv:2610.33641LENS: Likelihood Evaluation and Neighbor Smoothing for Attribute-Based Person Retrieval on Unseen Cameras
Abstract
Attribute-based person retrieval ranks surveillance images from a binary query of semantic attributes, but mean Average Attribute Degree of Match (mADM) drops on unseen cameras as predicted probabilities shift. Common pipelines rank gallery images by their L1 distance to the query, which penalizes a confident single-attribute mismatch no more than small uncertainties across many attributes, while post-hoc recalibration fitted on source validation data fails to transfer because the per-attribute maps fitted on source data do not match those of new cameras. We propose LENS (Likelihood Evaluation and Neighbor Smoothing), combining fine-tuned DINOv3 and CLIP models with a distilled student. LENS regularizes mutually exclusive attribute groups with group cross-entropy in training, scores gallery images by the log-likelihood of the exact query, and smooths gallery logits over nearest neighbors using DINOv3 appearance features from the same forward pass. On held-out datasets, all three changes raise mADM: the likelihood score improves all six retrieval metrics for the main ensemble and mADM for all 48 development models, and training-free kNN smoothing improves all 46 tested development models. On the hidden test set of the UPAR 2027 benchmark, LENS reaches 68.17 mADM.
1. Introduction
Attribute-based person retrieval finds people in surveillance cameras from a binary query of gender, age, clothing, and accessories without a query image [30]. It is usually solved by predicting attribute probabilities for each gallery image and comparing them with the binary query [28, 30]. A central difficulty arises when test images come from cameras never seen in training, because changes in viewpoint, lighting, resolution, and annotation rules between datasets [30] can shift the predicted probabilities. In the 2023 and 2024 UPAR challenges [6, 7], which trained on PA100k [20], PETA [8], and Market-1501 [18, 41] and tested on unseen datasets, one team (2023) and ten teams (2024) beat the attribute recognition baseline, but no team beat the retrieval baseline in either edition.
The UPAR 2027 starter kit ranks gallery images by the L1 distance between the binary query and the predicted attribute probabilities [36], and earlier work used Euclidean or calibrated, weighted distances [28]. The 2024 report suggested that overfitted models become over- or under-confident [7]. We test both aspects under a leave-one-dataset-out protocol across the three datasets. First, a limitation of L1 distance is that it sums attribute errors linearly, so a confident mismatch on one queried attribute adds no more penalty than small uncertainties spread across several attributes. Ranking instead by the log-likelihood of the exact query [16, 26] penalizes near-zero probabilities on queried attributes and raises retrieval mADM on the exact same predicted probabilities without retraining. Second, decomposing negative log-likelihood into calibration and refinement terms [14] shows that miscalibration on held-out datasets is real, and comparing per-attribute Platt maps shows that the biases fitted on source validation data are nearly uncorrelated with those of the held-out dataset. Fitting per-attribute Platt scaling [23] on source validation splits therefore shifts attribute logits in directions that do not match the new cameras and lowers mADM on both held-out datasets.
Because probability shifts cannot be corrected after training from source validation data in our setting, we propose LENS (Likelihood Evaluation and Neighbor Smoothing), shown in Fig. 1. LENS combines fine-tuned DINOv3 [27] and CLIP [24] models, each equipped with a Pre-LN cross-attention query head, together with a distilled student [2, 13]. The CLIP model also adds an attribute text score and interpolates its fine-tuned weights with the pretrained initialization via WiSE-FT [37]. Because the likelihood score depends on the quality of the predicted probabilities, we regularize mutually exclusive attribute groups with a group cross-entropy loss during training. At inference, we smooth the predicted logits of each gallery image
→ DINov3 → CLIP → student ✗ frozen □ parameter-free ☐ training only □ low → high value
(a) Each gallery image
(b) Test-time gallery refinement

Figure 1. Overview of the LENS retrieval pipeline. (a) Three attribute models process one gallery image g from the held-out PETA fold. Each encoder freezes the patch embedding and first eight blocks (snowflake icon) and fine-tunes the remaining blocks with a query head (Fig. 2). The DINov3 and CLIP models use BCE and group CE losses, and the student is distilled from two teachers. At inference, their logits are averaged into , while the L2-normalized mean of the 98 patch tokens of the DINov3 model forms . (b) Five of the nearest neighbors of g by cosine similarity of (shown here with pretrained DINov3 features, retrieving the same person in other frames) are averaged in kNN smoothing (Eq. (6)), flipping the Age-Old logit sign to match the label and improving the rank of g under Eq. (5) from 22 to 10.
with those of its nearest neighbors in the gallery using DI-NOv3 appearance features from the same forward pass, an automatic post-processing step that the benchmark rules allow because it uses no knowledge of the hidden test set [35]. Our main contributions are:
• Scoring gallery images by the log-likelihood of the exact query beats L1 distance on all six metrics for the main ensemble and on mADM for every development model.
• We show that miscalibration on held-out datasets costs mADM, but per-attribute recalibration maps fitted on source data do not match the held-out data, so source-fitted recalibration lowers mADM.
• Regularizing mutually exclusive attribute groups with group cross-entropy in training raises mADM on both held-out datasets, alone and with kNN smoothing.
• Smoothing gallery logits over DINov3 nearest neighbors needs no training and raises mADM for every tested development model on both held-out datasets.
Calibration and attribute dependencies. Because log-likelihood scoring heavily penalizes near-zero probabilities on queried attributes, its effectiveness hinges on probability reliability under domain shift. While post-hoc methods like Platt [23] or temperature scaling [12] adjust logits on validation data, calibration maps degrade under distribution shift [22]. Using the decomposition of proper scoring rules into calibration and refinement [14], we find that held-out datasets are miscalibrated but that per-attribute maps fitted on source data do not match them, so source-fitted calibration hurts retrieval. Rather than adjusting logits post-hoc, LENS enforces probability consistency during training: while the weighted sigmoid cross-entropy of DeepMAR [17] scores each attribute with an independent sigmoid, we regularize mutually exclusive groups (such as age, hair length, clothing colors [30]) with categorical group cross-entropy.
Test-time gallery smoothing. Single-frame gallery predictions remain vulnerable to viewpoint, blur, or occlusion. In image retrieval and person re-identification, test-time methods refine rankings using gallery structure: k-reciprocal re-ranking explores mutual neighbors [42], query expansion averages top retrieved features [5], and database-side augmentation combines each database descriptor with those of its neighbors [1, 11, 34]. However, these methods require query and gallery images to share a visual feature space, which is absent in attribute-based retrieval where the query is a binary attribute vector. For classification under shift, LAME [3] adapts predictions via graph optimization; LENS instead reuses DINOv3 patch tokens from the same forward pass to perform training-free kNN smoothing on attribute logits before scoring.
3. Method
Task and evaluation metric. Each query is a binary vector over attributes. Under the UPAR protocol [29, 30], each distinct ground-truth label vector in the gallery forms a query, and an image with binary labels is an exact match when . Let be the share of attributes on which agrees with , normalized relative to the gallery mean as
Let be the ranks of the exact matches in , and let be the image at rank . Average Attribute Degree of Match (ADM) is defined as
and mADM is the mean of ADM(q) over all queries; we also report mAP, mINP [38], Rank-1, Rank-5, and Rank-10 (in points). Unlike mAP, which gives zero credit to near matches, mADM takes its score at the exact-match ranks while giving partial credit to near matches ranked ahead of them via . Consequently, a single confident error on an exact match or an unpenalized mismatch on a distractor pushes exact matches down in rank. LENS addresses this in three connected stages (Fig. 1): learning non-conflicting attribute logits from localized visual
one layer, d = 1024 (DINOv3 head: 1280)

Figure 2. Pre-LN cross-attention query head with hidden width ( for DINOv3; for CLIP and the student; see Sec. 4). Inset: Age-Old cross-attention weights over the grid of in Fig. 1.
and semantic cues, ranking gallery images by their exact-query log-likelihood rather than L1 distance, and smoothing single-frame logit noise over gallery neighbors.
Attribute recognition. Predicting reliable attribute logits on unseen cameras faces two competing demands: small region-level attributes (footwear, headwear, bags) need fine spatial localization, whereas clothing colors and global attributes need semantic invariance to lighting, viewpoint, and camera shifts. We therefore pair two encoders that are pretrained differently: self-supervised DINOv3 [27] learns spatially localized patch tokens that separate fine visual details, whereas CLIP [24] learns from image-text pairs and is more robust under distribution shift [9], even though it can embed visually distinct images close together [32]. LENS therefore pairs a fine-tuned DINOv3 model with a fine-tuned CLIP model (Fig. 1a). As shown in Fig. 1a, each encoder freezes its patch embedding and first eight blocks (snowflake icon), fine-tuning the remaining blocks with a one-layer Pre-LN cross-attention query head [19, 25] (Fig. 2), where K learned attribute queries attend directly to relevant image regions (Fig. 2 inset) before an MLP and linear classifiers output visual logits . To incorporate CLIP's language alignment without overfitting its text encoder, the CLIP model adds a language-anchored text score to its visual query head logit (Fig. 1a):
where P is the frozen pretrained projection mapping the image CLS token to the joint embedding space, the overline denotes normalization, (plus a learn-able residual scaled by 0.1) is the prompt-ensembled attribute text embedding minus the neutral prompt “a person” (which subtracts shared person-level features and isolates the attribute direction), and is a learnable bias initialized from log-prior odds. Because fine-tuning on source cameras can distort pretrained representations [15], we interpolate fine-tuned CLIP weights with pretrained weights via WiSE-FT [37]: .
While pairing DINOv3 and CLIP strengthens the visual and semantic features, standard training with the class-balanced binary cross-entropy of DeepMAR [17], , treats the attributes as independent binary tasks on hard labels. This leaves two failure modes for probability-based ranking: independent sigmoids allow mutually exclusive attributes (such as competing age ranges or clothing colors) to fire at once, and hard labels on occluded or low-resolution crops push logits toward overconfident errors. To prevent conflicting predictions within the mutually exclusive attribute groups , we regularize both models in training with a categorical group cross-entropy loss over each group that has a single active attribute :
where skips groups without a unique positive label (such as unlabeled or multi-color clothing), and we optimize so attributes within each active group compete. To soften overconfident errors on ambiguous crops and add a third model, we distil a DINOv3 student [13] from DINOv3 and CLIP teachers on mixup [40] and CutMix [39] images [2], minimizing against the teacher ensemble probabilities . At inference, the logits of DINOv3, CLIP, and the student are averaged into (Fig. 1a), giving candidate probabilities without tuned thresholds.
Exact-query likelihood scoring. Given the predicted probabilities for each gallery image , the starter kit ranks the gallery by the L1 distance [36]. Because equals the expected number of mismatched attributes, it sums errors linearly and cannot separate one confident mismatch from many small uncertainties: a distractor matching attributes that is confidently wrong on one queried attribute ( for ) adds less than 1 to and can rank ahead of an exact match with slight uncertainty across several attributes. Because mADM (Eq. (2)) scores the ranking at the positions of exact matches, gallery images should instead be ordered by the probability that all attributes match
| Fold | Score | mADM | mAP | mINP | R-1 | R-5 | R-10 |
|---|---|---|---|---|---|---|---|
| PETA | L1 distance [36] | 62.88 | 24.03 | 18.67 | 21.75 | 39.59 | 47.22 |
| likelihood (5) | 69.91 | 35.51 | 29.08 | 31.57 | 54.68 | 63.07 | |
| likelihood | 69.84 | 35.38 | 28.99 | 31.59 | 54.17 | 63.30 | |
| group-softmax | 68.62 | 35.47 | 28.77 | 32.10 | 54.34 | 63.41 | |
| Market | L1 distance [36] | 69.29 | 25.08 | 8.97 | 32.53 | 51.46 | 58.00 |
| likelihood (5) | 74.90 | 34.39 | 16.84 | 37.97 | 61.30 | 70.87 | |
| likelihood | 74.59 | 34.17 | 16.48 | 38.28 | 60.77 | 71.13 | |
| group-softmax | 73.63 | 34.38 | 16.57 | 39.64 | 61.92 | 71.97 |
Table 1. Scoring rules on the DINOv3 + CLIP ensemble (CLIP with text score and WiSE-FT), in points. Bold marks the better of L1 distance and likelihood. Same single-seed logits as Tab. 4.
at once. By the probability ranking principle [26], this order is optimal for exact-match relevance when the probabilities are accurate and attributes are conditionally independent given the image. DAP [16] divides each posterior by its attribute prior ; in log-space, the prior term depends only on and cancels across , whereas shifting logits by source log-priors before distorts under prior shift. LENS ranks candidates by the exact-query log-likelihood against the 40-bit query (Fig. 1b):
which simplifies via to , reducing scoring all queries against the gallery to one matrix product plus one constant per image.
kNN smoothing. Because the likelihood score (Eq. (5)) heavily penalizes confident errors, an exact match whose logit on one attribute is flipped by single-frame occlusion, blur, or angle suffers a steep rank drop. The test-time gallery refinement stage in Fig. 1b addresses this vulnerability: surveillance images are not independent because a gallery image shares visual neighbors of two kinds, namely other frames of the same person and different individuals with matching clothing and appearance. Averaging logits across such visually consistent neighbors suppresses single-frame noise without labels or queries. Rather than running a separate network, we reuse the localized patch tokens of the DINOv3 encoder from the same forward pass (Fig. 1a), defining appearance feature as the L2-normalized mean of its 98 patch tokens. Let be the nearest neighbors of in by cosine similarity of (Fig. 1b). We smooth the ensemble logits over before scoring:
| PETA | Market | |
|---|---|---|
| NLL on the held-out dataset (nat/image) | 6.20 | 5.26 |
| NLL on source datasets (nat/image) | 4.48 | 4.28 |
| Calibration term, held-out dataset | 1.11 | 1.01 |
| Calibration term, source datasets | 0.80 | 1.06 |
| mADM, no recalibration | 69.53 | 74.66 |
| mADM, oracle recalibration | 71.95 | 76.26 |
| mADM, source recalibration | 68.51 | 73.65 |
| mADM, logits divided by T = 0.9 | 69.16 | 74.44 |
| mADM, logits divided by T = 1.1 | 69.64 | 74.79 |
| mADM, logits divided by T = 1.3 | 69.49 | 74.82 |
Table 2. Recalibration after training for the DINOv3 + CLIP ensemble (seed 1, CLIP with text score, without WiSE-FT) using per attribute. Oracle recalibration fits on held-out dataset labels, and source recalibration fits on source validation images. The calibration term [14] is the NLL removed by the per-attribute Platt map fitted on the same images (a lower bound).
and substitute (with candidate probabilities ) into Eq. (5).
4. Experiments
Evaluation protocol. We use a leave-one-dataset-out protocol across PA100k [20], PETA [8], and Market-1501 [18, 41]: models train on two source training splits and are evaluated on the held-out validation gallery, where each distinct label vector forms a query. Held-out PETA has 6,963 images and 1,763 queries (89.0k source training images from PA100k + Market-1501); held-out Market-1501 has 16,458 images and 956 queries (87.7k source images from PA100k + PETA). Holding out PA100k (9,986 images, 1,479 queries) leaves only 18.7k combined source training images from PETA + Market-1501 (nearly five times fewer than the other folds), so we train full multi-encoder ensembles on the PETA and Market-1501 folds and include two PA100k-fold models in our 48 development models spanning ViT and ConvNeXt encoders at sizes B, L, and H (41 on PETA, 5 on Market-1501, and 2 on PA100k). Replicate standard deviation across seeds is 0.15 mADM points (paired bootstrap standard error of a difference 0.24 to 0.29); single-seed runs in Tabs. 2 and 4 match two-seed CLIP averages in Tabs. 1 and 3 within ≤ 0.31 points.
Implementation details. The benchmark uses binary attributes across PETA, Market-1501, and PA100k, with five mutually exclusive groups: three age ranges, three hair lengths, two lower-body clothing types, 12 upper colors, and 12 lower colors. The encoders are DINOv3 ViT-H+/16 [27] (840M parameters, query head width ) and OpenAI CLIP ViT-L/14 [24] (303M parameters, ), both trained at . The student is DINOv3
| Model | PETA | Market | Mean |
|---|---|---|---|
| DINOv3 | 66.36 | 73.87 | 70.12 |
| DINOv3, two fine-tuned copies | 66.69 | 74.00 | 70.34 |
| CLIP | 65.81 | 71.72 | 68.76 |
| CLIP + text score | 67.17 | 72.32 | 69.74 |
| CLIP + text score + WiSE-FT | 67.38 | 71.98 | 69.68 |
| DINOv3 + CLIP | 68.92 | 74.46 | 71.69 |
| DINOv3 + CLIP (text score) | 69.49 | 74.79 | 72.14 |
| DINOv3 + CLIP (text score, WiSE-FT) | 69.91 | 74.90 | 72.40 |
Table 3. Held-out mADM (points) of individual models and ensembles under the likelihood score. The second row averages two DINOv3 models fine-tuned independently with the same recipe. The last row is the final setting without group CE, kNN smoothing, and the student.
ViT-L/16 (304M, ) at (for CPU-only inference, DINOv3 ViT-B/16, 86M, at ), distilled with (50% mixup [40]/CutMix [39]). Encoders freeze the patch embedding and first eight blocks, fine-tuning remaining blocks on a single GPU (RTX 5090 or RTX PRO 6000) with AdamW (, , weight decay 0.05), batch size 64, and EMA. Base learning rate is at the top block (0.75 layer decay below) and in the query head. WiSE-FT on CLIP uses . Training combines BCE with DeepMAR weights [17], label smoothing [31], and group CE weight . Teachers train for 3 epochs and the student for 20 epochs. At inference, kNN smoothing uses DINOv3 patch features with , (0.1 s on GPU for 6,963 images), and probabilities are clipped to (logits within ) before Eq. (5), bounding single-attribute penalty at nats.
Scoring gallery images. We first measure how much the scoring rule changes the ranking when predicted probabilities are fixed. Table 1 compares the L1 distance of the starter kit [36] with the likelihood score (Eq. (5)) on the same DINOv3 + CLIP ensemble. The likelihood score raises mADM by 7.03 points on PETA and 5.61 points on Market-1501, and increases all five other metrics. This result repeats across all 48 development models, beating L1 on every model by 3.7 to 9.1 mADM (+8.16 and +9.10 on the two held-out PA100k models).
Figure 3a shows the cause on a query for an adult woman. Four of the five images that L1 distance ranks first are frames of one man: the model predicts he is not female ( to 0.04) while all 39 other attributes match. This single confident mismatch adds less than 1 to the L1 distance, smaller than the sum of slight uncertainties across 40 attributes on exact matches, whereas adds 3.2 to 3.6 nats. LENS strongly penalizes the near-zero female prob-
(a) held-out PETA: adult, female, short hair, brown top, blue lower, trousers/shorts
L1 distance (0 of top 5 exact)

not female not female not female
LENS (3 of top 5 exact)
5 wrong
not female
(b) held-out PETA: adult, short hair, red top, white top, black lower, trousers/shorts, backpack
L1 distance (0 of top 5 exact)
2 wrong
not white top
2 wrong
LENS (3 of top 5 exact)
not red top
2 wrong

exact
2 wrong
exact
2 wrong
exact
(c) held-out Market: adult, female, long hair, short sleeves, red top, short lower, white lower, trousers/shorts, bag
L1 distance (0 of top 5 exact)
3 wrong
LENS (4 of top 5 exact)
3 wrong
3 wrong
3 wrong
3 wrong
3 wrong

exact
exact
exact
exact
3 wrong
Figure 3. Top five gallery images of three held-out queries under the L1 distance and under LENS (likelihood score with kNN smoothing). Both rankings start from the same probabilities of the DINOv3 + CLIP models of the fold (trained with group CE on the two other datasets, CLIP without WiSE-FT), and kNN smoothing uses the fine-tuned DINOv3 features of the fold ( , ). Green borders mark exact matches, and the labels under the other images give the single mismatched attribute or the number of mismatched attributes. The queries were selected among those with 2 to 8 exact matches for which the L1 distance has no exact match in its top five and LENS has at least three.
PETA fold (39 attributes)
Market fold (34 attributes)

fitted on the source datasets

fitted on the source datasets
Figure 4. Per-attribute Platt parameters fitted on source vs. held-out labels for the ensemble in Tab. 2 ( dashed, Pearson r, omitting attributes without both classes on the held-out split).
ability and places three exact matches in the top five. In the other two queries of Fig. 3, L1 distance also has no exact match in its top five, whereas LENS places three and four. Against other scoring rules, literal log-DAP [16] subtracts a query-only prior constant ( ), and weighting attributes by source AUC, a simplified form of the weighting in [28], changes mADM by on PETA/Market-1501/PA100k for earlier single models. On the same logits, replacing sigmoids in each mutually exclusive group by (group-softmax in Tab. 1) slightly raises mAP and Rank-k but lowers mADM by 1.22 and 0.96 points, plausibly because it forces one pos-
(a) Student distillation vs. hard labels (held-out PETA)

training epochs
training epochs
(b) Held-out NLL by attribute group & group CE (PETA)

12 upper colors:
Figure 5. Improving predicted probabilities on held-out PETA. (a) Training the DINOv3 ViT-L/16 student ( ) on hard labels alone vs. distilling from DINOv3-L + CLIP-L teachers across epochs. (b) Held-out NLL per image by attribute group (asterisks mark groups in Eq. (4)), with a PETA crop whose 12-color probability sum drops from 1.42 to 1.30.
itive even when a group has zero or two active labels.
Post-hoc recalibration on unseen cameras. We test whether models are miscalibrated on new cameras with per-attribute Platt scaling [23], mapping each logit via in two ways: oracle recalibration fits , on held-out labels to measure the mADM cost of miscalibration,
| DINov3 + CLIP ensemble | PETA | Market | Mean |
|---|---|---|---|
| Likelihood score | 69.84 | 74.59 | 72.22 |
| + kNN smoothing | 70.23 | 75.31 | 72.77 |
| + group CE | 70.89 | 75.28 | 73.08 |
| + group CE + kNN smoothing (final) | 71.03 | 75.66 | 73.35 |
| kNN with pretrained DINov3 | 71.00 | 75.52 | 73.26 |
| row 4 + query expansion | 70.99 | 75.94 | 73.47 |
Table 4. Held-out mADM (points) of the DINov3 + CLIP ensemble (seed 1) under the likelihood score. Group CE is applied to both models, and kNN smoothing uses , , and fine-tuned DINov3 features except in the fifth row. The fourth row is the final setting without the student; the first row differs slightly from the last row of Tab. 3 because this table uses CLIP seed 1 only and a retrained DINov3 model.
whereas source recalibration fits on the validation splits of the two source datasets (using the seed-1 DINov3 + CLIP ensemble without WiSE-FT, which saved source validation logits).
Table 2 shows that held-out miscalibration is real: oracle recalibration raises mADM by 2.42 points on PETA and 1.60 points on Market-1501. However, source recalibration lowers mADM by about one point on both folds, and lowers mADM on 47 of the 48 development models (except one linear-head model on the smaller PA100k fold).
The cause is not that miscalibration appears only on new cameras: on the source datasets, the calibration term is 72% of the held-out value in the PETA fold and exceeds it in the Market-1501 fold. Rather, the per-attribute maps differ between the two fits (Fig. 4): the scale is above 1 for most attributes on both splits, but the per-attribute values correlate weakly (scale and 0.12, bias and 0.20 on PETA and Market-1501). Source-fitted maps therefore shift logits in directions that do not match the new cameras. A single shared temperature changes mADM by at most 0.4 points on PETA and Market-1501 (but by -0.42 and -1.34 at and 1.3 for one earlier PA100k-fold model). Miscalibration costs mADM, but source validation data cannot guide its correction, so LENS uses uncalibrated logits and improves probabilities via stronger models, group CE, and kNN smoothing.
The role of two different encoders. Because probabilities cannot be fixed after training, we improve the probabilities themselves (Tab. 3). On held-out PETA under Eq. (5), a DINov3-pretrained ConvNeXt-B [21] with a query head (Fig. 6a) reaches 59.59 mADM (62.26 for ConvNeXt-L), and single-encoder query-head models with AIMv2-L [10], SigLIP2-L [33], or MetaCLIP2-H [4], trained at lower input resolutions, reach 57.98, 60.00, and 63.15, below DINov3 ViT-H+/16 (66.36). Averaging two fine-tuned copies of DINov3 raises the two-fold mean mADM by only 0.22 points over a single copy, whereas pairing DINov3 with CLIP raises the mean by 1.57 points even though CLIP alone is weaker than DINov3, showing that pairing two differently pretrained encoders helps more than averaging two copies of one encoder. Adding the CLIP text score and WiSE-FT raises the ensemble by another 0.71 points in the mean, mostly on PETA.
| Neighbor feature | M, α | PETA | Market | PA100k |
|---|---|---|---|---|
| no smoothing (mADM) | 68.45 | 78.14 | 73.86 | |
| DINov3, mean patch token | 3, 0.25 | -0.03 | +0.67 | +0.52 |
| DINov3, mean patch token | 10, 0.25 | +0.56 | +0.86 | +0.67 |
| DINov3, mean patch token | 20, 0.25 | +0.64 | +0.86 | +0.65 |
| DINov3, mean patch token | 50, 0.25 | +0.60 | +0.85 | +0.70 |
| DINov3, mean patch token | 50, 0.2 | +0.70 | +0.69 | +0.66 |
| DINov3, mean patch token | 20, 0.5 | -1.58 | +0.82 | -0.29 |
| DINov3, CLS token | 20, 0.25 | +0.54 | +0.64 | +0.78 |
| CLIP, mean patch token | 20, 0.25 | +0.23 | +1.07 | +0.29 |
Table 5. Change in mADM (points) from Eq. (6) relative to the first row on an earlier DINov3 + CLIP ensemble of the PETA fold (without text score) across the unseen target gallery (held-out PETA) and the two source-domain validation galleries (Market-1501 and PA100k, excluded from training).
(a) Generality across all 46 models (pretrained DINov3, M=50)

(b) Feature space & neighborhood size M
Image g' & top-3 neighbors
Figure 6. Generality and feature analysis of kNN smoothing. (a) mADM across all 46 development models with saved gallery features (, ) using pretrained DINov3 features: all 41 PETA models ([+0.11, +1.65]) and all 5 Market-1501 models ([+1.00, +1.21]) improve. (b) Mean mADM across the three galleries in Tab. 5 vs. (), with a PETA crop and top-3 neighbors.
To isolate distillation across training length, Fig. 5a trains the DINov3 ViT-L/16 student on the PETA fold using DINov3 ViT-L/16 and CLIP ViT-L/14 teachers. At 3 epochs, distillation raises held-out PETA mADM by 0.40
| Final model | mADM |
|---|---|
| DINov3 ViT-B/16 student | 63.65 |
| DINov3 + CLIP + DINov3 ViT-L/16 student | 67.22 |
| + text score, WiSE-FT, kNN smoothing | 67.83 |
| + group CE for DINov3 and CLIP | 68.17 |
Table 6. mADM (points) on the hidden test set of the UPAR 2027 benchmark under the likelihood score. All models are trained on the training and validation splits of the three datasets.
points over hard labels alone (65.55 vs. 65.15). Extending hard-label training from 3 to 5 epochs does not improve mADM (64.96) and worsens refinement from 5.51 to 5.58 nats (even as total NLL drops from 6.91 to 6.77 nats), whereas distillation keeps improving the student through 10 epochs to 66.81 mADM. Adding the 10-epoch ViT-L/16 student to the DINov3 + CLIP ensemble raises PETA mADM from 69.91 to 70.24.
Group CE and kNN smoothing. Because the likelihood score depends on probability quality, we regularize mutually exclusive groups in training with group CE (Fig. 5b). Table 4 evaluates group CE and kNN smoothing on both held-out datasets: group CE raises mADM by 1.05 points on PETA and 0.69 points on Market-1501, and also improves the DINov3 model alone from 65.95 to 67.25 on PETA and from 73.38 to 74.41 on Market-1501. Meanwhile, kNN smoothing raises mADM by 0.39 and 0.72 points alone, and adds 0.14 (within noise) and 0.38 points after group CE. Pretrained DINov3 features without fine-tuning give nearly the same gain on PETA and about two thirds of the gain on Market-1501, showing that the neighbor features need no task fine-tuning. Query expansion [5] raises mADM on Market-1501 (75.94) but not on PETA (70.99) and lowers Rank-5 and Rank-10 on both folds, so we omit it.
Sensitivity of kNN smoothing. Table 5 varies , , and the neighbor feature. On the two source-domain validation galleries, and form a broad plateau, and every setting on it transfers positively to held-out PETA (+0.56 to +0.70 in Tab. 5, +0.52 with the student at , , and +0.73 to +0.83 on held-out Market-1501 for the Market-fold ensemble; only over-smooths PETA by -1.58). We fix and from this source-validation plateau.
already helps on Market-1501 (+0.67) and PA100k (+0.52) but not on PETA (-0.03). Under DINov3 appearance features, the top-1 neighbor shares all 40 ground-truth labels with the image for of Market-1501, of PA100k, and of PETA images (Fig. 1b, Fig. 6b), as of Market-1501 queries have more than one exact match in the gallery whereas of PETA queries have a single one. On Market-1501, the few nearest neighbors are mostly frames of the same person; on PETA, which has fewer repeated identities, likely averages over different pedestrians with similar clothing, whereas neighbors found by predicted probability cosine similarity (, ) lower PETA mADM in Tab. 1 by 0.13 points (+0.17 on Market-1501).
With frozen pretrained DINov3 features, kNN smoothing needs no training and raises mADM for all 46 development models with saved gallery features (Fig. 6a), by a median of +1.07 points on PETA and +1.12 on Market-1501. The gain shrinks as the base model gets stronger (r = -0.77 on PETA), consistent with Tab. 4.
Evaluation on the UPAR 2027 hidden test set. For the hidden test set, teacher and student models train on the combined training and validation splits of PA100k, PETA, and Market-1501 with the fold hyperparameters (Tab. 6). For CPU-only inference, a standalone DINov3 ViT-B/16 model with group CE reaches 62.47 mADM, rising to 63.15 with 10-epoch distillation and 63.65 with 20-epoch mixup/CutMix distillation. Combining DINov3 ViT-H+/16, CLIP ViT-L/14, and the DINov3 ViT-L/16 student (Fig. 1) reaches 67.22 mADM; reusing the DINov3 and student weights while adding the CLIP text score, WiSE-FT, and kNN smoothing reaches 67.83, and retraining both teachers with group CE (+0.34) reaches 68.17 mADM.
5. Limitations and future work
Our experiments cover PA100k, PETA, Market-1501, and the UPAR 2027 hidden test set with 40 binary attributes, with one or two seeds per fold model. Future work will test open-vocabulary queries and other benchmarks, unsupervised test-time calibration beyond Platt and temperature scaling, and neighbor weights that adapt to how often a person reappears in the gallery. Given privacy risks in surveillance retrieval, we use only public benchmarks.
6. Conclusion
We studied attribute-based person retrieval on unseen cameras across PA100k, PETA, Market-1501, and UPAR 2027. Ranking gallery images by the exact-query log-likelihood outperforms the L1 distance on the same predicted probabilities because it penalizes confident single-attribute mismatches. Held-out miscalibration is real, but its per-attribute direction cannot be estimated from source data, so LENS instead improves the probabilities via DINov3 and CLIP teachers, student distillation, group CE, and kNN smoothing, reaching 68.17 mADM on the UPAR 2027 hidden test set.
References
[1] Relja Arandjelović and Andrew Zisserman. Three things everyone should know to improve object retrieval. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2911–2918, 2012. 3
[2] Lucas Beyer, Xiaohua Zhai, Amélie Royer, Larisa Markeeva, Rohan Anil, and Alexander Kolesnikov. Knowledge distillation: A good teacher is patient and consistent. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 10915–10924, 2022. 1, 4
[3] Malik Boudiaf, Romain Mueller, Ismail Ben Ayed, and Luca Bertinetto. Parameter-free online test-time adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 8334–8343, 2022. 3
[4] Yung-Sung Chuang, Yang Li, Dong Wang, Ching-Feng Yeh, Kehan Lyu, Ramya Raghavendra, James Glass, Lifei Huang, Jason Weston, Luke Zettlemoyer, Xinlei Chen, Zhuang Liu, Saining Xie, Wen-tau Yih, Shang-Wen Li, and Hu Xu. Meta CLIP 2: A worldwide scaling recipe. In Advances in Neural Information Processing Systems (NeurIPS), pages 48009–48036, 2025. 7
[5] Ondřej Chum, James Philbin, Josef Sivic, Michael Isard, and Andrew Zisserman. Total recall: Automatic query expansion with a generative feature model for object retrieval. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1–8, 2007. 3, 8
[6] Mickael Cormier, Andreas Specker, Julio C. S. Jacques Junior, Lucas Florin, Jürgen Metzler, Thomas B. Moeslund, Kamal Nasrollahi, Sergio Escalera, and Jürgen Beyerer. UPAR challenge: Pedestrian attribute recognition and attribute-based person retrieval – dataset, design, and results. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision Workshops (WACVW), pages 166–175, 2023. 1
[7] Mickael Cormier, Andreas Specker, Julio C. S. Jacques Junior, Lennart Moritz, Jürgen Metzler, Thomas B. Moeslund, Kamal Nasrollahi, Sergio Escalera, and Jürgen Beyerer. UPAR challenge 2024: Pedestrian attribute recognition and attribute-based person retrieval – dataset, design, and results. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision Workshops (WACVW), pages 359–367, 2024. 1
[8] Yubin Deng, Ping Luo, Chen Change Loy, and Xiaoou Tang. Pedestrian attribute recognition at far distance. In Proceedings of the 22nd ACM International Conference on Multimedia, pages 789–792, 2014. 1, 5
[9] Alex Fang, Gabriel Ilharco, Mitchell Wortsman, Yuhao Wan, Vaishaal Shankar, Achal Dave, and Ludwig Schmidt. Data determines distributional robustness in contrastive language image pre-training (CLIP). In Proceedings of the 39th International Conference on Machine Learning (ICML), pages 6216–6234, 2022. 3
[10] Enrico Fini, Mustafa Shukor, Xiujun Li, Philipp Dufter, Michal Klein, David Haldimann, Sai Aitharaju, Victor G. Turrisi da Costa, Louis Béthune, Zhe Gan, Alexander
Toshev, Marcin Eichner, Moin Nabi, Yinfei Yang, Joshua Susskind, and Alaaeldin El-Nouby. Multimodal autoregressive pre-training of large vision encoders. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9641–9654, 2025. 7
[11] Albert Gordo, Jon Almazán, Jerome Revaud, and Diane Larlus. End-to-end learning of deep visual representations for image retrieval. International Journal of Computer Vision, 124(2):237–254, 2017. 3
[12] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In Proceedings of the International Conference on Machine Learning (ICML), pages 1321–1330, 2017. 2
[13] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. 1, 4
[14] Meelis Kull and Peter Flach. Novel decompositions of proper scoring rules for classification: Score adjustment as precursor to calibration. In Machine Learning and Knowledge Discovery in Databases (ECML PKDD), pages 68–85, 2015. 1, 2, 5
[15] Ananya Kumar, Aditi Raghunathan, Robbie Jones, Tengyu Ma, and Percy Liang. Fine-tuning can distort pretrained features and underperform out-of-distribution. In International Conference on Learning Representations (ICLR), 2022. 4
[16] Christoph H. Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 951–958, 2009. 1, 2, 4, 6
[17] Dangwei Li, Xiaotang Chen, and Kaiqi Huang. Multi-attribute learning for pedestrian attribute recognition in surveillance scenarios. In Proceedings of the 3rd IAPR Asian Conference on Pattern Recognition (ACPR), pages 111–115, 2015. 3, 4, 5
[18] Yutian Lin, Liang Zheng, Zhedong Zheng, Yu Wu, Zhilan Hu, Chenggang Yan, and Yi Yang. Improving person re-identification by attribute and identity learning. Pattern Recognition, 95:151–161, 2019. 1, 5
[19] Shilong Liu, Lei Zhang, Xiao Yang, Hang Su, and Jun Zhu. Query2Label: A simple transformer way to multi-label classification. arXiv preprint arXiv:2107.10834, 2021. 3
[20] Xihui Liu, Haiyu Zhao, Maoqing Tian, Lu Sheng, Jing Shao, Shuai Yi, Junjie Yan, and Xiaogang Wang. HydraPlus-Net: Attentive deep features for pedestrian analysis. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 350–359, 2017. 1, 5
[21] Zhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer, Trevor Darrell, and Saining Xie. A ConvNet for the 2020s. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11966–11976, 2022. 7
[22] Yaniv Ovadia, Emily Fertig, Jie Ren, Zachary Nado, D. Sculley, Sebastian Nowozin, Joshua V. Dillon, Balaji Lakshminarayanan, and Jasper Snoek. Can you trust your model's uncertainty? Evaluating predictive uncertainty under dataset shift. In Advances in Neural Information Processing Systems (NeurIPS), 2019. 2
[23] John C. Platt. Probabilities for SV machines. In Advances in Large Margin Classifiers, pages 61–74. MIT Press, 2000. 1, 2, 6
[24] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning (ICML), pages 8748–8763, 2021. 1, 3, 5
[25] Tal Ridnik, Gilad Sharir, Avi Ben-Cohen, Emanuel Ben-Baruch, and Asaf Noy. ML-Decoder: Scalable and versatile classification head. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 32–41, 2023. 3
[26] Stephen E. Robertson. The probability ranking principle in IR. Journal of Documentation, 33(4):294–304, 1977. 1, 2, 4
[27] Oriane Siméoni, Huy V. Vo, Maximilian Seitzer, Federico Baldassarre, Maxime Oquab, Cijo Jose, Vasil Khalidov, Marc Szafraniec, Seungeun Yi, Michaël Ramamonjisoa, Francisco Massa, Daniel Haziza, Luca Wehrstedt, Jianyuan Wang, Timothée Darcet, Théo Moutakanni, Leonel Sentana, Claire Roberts, Andrea Vedaldi, Jamie Tolan, John Brandt, Camille Couprie, Julien Mairal, Hervé Jégou, Patrick Labatut, and Piotr Bojanowski. DINov3. Transactions on Machine Learning Research, 2026. 1, 3, 5
[28] Andreas Specker and Jürgen Beyerer. Improving attribute-based person retrieval by using a calibrated, weighted, and distribution-based distance metric. In Proceedings of the IEEE International Conference on Image Processing (ICIP), pages 2378–2382, 2021. 1, 2, 6
[29] Andreas Specker and Jürgen Beyerer. Balanced pedestrian attribute recognition for improved attribute-based person retrieval. In Proceedings of the IEEE International Conference on Pattern Recognition Systems (ICPRS), pages 1–7, 2023. 2, 3
[30] Andreas Specker, Mickael Cormier, and Jürgen Beyerer. UPAR: Unified pedestrian attribute recognition and person retrieval. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pages 981–990, 2023. 1, 2, 3
[31] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the Inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2818–2826, 2016. 5
[32] Shengbang Tong, Zhuang Liu, Yuexiang Zhai, Yi Ma, Yann LeCun, and Saining Xie. Eyes wide shut? Exploring the visual shortcomings of multimodal LLMs. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9568–9578, 2024. 3
[33] Michael Tschannen, Alexey Gritsenko, Xiao Wang, Muhammad Ferjad Naeem, Ibrahim Alabdulmohsin, Nikhil Parthasarathy, Talfan Evans, Lucas Beyer, Ye Xia, Basil Mustafa, Olivier Hénaff, Jeremiah Harmsen, Andreas Steiner, and Xiaohua Zhai. SigLIP 2: Multilingual vision-language encoders with improved semantic under-
standing, localization, and dense features. arXiv preprint arXiv:2502.14786, 2025. 7
[34] Panu Turcot and David G. Lowe. Better matching with fewer features: The selection of useful features in large database recognition problems. In Proceedings of the IEEE International Conference on Computer Vision Workshops (ICCVW), pages 2109–2116, 2009. 3
[35] UPAR Challenge organizers. RWS2027 – UPAR challenge track 2: Attribute-based person retrieval @ WACV2027. https://www.codabench.org/competitions/18196/, 2026. Rules clarified on October 6, 2026; accessed October 2026. 2
[36] UPAR Challenge organizers. UPAR 2027 challenge track 1 & 2 development data @ real-world surveillance workshop 2027. https://github.com/speckean/UPAR-Challenge-2027, 2026. Accessed October 2026. 1, 2, 4, 5
[37] Mitchell Wortsman, Gabriel Ilharco, Jong Wook Kim, Mike Li, Simon Kornblith, Rebecca Roelofs, Raphael Gontijo-Lopes, Hannaneh Hajishirzi, Ali Farhadi, Hongseok Namkoong, and Ludwig Schmidt. Robust fine-tuning of zero-shot models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7959–7971, 2022. 1, 4
[38] Mang Ye, Jianbing Shen, Gaojie Lin, Tao Xiang, Ling Shao, and Steven C. H. Hoi. Deep learning for person re-identification: A survey and outlook. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(6):2872–2893, 2022. 3
[39] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. CutMix: Regularization strategy to train strong classifiers with localizable features. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 6022–6031, 2019. 4, 5
[40] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In International Conference on Learning Representations (ICLR), 2018. 4, 5
[41] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jingdong Wang, and Qi Tian. Scalable person re-identification: A benchmark. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1116–1124, 2015. 1, 5
[42] Zhun Zhong, Liang Zheng, Donglin Cao, and Shaozi Li. Re-ranking person re-identification with k-reciprocal encoding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3652–3661, 2017. 3