Long-tail learning has received significant attention in recent years due to the challenge it poses with extremely imbalanced datasets. In these datasets, only a few classes (known as the head classes) have an adequate number of training samples, while the rest of the classes (known as the tail classes) are infrequent in the training data. Re-sampling is a classical and widely used approach for addressing class imbalance issues. Unfortunately, recent studies claim that re-sampling brings negligible performance improvements in modern long-tail learning tasks. This paper aims to investigate this phenomenon systematically. Our research shows that re-sampling can considerably improve generalization when the training images do not contain semantically irrelevant contexts. In other scenarios, however, it can learn unexpected spurious correlations between irrelevant contexts and target labels. We design experiments on two homogeneous datasets, one containing irrelevant context and the other not, to confirm our findings. To prevent the learning of spurious correlations, we propose a new context shift augmentation module that generates diverse training images for the tail class by maintaining a context bank extracted from the head-class images. Experiments demonstrate that our proposed module can boost the generalization and outperform other approaches, including class-balanced re-sampling, decoupled classifier re-training, and data augmentation methods. The source code is available at https://www.lamda.nju.edu.cn/code_CSA.ashx.
翻译:长尾学习因极不平衡数据集带来的挑战而备受关注。在这类数据集中,仅有少数类别(即头部类别)拥有足够数量的训练样本,而其余类别(即尾部类别)在训练数据中出现频率较低。重采样是处理类别不平衡问题的经典且广泛使用的方法。然而,近期研究指出,在现代长尾学习任务中,重采样带来的性能提升微乎其微。本文旨在系统性地探究这一现象。研究表明,当训练图像不包含语义无关的背景信息时,重采样能显著提升泛化能力;但在其他场景下,它可能学习到无关背景与目标标签之间意外的虚假关联。我们设计了两组同质数据集实验(一组含无关背景,另一组不含)以验证结论。为阻止虚假关联的学习,我们提出了一种新的背景偏移增强模块,该模块通过维护从头部类别图像中提取的背景库,为尾部类别生成多样化的训练图像。实验证明,该模块能有效提升泛化性能,并优于类平衡重采样、解耦分类器重训练及数据增强等其他方法。源代码已开源:https://www.lamda.nju.edu.cn/code_CSA.ashx。