{'fraction_non_alphanumeric': 0.03407327108329843, 'fraction_numerical': 0.012146147971125182, 'mean_word_length': 4.868999421631001, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Improving Person Re-identification with Iterative Impression Aggregation

Our impression about one person often updates after we see more aspects of him/her and this process keeps iterating given more meetings. We formulate such an intuition into the problem of person re-identification (re-ID), where the representation of a query (probe) image is iteratively updated with new information from the candidates in the gallery. Specifically, we propose a simple attentional aggregation formulation to instantiate this idea and showcase that such a pipeline achieves competitive performance on standard benchmarks including CUHK03, Market-1501 and DukeMTMC. Not only does such a simple method improve the performance of the baseline models, it also achieves comparable performance with latest advanced re-ranking methods. Another advantage of this proposal is its flexibility to incorporate different representations and similarity metrics. By utilizing stronger representations and metrics, we further demonstrate state-of-the-art person re-ID performance, which also validates the general applicability of the proposed method.


I. INTRODUCTION
In video surveillance, when presented with a query person of interest, person re-ID aims to arbitrate whether the person has been observed by another camera in a different place or time. Due to the increasing number of camera networks and a surging demand of public safety, person re-ID has become an increasingly demanding task in computer vision and drawn a lot of attention from both academia and industry.
In this regard, contributions have been made mainly to building stronger person description/representation [1], [2], [3], [4], [5], [6], [7], [8] and better similarity metrics [9], [10], [11], [12], [13], [14], [15], [16] etc. Especially, recent deep learning based methods [3], [6], [17], [18] have achieved very promising performance on standard benchmarks. However, due to the limited size of current datasets for person re-ID, it seems we are approaching a certain performance saturation after exhaustively exploring existing training data towards stronger representations and similarity metrics.  The numbers show the value of a similarity measurement (the higher the more similar), numbers in red represent updated similarities after impression aggregation. In both cases, the original similarity between the query image and gallery2 is relatively low, but since the query image is close to gallery1 and after identifying gallery1 and aggregating information from gallery1, the new representation/impression of the query becomes more similar to gallery2.
To this end, we propose to exploit more information from the gallery dataset at the retrieval phase to improve re-ID performance. Note that, since the gallery dataset often contains more images of the query person of interest, during the retrieval phase, images from the gallery of easy positive candidates could be explored to provide auxiliary information to the query image to better locate hard positive candidates. One example would be as follows: when searching for a person-of-interest, if the query image is of the person's frontalview F and the gallery has images of both the person's sideview S and back-view B. Although matching B directly to F is difficult, we may be able to match F to S first and then leverage S as a bridge to match B, so as to establish the match between F and B. Fig. 1 illustrates two instances from real data, where updating the impression of the query with gallery information helps to find hard positive candidates more easily.
Recently, there is a surging attention to migrating re-ranking techniques of generic instance retrieval [19], [20], [21], [22], [23], [24] to the re-ID community due to their effectiveness in improving performance. Re-ranking methods indeed help to arXiv:2009.10066v1 [cs.CV] 21 Sep 2020 explore more information from the gallery dataset. Notwithstanding the demonstrated success of conventional re-ranking method by directly manipulating the retrieval ranks, we find alternatively that adaptively updating the query representation with relevant gallery information to be very effective in achieving better accuracy. This is partially inspired by the human visual system, which formulates an impression or description of the person-of-interest and keeps updating this impression when we see more aspects of this person [25].
Therefore, we propose a surrogate way to exploit gallery information, where we keep track of the representation of a query (probe) image and iteratively update it with new information from the candidates in the gallery. At each iteration, the new representation, bearing the newly formed impression, could be used to compute similarities and retrieve instances of the same ID. Such a process can be viewed as one form of query expansion [26], another classic idea from the retrieval literature, applied to person re-ID in an iterative manner. We further note that, such an impression update could be applied to both the query image and all the images in the gallery, where we keep track of the impressions of all candidates as well.
We propose a simple iterative attentional aggregation model to formulate and computationally put such intuition into practice. Specifically, at each iteration, we first compute a similarity map between the query image and all the images from the gallery based on the current representations. Then we utilize the similarities to re-weight (similar candidates with higher weights and vice versa) and aggregate different gallery representations to update the query representation. Similar updates could also be optionally applied to all gallery images. Therefore, after each iteration, we can compute new similarities and retrieve instances based on the newly formed representations/impressions. Such an impression-update process keeps iterating until a saturating point, and the final representation will be used to facilitate retrieval. We name our proposed model iterative impression aggregation (IIA) and refer to it as IIA in the rest of the paper.
Although the idea is simple and intuitive, our design of IIA inherently enjoys flexibility to be combined with different representations and similarity metrics. In order to evaluate its effectiveness, extensive experiments have been conducted on standard person re-ID benchmarks including CUHK03, Market-1501 and DukeMTMC. We observe that a simple naive implementation with regular similarity metric could already largely improve the performance of competitive baseline models. It also achieves comparable performance with recent advanced re-ranking methods. With incorporation of stronger baseline representations and similarity metrics, we further demonstrate state-of-the-art performance.
In the remaining sections, we start by discussing related works in Section II. Then the detailed mathematical formulations and analysis of IIA will be elaborated in Section III. For better understanding, we also provide extensive ablation analysis in Section IV. Finally, we conclude this paper with discussions about future efforts in Section V. Before proceeding, we summarize our key contributions as follows: • We propose an iterative impression aggregation model to improve person re-ID, which is an intuitive and novel way to explore gallery information for re-ID. • We propose an effective attentional aggregation formulation, which is flexible to leverage different representations and similarity metrics for different purposes. • We achieve state-of-the art performance on standard re-ID benchmarks, providing a simple practical post-processing module to strengthen the performance of existing re-ID methods.

II. RELATED WORK
Person re-ID remains to be one of the most active research area in computer vision with wide applications. We refer interested readers to [27] for a comprehensive review of the literature and here we mainly focus on discussions about recent research works that highly relate to our method.

A. Representative baselines
Many works have been devoted to building stronger representations [28], [3], [6], [17] and similarity metrics [9], [12] or in an end-to-end fashion to improve the performance. In [3], [6], part-level features have been studied for better representation learning. In details, discriminative partinformed features with classification loss and part-aligned bilinear representations are learned in [3] and [6] respectively. Alexander et al. [28] revisited the importance of triplet loss and demonstrated that good representations can also be learnt with only triplet loss. In [17], both part based classification loss and triplet loss are applied to learn better features and achieves new state-of-the-art performance. For metric learning, based on statistical inference, a distance metric is learnt with equivalence constraints in [9]. And Liao et al. [12] propose to learn discriminant metric by learning low dimensional subspace with cross-view quadratic discriminant analysis. Our proposed IIA is orthogonal with these works and aims to improve the performance from another aspect in better exploiting information in the gallery database. As we empirically observe, this is highly complementary to these baseline methods and our method often improves such baselines by a clear margin.

B. Exploiting gallery information
To better model the relationship between the query and gallery, many works start to integrate the extra gallery information either in the training or inference stage. For the training stage integration, representative works include [4], [5], [29]. Specifically, Chen et al. utilize conditional random field (CRF) for end-to-end group consistent similarities learning. And in [5], a different affinity metric between gallery images is explored via random walk. To pass the message from gallery to query in a more structural way, a similarity-guided graph neural network is proposed in [29]. By integrating gallery information, these methods can produce more compact and discriminative features.
Compared to training stage integration, gallery information exploitation in inference stage can also be viewed as a flexible post-processing step in many existing methods. By exploring extra statistics from the testing set in the inference stage, they can gradually improve the performance with negligible cost. Existing methods can be roughly divided into two types: re-ranking and query expansion. Originally studied in generic instance retrieval [30], [31], re-ranking has drawn increasing attention in the re-ID community [32], [33], [24], [34]. Specifically, in [32], an unsupervised re-ranking model is learned by jointly considering the content and context information in the ranking list. And in [33], the shared nearest neighbors of different baseline methods are exploited to re-rank the task of interest. After that, Zhong et al. [24] further proposed a k-reciprocal encoding method and reported superior performance. Recently, by fusing the results of several different models, an effective re-ranking solution is further developed in [34]. While most re-ranking methods start from distance space to improve the performance, our IIA works from the feature space by a weighted and iterative design and keeps updating the impression of a person of interest. In the following experiments, we will show that the proposed simple IIA model can be as effective as these advanced reranking methods. And by leveraging stronger representation and similarity metrics, IIA can further improve the re-ID performance.
For query expansion, it denotes the process of reformulating a given query and is widely used in image retrieval [26], [35], [36]. In particular, by concatenating the averaged topk candidate galleries, a new query will be produced in the well-known average query expansion (AQE) method [35]. And in [36], AQE is further improved by discriminative query expansion (DQE). Rather than using a simple averaging, a linear SVM is leveraged in DQE to obtain a new query and the distance from the decision boundary is employed for the initial ranking list revision. The proposed IIA generally shares the same spirit with [35], [36], but involves a more advanced weighting mechanism for updating query and formulates this process in an iterative manner.

C. Iterative updating
The idea of updating an impression of a person iteratively is natural and intuitive. Technically, iterative updating has been well studied in the field of optimization [37], [38], [39]. Our specific implementation is also highly motivated from the recent attention models originated from natural language processing [40], [41] and memory networks [42], [43]. In natural language processing, attention can be applied to different positions in a sentence to formulate an overall understanding of the sentence in a step-by-step manner. And in memory networks, such as [42] and the neural Turing machines [44], memory represented as vectors can be erased, updated and read with mathematical tools. Our work, though not seemingly related, shares similar conceptual intuition (e.g. impression as to memory) and mathematical formulation (e.g. attention by similarity) with these interesting works.

III. ITERATIVE IMPRESSION AGGREGATION
In human visual system, the impression about one person keeps updating when we see more aspects of him/her, thus making the representation more and more robust. Since comprehensive and robust person representation is also required in person re-ID, we will formulate a model and put such an intuition computationally into practice in the the re-ID system in this section. We start by formulating a basic iterative attentional aggregation model in the settings of person re-ID in Section III-A and discuss the extension to updating the representations of gallery candidates in Section III-B.Then we proceed to introduce more advanced similarity metrics to further strengthen the model in Section III-C and provide computational complexity analysis to highlight the simplicity and efficiency of the proposed IIA in Section III-D.
Let us first consider a typical re-ID model, in which G is a gallery composed of N images, denoted as . Given a query image q, the task is to retrieve all candidates in G that is of the same identity as q. Different from the works about developing good person representations and similarity metrics from training data, the focus of our method is designing a strategy to better exploit information from the gallery dataset in an orthogonal way. Without loss of generality, we denote x q and x gi as the developed/learned representations of the query and gallery images respectively and define s qi = s(q, g i ), s ij = s(g i , g j ) as the metric developed for computing similarity (or distance) between the corresponding image pairs.

A. Iterative Attentional Aggregation
In order to iteratively aggregate new information from more aspects, we propose the following key formulation.
where t is the iteration index. Note that, here we have two functions m(·) and f (·), which define a merging function and an attention function respectively. Two high level insights are under this general formulation: 1) We would like to update the representation of the query after we observe the gallery images and we would like to keep updating this representation iteratively. 2) During each iteration, the attention we paid to each gallery image is related to the similarity/distance between this image and the query image. By default, we use the following simple function formulation.
is a linear merging function that updates the impression with new information via a forgetting parameter α. Intuitively, α can be used to control the updating intensity. f (·) is a straightforward soft attentional aggregation function defined upon q's top-k nearest neighbors N q to avoid involving noisy samples. τ is the temperature factor to control the smoothness of the updating weight. Here we design m(·) and f (·) to be as simple and automatic as possible, which only involve three tuning parameters. However, more advanced merging and attention functions may be beneficial for larger performance gain. For example, LSTM cells or memory networks could be leveraged to automatically learn m, f . Due   Fig. 2. Illustration of the iterative impression aggregation pipeline. From left to right, we start from the input query and gallery images, we extract a baseline feature/representation, and iteratively apply the IIA module, where features from the last iteration will be updated by exploring similarities among images. After several iterations, the final impressions are formed and we use them to compute a final similarity for retrieval.
to the iterative nature, we can obtain a list of historical representations and similarities, it is also possible to apply all or part of the historical representations (or similarities) to achieve an ensemble when computing the final retrieval. Note that, the proposed IIA has one good property, i.e., so long as m(·) and f (·) are differential with respect to x, we can back-propagate information and further fine-tune the original representation x. In this paper, we adopt the above lightweight design to prove the concept of IIA by default. This also allows us to put more efforts into equipping IIA with many different feature representations x and distance metrics M .
In real application systems, if the number of candidates in the gallery is very large, we can simply apply IIA to smaller sampled subsets of the whole gallery. This can be suboptimal, but could still potentially improve the performance with negligible computation overhead.

