The Rich Get Richer: Disparate Impact of Semi-Supervised Learning

1 INTRODUCTION . The success of deep neural networks benefits from large-size datasets with high-quality supervisions , while the collection of them may be difficult due to the high cost of data labeling process e.g. , medical diagnosis ( Agarwal et al. , 2016 ) . Practically , a much cheaper and easier solution is to obtain a small labeled dataset and a large unlabeled dataset , and apply semi-supervised learning ( SSL ) . Although the global model performance for the entire population of data is almost always improved by SSL , it is unclear how the improvements fare for different sub-populations . Similar to the goal of multiaccuracy ( Kim et al. , 2019 ) , the improvement of SSL should not only on the entire population , but also on different sub-populations . Analyzing and understanding the above question will have substantial fairness implications especially when these sub-populations are defined by the demographic groups e.g. , race and gender . Motivating Example Figure 1 shows the change of test accuracy for each class during SSL . Each class denotes one sub-population and representative sub-populations are highlighted . Figure 1 shows two important messages : in SSL , even with some state-of-the-art algorithms , 1 ) the “ rich getting richer ” is common and 2 ) the “ poor getting poorer ” possibly happens . Specifically , the “ rich ” subpopulation , such as automobile that has a high baseline accuracy at the beginning of SSL , tends to be consistently benefiting during SSL . But the “ poor ” sub-population , such as dog that has a low baseline accuracy , will remain a low-level performance as Figure 1 ( a ) or even get worse performance as Figure 1 ( b ) . This example shows disparate impact of accuracies for different sub-populations are common in SSL . In extreme cases such as Figure 1 ( b ) , we observe the Matthew effect : the rich get richer and the poor get poorer . See more discussions in Appendix B . In this paper , we aim to understand the disparate impact of SSL from both theoretical and empirical aspects , and propose to evaluate SSL from a different dimension . Specifically , based on classifications tasks , we study the disparate impact of model accuracies with respect to different sub-populations ( such as label classes , feature groups and demographic groups ) after applying SSL . Different from traditional group fairness ( Zafar et al. , 2017 ; Bellamy et al. , 2018 ) defined over one model , our study focuses on comparing the gap between two models ( before and after SSL ) . To this end , we first theoretically analyze why and how disparate impact are generated . The theoretical results motivate us to further propose a new metric , benefit ratio , which evaluates the normalized improvement of model accuracy using SSL methods for different sub-populations . The benefit ratio helps us uncover the “ Matthew effect ” of SSL : a high baseline accuracy tends to reach a high benefit ratio that may even be larger than 1 ( the rich get richer ) , and a sufficiently low baseline accuracy may return a negative benefit ratio ( the poor get poorer ) . Following the intuitions of Equal Odds ( Hardt et al. , 2016 ) , a fair SSL algorithm should be with Equal Benefit Ratio . We then numerically demonstrate using benefit ratios to evaluate SSL and discuss how two possible treatments , i.e. , balancing the data and collecting more labeled data , might mitigate the disparate impact . We hope our analyses and discussions could encourage future contributions to promote the fairness of SSL . Our main contributions and findings are summarized as follows : 1 ) We propose an analytical framework that unifies a broad family of SSL algorithms , which either explicitly or implicitly use an auxiliary “ pseudo-label ” . The framework provides a novel perspective for analyzing SSL by connecting consistency regularization to the problem of learning with noisy labels . 2 ) Based on our framework , we further prove an upper bound for the generalization error of SSL and theoretically show the heterogeneous error of learning with the smaller scale supervised dataset is one primary reason for disparate impacts . This observation reveals a “ Matthew effect ” of SSL . 3 ) We contribute a novel metric called benefit ratio to measure the disparate impact in SSL , the effectiveness of which is theoretically guaranteed by our proved generalization bounds . 4 ) We conduct experiments on both image and text classification tasks to demonstrate the ubiquitous disparate impacts in SSL . 5 ) We also discuss how the disparate impact could be mitigated . 1.1 RELATED WORKS . Semi-supervised learning SSL is popular in both computer vision and natural language processing communities ( Dai & Le , 2015 ; Howard & Ruder , 2018 ; Clark et al. , 2018 ; Yang et al. , 2019 ; Sachan et al. , 2019 ; Guo et al. , 2020 ; Wang et al. , 2021b ; Luo et al. , 2021 ) . We briefly review recent advances in SSL . See comprehensive overviews by ( Chapelle et al. , 2006 ; Zhu et al. , 2003 ) for traditional SSL methods . A major line of recent works focus on assigning pseudo-labels generated by the supervised model to unlabeled dataset ( Lee et al. , 2013 ; Iscen et al. , 2019 ; Berthelot et al. , 2019b ; a ) , where the pseudo-labels are often confident or with low-entropy ( Sohn et al. , 2020 ; Zhou , 2018 ; Meng et al. , 2018 ) . There are also many works on minimizing entropy of predictions on unsupervised data ( Grandvalet et al. , 2005 ) or regularizing the model consistency on the same feature with different data augmentations ( Tarvainen & Valpola , 2017 ; Miyato et al. , 2018 ; Sajjadi et al. , 2016 ; Clark et al. , 2018 ) , including mixup ( Zhang et al. , 2018 ) , adversarial noise ( Miyato et al. , 2016 ) , and other advanced augmentations ( Xie et al. , 2019 ) . In addition to network inputs , augmentations can also be applied on some hidden layers ( Chen et al. , 2020 ) . Besides , some works conduct pre-training on the unlabeled dataset first and then fine-tune the model on the labeled dataset ( Peters et al. , 2018 ; Devlin et al. , 2018 ; Gururangan et al. , 2019 ; Chen et al. , 2019 ; Yang et al. , 2017 ) , or use ladder networks to combine unsupervised learning with supervised learning ( Rasmus et al. , 2015 ) . Disparate impact Over the past few years , the fairness in machine learning has been extensively studied . Even models developed with the best intentions may introduce discriminatory biases . Re- searchers in various fields have found the unfairness issues , e.g. , model compression ( Bagdasaryan et al. , 2019 ) , differential privacy ( Hooker et al. , 2019 ; 2020 ) , recommendation system ( Gómez et al. , 2021 ) , information retrieval ( Gao & Shah , 2021 ) , machine translation ( Khan et al. , 2021 ) , and learning with noisy labels ( Liu , 2021 ) . There also some treatments considering fairness without demographics ( Lahoti et al. , 2020 ; Diana et al. , 2021 ; Hashimoto et al. , 2018 ) , minimax Pareto fairness ( Martinez et al. , 2020 ) , multiaccuracy boosting ( Kim et al. , 2019 ) , and fair classification with label noise ( Wang et al. , 2021a ) . Most of these works focus on supervised learning . To our best knowledge , the unfairness issue in SSL methods has not been sufficiently explored . 2 PRELIMINARIES . We summarize the key concepts and notations as follows . 2.1 SUPERVISED CLASSIFICATION TASKS . Consider aK-class classification task given a set ofNL labeled training examples denoted byDL : = { ( xn , yn ) } n∈ [ NL ] , where [ NL ] : = { 1 , 2 , · · · , NL } is the set of indices , xn is a high-dimension feature , yn ∈ [ K ] stands for a particular label class . The corresponding clean data distribution with full supervision is denoted by D. Examples ( xn , yn ) are drawn according to random variables ( X , Y ) ∼ D. The classification task aims to identify a classifier f that maps X to Y accurately . Let 1 { · } be the indicator function taking value 1 when the specified condition is satisfied and 0 otherwise . Define the 0-1 loss as 1 ( f ( X ) , Y ) : = 1 { f ( X ) 6= Y } . The optimal f is denoted by the Bayes classifier f∗ = arg minf ED [ 1 ( f ( X ) , Y ) ] . One common choice is training a deep neural network ( DNN ) by minimizing the empirical risk : f̂ = arg minf 1 N ∑N n=1 ` ( f ( xn ) , yn ) . Notation ` ( · ) stands for the cross-entropy ( CE ) loss ` ( f ( x ) , y ) : = − ln ( fx [ y ] ) , y ∈ [ K ] , where fx [ y ] denotes the y-th component of f ( x ) . Notations f and f stand for the same model but different outputs . Specifically , vector f ( x ) denotes the probability of each class that model f predicts given feature x . The predicted label f ( x ) is the class with maximal probability , i.e. , f ( x ) : = arg maxi∈ [ K ] fx [ i ] . We use notation f if we only refer to a model . 2.2 SEMI-SUPERVISED CLASSIFICATION TASKS . In the semi-supervised learning ( SSL ) task , there is also an unlabeled ( a.k.a . unsupervised ) dataset DU : = { ( xn+NL , · ) } n∈ [ NU ] drawn from D , while the labels are missing or unobservable . Let N : = NL + NU . Denote the corresponding unobservable supervised dataset by D : = { ( xn , yn ) } n∈ [ N ] . Compared with the supervised learning tasks , it is critical to leverage the unsupervised information in semi-supervised learning . To improve the model generalization ability , many recent SSL methods rely on building consistency regularization terms with unlabeled data to ensure that the model output remains unchanged with randomly augmented inputs ( Berthelot et al. , 2019b ; Xie et al. , 2019 ; Berthelot et al. , 2019a ; Sohn et al. , 2020 ; Xu et al. , 2021 ) . To better formulate the consistency regularization in these popular methods , we introduce soft/pseudo-labels y as follows . Soft-labels To motivate the definitions , we first consider a special case yn , i.e. , the one-hot encoding of yn , where each element writes as yn [ i ] = 1 { i = yn } . More generally , we can extend the one-hot encoding to soft labels by requiring each element y [ i ] ∈ [ 0 , 1 ] and ∑ i∈ [ K ] y [ i ] = 1 . The CE loss with soft y writes as ` ( f ( x ) , y ) : = − ∑ i∈ [ K ] y [ i ] ln ( fx [ i ] ) . If we interpret y [ i ] = P ( Y = i ) as a probability and denote by Dy the corresponding label distribution , the above CE loss with soft labels can be interpreted as the expected loss with respect to a stochastic label Ỹ , i.e. , ` ( f ( x ) , y ) : = ∑ i∈ [ K ] P ( Ỹ = i ) ` ( f ( x ) , i ) = EỸ∼Dy [ ` ( f ( x ) , Ỹ ) ] . ( 1 ) Pseudo-labels In consistency regularization , by using model predictions , the unlabeled data will be assigned pseudo-labels either explicitly ( Berthelot et al. , 2019b ) or implicitly ( Xie et al. , 2019 ) , where the pseudo-labels can be modeled as soft-labels . In the following , we review both the explicit and the implicit approaches and unify them in our analytical framework . Consistency regularization with explicit pseudo-labels For each unlabeled feature xn , pseudolabels can be explicitly generated based on model predictions ( Berthelot et al. , 2019b ) . The pseudolabel is later used to evaluate the model predictions . To avoid trivial solutions where model predictions and pseudo-labels are always identical , independent data augmentations of feature xn are often generated for M rounds . The augmented feature is denoted by x′n , m : = Augment ( xn ) , m ∈ [ M ] . Then the pseudo-label yn in epoch-t can be determined based on M model predictions as y ( t ) n = Sharpen ( 1 M ∑M m=1 f̄ ( t ) ( x′n , m ) ) , where model f̄ ( t ) is a copy of the DNN at the beginning of epoch-t but without gradients . The function Sharpen ( · ) reduces the entropy of a pseudo-label , e.g. , setting to one-hot encoding ej , j = arg maxi∈ [ K ] y ( t ) n ( Sohn et al. , 2020 ) . In epoch-t , with some consistency regularization loss ` CR ( · ) , the empirical risk using pseudo-labels is : L1 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , y ( t ) n ) . Consistency regularization with implicit pseudo-labels Consistency regularization can also be applied without specifying particular pseudo-labels , where a divergence metric between predictions on the original feature and the augmented feature is minimized to make predictions consistent . For example , the KL-divergence could be applied and the data augmentation could be domain-specific ( Xie et al. , 2019 ) or adversarial ( Miyato et al. , 2018 ) . In epoch-t , the total loss is : L2 ( f , DL , DU ) = 1 NL NL∑ n=1 ` ( f ( xn ) , yn ) + λ · 1 NU NL+NU∑ n=NL+1 ` CR ( f ( xn ) , f̄ ( t ) ( x′n ) ) , where λ balances the supervised loss and the unsupervised loss , x′n : = Augment ( xn ) stands for oneround data augmentation ( m = 1 following the previous notation x′n , m ) . Without loss of generality , we use λ = 1 in our analytical framework . Consistency regularization loss ` CR ( · ) In the above two lines of works , there are different choices of ` CR ( · ) , such as mean-squared error ` CR ( f ( x ) , y ) : = ‖f ( x ) − y‖22/K ( Berthelot et al. , 2019b ; Laine & Aila , 2016 ) or CE loss ( Miyato et al. , 2018 ; Xie et al. , 2019 ) defined in Eq . ( 1 ) . For a clean analytical framework , we consider the case when both supervised loss and unsupervised loss are the same , i.e. , ` CR ( f ( x ) , y ) = ` ( f ( x ) , y ) . Note L2 implies the entropy minimization ( Grandvalet et al. , 2005 ) when both loss functions are CE and there is no augmentation , i.e. , x′n = xn .

Summary: This paper presents the disparate impact on semi-supervised learning, where the sub-population that has a higher baseline accuracy tends to benefit more from SSL. The paper targets an important problem to ensure the fairness of machine learning algorithms. The authors also proposed a new metric benefit ratio to facilitate the evaluation of SSL. They also suggested two methods to mitigate the disparate, balancing the labeled data or collecting more labeled data.