# Local Contrast Learning for One-Shot Learning
## 5 Discussion  
The LCL method is based on the idea of using a sample as the center to establish a local space to contrast and identify other samples. Contrasting samples within a local context is a key factor for the success of the LCNN. Contrasting in local context forces the LCNN to adapt to different local contexts; thus, the LCNN cannot remember the context  
Figure 8: Transfer from HWDB to Omniglot. \begin{table}
\begin{tabular}{l l l l l l l l l l l} \hline \hline
**ID** & **Source** & **Target** & **Test** & **Target** & **Target** & **Test** & **avg\_** & **no\_trans\_** & **Max** & **Min** & **var\_** \\  & & & & **Classes** & **Samples** & **Shots** & **acc** & **avg\_acc** & **Accuracy** & **Accuracy** \\ \hline a1 & HWDB & & omniglot & & 1 & 87.69 & & 88.75 & 86.50 & 0.39 \\ a5 & HWDB & & omniglot & & 5 & 96.08 & & 97.20 & 94.40 & 0.67 \\ b1 & HWDB & omniglot & & 136 & 5 & 1 & 93.91 & 81.73 & 94.75 & 92.75 & 0.21 \\ b5 & HWDB & omniglot & & 136 & 5 & 5 & 98.14 & 94.52 & 99.00 & 96.40 & 0.43 \\ c1 & HWDB & omniglot & & 156 & 5 & 1 & 94.71 & 84.41 & 95.25 & 94.25 & 0.08 \\ c5 & HWDB & omniglot & & 156 & 5 & 5 & 98.40 & 96.02 & 99.40 & 97.20 & 0.36 \\ d1 & HWDB & omniglot & & 964 & 20 & 1 & 97.09 & 97.93 & 97.75 & 96.00 & 0.16 \\ d5 & HWDB & omniglot & omniglot & 964 & 20 & 5 & 99.11 & 99.04 & 99.80 & 98.40 & 0.13 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Results of all experiments on Omniglot and HWDB with 20-way accuracy (%). In all experiments, the image size is 64 \(\times\) 64. The experiments b1, b5, c1, c5, d1, and d5 have a constant learning rate of 0.001 and max learning steps of about 5000, and the corresponding non-transferred accuracies are given by the models with hyperparameters \(d_{1}\) 9600, \(d_{2}\) 12,800, and \(m\) 16,000. The “avg_acc” means average accuracy. The “no_trans_avg_acc” means no transferred average accuracy. The “var_accuracy” means variance average. information; so, in the case of tiny samples, the LCNN would not encounter overfitting. The other success of the LCL is partially attributed to the extremely large quantity of Local Cognitive Contexts (LCCs) and the three randomness factors: randomly selecting classes, randomly selecting samples, and randomly shuffling contrastive objects. They all enable the LCNN to learn to distinguish objects instead of representing and remembering the training object or its pattern. Of course, a super deep neural network, such as Resnet, is a very important factor, and its depth may provide enough flexibility to adapt to a large local context. However, the LCL method ensures that the super deep neural network avoids overfitting in the case of tiny samples. Therefore, the super deep neural network contributes to the high classification accuracy, but LCL contributes to its success in training. It is a fine design to use the Difference Perceptron to contrast the difference embedding instead of learning a similarity metric. That makes the contrast objects in the LCC become a list rather than a set and makes the order of the contrast objects become meaningful. The order is crucial to creating tremendously different LCCs. The number of training classes and the number of samples per class are an essential factor to improve performance. More classes and samples per class can improve the test accuracy. However, the accuracy is only increased when the sample is smaller. In case the training sample is enough, the increase of sample size almost cannot improve the classification accuracy, which is similar to human beings' cognitive behavior, in that humans can learn to recognize objects from a few samples, but humans cannot learn more from redundant similar samples. In some cases, the increase of samples might worsen the accuracy, because more samples may bring in more noise, which can interfere with the training.