Stochastic Feature Averaging for Learning with Long-Tailed Noisy Labels
Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence. Main Track. Pages 3902-3910.
https://doi.org/10.24963/ijcai.2023/434
Keywords
- Machine Learning: ML: Multi-label
- Machine Learning: ML: Weakly supervised learning
- Machine Learning: ML: Semi-supervised learning
Abstract
Deep neural networks have shown promising results on a wide variety of tasks using large-scale and well-annotated training datasets. However, data collected from real-world applications can suffer from two prevalent biases, i.e., long-tailed class distribution and label noise. Previous efforts on long-tailed learning and label-noise learning can only address a single type of data bias, leading to a severe deterioration of their performance. In this paper, we propose a distance-based sample selection algorithm called Stochastic Feature Averaging (SFA), which fits a Gaussian using the exponential running average of class centroids to capture uncertainty in representation space due to label noise and data scarcity. With SFA, we detect noisy samples based on their distances to class centroids sampled from this Gaussian distribution. Based on the identified clean samples, we then propose to train an auxiliary balanced classifier to improve the generalization for the minority class and facilitate the update of Gaussian parameters. Extensive experimental results show that SFA can enhance the performance of existing methods on both simulated and real-world datasets. Further, we propose to combine SFA with the sample-selection approach, distribution-robust, and noise-robust loss functions, resulting in significant improvement in performance over the baselines. Our code is available at https://github.com/HotanLee/SFA
- [Arazo et al., 2019] Eric Arazo, Diego Ortego, Paul Albert, Noel O'Connor, and Kevin McGuinness. Unsupervised label noise modeling and loss correction. In Proceedings of International Conference on Machine Learning, pages 312-321, 2019.
- [Arpit et al., 2017] Devansh Arpit, Stanislaw Jastrzebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, et al. A closer look at memo- rization in deep networks. In Proceedings of International Conference on Machine Learning, pages 233-242, 2017.
- [Berthelot et al., 2019] David Berthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin A Raffel. Mixmatch: A holistic approach to semi- supervised learning. Advances in Neural Information Pro- cessing Systems, 2019.
- [Cao et al., 2019] Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Arechiga, and Tengyu Ma. Learning imbalanced datasets with label-distribution-aware margin loss. Ad- vances in Neural Information Processing Systems, pages 1565-1576, 2019.
- [Cao et al., 2020] Kaidi Cao, Yining Chen, Junwei Lu, Nikos Arechiga, Adrien Gaidon, and Tengyu Ma. Het- eroskedastic and imbalanced deep learning with adaptive regularization. In International Conference on Learning Representations, 2020.
- [Cheng et al., 2022] De Cheng, Tongliang Liu, Yixiong Ning, Nannan Wang, Bo Han, Gang Niu, Xinbo Gao, and Masashi Sugiyama. Instance-dependent label-noise learning with manifold-regularized transition matrix esti- mation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 16630- 16639, 2022.
- [Cui et al., 2019] Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge Belongie. Class-balanced loss based on effective number of samples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9268-9277, 2019.
- [Cui et al., 2021] Jiequan Cui, Zhisheng Zhong, Shu Liu, Bei Yu, and Jiaya Jia. Parametric contrastive learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 715-724, 2021.
- [Ghosh et al., 2017] Aritra Ghosh, Himanshu Kumar, and P Shanti Sastry. Robust loss functions under label noise for deep neural networks. In Proceedings of the AAAI Confer- ence on Artificial Intelligence, pages 1919-1925, 2017.
- [Han et al., 2018] Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. Advances in Neural Information Processing Systems, pages 8536-8546, 2018.
- [He et al., 2016] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual net- works. In Proceedings of European Conference on Com- puter Vision, pages 630-645, 2016.
- [Hendrycks et al., 2018] Dan Hendrycks, Mantas Mazeika, Duncan Wilson, and Kevin Gimpel. Using trusted data to train deep networks on labels corrupted by severe noise. Advances in Neural Information Processing Sys- tems, pages 10477-10486, 2018.
- [Jamal et al., 2020] Muhammad Abdullah Jamal, Matthew Brown, Ming-Hsuan Yang, Liqiang Wang, and Boqing Gong. Rethinking class-balanced methods for long-tailed visual recognition from a domain adaptation perspective. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7610-7619, 2020.
- [Jiang et al., 2018] Lu Jiang, Zhengyuan Zhou, Thomas Le- ung, Li-Jia Li, and Li Fei-Fei. Mentornet: Learning data- driven curriculum for very deep neural networks on cor- rupted labels. In Proceedings of International Conference on Machine Learning, pages 2304-2313, 2018.
- [Jiang et al., 2022] Shenwang Jiang, Jianan Li, Ying Wang, Bo Huang, Zhang Zhang, and Tingfa Xu. Delving into sample loss curve to embrace noisy and imbalanced data. In Proceedings of the AAAI Conference on Artificial Intel- ligence, pages 7024-7032, 2022.
- [Kang et al., 2020] Bingyi Kang, Saining Xie, Marcus Rohrbach, Zhicheng Yan, Albert Gordo, Jiashi Feng, and Yannis Kalantidis. Decoupling representation and classi- fier for long-tailed recognition. In International Confer- ence on Learning Representations, 2020.
- [Lee et al., 2021] Hyuck Lee, Seungjae Shin, and Heey- oung Kim. Abc: Auxiliary balanced classifier for class- imbalanced semi-supervised learning. Advances in Neural Information Processing Systems, pages 7082-7094, 2021.
- [Li et al., 2020] Junnan Li, Richard Socher, and Steven C.H. Hoi. Dividemix: Learning with noisy labels as semi- supervised learning. In International Conference on Learning Representations, 2020.
- [Liu et al., 2019] Ziwei Liu, Zhongqi Miao, Xiaohang Zhan, Jiayun Wang, Boqing Gong, and Stella X Yu. Large-scale long-tailed recognition in an open world. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pat- tern Recognition, pages 2537-2546, 2019.
- [Liu et al., 2020] Sheng Liu, Jonathan Niles-Weed, Narges Razavian, and Carlos Fernandez-Granda. Early-learning regularization prevents memorization of noisy labels. Ad- vances in Neural Information Processing Systems, 2020.
- [Maddox et al., 2019] Wesley J Maddox, Pavel Izmailov, Timur Garipov, Dmitry P Vetrov, and Andrew Gordon Wil- son. A simple baseline for bayesian uncertainty in deep learning. Advances in Neural Information Processing Sys- tems, 2019.
- [Menon et al., 2020] Aditya Krishna Menon, Sadeep Jaya- sumana, Ankit Singh Rawat, Himanshu Jain, Andreas Veit, and Sanjiv Kumar. Long-tail learning via logit ad- justment. In International Conference on Learning Repre- sentations, 2020.
- [Patrini et al., 2017] Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition, pages 1944-1952, 2017.
- [Permuter et al., 2006] Haim Permuter, Joseph Francos, and Ian Jermyn. A study of gaussian mixture models of color and texture features for image classification and segmen- tation. Pattern Recognition, pages 695-706, 2006.
- [Ren et al., 2018] Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In Proceedings of International Con- ference on Machine Learning, pages 4334-4343, 2018.
- [Ren et al., 2020] Jiawei Ren, Cunjun Yu, shunan sheng, Xiao Ma, Haiyu Zhao, Shuai Yi, and hongsheng Li. Bal- anced meta-softmax for long-tailed visual recognition. Ad- vances in Neural Information Processing Systems, pages 4175-4186, 2020.
- [Shen et al., 2016] Li Shen, Zhouchen Lin, and Qingming Huang. Relay backpropagation for effective learning of deep convolutional neural networks. In Proceedings of Eu- ropean Conference on Computer Vision, pages 467-482, 2016.
- [Shu et al., 2019] Jun Shu, Qi Xie, Lixuan Yi, Qian Zhao, Sanping Zhou, Zongben Xu, and Deyu Meng. Meta- weight-net: Learning an explicit mapping for sample weighting. Advances in Neural Information Processing Systems, pages 1917-1928, 2019.
- [Szegedy et al., 2017] Christian Szegedy, Sergey Ioffe, Vin- cent Vanhoucke, and Alexander A Alemi. Inception-v4, inception-resnet and the impact of residual connections on learning. In Proceedings of AAAI Conference on Artificial Intelligence, pages 4278-4284, 2017.
- [Tang et al., 2020] Kaihua Tang, Jianqiang Huang, and Han- wang Zhang. Long-tailed classification by keeping the good and removing the bad momentum causal effect. Ad- vances in Neural Information Processing Systems, pages 1513-1524, 2020.
- [Wei and Li, 2020] Tong Wei and Yu-Feng Li. Does tail label help for large-scale multi-label learning? IEEE Transactions on Neural Networks and Learning Systems, 31(7):2315-2324, 2020. IJCAI
- [Wei et al., 2021] Tong Wei, Jiang-Xin Shi, Wei-Wei Tu, and Yu-Feng Li. Robust long-tailed learning under label noise. ArXiv Preprint ArXiv:2108.11569, 2021.
- [Wei et al., 2022a] Tong Wei, Jiang-Xin Shi, Yu-Feng Li, and Min-Ling Zhang. Prototypical classifier for robust class-imbalanced learning. In Proceedings of Pacific-Asia Conference on Knowledge Discovery and Data Mining, 2022.
- [Wei et al., 2022b] Tong Wei, Hai Wang, Weiwei Tu, and Yufeng Li. Robust model selection for positive and un- labeled learning with constraints. Science China Informa- tion Sciences, 65(11):1-13, 2022.
- [Wu et al., 2021] Zhi-Fan Wu, Tong Wei, Jianwen Jiang, Chaojie Mao, Mingqian Tang, and Yu-Feng Li. Ngc: A unified framework for learning with open-world noisy data. In Proceedings of the IEEE/CVF International Con- ference on Computer Vision, pages 62-71, 2021.
- [Xia et al., 2021] Xiaobo Xia, Tongliang Liu, Bo Han, Mingming Gong, Jun Yu, Gang Niu, and Masashi Sugiyama. Sample selection with uncertainty of losses for learning with noisy labels. In International Conference on Learning Representations, 2021.
- [Xiang et al., 2020] Liuyu Xiang, Guiguang Ding, and Jun- gong Han. Learning from multiple experts: Self-paced knowledge distillation for long-tailed classification. In Proceedings of European Conference on Computer Vision, pages 247-263, 2020.
- [Yi et al., 2022] Xuanyu Yi, Kaihua Tang, Xian-Sheng Hua, Joo-Hwee Lim, and Hanwang Zhang. Identifying hard noise in long-tailed sample distribution. In Proceedings of European Conference on Computer Vision, pages 739- 756, 2022.
- [Zhang and Sabuncu, 2018] Zhilu Zhang and Mert Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. Advances in Neural Informa- tion Processing Systems, 2018.
- [Zhou et al., 2020] Boyan Zhou, Quan Cui, Xiu-Shen Wei, and Zhao-Min Chen. Bbn: Bilateral-branch network with cumulative learning for long-tailed visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9719-9728, 2020.
- [Zhou et al., 2022] Xiong Zhou, Xianming Liu, Deming Zhai, Junjun Jiang, Xin Gao, and Xiangyang Ji. Prototype- anchored learning for learning with imperfect annotations. In Proceedings of International Conference on Machine Learning, pages 27245-27267, 2022.
- [Zhou, 2022] Zhi-Hua Zhou. Open-environment machine learning. National Science Review, 9(8):nwac123, 2022.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
Deep neural networks (DNNs) have achieved remarkable success on a wide variety of tasks by leveraging largescale and well-annotated datasets. Nevertheless, data collected from real-world applications usually follow a longtailed class distribution, i.e., most classes are associated with only a small amount of training data, leading to inferior generalization on the minority class [Zhou et al., 2020; Xiang et al., 2020; Menon et al., 2020; Wei and Li, 2020; Cui et al., 2021]. On the other hand, data annotated by human labelers or web crawling are easily corrupted (label noise) in practice. When training with label noise, over-parameterized DNNs can achieve perfect training accuracy due to the memorization effect but cannot generalize [Arpit et al., 2017; Han et al., 2018; Liu et al., 2020; Xia et al., 2021; Wu et al., 2021; Wei et al., 2022b; Zhou, 2022]. Hence, it is crucial to tackle those two types of data biases, i.e., the long-tailed class distribution and label noise, to train robust DNNs.
∗Corresponding author

