Is Fairness Only Metric Deep? Evaluating and Addressing Subgroup Gaps in Deep Metric Learning

1 INTRODUCTION . Deep metric learning ( DML ) extends standard metric learning to deep neural networks , where the goal is to learn metric spaces such that embedded data sample distance is connected to actual semantic similarities ( Globerson & Roweis , 2006 ; Weinberger et al. , 2006 ; Hoffer & Ailon , 2018 ; Wang et al. , 2014 ) . The explicit optimization of similarity makes deep metric spaces well suited for usage in unseen classes , such as zero-shot image or video retrieval or facial re-identification ( Milbich et al. , 2021 ; Roth et al. , 2020c ; Musgrave et al. , 2020 ; Hoffer & Ailon , 2018 ; Wang et al. , 2014 ; Schroff et al. , 2015 ; Wu et al. , 2018 ; Roth et al. , 2020c ; Brattoli et al. , 2020 ; Hu et al. , 2014 ; Deng et al. , 2019 ; Liu et al. , 2017 ) . However , while DML is effective in establishing notions of similarity , work describing potential fairness issues is limited to individual fairness in standard metric learning ( Ilvento , 2020 ) , disregarding embedding models . Indeed , the impacts and metrics of fairness are well studied in machine learning ( ML ) generally , and representation learning specifically ( Dwork et al. , 2012 ; Mehrabi et al. , 2019 ; Locatello et al. , 2019b ) . This is especially true on high-risk tasks such as facial recognition and judicial decision-making ( Chouldechova , 2017 ; Berk , 2017 ) , where there are known risks to minoritized subgroups ( Samadi et al. , 2018 ) . Yet , relatively little work has been done in the domain of DML ( Rosenberg et al. , 2021 ) . It is crucial to address this knowledge gap – if DML embeddings are used to create upstream embeddings that facilitate downstream transfer tasks , biases may propagate unknowingly . To tackle this issue , this work first proposes a benchmark to characterize fairness in non-balanced DML - finDML . finDML introduces three subgroup fairness definitions based on feature space performance metrics – recall @ k , alignment and group uniformity . These metrics measure clustering ability and generalization performance via feature space uniformity . Thus , we select the metrics for our definitions to enforce independence between inclusion in a particular cluster or class , and a protected attribute ( given the ground-truth label ) . We leverage existing datasets with fairness limitations ( CelebA ( Liu et al. , 2015 ) and LFW ( Huang et al. , 2007 ) ) and induce imbalance in training data of standard DML benchmarks , CARS196 ( Krause et al. , 2013 ) and CUB200 ( Wah et al. , 2011 ) , in order to create an effective benchmark for fairness analysis in DML . Making use of finDML , we then perform an evaluation of 11 state-of-the-art ( SOTA ) DML methods representing frequently used losses and sampling strategies , including : ranking-based losses ( Wang et al. , 2014 ; Hoffer & Ailon , 2018 ) , proxy-based ( Kim et al. , 2020 ) losses , semi-hard sampling ( Schroff et al. , 2015 ) and distance-weighted sampling ( Wu et al. , 2018 ) . Our experiments suggest that imbalanced data during upstream embedding impacts the fairness of all benchmarks methods in both upstream embeddings ( subgroup gaps up to 21 % ) as well as downstream classifications ( subgroup gaps up to 45.9 % ) . This imbalance is significant even when downstream classifiers are given access to balanced training data , indicating that data can not naively be used to de-bias downstream classifiers from imbalanced embeddings . Finally , inspired by prior work in DML on multi-feature learning ( Milbich et al. , 2020 ) , we introduce PARtial Attribute DE-correlation ( PARADE ) . PARADE addresses imbalance by de-correlating two learned embeddings : one learnt to represent similarity in class labels , and one learnt to represent similarity in the values of a sensitive attribute , which is discarded at test-time . This creates a model in which the ultimate target class embeddings have been de-correlated from the sensitive attributes of the input . We note that as opposed to previous work on variational latent spaces , PARADE de-correlates a learned similarity metric . We find that PARADE reduces gaps of SOTA DML methods by up to 2 % downstream in finDML . In total , our contributions can be summarized as follows : 1 . We define finDML ; introducing three definitions of fairness in DML to capture multifaceted minoritized subgroup performance in upstream embeddings through focus on feature representation characteristics across subgroups , and five datasets for benchmarking . 2 . We analyze SOTA DML methods using finDML , and find that common DML approaches are significantly impacted by imbalanced data . We show empirically that learned embedding bias can not be overcome by naive inclusion of balanced data in downstream classifiers . 3 . We present PARADE , a novel a novel adaptation of previous zero-shot generalization techniques to enhance fairness guarantees through de-correlation of class discriminative features with sensitive attributes . 2 BACKGROUND . Deep Metric Learning DML extends standard metric learning by fusing feature extraction and learning a parametrized metric space into one end-to-end learnable setup . In this setting , a large convolutional network ψ provides the mapping to a feature space Ψ , while a small network f , usually a single linear layer , generates the final mapping to the metric or embedding space Φ . The overall mapping from the image space X is thus given by ϕ = f ◦ ψ . Generally , the embedding space is projected on the unit hypersphere SD−1 through normalization ( Weisstein , 2002 ; Wu et al. , 2018 ; Roth et al. , 2020c ; Wang & Isola , 2020 ) to limit the volume of the representation space with increasing embedding dimensionality . The embedding network ϕ is then trained to provide a metric space Φ that operates well under some predefined , usually non-parametric metric such as the Euclidean or cosine distance defined over Φ . Typical objectives used to learn such metric spaces range from contrastive ranking-based training using tuples of data , such as pairwise ( Hadsell et al. , 2006 ) , triplet- ( Schroff et al. , 2015 ; Wu et al. , 2018 ) or higher-order tuple-based training ( Sohn , 2016 ; Wang et al. , 2020a ) , procedures to bring down the effective complexity of the tuple space ( Schroff et al. , 2015 ; Harwood et al. , 2017 ; Wu et al. , 2018 ) or the introduction of learnable tuple constituents ( Movshovitz-Attias et al. , 2017 ; Qian et al. , 2019 ; Kim et al. , 2020 ) . More recent work ( Milbich et al. , 2020 ; Roth et al. , 2020c ; Jacob et al. , 2019 ) extends standard DML training through incorporation of objectives going beyond just sole class label discrimination : e.g. , through the introduction of artificial samples ( Lin et al. , 2018 ; Duan et al. , 2018 ) , regularization of higher-order moments ( Jacob et al. , 2019 ) , curriculum learning ( Zheng et al. , 2019 ; Harwood et al. , 2017 ; Roth et al. , 2020a ) , knowledge distillation ( Roth et al. , 2020b ) or the inclusion of additional features ( DiVA ) to produce diverse and de-correlated representations ( Milbich et al. , 2020 ) . DML Evaluation Standard performance measures reflect the goal of DML : namely , optimizing an embedding space Φ for best transfer to new test classes via learning semantic similarities . As immediate applications are commonly found in zero-shot clustering or image retrieval , respective retrieval and clustering metrics are predominantly utilized for evaluation . Recall @ k ( Jegou et al. , 2011 ) or mean average precision measured on recall ( Roth et al. , 2020c ; Musgrave et al. , 2020 ) typically estimate retrieval performance . Normalized mutual information ( NMI ) on clustered embeddings ( Manning et al. , 2010 ) is used as a proxy for clustering quality ( see Supplemental for detailed definitions ) . We leverage these performance metrics to inform finDML and our experiments . Fairness in Classification Formalizing fairness in ML continues to be an open problem ( Mehrabi et al. , 2019 ; Chen et al. , 2018a ; Chouldechova , 2017 ; Berk , 2017 ; Locatello et al. , 2019b ; Chouldechova & Roth , 2018 ; Dwork et al. , 2012 ; Hardt et al. , 2016 ; Zafar et al. , 2017 ) . In classification , definitions for fairness such as demographic parity , equalized odds , and equality of opportunity , rely on model outputs across the random variables of protected attribute and ground-truth label ( Dwork et al. , 2012 ; Hardt et al. , 2016 ) . Fairness in Representations A more relevant family of fairness definitions for DML would be those explored in fairness for general representation learning ( Edwards & Storkey , 2015 ; Beutel et al. , 2017 ; Louizos et al. , 2015 ; Madras et al. , 2018 ) . Here , the goal is to learn a fair mapping from an original domain to a latent domain so that classifiers trained on these representations are more likely to be agnostic to the sensitive attribute in unknown downstream tasks . This assumption distinguishes our setting from previous fairness work in which the downstream tasks are known at train time ( Madras et al. , 2018 ; Edwards & Storkey , 2015 ; Moyer et al. , 2018 ; Song et al. , 2019 ; Jaiswal et al. , 2019 ) . DML differs from this form of representation learning as it aims to learn a mapping capturing semantic similarity , as opposed to latent space representation . Earlier works in fair representation learning intended to obfuscate any information about sensitive attributes to approximately satisfy demographic parity ( Zemel et al. , 2013 ) while a wealth of more recent works focus on using adversarial methods or feature disentanglement in latent spaces of VAEs ( Locatello et al. , 2019a ; Kingma & Welling , 2013 ; Gretton et al. , 2006 ; Louizos et al. , 2015 ; Amini et al. , 2019 ; Alemi et al. , 2018 ; Burgess et al. , 2018 ; Chen et al. , 2018b ; Kim & Mnih , 2018 ; Esmaeili et al. , 2019 ; Song et al. , 2019 ; Gitiaux & Rangwala , 2021 ; Rodríguez-Gálvez et al. , 2020 ; Sarhan et al. , 2020 ; Paul & Burlina , 2021 ; Chakraborty et al. , 2020 ) . In this setting , the literature has focused on optimizing on approximations of the mutual information between representations and sensitive attributes : maximum mean discrepancy ( Gretton et al. , 2006 ) for deterministic or variational ( Li et al. , 2014 ; Louizos et al. , 2015 ) autoencoders ( VAEs ) ; cross-entropy of an adversarial network that predicts sensitive attributes from the representations ( Edwards & Storkey , 2015 ; Xie et al. , 2017 ; Beutel et al. , 2017 ; Zhang et al. , 2018 ; Madras et al. , 2018 ; Adel et al. , 2019 ; Zhao & Gordon , 2019 ; Xu et al. , 2018 ) ; balanced error rate on both target loss and adversary loss ( Zhao et al. , 2019 ) ; Weak-Conditional InfoNCE for conditional contrastive learning ( Tsai et al. , 2021 ) . PARADE shares aspects of these previous methods in its choice of de-correlation or disentanglement . However , PARADE de-correlates the learned similarity metric as opposed to the latent space . In addition , with DML-specific criteria , PARADE learns similarities over the sensitive attribute while not directly removing all information about the sensitive attribute , as the sensitive attribute and target class embeddings share a base network . 3 EXTENDING FAIRNESS TO DML - finDML BENCHMARK To characterize fairness with finDML , this section introduces the key constituents – definitions to characterize fairness in embedding spaces and respective benchmark datasets .

Summary: The paper presents a study on the effect of training dml techniques on imbalanced data and show the negative impact of learned representations on the downstream tasks. The fairness is analyzed through 3 properties of the representation space; a) inter-class alignment, b) intra-class alignment, c) uniformity showing that the bias in the upstream task (dml) is propagated to the downstream classification tasks even when the data for training the classifier (downstream task) is balanced. To address this, an objective (PARADE) that de-correlates the discriminative features from the sensitive attributes are learned during training. The experiments are conducted on 4 benchmark datasets.