B. Gallery Impression Updates
In Eq (1), we only update the impression from the perspective of the query image. In this section, we will try to update the impression/representation of each gallery image given the rest of the gallery images and the query image in a similar manner. Although it is theoretically difficult to prove whether updating both query and gallery impressions enjoys a global optimal solution, we empirically observe that this choice often achieves better performance probably because more information is exchanged.
To update both the query impression and the gallery impressions, we mathematically formulate and keep track of a similarity matrix S ∈ R (N +1)×(N +1) . After we have computed the similarity matrix, we can set the diagonal elements of S to α and multiply (1 − α) to each of the non-diagonal element to achieve an update matrix U . Then the representations updates of both the query and gallery images can be obtained simultaneously via matrix multiplication D t+1 = D t U , which could be easily computed. We provide the complete process of IIA in Algorithm 1 for better reproduction of this work.

C. Similarity Incorporation and Enhancements
Once we have the initial representations, simple Euclidean or cosine distances can be directly used as the similarity measurement s. In the later experiments, the effectiveness of such simple metrics will be demonstrated, showcasing that the idea of iterative impression update matters.
Of course, any other forms of metrics could also be applied directly by leveraging better metric learning strategies from the re-ID literature. Note that, both re-ranking methods and our IIA try to exploit more information from the gallery dataset. But re-ranking methods work in the space of similarity metrics (thereafter ranking orders), while ours works in the space of representations. And because the proposed formulation also involves the similarity metrics to compute attention, we can potentially further benefit from incorporating other re-ranking methods to compute re-ranked similarities. Specifically, the idea can be achieved by first computing the initial similarity matrix S init then applying any re-ranking methods to obtain an updated similarity matrix S new . Finally, S new can be applied just as S shown in Algorithm 1.

