# RANDnet: Vehicle Re-Identification with Relation Attention and Nuance-Disparity Masks
## 2 Related work
### Attention Mechanism  
Vehicle re-identification (ReID) tasks inherently require the ability to distinguish subtle differences between highly similar vehicles, a challenge that particularly benefits from the use of attention mechanisms. These mechanisms enhance the model's ability to focus selectively on the most informative parts of an image, crucial for identifying vehicles across different camera captures.  
Attention mechanisms were first introduced in the field of natural language processing, as evidenced by several foundational studies [26; 27; 28; 29]. [PERSON] et al. [26] extended the encoder-decoder model to include a mechanism that learns to align and translate jointly, which enables the model to focus on relevant parts of a source sentence dynamically rather than relying on rigid segmentation. [PERSON] et al. [30] introduced both global and local attention mechanisms to neural machine translation, where global attention assesses all source words and local attention targets a subset at any given time. [PERSON] et al. [31] further innovated in this space by proposing the transformer, which utilizes multi-headed self-attention to replace recurrent layers, thus basing the entire sequence transduction model on attention mechanisms. [PERSON] et al. [32] expanded on self-attention by incorporating relative positions and distances between sequence elements.  
The utility of attention mechanisms in enhancing the performance of deep neural networks has led to their adoption in various other domains such as image classification, semantic segmentation [33], and object recognition [34]. [PERSON] et al. [35] introduced the Squeeze-and-Excitation block to adaptively adjust channel-wise feature responses by explicitly modeling interdependencies, focusing on the relationships between channels. [PERSON] et al. [36] developed the Residual Attention Network, stacking attention modules to produce features that are attention-aware. [PERSON] et al. [37] proposed the Convolutional Block Attention Module, which refines features using attention across both channel and spatial dimensions. [PERSON] et al. [38] enhanced the representational power of networks with a Bottleneck Attention Module. [PERSON] et al. [39] introduced a two-dimensional relative self-attention mechanism as an alternative computational primitive to traditional convolutions. [PERSON] et al. [40] devised a Harmonious Attention Convolutional Neural Network that integrates attention selection with feature representation learning, incorporating a cross-attention mechanism. [PERSON] et al. [41] designed a Multi-Task Attention Network to handle multiple learning tasks simultaneously, with each task benefiting from customized attention modules that facilitate the learning of both shared and task-specific features.  
Figure 2: The class activation maps generated by IBNNet. For the target vehicle, only a single most discriminative region is activated in the positive category (**left**). In contrast, for negative categories (**right**), simple negative category (**above**) activations are predominantly located in the background, whereas complex negative category (**below**) activations focus on other details of the vehicle. The areas with the highest activation are highlighted in red boxes.