arXiv:2610.33641cs.CVOct 2026

Manuscript Offprint

arXiv:2610.33641

LENS: Likelihood Evaluation and Neighbor Smoothing for Attribute-Based Person Retrieval on Unseen Cameras

Nguyen Dang Duy Tan, Vo Thanh Nguyen, Linh T. T. Tran, Huynh Nguyen Phat

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

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 zgz_g, while the L2-normalized mean of the 98 patch tokens of the DINov3 model forms ege_g. (b) Five of the M=50M = 50 nearest neighbors of g by cosine similarity of ege_g (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.

References (37)