Abstract
We cast visual retrieval as a regression problem by posing triplet loss as a regression loss. This enables epistemic uncertainty estimation using dropout as a Bayesian approximation framework in retrieval. Accordingly, Monte Carlo (MC) sampling is leveraged to boost retrieval performance. Our approach is evaluated on two applications: person re-identification and autonomous car driving. Comparable state-of-the-art results are achieved on multiple datasets for the former application. We leverage the Honda driving dataset (HDD) for autonomous car driving application. It provides multiple modalities and similarity notions for ego-motion action understanding. Hence, we present a multi-modal conditional retrieval network. It disentangles embeddings into separate representations to encode different similarities. This form of joint learning eliminates the need to train multiple independent networks without any performance degradation. Quantitative evaluation highlights our approach competence, achieving 6% improvement in a highly uncertain environment.
Introduction
Standard deep learning models for visual retrieval—such as those used in person re-identification or autonomous driving—are often "overconfident," providing ranked results without a measure of reliability. Furthermore, real-world retrieval tasks are frequently multi-modal and conditional. In autonomous driving, for instance, two events might be considered similar based on goal-oriented actions (e.g., turning) or stimulus-driven triggers (e.g., stopping for a pedestrian). This paper addresses these challenges by reformulating the ranking problem into a regression framework, allowing for robust uncertainty estimation and improved retrieval accuracy.
Methodology
Triplet Loss as Regression
The core innovation lies in mathematically reframing the traditional triplet loss—typically used to ensure a query is closer to a positive match than a negative one—as a trivariate regression problem. This transformation allows the model to leverage Monte Carlo (MC) Dropout during inference. By performing multiple stochastic forward passes, the system approximates a Bayesian posterior, enabling the calculation of both the mean embedding and its associated epistemic uncertainty (variance).
Multi-Modal Conditional Retrieval
To handle complex driving scenarios, we developed a network that integrates video features (ResNet) with vehicle sensor data (CAN bus), such as steering angle and braking. As illustrated in Figure 1, the architecture employs Conditional Similarity Networks (CSN). These networks use learnable masks to disentangle a common space embedding into distinct representations for different similarity notions. This allows a single model to retrieve clips based on specific criteria (e.g., "similar steering") without requiring separate networks for each task.
Experimental Results
Person Re-Identification
The model was benchmarked on the Market-1501 and DukeMTMC-reID datasets. On Market-1501, incorporating MC sampling into a DenseNet backbone improved the Mean Average Precision (mAP) from 68.62% to 72.19% when paired with adaptive weight triplet loss, demonstrating the effectiveness of the probabilistic approach in standard retrieval tasks.
Autonomous Driving and Uncertainty
Evaluation on the Honda Driving Dataset (HDD) revealed that MC sampling acts as a powerful denoising mechanism. The model demonstrated higher certainty for goal-oriented actions (like turns) which are clearly reflected in CAN sensors. In contrast, stimulus-driven actions (like avoiding a parked car) exhibited higher uncertainty due to the external nature of the triggers.
As shown in Figure 5, increasing the number of MC samples significantly boosts retrieval performance, particularly in these high-uncertainty "Stimulus" scenarios, where we observed a 6% improvement in mAP over the deterministic baseline.
Conclusion
By casting retrieval as a regression problem, we enable the use of Bayesian techniques to quantify model uncertainty. Our results show that MC sampling not only provides a confidence metric but also serves as a robust tool for enhancing retrieval accuracy in complex, multi-modal environments. Future work will focus on optimizing the computational cost of multiple forward passes and exploring aleatoric uncertainty to further refine multi-task learning.
Summary updated