Many methods for long-tailed learning (LTL) and labelnoise learning (LNL) have been proposed to address those two common types of data biases. LTL aims to deal with the imbalanced class distribution, and LTL methods have been evolving in three main directions: (1) re-balancing the training data [Shen et al., 2016; Liu et al., 2019; Zhou et al., 2020]; (2) adjusting the outputs of a model [Kang et al., 2020; Menon et al., 2020; Tang et al., 2020]; and (3) designing distribution-robust loss functions [Cao et al., 2019; Jamal et al., 2020; Ren et al., 2020]. However, existing LTL methods do not take the presence of label noise into account. On the other hand, LNL aims to deal with the problem of label noise by (1) designing noise-robust loss functions [Ghosh et al., 2017; Liu et al., 2020] or (2) detecting and cleaning the noisy data [Jiang et al., 2018; Li et al., 2020]. As one of the most commonly used criteria, a training sample is suggested as noisy data if the loss value between the prediction and its label is higher than a threshold [Han et al., 2018; Arazo et al., 2019; Xia et al., 2021]. However, these methods can detect many false noisy data because even clean data of the minority class has large losses.
To mitigate such issues for detecting label noise under long-tailed class distribution, we propose a novel and practical framework, stochastic feature averaging (SFA). SFA provides a high-quality splitting of clean and noisy data for both the majority and minority classes. Instead of using the loss values, SFA utilizes the distance distribution between samples and the estimated class centroids in the latent representation space. We find that the class centroid may be inaccurate due to the label noise and data scarcity; thus, we approximate the Gaussian posterior distribution over the running average of estimated class centroids. We sample class centroids from this Gaussian distribution and then compute distances. Based on the selected clean data, we add an auxiliary balance classifier to improve the generalization of the minority class and facilitate the estimate of Gaussian parameters. The proposed SFA framework significantly outperforms various existing approaches by a large margin, illustrated in Figure 1. Further, we propose to combine SFA with different existing methods: the sample-selection approach, distribution-robust, and noise-robust loss functions. The key contributions of this work are summarized as follows:
- We study an under-explored problem of learning from noisy data under long-tailed class distribution, which is more challenging yet practical.
- We propose a novel framework SFA for detecting noisy samples using the distance-based criterion and improving the minority class generalization. SFA can be an alternative to loss-based approaches to boost the performance balance across classes.
- Experimental results show that SFA significantly outperforms existing methods on various datasets and settings. Further, SFA can be used as a universal add-on for mainstream LTL and LNL methods.
2 RelatedWork
Long-tailed learning has drawn significant attention in recent years. Many approaches have been proposed, which can be roughly categorized into three types by modifying: (1) the inputs to a model by re-balancing the training data [Shen et al., 2016; Liu et al., 2019; Zhou et al., 2020]; (2) the outputs of a model, for example by post-hoc adjustment of the classifier [Kang et al., 2020; Menon et al., 2020; Tang et al., 2020] and (3) the internals of a model by modifying the loss function [Cui et al., 2019; Cao et al., 2019; Jamal et al., 2020; Ren et al., 2020]. It is worth noting that most of these LTL approaches rely on the assumption that the labels in the training set are correct. However, this is often not the case in real-world applications and label noise has been shown to deteriorate their performance severely.
Label-noise learning approaches can be broadly divided into three areas of focus: (1) noise transition matrix estimation [Patrini et al., 2017; Hendrycks et al., 2018; Cheng et al., 2022], (2) noise-robust loss functions design [Ghosh et al., 2017; Zhang and Sabuncu, 2018; Liu et al., 2020], and (3) clean sample selection [Han et al., 2018; Jiang et al., 2018; Arazo et al., 2019; Li et al., 2020]. Among these approaches, the "small-loss" criterion, which treats samples with small loss as clean samples, is one of the most frequently used methods and has achieved excellent performance. However, it ignores the class imbalance problem in the training data and thus cannot generalizes to long-tailed datasets.
Learning with long-tailed noisy labels aims to tackle both the long-tailed class distribution and label noise issues. A few attempts have been made in this direction by (1) reweighting samples to put greater emphasis on clean long-tailed data [Ren et al., 2018; Shu et al., 2019; Wei et al., 2022a; Jiang et al., 2022]; (2) designing robust loss functions for handling both label noise and class imbalance [Cao et al., 2020], (3) developing better representation learning methods [Zhou et al., 2022; Yi et al., 2022], and (4) selecting clean samples using carefully designed criteria [Wei et al., 2021; Xia et al., 2021]. Our approach follows the idea of sample selection based on the "small-distance" criterion, which detects noisy samples in the latent representation space. Further, we propose an auxiliary balanced classifier to improve the generalization based on selected clean samples.
3 The Proposed Approach
3.1 ProblemFormulation
Consider a K class classification task, we denote the training dataset D = {(xi, yi)}Ni=1 , where the training sample xi ∈ Rd and its label yi ∈ [K] = {1, 2, ...K}. We group training samples of class k ∈ [K] as Dk = {(xi, yi) | yi = k}. The training dataset D follows a long-tailed class distribution in our problem setting. Specifically, let ρ = maxk |Dk|/mink |Dk| as the imbalance ratio, we have ρ ≫ 1, e.g., ρ = 100. With label noise, a fraction of training samples are incorrectly labeled, i.e., ∃i ∈ [N], yi ̸= y∗ i where y∗ i denotes the ground-truth label for xi. In the rest of the paper, we denote the fraction of incorrectly labeled training samples as γ ∈ (0, 1). Given D, our goal is to learn a classifier f : Rd → [K] that can generalize to unseen data.
Basic idea. To tackle the problem of learning from longtailed noisy data, we design a novel framework termed SFA. On the one hand, SFA follows the sample selection paradigm and selects clean samples in the latent representation space, which applies to both the majority and minority classes. On the other hand, we propose to employ an auxiliary balanced classifier for training using selected yet long-tailed clean samples to improve the generalization for the minority class. Figure 2 provides an overview of our proposed framework.
3.2 ANew Sample Selection Framework
The Small-Distance Criterion. To select clean samples from long-tailed and noisy data, we proposed to adopt the small-distance criterion. It has been verified that the smalldistance criterion is more effective than the small-loss counterpart in the recent literature [Wei et al., 2021]. The smalldistance criterion makes an assumption on the data distribution that the likelihood of a sample xi belonging to class k decays exponentially with its distance from its class centroid ck, i.e., P(xi | ck) ∝ e-dist(ck,xi) , where dist is the distance measure in the latent representation space and is typically set to be the Euclidean distance. The assumption allows for an unrestricted number of samples, making it suitable for both the majority and minority classes. In other words, the closer the samples are to their corresponding class centroids, the more likely they are to be clean samples. The challenge of this approach is how to accurately estimate the class centroids in the presence of label noise, even when only a few samples are accessible for the minority class. In the following, this paper seeks to solve this problem by estimating the posterior distribution of the class centroids.

