# Accelerating Image Classification using Feature Map Similarity in Convolutional Neural Networks
## 4 Experimental Results and Analysis
### Cached CNN Hit Rate  
To measure the hit rate of the proposed cached CNN, we selected 10 classes from the Microsoft COCO [22] dataset and selected 100 images for each class. This was done for a test and training set. We first wrote training images in the cache of each convolution layer. We then classified 100 test images using a cache, and compared the results with the ground truth to measure the hit rate. We also experimented by increasing the number of cached training images from 2 to 10, 20, 40, 60, 80, and 100. This experiment was divided into two stages. First, all test images were classified by the cache. In this case, we did not apply the distance threshold for _Hit_/_Miss_ decision. That is, all results were a _Cache Hit_, and the query feature vector was only classified as the closest cached feature vector. In addition, the minimum number of cached images was one. The second stage was the result of applying the distance threshold. Using these two experiments, we could decide how far the distance threshold can reduce false positives. The entire process of dataset selection, caching, and hit-rate measurement was performed on AlexNet, GoogLeNet [23], VGG-16, VGG-19 [24], ResNet-50, and ResNet-101 CNN models. For example, the 10 selected classes and 100 images for each class were images classified as the same class by each CNN model from the Microsoft COCO dataset. In addition, GoogLeNet was measured in inception units, and ResNet was measured in residual block units. Figure 5 shows the hit rate of classifying the query feature vector into a class of feature vectors that correspond to the closest distance without applying the distance threshold. In this case, the hit rate is 100 % because all input images are classified by the cache. Each item on the horizontal axis represents a convolution layer, which consists of seven bars. Each bar represents the number of cumulative cached training images of 1, 10, 20, 40, 60, 80, and 100. The blue and red areas of the bar represent the rate of true and false positives, respectively. As expected, the layers toward the end extract more detailed and common features, so the rate of true positives is high. In addition, as the number of cached images increases, the rate of true positives increases, but from 40 onwards, it does not increase significantly, and in some cases the rate of true positive declines slightly. However, the rate of false positives is high except for the final layers of GoogLeNet, ResNet-50, and ResNet-101. In addition, given that all results are _Cache Hits_, the input query image may be classified as incorrect. Although CNNs, except AlexNet, show a true positive rate of 80 % or higher for the last convolution layer, it is insignificant to use the cache on this layer. Therefore, if the cache returns a false positive, it is advantageous to classify it using the CNN instead of using the cache, because it is necessary to lower the false positive rate and treat it as a _Cache Miss_ even if there is a reduction in the hit rate of the cache. Figure 6 shows the hit rate when applying the distance threshold to prevent a false positive from being a _Cache Miss_ and to avoid using the cache. The seven bars for each item on the horizontal axis indicate that the number of training images accumulated in the cache is 2, 10, 20, 40, 60, 80, and 100. Figure 5: Hit rate of cache without distance threshold. In this case, false positives are also classified by the cache, which are actually _Cache Misses_. Figure 6: Hit rate of cache when applying the distance threshold. In this case, most false positives can be treated as _Cache Misses_ to improve cache efficiency. The green area of each bar is treated as a _Cache Miss_ by applying the distance threshold. In this case, the input image can be classified by the CNN rather than the cache, the classification as a false positive can be avoided, and the hit rate is reduced by the _Cache Miss_. By applying a distance threshold, the number of values retrieved from the cache, that is, the hit rate, has been greatly reduced.