D. Computational Complexity
The main computational cost of the proposed IIA comes from pairwise distance/similarity computing and iterative feature updating. Suppose the size of the gallery set is N , the feature dimension is d, K is the number of closest candidates for aggregation and n is the number of iterations. For one query image, the computation complexity required for pairwise distance and the aggregation process are O(N nd) and O(N nK + nKd)), respectively. For updating galleries, the total computations are O(N 2 nd)+O(N 2 nK +N nKd). In practice, gallery updates can be obtained offline, thus for a query q, the actual online computation is O(N nd + N nK + nKd). As a comparison, the computational complexity of state-of-theart re-ranking method (RR) [24] is O(N 2 d) + O(N 2 log(N )) for offline pairwise distance computing and online sorting for galleries and O(N d) + O(N log(N )K) for online re-ranking. Table I compares the detailed computational complexity. As we empirically observe, the optimal or necessary n and K are often far less than N , which bring the speed advantage for IIA, especially during the actual online phase. Table II shows some typical run-time comparison on three different datasets, where we can observe that IIA runs practically 4∼6 times faster than RR [24]. To further just the runtime efficiency on larger dataset, we also conduct experiments on the MSMT17 dataset (0.1M images), and our IIA (398.39s) is still more than 4 times faster than RR (1638.99s).