Instant Centroid Estimation. A direct approach to estimate the class centroids is to compute the mean of all feature vectors of each class after each training epoch referred to as the instant centroid estimation. However, it may be difficult to produce accurate estimates when label noise exists in data, as it uses noisy samples in the computation. To mitigate this issue, one feasible approach is to use as many clean samples as possible to compute the class centroids. We find that the majority and minority classes tend to have similar ranges of predicted confidence output by the auxiliary balanced classifier, and most clean samples have higher confidence than noisy samples. This observation motivates us to select a fraction of clean samples for each class to compute a rough estimate of class centroids using a single confidence threshold τ . Specifically, we compute the centroid of class k by:
where I(·) is the indicator function, N ′k is the number of selected samples, g(x) returns the latent representation for x, and fabc(x) outputs the predicted confidence by the auxiliary balanced classifier, which is introduced in Section 3.3. In practice, since more and more samples tend to receive high predicted confidence as the training proceeds, we set a dynamic threshold τt as an increasing function of iteration t, which is given by τt = ϕt ˆ τ, where ϕ is a constant. For example, we set ϕ = 1.005 and ˆ τ = 1/K in our experiments. With this instant centroid estimation, we obtain a relatively reliable centroid for selecting clean samples. However, the accuracy of the estimate can still be affected by the scarcity of the minority class samples.
Stochastic Feature Averaging. To further reduce the estimation error, inspired by [Maddox et al., 2019], a Bayesian extension of the class centroid is designed to conduct Bayesian inference using a Gaussian approximation to the posterior distribution over class centroids. To start with, SFA maintains the running average of class centroids:
where CSFA = [c1; · · · ; cK] is the running estimate of class centroids, Ct denotes the instant centroid estimates computed by Eq. (1) after the t-th training epoch, and β is the smoothing factor. This averaging in the latent representation space captures the training dynamics of DNNs and provides a robust estimate of the centroid.
SFA conducts Bayesian inference using Gaussian approximation to the posterior distribution over class centroids. This paper considers a simple diagonal format for the covariance matrix. To fit a diagonal covariance approximation, we maintain a running average of the second moment for class centroids:
C2 denotes the element-wise square. Thus, a diagonal covariance matrix can be approximated by ΣSFA = diag(C′SFA - C2SFA) and the posterior over class centroid can be constructed as a Gaussian distribution N(CSFA,ΣSFA). Note that previous work [Maddox et al., 2019] also proposes a higher-rank approximation for the covariance, but we only focus on the diagonal approximation for simplicity. Then we sample several stochastic class centroids from this Gaussian distribution and perform distance averaging for sample selection. Specifically, given the sampling rates S, we first sample ˜C ∼ N(CSFA,ΣSFA) and then compute the Euclidean distances between ˆck and samples of class k by:
This procedure is repeated for S times and an averaged distance is obtained; thus, training samples are well clustered with the distance to the class centroid by fitting them into a two-component Gaussian mixture model (GMM) [Permuter et al., 2006], i.e., dist ∼ ∑2j=1 ϕjN(µj, σ2 j ) where µj , σ2 j
Algorithm 1: The SFA Framework
1 Input: training dataset D = {(xi, yi)Ni=1 }, model parameters θ, sampling rate S, warm-up epochs T0, and total training epochs T . // warm-up for T0 epochs 2 for t = 1, ..., T0 do 3 L = ℓCE(D, f) + ℓBS(D, fabc) 4 θt = SGD(L, θt-1) 5 end 6 for t = T0 +1, ..., T do // sample selection 7 Dclean = ∅, Dnoisy = ∅ 8 Compute confidence threshold τt = γ t ˆ τ 9 for k = 1, ..., K do 10 Compute instant centroid by Eq. (1) 11 Update the first moment CSFA by Eq. (2) and the second moment C′SFA by Eq. (3) 12 for s = 1, ..., S do 13 Sample ˜ck ∼ N (CSFA, ΣSFA) 14 disti,s = ||˜ck - g(xi)||2, where xi ∈ Dk 15 end 16 disti = 1S ∑Ss=1 disti,s 17 Dclean k ,Dnoisy k = GMM(dist) 18 Dclean = Dclean ∪Dclean k ,Dnoisy = Dnoisy ∪Dnoisy k 19 end // semi-supervised learning 20 LSSL =MixMatch(Dclean ,Dnoisy , f) 21 LABC =MixMatch(Dclean ,Dnoisy , fabc) 22 L = LSSL +LABC 23 θt = SGD(L, θt-1) 24 end
are the mean and variance of the j-th Gaussian component. Assume µ1 < µ2 without loss of generality, as clean samples distribute around class centroids while noisy samples spread out, we denote the clean probability of one sample as:
We select samples with P(clean | xi) > 0.5 as clean samples and others as noisy samples. Next, the training dataset D is divided into the clean sample set Dclean and noisy sample set Dnoisy . As data in Dclean may still follow a long-tailed distribution, we propose an auxiliary balanced classifier to obtain unbiased predictions.
3.3 Auxiliary Balanced Classifier
In the literature on long-tailed learning, class re-balancing strategies are the prominent and effective methods proposed to alleviate imbalance problems, which can significantly promote classifier learning and affect the representation learning w.r.t. the original data distribution. Several existing works [Kang et al., 2020; Zhou et al., 2020; Lee et al., 2021] suggest decoupling representation and classifier learning and demonstrate their superiority over conventional learning methods.
To further boost the performance, we adopt a two-branch network to combat class imbalance during model training: we add an auxiliary classifier to the backbone of the neural network for balanced classifier learning and meanwhile maintain the original classifier for the sake of representation learning. We denote the two classifiers as fabc and f, where f is trained using the standard cross-entropy loss ℓCE(x, y) = -log ezy ∑Kk=1 ezk , where z = f(x). Next, we describe obtaining a balanced classifier fabc.
Balanced Softmax. To produce unbiased predictions, we propose an auxiliary balanced classifier fabc, which is jointly learned with the standard classifier f by sharing the feature extractor. Specifically, fabc seeks to minimize the Balanced Softmax (BS) function [Ren et al., 2020]:
where nk = |Dclean k | is the number of samples of class k counted from Dclean , and zk stands for the k-th logit produced by fabc(x). The loss can penalize more heavily on samples in the majority class while placing a lower penalty on samples in the minority class. This helps to learn a balanced classifier and prevent the model from being significantly biased towards the majority class.
Incorporating with Semi-supervised Learning. To improve the utilization of noisy data, we treat samples in noisy set Dnoisy as unlabeled data and incorporate our methods into a popular semi-supervised learning framework MixMatch [Berthelot et al., 2019]. MixMatch is a state-of-the-art semisupervised learning algorithm that combines data augmentation, consistency regularization, and mixup to achieve excellent performance. For unlabeled samples in Dnoisy , we perform label guessing using predictions from the standard classifier f. The total loss is L = LSSL +LABC, where LSSL and LABC stands for a MixMatch loss computed from the standard classifier f and the balanced classifier fabc. The pseudo-code of our SFA framework is summarized in Algorithm 1. At test time, both classifiers are utilized to return the classification results. Furthermore, we also employ two separate neural networks to combat confirmation biases following DivideMix [Li et al., 2020] and RoLT+ [Wei et al., 2021].
3.4 Time Complexity Analysis
The computation of distances between features and class centroids, and the fitting of GMM, are the main additional computational cost in sample selection. The time complexity of computing distances is O(SNd), where N is the number of samples, d is the latent feature dimension, and S is the sampling rate. We set S = 1 for large-scale datasets. The time complexity of fitting the two-component GMM using the EM algorithm requires O(Nd′ ct), where d′ is the dimension of distances, c is the number of components, and t is the number of iterations. In our approach, we have d′ = 1, c = 2, and t = 100. The total time complexity is O((200+d)N), which is efficient enough compared with existing approaches.
| CIFAR-10 | CIFAR-100 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Noise Level | 0.2 | 0.5 | 0.2 | 0.5 | |||||||||
| Imbalance Ratio | 10 | 50 | 100 | 10 | 50 | 100 | 10 | 50 | 100 | 10 | 50 | 100 | |
| CE Best | 77.86 74.00 | 64.38 | 61.79 55.69 | 60.72 44.29 | 46.50 32.69 | 38.43 27.78 | 45.97 45.75 | 33.41 33.12 | 29.85 29.58 | 28.70 23.70 | 18.49 16.56 | 16.24 14.19 | |
| Last BBN Best Last | 78.44 77.67 | 61.38 69.05 68.01 | 64.24 64.15 | 64.51 53.67 | 48.88 45.06 | 37.75 34.93 | 48.60 47.72 | 29.08 28.87 | 27.44 27.04 | 31.05 30.11 | 20.33 19.97 | 15.51 14.95 | |
| cRT Best | 77.67 75.36 | 68.50 67.94 | 60.85 58.67 | 62.37 60.35 | 42.60 41.58 | 35.75 33.86 | 43.56 42.75 | 31.07 30.43 | 24.65 23.97 | 26.31 25.12 | 19.65 19.32 | 15.41 14.82 | |
| Last ELR+ Best | 88.96 | 80.21 79.69 | 69.60 | 85.02 84.08 | 56.96 48.14 | 48.72 | 54.01 | 49.64 | 38.40 | 49.53 | 30.12 29.68 | 21.58 20.47 | |
| Last | 88.09 | 66.67 | 87.54 | 67.92 | 43.11 | 53.32 | 48.37 | 38.12 | 49.06 | 31.82 | |||
| DivideMix Best Last | 88.79 | 75.34 | 66.90 63.76 | 86.88 | 65.22 | 61.81 59.65 | 63.79 63.17 | 49.64 | 43.91 42.59 | 49.35 48.87 | 36.52 | ||
| MW-Net Best Last | 88.10 82.19 | 73.48 71.63 | 67.26 58.23 | 72.12 59.68 | 56.09 45.39 | 46.36 | 50.20 | 48.37 36.68 | 31.77 | 37.50 | 35.72 23.99 | 31.05 21.24 | |
| HAR Best Last | 77.67 81.63 78.04 | 64.12 66.45 60.17 | 56.95 54.78 | 63.07 61.13 | 54.54 48.61 | 37.05 38.41 35.40 | 47.82 45.28 44.52 | 34.45 29.74 | 29.57 26.79 | 33.14 29.30 | 20.33 17.33 | 18.82 14.47 | |
| RoLT+ Best Last | 87.95 87.54 | 77.26 75.90 | 72.31 69.12 | 88.17 87.45 | 75.11 73.92 | 64.42 61.15 | 64.22 63.31 | 26.13 51.01 49.40 | 23.90 45.35 43.16 | 26.46 53.31 52.44 | 14.68 39.78 39.27 | 12.36 35.29 34.43 | |
| PCL Best | 90.92 | 84.12 | 79.54 | 84.04 | 71.44 | 66.33 | 65.23 | 51.73 | 47.38 | 57.65 | 42.51 | 38.42 | |
| Last | 90.81 | 83.71 | 78.34 | 83.51 | 71.44 | 64.69 | 65.14 | 51.46 | 47.12 | 57.65 | 42.51 | ||
| Best | 92.53 | 85.96 | 80.26 | 75.17 | 66.32 | 54.29 | 48.51 | 57.41 | 44.37 | 38.36 39.73 | |||
| SFA (ours) Last | 92.13 | 90.57 | 79.89 | ||||||||||
| 84.80 | 79.22 | 90.08 | 78.93 | 74.06 | 65.65 | 53.10 | 47.73 | 57.28 | 43.41 | 39.73 | |||
4 Experiments
4.1 Datasets and Implementation Details
Benchmark Datasets. We first test our approach on CIFAR-10 and CIFAR-100 datasets by simulating training data with long-tailed class distribution and label noise following prior work [Wei et al., 2021]. Formally, denote the imbalance ratio as ρ and noise level as γ. We set the number of samples for the k-th class to Nk = N/ρ k-1 K-1 and generate a long-tailed dataset. Next, we inject the label noise into this dataset via a noise transition matrix T defined as:
We use an 18-layer PreAct ResNet [He et al., 2016] and train it using SGD with a momentum of 0.9, a weight decay of 5× 10-4 , a batch size of 128 and an initial learning rate of 0.02. The model is trained for 200 epochs with 1 NVIDIA GeForce RTX 3090. We perform sample selection after a warm-up period of 30 epochs and anneal the learning rate by a factor of 10 after 150 epochs. For all CIFAR experiments, we choose ρ from {10, 50, 100} and γ from {0.2, 0.5}, and use the same hyperparameters β = 0.99 and S = 5.
Real-World Dataset. WebVision is a large-scale dataset with real-world noisy labels and long-tailed distributions. It contains 2.4 million images crawled from Flickr and Google using the 1,000 concepts in ImageNet ILSVRC12. As previously done in [Li et al., 2020], we use the Inception-ResNet v2 architecture [Szegedy et al., 2017] to evaluate the performance of baseline methods on the first 50 classes of the Google image subset. We set the hyperparameters to β = 0.9, S = 1 and train the network using SGD with a momentum of 0.9, a weight decay of 1 × 10-3 , and a batch size of 32. The initial learning rate is set to 0.01 and reduced by a factor of 10 after 50 epochs. The warm-up period is one epoch, and the model is trained for 100 epochs in total with 2 NVIDIA GeForce RTX 3090.
4.2 ComparisonMethods
We compare the performance of our approach SFA with nine baselines with the same network architecture. In addition to the direct approach using cross-entropy loss (CE), we compare SFA with the following three groups of methods:
- Long-tailed learning. Methods commonly used to address the long-tailed classification include BBN [Zhou et al., 2020] and cRT [Kang et al., 2020].
- Label-noise learning. Recent state-of-the-art methods for learning with noisy labels, including ELR+ [Liu et al., 2020] and DivideMix [Li et al., 2020]
- Learning with long-tailed noisy data. Methods designed to tackle noisy labels and long-tailed distributions simultaneously, including MW-Net [Shu et al., 2019], HAR[Cao et al., 2020], RoLT+ [Wei et al., 2021], and PCL [Wei et al., 2022a].
4.3 Results on Benchmark Dataset
Table 1 summarizes the results on CIFAR-10 and CIFAR-100 datasets under different levels of label noise and imbalance ratios. We report the "best" test accuracy across all training iterations and the "last" test accuracy at the end of training. As shown in the results, initial model training with crossentropy loss is susceptible to biases in the training set, leading to a significant decrease in its classification accuracy as the data biases become more pronounced. Also, previous longtailed learning methods (i.e., BBN and cRT) dreadfully degrade their performance as the noise level increases. When the noise level is high, the last accuracy is significantly lower than the best accuracy due to the model's tendency to fit the label noise, which can negatively affect the model's ability to generalize to unseen data. The same conclusions can be drawn from other methods. However, our approach (SFA) retains the most robust performance and advances all other compared methods in almost all dataset settings. In particular, compared with the previous state-of-the-art method PCL, SFA can further improve the test accuracy on CIFAR-10 by an average of 4.04% and on CIFAR-100 by an average of 1.24%, and it can be observed that the improvement becomes more significant at high noise levels and imbalance ratios, benefiting from proposed stochastic feature averaging and balanced classifier training.

