Deep neural networks perform poorly on heavily class-imbalanced datasets. Given the promising performance of contrastive learning, we propose Rebalanced Siamese Contrastive Mining (ResCom) to tackle imbalanced recognition. Based on the mathematical analysis and simulation results, we claim that supervised contrastive learning suffers a dual class-imbalance problem at both the original batch and Siamese batch levels, which is more serious than long-tailed classification learning. In this paper, at the original batch level, we introduce a class-balanced supervised contrastive loss to assign adaptive weights for different classes. At the Siamese batch level, we present a class-balanced queue, which maintains the same number of keys for all classes. Furthermore, we note that the imbalanced contrastive loss gradient with respect to the contrastive logits can be decoupled into the positives and negatives, and easy positives and easy negatives will make the contrastive gradient vanish. We propose supervised hard positive and negative pairs mining to pick up informative pairs for contrastive computation and improve representation learning. Finally, to approximately maximize the mutual information between the two views, we propose Siamese Balanced Softmax and joint it with the contrastive loss for one-stage training. Extensive experiments demonstrate that ResCom outperforms the previous methods by large margins on multiple long-tailed recognition benchmarks. Our code and models are made publicly available at: https://github.com/dvlab-research/ResCom.
翻译:深心神经网络在高等级平衡的数据集上表现不佳。 鉴于对比性学习表现良好, 我们提议重新平衡暹罗对比采矿(ResCom) 以解决不平衡的识别问题。 根据数学分析和模拟结果, 我们声称, 监督对比性学习在原始批次和暹梅赛批次级上都存在双级平衡问题, 这比长尾分类学习更为严重。 在本文最初的批次一级, 我们引入了一种等级平衡的监督对比性对比性损失, 以分配不同类的适应性加权。 在暹梅批次一级, 我们提出一个等级平衡的队列, 以维持所有类的相同键数。 此外, 我们指出, 与对比性对齐对比性逻辑有关的不平衡对比性损失梯度梯度可以分解成正负两个等级, 并且容易的正负值和容易的负值将使对比性梯度消失。 我们提议由监管的正对和负对对矿开采来收集信息, 用于对比性计算和改进代表制学习。 最后, 为了尽可能扩大两种观点之间的相互信息, 我们提议在一次对比性分析性/ 对比性模型上, 我们提议在一次对比性实验中进行大规模的模型上, 对比性实验中, 展示前的模型的模型 。