IV. EXPERIMENTS
We conduct extensive experiments on many popular datasets including CUHK03, Market-1501 and DukeMTMC. These datasets have been widely used as standard benchmarks to evaluate the performance of person re-ID methods. We start by introducing the basics of these datasets and the corresponding experimental setting in Section IV-A. Then we demonstrate the improvement of IIA over competitive baseline models and comparison with alternative post-processing methods in Section IV-B. Then we provide detailed ablation study of our proposed framework in Section IV-C. After that, we perform hyper parameters analysis in the experiments setting in Section IV-D. Then we demonstrate the effectiveness of our methods by comparing with state-of-the-art methods in Section IV-E, Finally, we discuss the limitation and failure cases of the proposed methods in Section IV-F. Market-1501 [46], a standard large scale image-based re-ID dataset, contains 32,668 labeled bounding boxes of 1,501 identities captured from 6 different viewpoints. These bounding boxes are obtained by Deformable Parts Model (DPM) [47]. On average, each identity has about 20 images. The dataset is split into two parts: 12,936 images with 751 identities for training and 19,732 images with 750 identities for testing. In the testing phase, 3,368 hand-drawn images with 750 identities are used as the query set to identify the correct identities on the testing set. Following the literature, we report the single-query evaluation results for this dataset.

A. Datasets and Experiment Protocols
CUHK03 [48] a classic re-ID dataset, contains 14,096 images of 1,467 identities. Each identity is captured from two cameras on the campus of CUHK. On average, each identity has about 5 images in each camera. This dataset provides both manually labeled bounding boxes and DPM-detected bounding boxes. We report results in both the labeled (CUHK03-lab) and detected (CUHK03-det) settings. The dataset is split into two parts: 7,365 images with 767 identities for training and 6,732 images with 700 identities for testing. In the testing phase, 1,400 images with 700 identities are used as the query set. As we use the new protocols proposed by [24], we refer this dataset to CUHK03-NP in the rest of this paper.
2) Evaluation Protocols: In all the experiments, we follow the standard evaluation metrics: mean Average Precision (mAP) and the Cumulated Matching Characteristics top-1 (cmc1) metric. On Market-1501 and DukeMTMC, our evaluation follows the official standard settings, and our evaluation on CUHK03 is performed by following the same setups as [24] for fair comparison.
Baseline models. We explore four representative baseline models: Trip [28], where representative triplet loss is applied and PCB [3] and PAB [6], where state-of-the-art part-level features are used and MGN [17], where latest state-of-the-art performance is reported. To demonstrate the effectiveness of our method, we combine two different versions of IIA with these baselines: a basic simple IIA bas where we directly applied cosine similarity in the representation space, and a more advanced IIA adv where we utilize the re-ranked similarity from [24] to exploit auxiliary information as mentioned above.

