[Paper Review] NFormer: Robust Person Re-identification with Neighbor Transformer
NFormer proposes a Neighbor Transformer network that models cross-image relations across all input images during both training and inference to suppress outlier features and improve robustness in person re-identification. By introducing Landmark Agent Attention for efficient affinity computation and Reciprocal Neighbor Softmax for sparse, relevant attention, NFormer achieves state-of-the-art performance on four large-scale Re-ID datasets, outperforming prior methods by up to 4.4% in mAP.
Person re-identification aims to retrieve persons in highly varying settings across different cameras and scenarios, in which robust and discriminative representation learning is crucial. Most research considers learning representations from single images, ignoring any potential interactions between them. However, due to the high intra-identity variations, ignoring such interactions typically leads to outlier features. To tackle this issue, we propose a Neighbor Transformer Network, or NFormer, which explicitly models interactions across all input images, thus suppressing outlier features and leading to more robust representations overall. As modelling interactions between enormous amount of images is a massive task with lots of distractors, NFormer introduces two novel modules, the Landmark Agent Attention, and the Reciprocal Neighbor Softmax. Specifically, the Landmark Agent Attention efficiently models the relation map between images by a low-rank factorization with a few landmarks in feature space. Moreover, the Reciprocal Neighbor Softmax achieves sparse attention to relevant -- rather than all -- neighbors only, which alleviates interference of irrelevant representations and further relieves the computational burden. In experiments on four large-scale datasets, NFormer achieves a new state-of-the-art. The code is released at \url{https://github.com/haochenheheda/NFormer}.
Motivation & Objective
- To address high intra-identity variations in person re-identification caused by occlusions, viewpoint changes, and clothing variations.
- To overcome the limitation of existing methods that model relations only within small training batches or ignore inter-image interactions entirely.
- To enable robust representation learning by explicitly modeling relations among all input images during both training and inference.
- To reduce computational cost in large-scale Re-ID by efficiently approximating full affinity matrices and focusing attention on relevant neighbors.
- To develop a plug-and-play module that enhances existing Re-ID models without architectural overhaul.
Proposed method
- Introduces Landmark Agent Attention (LAA) to factorize the full affinity matrix using a small set of landmark agents in the feature space, reducing quadratic complexity to linear in the number of landmarks.
- Employs Reciprocal Neighbor Softmax (RNS) to enforce sparse attention only on mutually relevant neighbors, minimizing interference from irrelevant representations.
- Constructs a global relation map between all input image representations using a self-attention mechanism enhanced by low-rank factorization.
- Applies global average pooling to extract final features after relation modeling and aggregation.
- Uses a dual-branch architecture where features are refined through iterative message passing across neighbor images based on learned affinities.
- Enables end-to-end training and inference with full interaction between all images, closing the gap between training and test-time behavior.
Experimental results
Research questions
- RQ1Can modeling inter-image relations across all input images during both training and inference improve robustness in person re-identification?
- RQ2How can the computational cost of full pairwise affinity modeling be reduced without sacrificing representation quality?
- RQ3Can sparse attention focused only on relevant neighbors improve feature discrimination and reduce noise?
- RQ4Does the proposed method generalize across diverse Re-ID benchmarks with varying intra-identity image counts?
- RQ5To what extent can NFormer be integrated with existing SOTA models to further boost performance?
Key findings
- NFormer achieves a new state-of-the-art on Market-1501, achieving 94.7% mAP and 91.1% top-1 accuracy when combined with ResNet-50.
- On DukeMTMC-reID, NFormer improves mAP by 3.5 percentage points over the second-best method ISP when using ResNet-50.
- On MSMT17, NFormer with ResNet-50 achieves 83.5% mAP, outperforming the second-best method RGA-SC by 2.3 percentage points.
- On CUHK03, NFormer improves mAP by 4.2% over the baseline on the manually labeled set and 3.5% on the detected set when using ResNet-50.
- When combined with ABDNet, NFormer achieves 95.7% mAP on Market-1501, surpassing the second-best method by 1.9% in mAP and 1.0% in top-1 accuracy.
- Ablation studies confirm that NFormer's performance gain is most significant on datasets with higher average images per identity, indicating stronger neighbor information utilization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.