# How Deeply to Fine-Tune a Convolutional Neural Network: A Case Study Using a Histopathology Dataset
## 4 Results
### Experiment Results  
The results of fine-tuning VGG16 with three different learning rates are shown in Table 2. These results are the AUC of the ROC curve from the Kaggle website using the unlabeled dataset. The first block that was trained was the 5 th block, and the results of the three learning rates are approximately the same, although the highest was with the \(10^{-3}\) learning rate. The second block was the 4 th, which was fine-tuned with the 5 th layer, and the highest AUC obtained was by the \(10^{-4}\) learning rate followed by the \(10^{-3}\) and \(10^{-5}\). The AUC results did increase by fine-tuning the 4 th as well. The third experiment fine-tuned the blocks from the 5 th to the 3 rd, and the results obtained were higher than those of the previous two experiments. The highest was obtained by using the learning rate of \(10^{-4}\). The fourth experiment fine-tuned the blocks from the 5 th to the 2 nd, and the results show that the accuracy started to decrease compared to the previous experiments. The fifth experiment fine-tuned the entire network, and the results were higher than the previous experiment but overall lower than the third experiment. Figure 10: A schematic diagram of the proposed model. Overall, the highest AUC was 96%, which was achieved by fine-tuning the last 3 blocks and using the \(10^{-4}\) learning rate. The results of fine-tuning the VGG19 network are shown in Table 3. The same procedure followed to fine-tune the VGG16 architecture was employed. According to the results reported in Table 3, it is possible to see that the highest AUC was obtained by fine-tuning the last three blocks, by freezing the other blocks, and with a learning rate of \(10^{-4}\). A comparable performance is obtained with a learning rate of \(10^{-5}\), while when a learning rate of \(10^{-3}\) was used, the best performance was obtained by fine-tuning only the last two layers. The results of fine-tuning the InceptionV3 architecture are shown in Table 4. The first experiment conducted using the InceptionV3 architecture was to freeze the entire network and fine-tune the last block (13 th block) three times using three learning rates. The results were similar across the three learning rates, with the highest found by using the highest learning rate (\(10^{-3}\)) and the lowest by using the medium learning rate (\(10^{-4}\)). This procedure (that consists of fine-tuning the last \(n\) blocks and freezing the remaining blocks) was subsequently iterated for \(n\) in the range [2; 13] and by considering at each iteration the three different learning rates. According to the results reported in Table 4, when considering a learning rate of \(10^{-4}\) and \(10^{-5}\), the best performance was obtained by fine-tuning the whole architecture (i.e., \(n=13\)). On the other hand, with a learning rate of \(10^{-3}\), the best performance was achieved by fine-tuning the last eight blocks (from block 6 to block 13), thus freezing the first five blocks. To demonstrate the potential of the fine-tuning approach, we decided to compare its performance against the one obtained by using CNNs trained from scratch, specifically for the PatchCamelyon dataset. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{4}{c}{**VGG16 Test AUC Results**} \\ \hline
**Blocks** & **LR=\(10^{-3}\)** & **LR=\(10^{-4}\)** & **LR=\(10^{-5}\)** \\ \hline Fine-Tuning 5 th Block & 0.9303 & 0.9260 & 0.9212 \\ Fine-Tuning 4 th Block & 0.9398 & 0.9480 & 0.9382 \\ Fine-Tuning 3 rd Block & 0.9364 & 0.9603 & 0.9475 \\ Fine-Tuning 2 nd Block & 0.8893 & 0.9350 & 0.9384 \\ Fine-Tuning ALL & 0.9383 & 0.9310 & 0.9404 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Results of the VGG16 architecture.