B. Improvements over Baseline Models
In this section, on the one hand, we want to show the relative performance gain brought by IIA upon the baseline models. On the other hand, we compare the proposed IIA with two other gallery information exploitation methods: the state-ofthe-art re-ranking method RR [24] and an effective query expansion method (AQE) [35]. For extensive comparison, we integrate IIA, RR and AQE with the above mentioned Trip, PCB, PAB and MGN respectively. Table IV,V and VI show the detailed comparison results on the Market-1501, DukeMTMC, CUHK03-NP detected and labeled benchmarks. The performance of baseline models is obtained with released models or source code from the original papers. And we report the results of RR and AQE methods by using default parameters mentioned in their papers. For our method, we set the hyper-parameters by tuning on the validation dataset. More discussions about these hyper-parameters will also be provided in the following analysis part.
It can be easily observed that both the simple and advanced IIA are able to boost the baseline models' performance by a large margin, especially on the evaluation metric of mAP. Specifically, our IIA bas has an improvement of 16 [35], our IIA consistently outperforms it, highlighting the advantage of our elaborated attentional design and its iterative update mechanism. And compared to state-of-the-art reranking method RR [24], IIA can achieve better performance in most cases while ensuring much faster speed. We further try to combine RR and AQE, and results show that a better initial ranking is also beneficial to AQE. However, the improvement is minor and the final performance is still worse than our IIA bas with a certain margin. Moreover, we find RR+AQE is even weaker than RR on mAP, which indicates that a naive query expansion with averaged top-k galleries at one time potentially cannot fully utilize the useful extra information brought by a strong initial ranking.
When comparing the results of IIA adv with the simple IIA bas , we observe that, though IIA adv incorporates re-ranking similarities, IIA adv does not always bring extra performance gain over IIA bas . This showcases that IIA bas is already a very competitive (and faster) alternative. But on DukeMTMC and Market-1501 datasets where the galleries are large and more gallery information is able to be exploited, the enhanced similarity can bring extra performance gain.
In conclusion, the proposed IIA can consistently improve competitive baseline models and outperform both classic query expansion method and state-of-the-art re-ranking method in most scenarios. It demonstrates that IIA can effectively take advantage of the gallery information for person re-ID. And thanks to the simplicity of IIA bas , it could be a light-weight off-the-shelf module for existing re-ID models to improve their performance. In Fig. 3, we provide some representative examples to illustrate the updated ranking with new representations obtained by IIA. Obviously, the updated impressions/representations from IIA help to better rank the gallery candidates and move many true positives to the front. Another interesting investigation is to see how IIA collaborates with metric learning ideas, which are often utilized by person re-ID methods to boost their performance. Our work can also perform quite well with metric learning methods. To validate this, we conduct experiments based on methods including XQDA [12] and KISSME [9] with LOMO [12], BOW [46] and MGN [17] features on the Market-1501 dataset. Fig. 3. Examples of updated ranking from new impressions (from top to bottom these samples come from Market1501, DukeMTMC, CUHK03-NPlab, CUHK03-NP-det respectively). For each query image (the left most ones), the first row shows the original ranking list produced by PCB, while the second row demonstrates the updated ranking results obtained by IIA bas . Images surrounded by green box denotes its identity is the same with that of the query image and the red-boxed images are negative ones. Table VII shows that IIA can also improve the performance on naive hand-craft features. Even for well trained deep features (e.g. MGN), where the classification boundary in the training set is already very clear (accuracy≈1) and additional metric learning is unable to bring obvious improvements, facilitated with IIA, we can make a considerable improvement over different features. Therefore, IIA seems to be able to explore useful gallery information that could have been neglected by conventional designs including but may not limited to one-step query expansion, re-ranking and metric learning etc.

