半监督论文阅读:Open-World Semi-Supervised Learning


论文简介

论文概述

传统的监督学习和半监督学习方法都是基于封闭世界的设置,也就是说,未标记的数据只包含在已标记的训练数据中遇到的类。这篇文章就是引入了一个开放世界半监督学习的设置,模型既需要识别以前见过的类,也需要发现没在标记数据集中见过的新类。
文章提出了ORCA(Open-woRld with unCertainty based Adaptive margin),引入了基于不确定性的自适应margin,减少了novel class和intra-class之间的差距。

情景设定

文章引入了open-world semi-supervised learning:有一个标记数据集和一个未标记数据集,未标记数据集可能包含从未在标记数据集中出现过的类,且模型需要能够:

  • 识别未标记数据的样本是否属于标记数据集中出现的已知类之一
  • 将未标记数据集的相似样本分组,分配为新的类,在没有任何先验知识的情况下自动发现新的类/unseen class。


相似情景论文



  • Robust SSL(OOD检测):假设带标记数据和未标记数据之间的类分布不匹配,要求模型能够识别/拒绝未标记数据中的新类的实例为ood实例即可。

    Avital Oliver, Augustus Odena, Colin A Raffel, Ekin Dogus Cubuk, and Ian Goodfellow. Realistic evaluation of deep semi-supervised learning algorithms. In Neural Information Processing Systems, 2018.
    Lan-Zhe Guo, Zhen-Yu Zhang, Yuan Jiang, Yu-Feng Li, and Zhi-Hua Zhou. Safe deep semi-supervised learning for unseen-class unlabeled data. In International Conference on Machine Learning, 2020.
    Yanbei Chen, Xiatian Zhu, Wei Li, and Shaogang Gong. Semi-supervised learning under class distribution mismatch. In AAAI Conference on Artificial Intelligence, 2020b.
    Lan-Zhe Guo, Zhen-Yu Zhang, Yuan Jiang, Yu-Feng Li, and Zhi-Hua Zhou. Safe deep semi-supervised learning for unseen-class unlabeled data. In International Conference on Machine Learning, 2020.
    Qing Yu, Daiki Ikami, Go Irie, and Kiyoharu Aizawa. Multi-task curriculum framework for open-set semi-supervised learning. In European Conference on Computer Vision, 2020.
  • Novel class discovery(零样本,自适应问题):聚类问题,假设未标记数据仅由新类组成。

    Yen-Chang Hsu, Zhaoyang Lv, and Zsolt Kira. Learning to cluster in order to transfer across domains and tasks. In International Conference on Learning Representations, 2018.
    Yen-Chang Hsu, Zhaoyang Lv, Joel Schlosser, Phillip Odom, and Zsolt Kira. Multi-class classification without multi-class labels. In International Conference on Learning Representations, 2019.
    Kai Han, Andrea Vedaldi, and Andrew Zisserman. Learning to discover novel visual categories via deep transfer clustering. In IEEE International Conference on Computer Vision, 2019.
    Kai Han, Sylvestre-Alvise Rebuffi, Sebastien Ehrhardt, Andrea Vedaldi, and Andrew Zisserman. Automatically discovering and learning new visual categories with ranking statistics. In International Conference on Learning Representations, 2020.
    Zhun Zhong, Linchao Zhu, Zhiming Luo, Shaozi Li, Yi Yang, and Nicu Sebe. OpenMix: Reviving known knowledge for discovering novel visual categories in an open world. In IEEE Conference on Computer Vision and Pattern Recognition, 2021.
  • 开集识别:在测试过程中可能出现新类,模型需要拒绝来自新类的实例。

    Walter J Scheirer, Anderson de Rezende Rocha, Archana Sapkota, and Terrance E Boult. Toward open set recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(7): 1757–1772, 2012.
    Chuanxing Geng, Sheng-jun Huang, and Songcan Chen. Recent advances in open set recognition: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020.
    Abhijit Bendale and Terrance E Boult. Towards open set deep networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2016.
    ZongYuan Ge, Sergey Demyanov, Zetao Chen, and Rahil Garnavi. Generative OpenMax for multi-class open set classification. In British Machine Vision Conference, 2017.
    Xin Sun, Zhenning Yang, Chi Zhang, Keck-Voon Ling, and Guohao Peng. Conditional Gaussian distribution learning for open set recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2020a.
  • open-world recognition approaches:用新类来逐步学习和扩展已知的类集,通过人工来增量的标记新类。

    Abhijit Bendale and Terrance E Boult. Towards open world recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2015.
    Ethan M Rudd, Lalit P Jain, Walter J Scheirer, and Terrance E Boult. The extreme value machine. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(3):762–768, 2017.
    Terrance E Boult, Steve Cruz, Akshay Raj Dhamija, M Gunther, James Henrydoss, and Walter J Scheirer. Learning and the unknown: Surveying steps toward open world recognition. In AAAI Conference on Artificial Intelligence, 2019.
  • Generalized zero-shot learning:跟open-world SSL很像,假设标记集中看到的类和新的类在测试时出现,但GZSL对先验知识增加了额外的辅助属性,这些属性能唯一描述每个单独的类。

    Yongqin Xian, Bernt Schiele, and Zeynep Akata. Zero-shot learning-the good, the bad and the ugly. In IEEE Conference on Computer Vision and Pattern Recognition, 2017.
    Shichen Liu, Mingsheng Long, Jianmin Wang, and Michael I Jordan. Generalized zero-shot learning with deep calibration network. In Neural Information Processing Systems, 2018.
    Wei-Lun Chao, Soravit Changpinyo, Boqing Gong, and Fei Sha. An empirical study and analysis of generalized zero-shot learning for object recognition in the wild. In European Conference on Computer Vision, 2016.

