## 4 Method
### Normalized Virtual Softmax Loss  
Softmax loss, also called classification loss, is often used in vehicle ReID task, in which every unique vehicle (every ID) is treated as a class. It can divide the different classes  
Figure 6: Details of our dataset. Figure 7: Image attributes of VRAI_AIR. but cannot pull them apart, leading to the samples near the decision boundaries are often misclassified, which is not a big challenge in classification task but extremely exacerbates the performance of ReID network, due to the problems of mixed feature space mentioned in **Introduction**. The most effective method to solve the problem is to keep the samples as far away from the decision boundaries as possible, or just pull apart the decision boundaries of different classes, where a new loss function is called to be proposed. Softmax loss is a combination of fully connected layer, softmax function and cross-entropy loss. An image passes through feature extraction network, transformed to a D-dimensional vector **X** containing high-dimensional feature of the original image, and then enters into the last fully connected layer (FC layer) of the network to multiply with the weight matrix **W**. Each row vector of the weight matrix **W\({}_{i}\)** can be seen as the coordinates of each class's central position in the feature space as perceived by the current network, which is called the class anchor (Equation (1)), as shown in Figure 8. So the multiplication between the feature vector **X** and the row vector of weight matrix **W\({}_{i}\)** is essentially the calculation of the cosine similarity between them (Equation (2)). The calculate C similarities make up the score vector **S** corresponding to C classes (Equation (3)). In the inference stage, the class with the largest score is inferred by the network as the class to which the sample belongs. As an example of 2-class classification problem, shown in Figure 9a, sample is judged to be the red class when **X\(\cdot\)W\({}_{1}<\)X\(\cdot\)W\({}_{2}\)**. In the training stage, the **S** is modified by softmax function to **S\({}^{*}\)** (Equation (4)), and calculated the cross-entropy loss L (Equation (6)) with the ground truth of the image in one-hot form **Y** (Equation (5)), where N is the batch size, k means the k-th sample in a batch and **W\({}_{y_{k}}\)** is the class anchor of the k-th sample's ground truth. \[\textbf{W}= \begin{bmatrix}\textbf{W}_{1}&\textbf{W}_{2}&\cdots&\textbf{W}_{i}& \cdots&\textbf{W}_{\text{C}}\end{bmatrix} ^{T},\textit{wherei}=1,2,\cdots,C; \textit{Cisthenumberofclasses} \tag{1}\]  
\[\textbf{X}\cdot\textbf{W}_{i}^{T}= \begin{bmatrix}\textbf{X}|\cdot|\textbf{W}_ {i}|\cdot cos<\textbf{X},\textbf{W}_{i}>=s_{i}\end{bmatrix}  \tag{2}\]  
\[\textbf{X}\cdot\textbf{W}^{T}= \begin{bmatrix}s_{1}&s_{2}&\cdots&s_{i}&\cdots&s _{\text{C}}\end{bmatrix} =\  
\[W= \begin{bmatrix}W_{1,3}&W_{1,2}&W_{1,3}&...&W_{1,j}&...&W_{1,D}\\ W_{2,1}&W_{2,2}&W_{2,3}&...&W_{2,j}&...&W_{2,D}\\...&...&...&...&...&...&...\\ \hline W_{3,3}&W_{i,2}&W_{i,3}&...&W_{i,j}&...&W_{i,D}\\...&...&...&...&...&...&...\\ W_{C,3}&W_{C,2}&W_{C,3}&...&W_{C,j}&...&W_{C,D}\end{bmatrix} \]  
The loss back propagates (Equation (7)) to modify the parameters of the network to make the samples away from the boundaries and move closer to the anchor of the class they belonging to. The farther the samples are from the boundaries, the less likely the network is to misclassify. So, it is easy to come up with an idea to create some \"no-man's land\" between two adjacent space to promote this process, which is the original purpose of the virtual class. The virtual class is a paradox, which is an artificial class that does not exist in the real classification problem, opposed to real classes. That means there is no sample in the dataset belonging to the virtual class but it exists in the feature space. On the one hand, there is no sample so all samples belonging to the real classes will keep away from it. On the other hand, it exists in the feature space so it can pull apart the adjacent real classes.