4.4 Results on Real-World Dataset
Table 2 reports the results on the WebVision dataset (ρ ≈ 6). SFA consistently outperforms compared methods by a large margin, with an average improvement of 1.02% (0.9%) on WebVision (ImageNet) validation sets. This demonstrates the effectiveness of our approach in improving the performance of deep learning models in the presence of real-world label noise and class imbalance. To further illustrate the benefits of our approach, we also conduct experiments on the WebVision dataset by manipulating the imbalance ratios (ρ = 50 and ρ = 100) and observe a clear improvement, which suggests that the advantage of our approach is more appealing as the imbalance factor increases.
| IR | Method | WebVision | ImageNet | ||
|---|---|---|---|---|---|
| top1 | top5 | top1 | top5 | ||
| ELR+ | 77.78 | 91.68 | 70.29 | 89.76 | |
| DivideMix | 77.32 | 91.64 | 75.20 | 90.84 | |
| ≈ | HAR | 75.50 | 90.70 | 70.30 | 90.00 |
| ρ 6 | RoLT+ | 77.64 | 92.44 | 74.64 | 92.48 |
| PCL | 77.32 | 92.60 | 75.12 | 91.92 | |
| SFA (ours) | 78.96 | 93.00 | 76.16 | 92.68 | |
| DivideMix | 64.56 | 83.56 | 62.68 | 85.24 | |
| RoLT+ | 66.28 | 88.68 | 64.76 | 89.96 | |
| ρ = 50 | PCL | 68.00 | 88.44 | 65.00 | 86.32 |
| SFA (ours) | 70.64 | 89.96 | 69.04 | 90.36 | |
| DivideMix | 55.76 | 73.48 | 53.92 | 74.00 | |
| RoLT+ | 60.68 | 87.84 | 59.68 | 88.52 | |
| ρ = 100 | PCL | 62.12 | 85.88 | 59.60 | 84.20 |
| SFA (ours) | 65.68 | 88.52 | 65.08 | 88.92 | |
4.5 Ablation Studies and Further Analyses
Insights into the Key Components. We conduct ablation studies to better understand the impact of different components of our SFA framework. Table 3 reports the results on CIFAR datasets with varying levels of noise and imbalance ratios, where w/o ICE/SCC/ABC means removing the proposed instant centroid estimation, stochastic class centroid, and auxiliary balanced classifier, respectively. The following analyses of results can be derived: (1) in the presence of noisy labels, instant centroid estimation based on the confidence of samples from the balanced classifier can provide a more accurate approximation of the actual class centroids compared to simply taking the mean value of all sample features. (2) The dramatic decrease in accuracy among all settings without stochastic class centroid highlights the significance of the Gaussian posterior distributions over class centroid for better sample selection. (3) the auxiliary balanced classifier can significantly enhance the model's performance, especially in cases of heavy class imbalance.
| Noise Level | 0.2 | 0.5 | |||||
|---|---|---|---|---|---|---|---|
| Imbalance Ratio | 10 | 50 | 100 | 10 | 50 | 100 | |
| SFA Best | 92.53 | 85.96 | 80.26 | 90.57 | 79.89 | 75.17 | |
| Last | 92.13 | 84.80 | 79.22 | 90.08 | 78.93 | 74.06 | |
| w/o ICE | Best | 91.76 | 83.90 | 78.39 | 89.99 | 78.81 | 73.81 |
| Last | 91.73 | 83.62 | 78.00 | 89.84 | 78.43 | 73.80 | |
| w/o SCC | Best | 88.22 | 79.08 | 74.28 | 89.47 | 76.30 | 73.74 |
| Last | 88.20 | 78.47 | 74.28 | 89.18 | 76.05 | 72.76 | |
| w/o ABC | Best | 91.84 | 82.70 | 76.38 | 89.55 | 78.51 | 71.19 |
| Last | 91.59 | 82.58 | 74.86 | 88.97 | 77.61 | 70.73 | |
Efficacy of Sample Selection. We compare the F1-scores with existing sample selection-based methods (i.e., DivideMix and RoLT+) on two CIFAR datasets to verify the effectiveness of sample selection in our approach. Results in Figure 4 illustrate the superiority of our approach in selecting clean samples from noisy and long-tailed data. We believe this is due to the following reasons: (1) we adopt the smalldistance criterion, which is more robust than small-loss when noisy labels and class imbalance co-exist in datasets; (2) sampling stochastic class centroid from the Gaussian posterior distribution, which is used in distance averaging, can further reduce the impact of label noise and data scarcity on the estimation of the actual class centroid; (3) conducting Bayesian inference of class centroid allows the model to access a diverse range of clean samples at different epochs, which helps to prevent overfitting to a particular clean subset. This can be further illustrated in Figure 5. We compare the performance of our method with RoLT+ [Wei et al., 2021] in terms of the mean loss of actual clean samples on CIFAR-10 under different data settings. Both methods use the small-distance criterion, but our method utilizes Bayesian inference to estimate the class centroids. We believe a method that can achieve lower losses on the whole clean samples can more effectively identify and use these samples to improve the performance. The plot demonstrates that our approach can obtain lower losses and, therefore, better learning from clean samples than the method without stochastic class centroids.
Collaboration with Existing Approaches. To further showcase the versatility of the proposed sample selection approach, we present its three applications. We combine SFA with a variety of existing techniques, including the sample-selection approach (Co-teaching [Han et al., 2018]), the distribution-robust loss (LDAM [Cao et al., 2019]), and the noise-robust loss (HAR [Cao et al., 2020]). Specifically, we use SFA in two ways: a replacement for the sample selection module in Co-teaching and a method for identifying clean samples to train models with LDAM and HAR. Figure 3 summarizes the performance of different approaches with and without applying SFA under various settings. Results show that SFA improves the generalization of all approaches, leading to a more robust model.