方法步骤



问题的关键矛盾

对于open-world SSL,最关键的困难是,模型在见过的类上的学习鉴别表征的速度比新的类更快。这就导致的所见类的类内方差比新颖类更小。
解决思路:利用未标记数据的不确定性来控制所见类的类内方差。若未标记数据的不确定性高,则执行较大的所见类的类内方差,来减少所见类和新类方差之间的差距;若未标记数据的不确定性很高,则执行较小的类内方差,来鼓励模型充分使用标记数据。通过这种方式,用不确定性自适应余量来控制所见类的类内方差,确保所见类的鉴别性表征与新颖类相比不会学的太快。

作者先训练一个k分类的分类器,$k=|C_l \cup C_u|$,无标签的数据集的类的数量用已有的聚类方法[1]来进行估计,后期在对错估的类进行裁剪。后面如果有没有用到的类,再把这些虚拟类别裁掉。

[1] Kai Han, Andrea Vedaldi, and Andrew Zisserman. Learning to discover novel visual categories via deep transfer clustering. In IEEE International Conference on Computer Vision, 2019.

目标函数




目标函数包括三项:监督目标,成对目标,均匀分布正则化。

监督损失$L_S$

监督损失最初为标准的交叉熵损失:




但使用标准交叉熵损失会导致损失函数在标记数据和未标记数据之间产生不平衡问题:已知类别更新了梯度,unseen class没有更新梯度,这样会导致模型偏向已知类。因此ORCA引入了基于不确定性的margin,来平衡seen class和unseen class之间的类内方差,提高伪标签的质量。


在训练开始的时候,强制给他一个较大的负margin,这样损失函数会平衡好seen class和unseen class之间的方差。训练快结束的时候(新类已经形成聚类了),把边缘项调整为接近0的值,这样模型就可以充分利用新类里的标签信息。




作者使用模型的预测概率来计算未标记样本的不确定性,平衡类内方差。

成对目标$L_P$




类似于约束类内的紧凑。对于一个mini-batch的样本,有标签样本我们使用ground-truth来挑选正例。对于无标签阉割版,我们计算mini-batch里每个样本在特征空间的余弦相似度,然后进行距离排序,用最近邻来作为正例。

均匀分布正则化




如果在为标记数据上只使用上面的成对目标ORCA会退化为将所有样本分配至同一类的平凡解(即通用的OOD检测问题),$|C_u|=1$。为了避免这个问题,作者引入了KL散度的约束。

算法流程



  1. 预训练:采用对比学习SimCLR进行预训练。
  2. 分类器:从未标记样本的数据中估计出来新类的数量(用上面引用的那个聚类算法),用已知类的分类头和激活的虚拟分类头来对未标记样本进行分类。当然有的类可能一直不会被分配样本,即这个类一直没有被激活,最后会把这种类给裁去。
  3. 损失函数:用上面提到的损失函数来进行计算。

实验分析

数据集:CIFAR-10,CIFAR-100,ImageNet
对于已知类,使用精度作为评价指标;对于未知类,使用normalized mutual information(NMI)作为评价指标。
作者拿ORCA和传统SSL方法与一些新类别发现的方法进行了比较。ZM表示zero margin,即损失中的改进的margin交叉熵损失用标准的交叉熵损失代替;FNM表示fixed negative margin,交叉熵中的margin以常数0.5代替(0.5怎么来的在附录里有讲)。因此这个实验也算是一个变相的消融实验了。



从不确定性和精度指标来衡量ORCA:




作者拿ORCA,ZM和FNM三种情况来进行实验,作者在第140轮的实验消减了学习率,因此发生了一个突变。可以看到算法在zero margin的时候labeled data的不确定性很低,但unlabeled data不确定性很高,且在学习率降低以后seen class的精度也越来越低;而ORCA在labeled data和unlabeled data上的表现都是3种情况里表现最好的(当然novel class的精度也没有高出多少就是了)。

优缺点

这篇论文他提出的设定比较好,提出了一个综合ood检测和Novel class discovery的问题。文中在损失函数中提出的margin比较巧妙,用不确定性来平衡seen class和unseen class之间的方差,来保证伪标签的质量。

缺点就是他的方法还是有些堆模块的意思,目标函数涵盖了3个项,还在试验验证里又加了一个聚类;而且方法里提到的超参数有点多。

声明:奋斗小刘|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - 半监督论文阅读:Open-World Semi-Supervised Learning


Make Everyday Count