C. Ablation Study
In the proposed IIA, two important ingredients are iterative updating and query/gallery updating. To demonstrate their importance, we provide detailed analysis experiments and important visualizations to facilitate our understanding.
1) Effectiveness of Iterative updating: To illustrate the iterative updating mechanism, we demonstrate one typical example in Fig. 4. The initial ranking (t = 0) is given in the first row, in which only the top-4 galleries are correct. However, since the top-4 candidates have some neighbors in common (line marked as same color) from the rest of the gallery images, after updating the query representation with candidates' impressions, the similarities between query and these common galleries are enhanced. Therefore, when these missed common galleries (which are actually true positive candidates) were moved forward in the ranking list in the next iteration, and the average precision (AP) increases from 0.517 to 0.664 as well. As such procedure keeps iterating, more and more true galleries will be dug out with higher similarity. The top-10 list converges starting from t = 5. 2) Necessity of query and gallery updating: When applying IIA, we empirically consider both query impression updating and gallery impression updating, both of which were testified as very useful in our experiments. In particular, in Table VIII, the performance of three different settings is provided. When only query is updated ('q only'), the original baselines can be significantly boosted, which shows that iterative query updating is already effective. When we update the gallery representation, we further improve the performance by a large margin. For gallery updating, 'g online' means updating gallery representation at every iteration and meanwhile updating query with each iteration's updated gallery representation; while 'g offline' means updating gallery n iterations in advance and use the final iteration's gallery representation to update every iteration's query. Compared to 'g online', 'g offline' is much faster by reducing the updating frequency especially when the gallery set is very large. It can be seen that the offline version performs slightly worse than its online counterpart, but is still very competitive. In real-time systems, 'g offline' should be a good choice which significantly reduces the computation time without dropping much performance.

