摘要
小样本学习主要研究从少量的样本快速学习和归纳,原型网络对该问题提出了解决方法。原型网络算法将样本通过网络框架嵌入到低维空间,在低维空间中将支持集的每个类别的样本均值作为各自的原型,计算查询集样本到每个类别原型的距离,进而得到损失函数,通过迭代更新损失函数来优化网络框架,使得经过网络框架后的样本类内的差异变小,类间的差异变大。在计算每个类别原型的过程中,将每个类的样本均值作为各自的原型,由于每个类别的样本数较少,在计算原型时会有不确定性,当样本中存在离群点时,会使计算出的原型偏离真实的原型,在判别新样本属于哪一类别时,很容易产生误差。针对该问题,提出密度加权原型网络,利用密度加权算法计算每个类别中样本的密度,对密度大的样本赋予较大的权值,密度小的样本赋予较小的权值,进行加权得到原型,来缓解以上的缺陷。在miniImageNet数据集上设置5-way 5-shot、20-way 5-shot实验,结果表明所提出密度加权原型网络相对于原型网络算法在识别正确率方面有所提升。
Few-shot learning mainly studies fast learning and induction from a small number of samples,and the prototype network proposes a solution to this problem.The prototypical network algorithm embeds the samples into the low-dimensional space through the network framework.In the low-dimensional space,the sample mean of each category from the support set is used as the respective prototype,and the distance between the query set sample and the prototype of each category is calculated,and then the loss function is obtained.The network framework is optimized by iterating and updating the loss function,so that the intra-class difference in the sample through the network framework become smaller and the inter-class difference become larger.In the process of calculating the prototype of each category,the prototype network uses the sample average of each category as its own prototype.Since the number of samples in each category is small,there will be uncertainty when calculating the prototype.When there are outliers in the sample,the calculated prototype will deviate from the real prototype.When judging which category the new sample belongs to,it is easy to produce errors.In response to this problem,we propose a density-weighted algorithm,which uses a density-weighted algorithm to calculate the density of samples in each category,to assign larger weights to samples with high density,and to assign smaller weights to samples with low density to alleviate the above shortcomings.The 5-way 5-shot and 20-way 5-shot experiments are set on the miniImageNet dataset.The results show that the proposed density-weighted prototype network has improved recognition accuracy compared to the prototype network algorithm.
作者
华超
刘向阳
HUA Chao;LIU Xiang-yang(School of Science,Hohai University,Nanjing 211100,China)
出处
《计算机技术与发展》
2022年第9期8-13,共6页
Computer Technology and Development
基金
云南省重大科技专项计划项目资助(202002AE090010)。
关键词
小样本学习
情节
密度加权
临界距离
距离矩阵
few-shot learning
episodes
density weighting
critical distance
distance matrix