TeTRA -VPR: A Ternary Transformer Approach for Compact Visual Place Recognition

Oliver Grainge, Michael Milford, Indu Bodala, Sarvapali D. Ramchurn, Shoaib Ehsan · 2025

Read TeTRA -VPR: A Ternary Transformer Approach for Compact Visual Place Recognition by Oliver Grainge, Michael Milford, Indu Bodala, Sarvapali D. Ramchurn, Shoaib Ehsan (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-02511.txt.

Introduction

Oliver Grainge and co-authors present TeTRA-VPR, a compact transformer method for visual place recognition, the task of locating a photo by matching it to a database of geo-tagged images. Their 2025 paper notes that vision transformers are accurate but too large for drones and mobile robots with tight memory and compute budgets.

TeTRA squeezes the transformer step by step down to two bit precision and binarizes its final embedding layer. A staged distillation plan keeps the small model's power close to its full size teacher. On standard benchmarks TeTRA cut memory use by up to 69 percent and latency by 35 percent against efficient baselines, with recall equal or slightly better. The authors aim it at real field robots.

Catalog record

CREATOROliver Grainge, Michael Milford, Indu Bodala, Sarvapali D. Ramchurn, Shoaib Ehsan
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE31 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-02511

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

TeTRA -VPR: A Ternary Transformer Approach for Compact Visual Place Recognition Oliver Grainge, Michael Milford, Indu Bodala, Sarvapali D. Ramchurn, Shoaib Ehsan Abstract Visual Place Recognition (VPR) localizes a query image by matching it against a database of geo-tagged reference images, making it essential for navigation and mapping in robotics. Although Vision Transformer (ViT) solutions deliver high accuracy, their large models often exceed the memory and compute budgets of resource-constrained platforms such as drones and mobile robots. To address this issue, we propose TeTRA , a ternary transformer approach that progressively quantizes the ViT backbone to 2-bit precision and binarizes its final embedding layer, offering substantial reductions in model size and latency. A carefully designed progressive distillation strategy preserves the representational power of a full-precision teacher, allowing TeTRA to retain or even surpass the accuracy of uncompressed convolutional counterparts, despite using fewer resources. Experiments on standard VPR benchmarks demonstrate that TeTRA reduces memory consumption by up to 69% compared to efficient baselines, while lowering inference latency by 35%, with either no loss or a slight improvement in recall@1. These gains enable high-accuracy VPR on power-constrained, memory-limited robotic platforms, making TeTRA an appealing solution for real-world deployment. I Introduction Visual Place Recognition (VPR) is essential in a broad range of robotics applications, including navigation, mapping, and long-term autonomy. By identifying the location of a query image through visual matching against a geo-tagged database, VPR provides a robust localization capability in environments where GPS or other external signals may be unreliable. Commonly, VPR is framed as an image retrieval problem, where the goal is to extract discriminative features from an input image and retrieve the most similar images from a large database using vector search [ 1 , 2 , 3 ] . In this setting, the challenge lies in designing effective feature representations and similarity measures that can reliably match images despite variations in appearance, viewpoint, and other environmental conditions. Fig. 1: TeTRA block diagram illustrating the ternary and binary training pipeline. The pre-training stage employs distillation-based, progressive quantization-aware training with attention, classification, and patch token losses. During fine-tuning, all backbone layers except the last are frozen while supervised contrastive learning is performed using a multi-similarity loss. To achieve this objective, recent approaches have leveraged large scale vision foundation models such as DinoV2 to enhance VPR robustness and accuracy [ 4 ] . Many studies have demonstrated that these approaches maintain high accuracy and robustness against natural variations that occur in images of the same location, for instance changes in lighting, occlusions, viewpoint and appearance [ 5 , 6 , 7 ] . However, these methods typically incur significant computational and memory overhead [ 8 , 9 , 10 , 11 ] . This challenge is further compounded by the common use of multi-stage inference pipelines in which hierarchical coarse to fine retrieval mechanisms are employed, thereby increasing the cost of feature extraction, embedding and similarity computation [ 12 , 13 ] . Although smaller convolutional architectures can be used to reduce complexity, they often fall short of the accuracy achieved by methods based on foundation ViTs, particularly in scenarios with significant appearance changes [ 6 , 14 ] . In order to reduce the computational cost of applying foundation Vision Transformers (ViTs), inference optimization techniques can be employed. These include distillation, which compresses the knowledge of a large teacher model into a smaller student model; pruning, which removes redundancies by eliminating unnecessary weights, groups, or structures; and quantization, which lowers the precision of weights and activations to reduce memory requirements and alleviate bandwidth bottlenecks, ultimately accelerating inference [ 9 , 10 , 8 ] . Despite the success of transformer models in VPR, distillation and pruning have primarily been applied to convolution-based models, with quantization following a similar trend [ 9 , 10 , 8 ] . In particular, 8-bit integer quantization has been shown to significantly reduce resource usage with minimal impact on accuracy [ 8 ] . However, in the extreme quantization case where weights and activations are fully binarized, the efficiency gains come at the cost of substantial accuracy degradation [ 15 , 16 ] . Recently, in natural language processing tasks, ternary networks that use just one additional bit per weight compared to binary networks have demonstrated near full precision accuracy while achieving up to a sixteen fold reduction in memory usage [ 17 ] . Building upon these insights, we introduce TeTRA , a two stage training pipeline that synergizes distillation with ternary quantization of a transformer-based architecture, guided by a progressive quantization schedule. In TeTRA , knowledge transfer is carefully structured to preserve the representations of the full precision teacher while aggressively reducing bit widths of the student. The backbone is quantized to ternary precision, while embeddings are further compressed using binary representations. Given the inherent challenges of such extreme quantization, particularly with regard to convergence stability and performance degradation [ 15 , 16 ] , we propose a progressive distillation strategy that incrementally refines both ternary and binary representations smoothing the transition from full precision training to quantized aware training. Extensive experiments demonstrate that TeTRA achieves retrieval accuracy on par with full-precision convolution models while significantly reducing model size and inference latency. The main contributions of this work are: • Ultra-Low-Bit Quantization for Transformers in VPR: We propose TeTRA , a method that compresses a Vision Transformer by quantizing its backbone weights to ternary and its final embedding layer to binary, while preserving the expressive power necessary for robust place recognition under severe appearance changes. • Progressive Distillation for Stable Extreme Quantization: We develop a progressive distillation pipeline that gradually transitions from full-precision to extremely low-bit training. This pipeline leverages multi-level supervision, aligning classification tokens, patch tokens, and attention maps with a powerful teacher model to maintain high-quality representations. • State-of-the-Art Memory Efficiency and Pareto-Optimal Performance: We show that TeTRA achieves up to 69% lower model size and 35% lower latency compared to standard baselines, while maintaining or improving recall across diverse VPR benchmarks. This delivers a new Pareto frontier of memory and latency versus accuracy for resource-constrained robotic applications. This paper is structured as follows: Section II reviews related work on visual place recognition and efficient neural networks. Section III details our TeTRA training pipeline, including pre-training and fine-tuning. Section IV presents experiments on VPR benchmarks, evaluating accuracy, memory, and latency. Finally, Section V discusses key findings and future directions. II Related Work VPR has been a longstanding research topic in robotics and computer vision, with applications spanning localization, navigation, and long-term autonomy. Early methods relied on hand-crafted features, whereas modern approaches leverage deep learning to learn more robust and discriminative representations. II-A Early VPR Methods Initial VPR feature extraction techniques were based on local keypoint descriptors such as SIFT, SURF, and RootSIFT [ 18 , 19 , 20 ] . These features were typically aggregated into global representations using methods like Bag-of-Words (BoW) and VLAD, enabling efficient image retrieval [ 21 , 22 ] . While computationally efficient, their reliance on manually designed descriptors made them vulnerable to changes in viewpoint, illumination, and appearance [ 23 ] . II-B CNN-based Approaches The introduction of Convolutional Neural Networks (CNNs) significantly improved VPR

Read the complete text