D. Hyper Parameters Analysis
In our method, there are some key hyper-parameters that can influence the final performance. To study the effects of each hyper-parameter and get more insights and understanding of them, we provide detailed analysis in this regard.
1) Forgetting factor α: In Eq 2, α controls how much impression information should be updated at each iteration. We illustrate how the performance of both mAP and cmc1 change with respect to α in Fig. 5. As is shown, our method consistently outperforms the baselines both on the mAP and cmc1 with a wide range of α for all the three datasets. Specifically, the mAP increases along as α increases, before it begins to decrease rapidly after α surpasses a threshold. As demonstrated from this figure, the optimal α for mAP is roughly around 0.8. Cmc1 shares similar behavior to mAP, but the optimal α is larger (around 0.9). To our knowledge, since cmc1 only considers whether the largest gallery candidate is consistent with the query, it tends to have very low tolerance for involving wrong information. Therefore, it prefers a more conservative updating mechanism. In contrast, since mAP considers both precision and recall, it will have an improvement as long as the updated information has more constructive effect than destructive. So mAP will prefer a lower α to let more information in from galleries. In this paper, we prefer to select optimal positions according to mAP (since it considers both recall and precision) and choose α = 0.82 by default. Furthermore, we observe that the optimal α is empirically stable across datasets, indicating that the proposed IIA is robust to α to some extent. In a nutshell, we do recommend users to set α around 0.8 when come across unknown datasets. 2) Number of iteration n: In Fig. 6, we illustrate how the performance of mAP and cmc1 change with respect to n. Within a certain range, we can obtain better performance on both mAP and cmc1. However, more iterations do not always help to further improve performance. In fact, if we do not update gallery representations, the performance curves demonstrate saturating effects, meaning no new information is available under such a setting. However, since we are also updating the gallery representations, some noise information may be introduced to deteriorate the gallery impression with too many iterations. Specifically, for the CUHK03-NP (both labeled and detected) dataset, because the identities in gallery is same as those in query, its curves are more saturated for larger n. But for Market-1501 and DukeMTMC datasets, because of the existence of distractors in the gallery set, the performance will become worse for large n. Besides, we find the optimal n for cmc1 is about 2 iterations earlier than mAP, this may be because IIA can still have a considerable gain in recall but corrupt the top-1's identity within these iterations. Therefore, we recommend users to set n in the range of 4 ∼ 10 for an unknown new dataset. 3) Number of closest candidates K: In our formulation, we only use the top-k nearest neighbors for impression updating. Here, we study the performance change with different neighbor number K in Fig. 7. It can be seen that, for the DukeMTMC and Market-1501 dataset, the mAP curves are very robust for a very wide range of K, while for CUHK03-NP the mAP drops quickly when K surpasses a threshold (K = 8), which means K cannot be very large. In fact, from Table III we can find the number of person for per gallery identity is 15.9, 17.5 and 7.6 for DukeMTMC, Market-1501 and CUHK03-NP respectively. Intuitively, K needs to be set as a moderate value. Too large K means there must be some wrong candidates involved in query updating, while too small K means much useful information is unexplored. We recommend K to be the average number of samples per identity of a dataset or a little smaller than the average number, because not all the top-k ones are the right candidates. 4) Temperature factor τ : In Fig. 8, we illustrate how mAP and cmc1 change with respect to τ . Overall, it shows that the performance is very stable with the change of τ especially when τ is larger than a threshold, and the optimal τ is consistently around 0.1 ∼ 0.2. Intuitively, when τ is small, the lower part of the top-k candidates' response will be shrunk to a very small value or even disappear. In the extreme case when τ is very small, only the top-1 candidate gallery will have a valid response. This indeed degenerates to the case that the number of closest candidates K = 1, which determines the lower bound when τ changes. We also show the curve for K = 1 (dashed line with marker) as a comparison and observe that it is sightly better than baseline but worse than the optimal τ with a large margin. In this paper, we set τ = 0.2 by default and recommend this setting to users.
Note that, overall, most curves of the performance with respect to the hyper-parameters have a flipped-U shape, indicating an optimal position. We choose the optimal position according to the mAP metric since it considers both precision and recall. As shown in these figures and the above analysis, the performance of IIA is robust to hyper-parameters' tuning to some extent, demonstrating its practical applicability and effectiveness.

