ANFI: Rethinking Neighbor Feature Interaction in Person Re-ID

Xulin Li, Yan Lu, Bin Liu, Jiaze Li, Qinhong Yang, Tao Gong, Qi Chu, Nenghai YuarXiv 2026

TL;DR

Neighbor-based person re-identification (Re-ID) methods often fail when false-positive ("noisy") neighbors are mistakenly aggregated into a sample's representation. This paper introduces Adaptive Neighbor Feature Interaction (ANFI), a novel framework that models both affinity (positive) and discrepancy (negative) relations to filter out noisy feature propagation. Combined with a Noisy Relation Supervision (NRS) training strategy, ANFI achieves state-of-the-art performance across standard, cross-modal, and cross-domain Re-ID benchmarks.

What Problem Does This Paper Address?

Person Re-ID aims to retrieve and match images of a specific person across non-overlapping security cameras. To combat drastic variations in lighting, pose, and occlusion, recent state-of-the-art methods look at a sample's neighbors in the feature space to enhance its representation.

However, existing neighbor-based approaches assume these neighborhoods are highly reliable, utilizing an affinity-only aggregation scheme. In challenging real-world scenarios—such as blurry queries, small-scale galleries, or cross-domain retrieval—false positive neighbors ("noisy neighbors") inevitably creep into the top-$k$ results. Relying solely on affinity forces the model to pull these unrelated features closer, inadvertently blurring the distinctions between different identities and degrading retrieval accuracy.

Fig. 1: (a) Existing neighbor-based approaches always aggregate neighbor represen- tations by affinity-only relations. (b) Our approach dynamically incorporates both positive (affinity) and negative (discrepancy) relations, allowing samples to remain distinguishable from false positive neighbors.

Methods

To address the vulnerability to noisy neighborhoods, the authors propose two core components: ANFI at the model level and NRS at the training level.

  1. Adaptive Neighbor Feature Interaction (ANFI): Instead of just calculating positive affinity, ANFI introduces discrepancy relations that assign negative weights to non-self neighbors. This mathematical formulation effectively subtracts the features of false-positive neighbors, keeping the target sample distinct.
  2. Neighborhood Similarity: Traditional pairwise distance can easily be fooled by distinct identities that look alike. ANFI instead derives discrepancy relations from neighborhood similarity—analyzing the overlap of shared third-party neighbors to capture richer structural information.
  3. Adaptive Mixing: A sample-wise gating mechanism dynamically calculates importance scores ($w_i$) to balance affinity and discrepancy features based on the estimated noise level of each sample's neighborhood.
  4. Noisy Relation Supervision (NRS): Models trained on clean datasets naturally over-rely on affinity. NRS fixes this by introducing Noise Simulation (injecting feature perturbations during training to mimic noisy test distributions) and Relationship Regularization (a KL-divergence loss that guides the model's adaptive weights toward ground-truth neighbor relations).
The overall framework of the proposed ANFI and NRS modules.

Datasets

The authors evaluated their approach across five widely used benchmarks spanning different modalities:

  • Standard Re-ID: Market1501, CUHK03, and MSMT17.
  • Visible-Infrared Cross-Modal Re-ID: SYSU-MM01 and RegDB.

To thoroughly test robustness against noisy neighbor distributions, they also established a comprehensive testing benchmark evaluating performance under controlled stress-test settings: 1-shot, 2-shot, Hard Query, Poor Model, and Cross-Domain configurations.

Key Insights and Ideas

  • Negative Weights as a Corrective Force: Traditional graph neural networks in Re-ID only pull features together. Allowing negative weights (discrepancy) acts as a critical push mechanism when a neighborhood is corrupted, preserving identity boundaries.
  • Bridging the Train-Test Gap: During standard training, intra-identity features are highly similar, meaning the model rarely encounters noisy neighborhoods. NRS intentionally corrupts training batches so the model actually learns how and when to deploy its discrepancy mechanism before deployment.
  • Structure Over Pairwise Distance: Looking at whether two samples share the same friends (neighborhood similarity) is a much more robust indicator of true identity match than simply looking at how similar those two samples look in isolation.

Key Results

  • State-of-the-Art Performance: ANFI achieves top-tier results across all standard datasets, reaching 95.7% mAP on Market1501, 90.7% mAP on CUHK03, and 82.9% mAP on MSMT17, outperforming recent neighbor-based methods like Cheb-GR and NFormer.
  • Robustness in Noisy Settings: In the strict 1-shot gallery setting (where noise is highest), traditional neighbor methods actually degraded baseline performance (yielding negative $\Delta$ mAP). ANFI was the only method to maintain a positive gain (+0.9% mAP).
  • Cross-Modal Superiority: On the challenging visible-to-infrared SYSU-MM01 dataset, ANFI achieved 81.1% mAP, a 6.3% improvement over the closely related CIFT method.
  • Computational Efficiency: Despite modeling dual relations, ANFI's sparse graph implementation adds negligible latency (+0.3s on Market1501) compared to the raw backbone feature extraction cost.

Limitations and Future Work

The authors note that the neighborhood size $k$ remains a critical hyperparameter that must be coarsely adjusted based on dataset gallery statistics. If $k$ is set poorly, performance gains can diminish. A promising direction for future work is developing a completely non-parametric or dynamic neighborhood selection method that automatically infers the optimal $k$ for each individual query sample.

Summary updated

BibTeX
@misc{li2026anfi,
  author = {Xulin Li and Yan Lu and Bin Liu and Jiaze Li and Qinhong Yang and Tao Gong and Qi Chu and Nenghai Yu},
  title = {{ANFI: Rethinking Neighbor Feature Interaction in Person Re-ID}},
  year = {2026},
  eprint = {2607.25407},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.25407},
}
Figure