# NFormer: Robust Person Re-identification with Neighbor Transformer

arXiv: https://arxiv.org/abs/2204.09331 · HTML: https://mlsanity.com/paper/2204.09331/

## Key facts

- Cited by 57 papers in the map (data through 14 Oct 2026).
- Builds on 42 of its 72 references that are in the map.
- First posted on arXiv 20 Apr 2022.

## Builds on (most cited first, 30 of 42)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Deep Residual Learning for Image Recognition](https://mlsanity.com/paper/1512.03385/) (2015)
- [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://mlsanity.com/paper/2010.11929/) (2020)
- [End-to-End Object Detection with Transformers](https://mlsanity.com/paper/2005.12872/) (2020)
- [Generating Long Sequences with Sparse Transformers](https://mlsanity.com/paper/1904.10509/) (2019)
- [Linformer: Self-Attention with Linear Complexity](https://mlsanity.com/paper/2006.04768/) (2020)
- [Deep High-Resolution Representation Learning for Visual Recognition](https://mlsanity.com/paper/1908.07919/) (2019)
- [Random Erasing Data Augmentation](https://mlsanity.com/paper/1708.04896/) (2017)
- [In Defense of the Triplet Loss for Person Re-Identification](https://mlsanity.com/paper/1703.07737/) (2017)
- [Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking](https://mlsanity.com/paper/1609.01775/) (2016)
- [Person Transfer GAN to Bridge Domain Gap for Person Re-Identification](https://mlsanity.com/paper/1711.08565/) (2017)
- [Beyond Part Models: Person Retrieval with Refined Part Pooling (and a Strong Convolutional Baseline)](https://mlsanity.com/paper/1711.09349/) (2017)
- [Transformer Tracking](https://mlsanity.com/paper/2103.15436/) (2021)
- [Omni-Scale Feature Learning for Person Re-Identification](https://mlsanity.com/paper/1905.00953/) (2019)
- [Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro](https://mlsanity.com/paper/1701.07717/) (2017)
- [Re-ranking Person Re-identification with k-reciprocal Encoding](https://mlsanity.com/paper/1701.08398/) (2017)
- [Joint Discriminative and Generative Learning for Person Re-identification](https://mlsanity.com/paper/1904.07223/) (2019)
- [Harmonious Attention Network for Person Re-Identification](https://mlsanity.com/paper/1802.08122/) (2018)
- [Sparse Sequence-to-Sequence Models](https://mlsanity.com/paper/1905.05702/) (2019)
- [Person Re-identification in the Wild](https://mlsanity.com/paper/1604.02531/) (2016)
- [Style Normalization and Restitution for Generalizable Person Re-identification](https://mlsanity.com/paper/2005.11037/) (2020)
- [ABD-Net: Attentive but Diverse Person Re-Identification](https://mlsanity.com/paper/1908.01114/) (2019)
- [Relation-Aware Global Attention for Person Re-identification](https://mlsanity.com/paper/1904.02998/) (2019)
- [Diverse Part Discovery: Occluded Person Re-identification with Part-Aware Transformer](https://mlsanity.com/paper/2106.04095/) (2021)
- [Identity-Guided Human Semantic Parsing for Person Re-Identification](https://mlsanity.com/paper/2007.13467/) (2020)
- [Part-Aligned Bilinear Representations for Person Re-identification](https://mlsanity.com/paper/1804.07094/) (2018)
- [Hierarchical Clustering with Hard-batch Triplet Loss for Person Re-identification](https://mlsanity.com/paper/1910.12278/) (2019)
- [Interaction-and-Aggregation Network for Person Re-identification](https://mlsanity.com/paper/1907.08435/) (2019)
- [Pose-Normalized Image Generation for Person Re-identification](https://mlsanity.com/paper/1712.02225/) (2017)
- [Deeply-Learned Part-Aligned Representations for Person Re-Identification](https://mlsanity.com/paper/1707.07256/) (2017)

## Built on by (most cited first, 30 of 57)

- [Learning A Sparse Transformer Network for Effective Image Deraining](https://mlsanity.com/paper/2303.11950/) (2023)
- [Cross-Modal Implicit Relation Reasoning and Aligning for Text-to-Image Person Retrieval](https://mlsanity.com/paper/2303.12501/) (2023)
- [Diverse Embedding Expansion Network and Low-Light Cross-Modality Benchmark for Visible-Infrared Person Re-identification](https://mlsanity.com/paper/2303.14481/) (2023)
- [Magic Tokens: Select Diverse Tokens for Multi-modal Object Re-Identification](https://mlsanity.com/paper/2403.10254/) (2024)
- [Chat-Driven Text Generation and Interaction for Person Retrieval](https://mlsanity.com/paper/2509.12662/) (2025)
- [TOP-ReID: Multi-spectral Object Re-Identification with Token Permutation](https://mlsanity.com/paper/2312.09612/) (2023)
- [Transformer for Object Re-Identification: A Survey](https://mlsanity.com/paper/2401.06960/) (2024)
- [Adaptive Sparse Pairwise Loss for Object Re-Identification](https://mlsanity.com/paper/2303.18247/) (2023)
- [All in One Framework for Multimodal Re-identification in the Wild](https://mlsanity.com/paper/2405.04741/) (2024)
- [Efficient Bilateral Cross-Modality Cluster Matching for Unsupervised Visible-Infrared Person ReID](https://mlsanity.com/paper/2305.12673/) (2023)
- [Dynamic Uncertainty Learning with Noisy Correspondence for Text-Based Person Search](https://mlsanity.com/paper/2505.06566/) (2025)
- [Other Tokens Matter: Exploring Global and Local Features of Vision Transformers for Object Re-Identification](https://mlsanity.com/paper/2404.14985/) (2024)
- [Style Interleaved Learning for Generalizable Person Re-identification](https://mlsanity.com/paper/2207.03132/) (2022)
- [CA-Jaccard: Camera-aware Jaccard Distance for Person Re-identification](https://mlsanity.com/paper/2311.10605/) (2023)
- [Cross-video Identity Correlating for Person Re-identification Pre-training](https://mlsanity.com/paper/2409.18569/) (2024)
- [ReMix: Training Generalized Person Re-identification on a Mixture of Data](https://mlsanity.com/paper/2410.21938/) (2024)
- [Unity is Strength: Unifying Convolutional and Transformeral Features for Better Person Re-Identification](https://mlsanity.com/paper/2412.17239/) (2024)
- [Reciprocal Attention Mixing Transformer for Lightweight Image Restoration](https://mlsanity.com/paper/2305.11474/) (2023)
- [Rethinking Person Re-identification from a Projection-on-Prototypes Perspective](https://mlsanity.com/paper/2308.10717/) (2023)
- [PersonMAE: Person Re-Identification Pre-Training with Masked AutoEncoders](https://mlsanity.com/paper/2311.04496/) (2023)
- [Diverse Representation Embedding for Lifelong Person Re-Identification](https://mlsanity.com/paper/2403.16003/) (2024)
- [Fast and Interpretable Face Identification for Out-Of-Distribution Data Using Vision Transformers](https://mlsanity.com/paper/2311.02803/) (2023)
- [Camera-aware Label Refinement for Unsupervised Person Re-identification](https://mlsanity.com/paper/2403.16450/) (2024)
- [What Makes You Unique? Attribute Prompt Composition for Object Re-Identification](https://mlsanity.com/paper/2509.18715/) (2025)
- [DiP: Learning Discriminative Implicit Parts for Person Re-Identification](https://mlsanity.com/paper/2212.13906/) (2022)
- [X-ReID: Cross-Instance Transformer for Identity-Level Person Re-Identification](https://mlsanity.com/paper/2302.02075/) (2023)
- [Learning Robust Visual-Semantic Embedding for Generalizable Person Re-identification](https://mlsanity.com/paper/2304.09498/) (2023)
- [Enhancing Visual Representation for Text-based Person Searching](https://mlsanity.com/paper/2412.20646/) (2024)
- [Minimizing the Pretraining Gap: Domain-aligned Text-Based Person Retrieval](https://mlsanity.com/paper/2507.10195/) (2025)
- [Resolution as a Direction: Vector-Panning Feature Alignment for Cross-Resolution Re-Identification](https://mlsanity.com/paper/2510.00936/) (2025)

## Abstract (arXiv)

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 urlhttps://github.com/haochenheheda/NFormer.