E. Comparison to State-of-the-Arts
In this section, we collect our best performing model based on two baseline models and compare our results with many latest state-of-the-art models including: RW [5], GroupCRF [4], MGN [17], SPreID [49], DaRe [50], Mancs [51], AACN [52], DSA [54], Pyramid [53], SFT [55] and st-ReID [56]. As shown in Table IX, when combining the proposed IIA with MGN 1 or st-ReID 2 , we can achieve better results than all these state-of-the-art models. Especially on the CUHK03 dataset, our method surpasses existing methods by a large margin.

F. Limitation and Failure cases
Despite the superiority of IIA, it also has some failure cases. Fig. 9 shows the gain of AP after applying IIA for Market-1501 with PCB [3] features, from which we can see for most of the queries, their APs will be enhanced, but there are still a small portion where the value of APs decrease. After exploring these failure cases, we found the following three typical cases when IIA performs relatively poorly.
• The initial ranking list is very messy, e.g. none of the candidates is correct. Fig.10(a) shows this example.  IX  COMPARISON WITH STATE-OF-THE-ART METHODS. WE REPORT THE RESULTS OF ST-REID OBTAINED FROM THE OFFICIAL RELEASED CODES AND  MODELS, WHICH ARE LOWER THAN THE PAPER REPORTED ONES. RES152 AND DEN201 MEAN THE BACKBONE NETWORKS ARE RESNET-152 AND  DENSENET-201, WHILE THE OTHERS ARE ALL BASED ON RESNET-50. MISSING ENTRIES MEAN THAT THOSE PAPER DIDN'T REPORT THAT KIND Fig.10(b). • The first top few candidates in the initial rank are not the same as the query. Fig. 10(c) show this example The latter two failure cases share the same essence: Error Propagation. This is due to the inherent design philosophy of IIA that tries to pass information from gallery to query. Potential solutions include but not limited to, e.g., making an additional design to decide whether to update. For example, if we find the top-k candidates' feature can be divided into 2 clusters almost uniformly, we directly discard this update.

V. CONCLUSION
In this paper, we shed light on a natural iterative impression update process. Intuitively, we put our impression about one person updates after we see more aspects of this person computationally into practice. We incorporate this idea to person re-identification with an iterative attentional aggregation model, where the representation of a query image is iteratively updated with new information from those closely related candidates in the gallery. The proposed model is flexible to leverage different representations and similarity metrics, and therefore results in both a simple practical solution to largely improve the performance of existing re-ID models and also a strong re-ID model that achieves state-of-the-art performance on standard benchmarks including CUHK03, Market-1501 and DukeMTMC. The model also naturally supports certain ensemble designs using representations at each iteration and potential fine-tuning to original features in an end-to-end manner, both of which could potentially further strengthen the model and will be our focus in the near future. query (a) Failure case 1, initial ranking list is a mess.  For each query image, the first row shows the original ranking list, while the second row demonstrates the updated ranking results obtained by IIA bas . Images surrounded by green box denotes its identity is the same with that of the query image and the red-boxed images are negative ones.