arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.01522cs.CVcs.AIcs.LG
收藏

BatchFormer:学习探索样本关系以实现鲁棒表示学习

BatchFormer: Learning to Explore Sample Relationships for Robust Representation Learning

The University of Sydney(悉尼大学);JD Explore Academy(京东探索研究院)

Zhi Hou, Baosheng Yu, Dacheng Tao

摘要:

尽管深度神经网络取得了成功,但由于数据不平衡、不可见分布和域转移等数据稀缺问题,深度表示学习仍存在许多挑战。为了解决上述问题,已经设计了各种方法来以普通方式探索样本关系(即,从输入或损失函数的角度),未能探索深度神经网络的内部结构以用于利用样本关系进行学习。受此启发,我们建议使深度神经网络本身能够从每个小批量中学习样本关系。具体来说,我们引入了一个批处理Transformer模块或BatchFormer,然后将其应用于每个小批处理的批处理维度,以在训练期间隐式地探索样本关系。通过这样做,所提出的方法能够实现不同样本的协作,例如,头类样本还可以有助于尾类的学习以用于长尾识别。此外,为了缩小训练和测试之间的差距,我们在训练期间使用或不使用BatchFormer共享分类器,因此可以在测试期间删除。我们在十多个数据集上进行了广泛的实验,所提出的方法在不同的数据稀缺应用中实现了显着的改进,而没有任何花里胡哨的东西,包括长尾识别,组合零样本学习,领域泛化和对比学习。代码将在https://github.com/zhihou7/BatchFormer上公开。

英文摘要:

Despite the success of deep neural networks, there are still many challenges in deep representation learning due to the data scarcity issues such as data imbalance, unseen distribution, and domain shift. To address the above-mentioned issues, a variety of methods have been devised to explore the sample relationships in a vanilla way (i.e., from the perspectives of either the input or the loss function), failing to explore the internal structure of deep neural networks for learning with sample relationships. Inspired by this, we propose to enable deep neural networks themselves with the ability to learn the sample relationships from each mini-batch. Specifically, we introduce a batch transformer module or BatchFormer, which is then applied into the batch dimension of each mini-batch to implicitly explore sample relationships during training. By doing this, the proposed method enables the collaboration of different samples, e.g., the head-class samples can also contribute to the learning of the tail classes for long-tailed recognition. Furthermore, to mitigate the gap between training and testing, we share the classifier between with or without the BatchFormer during training, which can thus be removed during testing. We perform extensive experiments on over ten datasets and the proposed method achieves significant improvements on different data scarcity applications without any bells and whistles, including the tasks of long-tailed recognition, compositional zero-shot learning, domain generalization, and contrastive learning. Code will be made publicly available at https://github.com/zhihou7/BatchFormer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