5 Conclusion
This paper proposes a distance-based sample selection approach called stochastic feature averaging (SFA) and an auxiliary balanced classifier for handling datasets with both noisy labels and long-tailed class distribution. The SFA framework first estimates an instant centroid for each class and uses the exponential running average of the centroid to fit a Gaussian posterior distribution, which is utilized to identify noisy samples based on their distances to the centroid sampled from the Gaussian. Next, a standard and an auxiliary balanced classifier are jointly learned via a semi-supervised learning framework to improve the generalization of the minority class and facilitate the estimation of the Gaussian parameters. The proposed approach is evaluated on various datasets, including CIFAR-10, CIFAR-100, and WebVision, and is shown to outperform previous state-of-the-art consistently. Our proposed approach, SFA, can be an alternative to existing loss-based approaches for learning with long-tailed noisy labels and can be used as a universal add-on for various methods. For future work, we plan to investigate and provide a theoretical explanation for the effectiveness of stochastic class centroids.
Acknowledgments
This research was supported by the National Science Foundation of China (62206049). This research work is supported by the Big Data Computing Center of Southeast University.
@inproceedings{ijcai2023p434,
title = {Stochastic Feature Averaging for Learning with Long-Tailed Noisy Labels},
author = {Li, Hao-Tian and Wei, Tong and Yang, Hao and Hu, Kun and Peng, Chong and Sun, Li-Bo and Cai, Xun-Liang and Zhang, Min-Ling},
booktitle = {Proceedings of the Thirty-Second International Joint Conference on
Artificial Intelligence, {IJCAI-23}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Edith Elkind},
pages = {3902--3910},
year = {2023},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2023/434},
url = {https://doi.org/10.24963/ijcai.2023/434},
}
TY - CPAPER TI - Stochastic Feature Averaging for Learning with Long-Tailed Noisy Labels AU - Li, Hao-Tian AU - Wei, Tong AU - Yang, Hao AU - Hu, Kun AU - Peng, Chong AU - Sun, Li-Bo AU - Cai, Xun-Liang AU - Zhang, Min-Ling T2 - Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI-23 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2023 SP - 3902 EP - 3910 DO - 10.24963/ijcai.2023/434 UR - https://doi.org/10.24963/ijcai.2023/434 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: