Tackling Early Sparse Gradients in Softmax Activation Using Leaky Squared Euclidean Distance
Abstract
Softmax activation is commonly used to output the probability distribution over categories based on certain distance metric. In scenarios like one-shot learning, the distance metric is often chosen to be squared Euclidean distance between the query sample and the category prototype. This practice works well in most time. However, we find that choosing squared Euclidean distance may cause distance explosion leading gradients to be extremely sparse in the early stage of back propagation. We term this phenomena as the early sparse gradients problem. Though it doesn't deteriorate the convergence of the model, it may set up a barrier to further model improvement. To tackle this problem, we propose to use leaky squared Euclidean distance to impose a restriction on distances. In this way, we can avoid distance explosion and increase the magnitude of gradients. Extensive experiments are conducted on Omniglot and miniImageNet datasets. We show that using leaky squared Euclidean distance can improve one-shot classification accuracy on both datasets.
Empirical ResultsBrowse all benchmarks →
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| Omniglot | ProtoNet(LSED) | classification accuracy | 95.65%+0.51 vs baseline | 1-shot · ways=20Source quoteL117: ProtoNet(LSED) │ \bf{95.65}% │ \bf{98.70}% │ \bf{51.74}% │ \bf{68.39}% |
| miniImageNet | ProtoNet(LSED) | classification accuracy | 51.74%+3.4 vs baseline | 1-shot · ways=5Source quoteL117: ProtoNet(LSED) │ \bf{95.65}% │ \bf{98.70}% │ \bf{51.74}% │ \bf{68.39}% |
Reported baseline / comparator measurements (2)
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| Omniglot | ProtoNet baseline | classification accuracy | 95.14% | 1-shot · ways=20 · distance=squared-euclideanSource quoteL116: ProtoNet~\cite{snell2017prototypical} │ 95.14% │ 98.54% │ 48.34% │ 67.94% |
| miniImageNet | ProtoNet baseline | classification accuracy | 48.34% | 1-shot · ways=5 · distance=squared-euclideanSource quoteL116: ProtoNet~\cite{snell2017prototypical} │ 95.14% │ 98.54% │ 48.34% │ 67.94% |
BibTeX
@misc{shen2018tackling,
author = {Wei Shen and Rujie Liu},
title = {{Tackling Early Sparse Gradients in Softmax Activation Using Leaky Squared Euclidean Distance}},
year = {2018},
eprint = {1811.10779},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1811.10779},
}Ask Althea to put this paper to the test.
Loading related content...