scieee AI-readable full text Open interactive document viewer

Mitigating regressiveness in accuracy and fairness in Machine

Pallarés López, Anna

Abstract

El ràpid desenvolupament de la Intel·ligència Artificial (IA) i el Machine Learning (ML) ha revolucionat moltes indústries, però ha generat preocupacions sobre la confiança i l'ètica. Un problema clau és la regressivitat, on les actualitzacions dels models corregeixen errors passats, però empitjoren prediccions ja correctes, provocant una disminució del rendiment. Quan aquesta degradació afecta de manera desproporcionada grups basats en atributs sensibles (p. ex., gènere o ètnia), es genera un model discriminatori. Aquest estudi examina la intersecció entre regressivitat i injustícia, proposant nous mètodes per mitigar aquest problema. Introduïm dues estratègies basades en una nova mètrica d'equitat, "unfair regression", que mesura la disparitat en les prediccions interrompudes (negative flips) entre grups sensibles i no sensibles. La primera estratègia millora el procés de selecció del model utilitzant un algorisme de doble validació creuada que té en compte tant l'exactitud com la minimització de l’unfair regression. El segon enfocament integra la mètrica d’unfair regression en el framework del Support Vector Machine (SVM), creant l'"Unfair-Regression-Free SVM" (URFSVM), que redueix el biaix durant l'entrenament. Ambdues estratègies fomenten l’equitat, assegurant que les actualitzacions no afectin de manera desproporcionada cap grup. Aquesta recerca contribueix integrant tècniques de mitigació del biaix en els sistemes de ML existents sense comprometre el rendiment, promovent el desenvolupament de tecnologies d'IA alineades amb principis ètics i drets humans, per evitar discriminacions per raó de gènere, ètnia, discapacitat o estatus social.

Full text

UNIVERSITY OF GENOVA DOUBLE MASTER’SDEGREE IN INTERDISCIPLINARY AND INNOVATIVE ENGINEERING AND COMPUTER ENGINEERING Mitigating Regressiveness in Accuracy and Fairness in Machine Learning by Anna Pallarès López Thesis submitted for the degree of Computer Engineering under the Mobility Framework together with the Polytechnic University of Catalonia. September 2024 Luca Oneto Supervisor Irene Buselli Supervisor Raul Benítez UPC Supervisor 2 Department of Informatics, Bioengineering, Robotics and Systems Engineering To my grandmother, who passed away while I was abroad in Genova working on the present dissertation. As you always told me "No one will ever be able to take the knowledge you acquire, and this is the most important thing in life". Declaration I hereby declare that except where specific reference is made to the work of others, the contents of this dissertation are original and have not been submitted in whole or in part for consideration for any other degree or qualification in this, or any other university. This dissertation is my own work and contains nothing which is the outcome of work done in collaboration with others, except as specified in the text and Acknowledgements. This dissertation contains fewer than 65,000 words including appendices, bibliography, footnotes, tables and equations and has fewer than 150 figures. Anna Pallarès López September 2024 Acknowledgements I would like to express my deepest gratitude to Prof. Luca Oneto for providing me with the opportunity to join his research group by developing this work, which has clearly marked a turning point in my professional career. His unwavering belief in my potential and continuous support have been fundamental to my progress. Additionally, I would like to extend my appreciation to Dr. Irene Buselli for her strong support throughout the development of my work. I am sure I could not have undertaken this journey without her since Irene’s willingness to share her expertise so generously and patiently has been invaluable to my research. Her meticulous attention to detail and profound knowledge have greatly enriched my understanding of the subject, and her constructive feedback has pushed me to work toward excellence in all aspects of my work. To Raul Benitez, my home university supervisor, I would like to express my deepest appreciation for opening the doors for me to pursue this period abroad and for giving my career a significant boost. Also many thanks to Yolanda Vidal for dedicating her time to supervise and correct my work. I am also thankful for the personal support that has been equally vital. My friends, Alessandro, Igor, Elia, Mendy, Giacomo, Matthieu, Lorenzo, Michelle, and Leonardo, have not only been exceptional classmates but have also made my time in Genova unforgettable. Their friendship and shared experiences have been a cornerstone of my journey. My partner, Eduard, deserves special recognition for his unconditional support; for being both a partner and a colleague. He has always empowered me to overcome challenges and planted in me the belief that I can achieve anything. Not only has he been always there willing to empower me and provide support, but Eduard’s role in my journey goes further; his intellectual contributions and critical insights have also enriched my academic work. iv Together, we’ve tackled complex problems, transforming the daunting task of research into a collaborative and more rewarding experience. I would also like to acknowledge my brother, Roger, whose brilliance and expertise in the field of machine learning have been a constant source of help and inspiration. His ability to solve complex problems effortlessly has greatly aided my research. Lastly, I must thank my parents, without whom none of this would have been possible. Their assistance in all aspects allowed me to study abroad and pursue my dreams, which is an enormous privilege for which I am profoundly grateful. They have always believed in my potential and supported every decision I’ve made, providing wise counsel and invaluable perspectives. Without the collective support of all these people, I would not be here today presenting this work. I am deeply grateful to each of them for their roles in shaping my path. Abstract The rapid advancement of Artificial Intelligence (AI) and Machine Learning (ML) technologies has positively transformed numerous industries but also introduced challenges regarding their trustworthiness and ethicality. A critical issue arises when newly updated models correct past wrong predictions but simultaneously disrupt already-correct ones leading to a perceived regression in performance, namely regressiveness. Especially, when this degradation in performance of some samples is not balanced with respect to a sensitive attribute (e.g. gender or ethnicity), a discriminatory model emerges. Therefore, the intersection between regressiveness and unfairness in machine learning is foremost studied in this work by presenting novel methodologies to alleviate this phenomenon. The study proposes two novel mitigation strategies within the framework of our new fairness metric, unfair regression, based on the difference in the negative flips phenomenon, which quantifies the disparity in disrupted predictions between sensitive and non-sensitive groups in an updated model. By focusing on minimizing this metric, we introduce the first mitigation approach that only affects the model selection phase. We implement a double-step cross validation algorithm that accounts for both accuracy and unfair regression minimization. The second mitigation algorithm directly affects the learning phase, adding the unfair regression metric as a constraint within the Support Vector Machine (SVM) framework, yielding to our Unfair-Regression-Free SVM (URFSVM). These algorithms contribute on reducing bias and enhance fairness in predictive performance. Both approaches ensure that model updates do not disproportionately affect any particular group, promoting more equitable and trustworthy machine learning systems. The objectives of this study include conducting an in-depth review of current bias mitigation techniques as well as regression in performance, studying the intersection between them, developing novel in-processing methods to minimize regressiveness, evaluating these methods between them and against standard and fairness-enhanced models, and integrating the proposed approaches into existing machine learning frameworks without compromising vi performance. On the whole, this work intends to contribute to the development of AI technologies that align with ethical standards and international human rights, through our novel strategies, ensuring that no individual is discriminated against based on gender, ethnicity, disabilities, or social status. Abstract El ràpid avenç de la Intel·ligència Artificial (IA) i l’aprenentatge automàtic, o Machine Learning (ML), ha transformat positivament nombroses indústries, però també ha plantejat reptes significatius pel que fa a la fiabilitat i ètica de presa de decisions d’aquests models. Un problema crític es presenta quan l’actualització d’un model corregeix prediccions que anteriorment eren errònies, però simultàniament modifica aquelles que ja eren correctes. Aquest fenomen, anomenat regressió en el rendiment, o regressiveness, es dona a través de girs negatius, o Negative Flips, generat així, una percepció de no haver millorat el model després de l’actualització. Específicament, quan aquesta reducció de precisió no es dona d’igual forma respecte atributs sensibles, com pot ser el gènere o l’ètnia, es crea un model discriminatori. Així doncs, en aquest treball s’estudia la intersecció de dos fenomens més o menys estudiats en el món de recerca, que no han estat estudiats en conjunt: la degradació en el rendiment i l’equitat en els models d’aprenentatge automàtic. En aquest estudi es proposen dues noves estratègies per a mitigar aquest fenomen dins del marc de la nova mètrica d’avaluació que proposem, Unfair Regression, que es basa en els Negative Flips. En minimitzar aquesta mètrica, s’introdueix la primera estratègia de mitigació que només afecta la fase de selecció del model, o model selection. S’implementen dos passos en el procés de cross validation, fent que l’algorisme tingui en compte la minimització d’ambdós mètriques: la precisió i l’equitat. En la segona estratègia de mitigació, l’algorisme afecta directament a la fase d’aprenentatge, incorporat com a restricció la mètrica desenvolupada, Unfair Regression, dins del marc de Support Vector Machines (SVMs), creant així el model anomenat Unfair-Regression-Free SVM (URFSVM). Ambdues estratègies contribueixen en reduir el biaix i en millorar l’equitat en l’aprenentatge automàtic, assegurant que les actualitzacions del model no afectin negativament de forma desproporcionada a cap grup en particular, promovent així resultats més fiables, robustos i justos. Els objectius d’aquest estudi inclouen realitzar una revisió exhaustiva de les tècniques actuals de mitigació de biaixos així com de la regressió en el rendiment, estudiar la intersecció List of figures xiv 5.2 Normalized percentage of lost accuracy in model updates and unfair regression (UR). The closer the data point to the origin, the better performance in both accuracy and fairness. Note that the subscript numeration for the model notation designates the model configuration in terms of dataset size and kernel function, as listed in Table 4.2. . . . . . . . . . . . . . . . . . . 45 5.3 Normalized UR (the smallest the better) and inverted accuracy gain (the smallest the better) for each dataset and updating scenario. Gray lines join the results of the different methods on the same dataset. Note that, for meaningful plots, the inverted accuracy gain has been computed by subtracting the max value from each accuracy gain value and then normalized. Results retrieved fromTable5.2. ................................ 48 List of tables 2.1 Highlighted works in the current literature on fairness in ML within inprocessingtechniques. ............................ 8 2.2 Highlighted works on regression in model updates of ML systems. . . . . . 9 3.1 Classificationmetrics.............................. 22 4.1 Dataset characteristics overview with the related statistics, and the sensitive features involved. Gender considers the two groups as male and female; ethnicity considers the ethnic group as white and other ethnic groups; foreign considers being or not being a foreign person. . . . . . . . . . . . . . . . . 37 4.2 Model configurations varying subset sizes and types of kernel functions. . . 38 4.3 Considered scenarios for model updating. The new model is the enhanced classifier, while the old model performs as a reference. . . . . . . . . . . . 38 5.1 Performance and fairness metrics for the datasets with different kernel methodsanddatasetsizes. ............................. 43 5.2 Accuracy gain (ACCG) and unfair regression (UR) tested on a model update scenario, for the different cases considered going from f∗ old to f∗ new. . . . . . 44 5.3 Overall accuracy (ACC), balanced accuracy (B-ACC), unfair regression (UR), and accuracy gain (ACCG) obtained when using the 2-step CV method on the three different updating scenarios for various datasets with f∗ old →f∗ new . 46 5.4 Overall accuracy (ACC), balanced accuracy (B-ACC), unfair regression (UR), and accuracy gain (ACCG) obtained when using the unfair-regression- free SVM (URFSVM) method on the three different updating scenarios for various datasets with f∗ old →f∗ new. ...................... 47 Nomenclature Roman Symbols aCoefficient vector for fairness constraint in SVM b Bias term in the SVM equation, determining the offset of the hyperplane CRegularization parameter in SVM FSet of functions f fFunction mapping inputs to outputs in the supervised learning problem ISet of indices for samples with positive labels KGaussian Kernel function in SVM LGeneralization error lLoss function NTotal count of isamples in a dataset S System or rule in supervised learning SBinary sensitive attribute wWeight vector in SVM XInput space YOutput space ZCartesian product of Xand Y Greek Symbols Nomenclature xvii αLagrange multiplier in SVM εSlack variable in SVM γParameter that defines the with of the Gaussian kernel in a SVM Superscripts aIndex for samples in a dataset corresponding to a sensitive attribute bIndex for samples in a dataset corresponding to a non-sensitive attribute iIndex for samples in a dataset jIndex for samples in a dataset Other Symbols AAn algorithm that designs the learning machine R A∗Best algorithm that designs the learning machine R DnDataset of nexamples f∗Best function mapping inputs to outputs in the supervised learning problem HSet of hyperparameters that characterize an algorithm H∗Best set of hyperparameters that characterize an algorithm ˆ LEmpirical error RSet of real numbers RSet of rules ℜLearning machine, specific rule of a set of rules R ˆyPredicted output Acronyms / Abbreviations ACC Accuracy ACCG Accuracy Gain due to an update of the model Nomenclature xviii AI Artificial Intelligence B−ACC Balanced Accuracy COMPAS Correctional Offender Management Profiling for Alternative Sanctions CV Cross Validation DDP Difference on Demographic Parity Oportunity DEO Difference on Equal Oportunity DL Deep Learning DP Demographic Parity EO Equal Oportunity FN False negative FP False positive LGTBIQA+ Collective of lesbians, gays, bisexuals, transgenders, queer, questioning, intersex, asexuals, and others. ML Machine Learning NFD Negative Flips Difference NF Negative Flips NFR Negative Flip Rate NN Neural Networks PC Positive Congruent PCT Positive Congruent Training RBF Radial Basis Function SL Supervised Learning SVM Support Vector Machine Nomenclature xix TN True negative TP True positive TPR True positive rate URFSVM Unfair-Regression-Free Support Vector Machine UR Unfair Regression Part I Section One Chapter 1 Introduction Over the past few years, Artificial Intelligence (AI) has experienced extraordinary advances, which have caused an increase in its worldwide use. Because AI-based algorithms enable the automation of decision-making processes using data, valuable resources such as time and money are substantially cut down compared to traditional methods that rely heavily on human intervention. AI encompasses a broad range of technologies, with machine learning (ML) being a key subset that enables AI systems to learn from data and improve their performance over time without explicit programming. However, since ML algorithms strongly rely on humangenerated data, biases present in these data are unintentionally transferred to the algorithm’s decisions, leading to unfair outcomes. As a result, along with these advancements comes a growing concern regarding the fairness of machine learning algorithms. Several studies have revealed biases in machine learning applications, specifically in areas such as facial recognition [ 2 ], candidate ranking [ 3 ], and hiring decisions [ 4 ]. For example, if an AI-based algorithm is used for hiring in a men-dominant job, in most of the cases discrimination against women will be perpetuated despite having the exact same features as the other class. Despite the efforts to mitigate these concerns, there remains an important need to address the issue of regression in machine learning algorithms. This occurs when a model is updated and begins to incorrectly predict previous accurate examples, leading to a drop in performance for a specific class. The problem we address in this research focuses on the intersection between unfairness and regression in performance. This particular case is given when regressiveness is unbalanced with respect to the sensitive attribute, which can be perceived 1.1 Background 3 as discriminatory behavior. Such phenomenon will be mentioned several times across this document as unfairness in regressiveness, unfair regression, unbalanced regression or UR. This work addresses this critical issue by proposing novel methodologies to mitigate unbalanced regressiveness in both accuracy and/or fairness within machine learning systems. By doing so, we attempt to advance in the field and contribute to the development of more equitable and reliable machine learning models. The study is structured as follows: first, the topic overview establishes the motivation, goals, and significance of the research. Following, the literature review is set, highlighting the existing research gaps. Our new metric is introduced by defining the unbalance between negative flips (NF) in model updates, which is referred to as unfair regression. After that, two mitigation strategies are defined to palliate this unbalance in predictive analysis. The first one affects only the model selection phase while the second one is built within the framework of Support Vector Machines (SVM). In both scenarios, we use our newly introduced metric (i.e. Unfair Regression) set as a constraint in the problem optimization that aims to be minimized. Lastly, the results showcase a comparative analysis between the standard and enhanced models, discussing how these new methods perform in terms of fairness. In addition, a summary of the most significant findings, their implications, and potential directions for further investigation completes the thesis. 1.1 Background The rapid advancement of AI-based technologies has transformed numerous industries and processes. From Alan Turing’s pioneering contributions to computer science through the development of the perceptron and the subsequent initial neural network architecture (the multilayer perceptron) in the mid-20th century, to the recent boom in deep learning (DL) algorithms that have driven remarkable advancements in fields like natural language processing (NLP) and computer vision (CV), machine learning has become an integral part of our daily lives. The 21st century brought rapid advancements as AI has significantly evolved with improvements in deep learning, natural language processing, and AI’s integration into various industries, demonstrating profound impacts on technology and society [ 5 ], such as the wellknown large language model named GPT-3 [ 6 ]. According to a study conducted by Gartner, 1.1 Background 4 the adoption of AI and machine learning technologies has increased by 270 % in the past four years [ 7 ]. As a result, concerns about the awareness of the trustworthiness of these systems, particularly regarding bias and fairness, has grown in recent years. Researchers must ensure that these systems do not perpetuate negative social impacts on minority groups discriminated against based on gender, ethnicity, or disability, among others. Furthermore, in machine learning there is also the unrelated problem of regressiveness in performance, which comes from the term regression, very well known in classical software development. This concept refers to a decline in software performance or functionality followed by an update. Similarly, in ML-based systems, updates are also required for various reasons, such as the availability of new data or models, and the need to optimize different technical or ethical metrics. The updated versions of ML models are designed to improve the average performance not taking into account the sample-wise performance (i.e. performance on specific predictions). Consequently, in classification tasks, an update may decrease the average number of misclassifications while introducing misclassification on samples that were correctly predicted in the old model. These newly introduced misclassifications are called negative flips (NF) [ 8 ] and the need for reducing them is a challenge in different applications [9], [10]. While there is significant literature on algorithmic unfairness, the concept of regression in ML is relatively new in the literature. Research has focused on developing methods to handle new data more effectively, making the regression in model updates a less prominent area of research focus. Accordingly, ongoing and future investigation needs to continue exploring and refining such strategies that consider the multifaceted nature of bias in data and that minimize the regression of accuracy and/or fairness in machine learning models aligned with the existing laws and international human rights standards according to the EU AI Act [11]. This study reviews existing research dedicated to fairness in machine learning, as well as techniques and metrics for identifying and reducing biases [ 12 ]. Specifically, new methodologies to deal with unbalanced regression within the SVM framework are proposed, allowing us to focus for the first time on the intersection between unfairness and regressiveness. Chapter 3 Theoretical Background 3.1 Fundamentals of Machine Learning Artificial Intelligence can be defined as the capability of a computer system and machine to perform tasks that traditionally require human intelligence. Furthermore, what makes a machine intelligent is the ability to memorize things. Nowadays, when we talk about artificial intelligence, in most cases we refer to machine learning systems. As aforementioned, ML is a branch of AI that allows computers to learn from data and improve their performance over time without explicit programming. These algorithms can identify patterns and relationships within data, extract meaningful insights, and make predictions or decisions based on those patterns. This ability to learn from data enables ML systems to automate tasks, recognize speech, classify images, and more. Within ML systems, we can distinguish three fundamental approaches: supervised learning, unsupervised learning, and reinforcement learning. In supervised learning (SL) the algorithm learns from labeled examples to make predictions or classifications. On the other hand, unsupervised learning involves learning from unlabeled data, where the algorithm is not provided with any target label and it aims to extract meaningful hidden patterns. Reinforcement learning is a distinct branch of ML where the computer learns to interact with an environment and takes actions to maximize a reward signal. ML becomes Deep Learning (DL) when a neural network architecture is employed to perform tasks of any of the three aforementioned branches. Along all these approaches, there exist multiple algorithms, and the choice depends on the task’s main objective and the data’s nature. 3.1 Fundamentals of Machine Learning 12 In the present dissertation, bias mitigation techniques are built and achieved within the SL framework for classification tasks, using the well-known learning algorithm named support vector machine. 3.1.1 The Supervised Learning Problem Supervised learning aims to classify an unknown system, or rule, to a specific outcome. From a mathematical notation point of view, by observing the system or rule, S:X→Y , which maps a point x from an input space X , into a point y of an output space Y , we can build a rule (i.e. a learning machine) ℜ:X→Y , that similarly maps a point x∈X , into a point ˆy∈Y , as displayed in Fig. 3.1. We can define the space Z as the cartesian product between the input and the output space, Z=X×Y , being z∈Z a point in this space. From the system S , a series of nexamples can be obtained, which compound the dataset Dn . Therefore, the goal of supervised learning is to project Dn∈Zn into a rule ℜ selected from a predefined set of possible rules, R, during the learning phase [38]. Figure 3.1 Graphical representation of the supervised learning problem. Given a labeled dataset Dn={( x i,yi),...,( x n,yn)} that consists of n examples, we can consider that there is some specific unknown function f within a set of functions F , f∈F , that best represents the mapping from an input space x∈X to an output space y∈Y of our machine ℜ: ˆy=f(x). Then, the quality of the learning machine, ℜ , that mimics the system’s behavior, S , for a determined set of data Dn , can be measured through the loss function ℓ , mathematically described as ℓ(ˆy,y):Z→R , which quantifies the difference between the predicted output ˆy=f(x)and the actual output yfor a given input x. 3.1 Fundamentals of Machine Learning 13 3.1.2 The Classification Problem: Support Vector Machines SVMs as classifiers became well-known in the 1990s and early 2000s for their excellent performance in a variety of contexts [ 39 ]. SVMs are particularly well-suited for binary classification tasks, where the objective is to identify the optimal hyperplane that separates two classes in an n-dimensional feature space. This hyperplane is selected to maximize the margin, which is the distance between the hyperplane and the closest data points from each class, known as support vectors. The SVM aims to minimize classification errors by balancing the trade-off between a wider margin and the penalty for misclassification. Figure 3.2 Linear Support Vector Machine classification based on two predictors (x1,x2). Classification hyperplane (-) and maximal margins (- - -) are shown. The SVM approach is fundamentally grounded in the concept of finding this optimal separating hyperplane, mathematically defined in Eq. 3.1. Those points that lie immediately next to the separating hyperplane, namely the support vectors, are the most critical elements when defining the decision boundary. However, by focusing on these support vectors rather than on the entire dataset, SVMs can handle high dimensional spaces efficiently and are less vulnerable to overfitting. w·x+b=0 (3.1) 3.1 Fundamentals of Machine Learning 14 The Kernel-Trick Theoretically, when data is not linearly separable in the original future space, a transformation can be applied to project the data into a higher-dimensional space where a linear separation is possible [ 40 ]. However, applying such transformation directly may be too computationally expensive, especially with high-dimensional data. To address this issue, SVMs take advantage of the "kernel-trick", which enables them to efficiently operate in high-dimensional spaces without explicitly computing the transformation [41]. The kernel function computes the dot product of the data points in the transformed feature space directly, allowing the SVM to construct a non-linear decision boundary in the original space [ 42 ]. Different kernel functions can be employed depending on the problem, each specifying a different kind of decision boundary. Commonly used kernels include the linear kernel, which is effective when data is approximately linearly separable, and non-linear kernels such as polynomial and radial basis function (RBF) kernels. The choice of kernel significantly impacts the performance and complexity of the SVM model. Non-linear kernels, such as the Gaussian kernel, are more versatile and particularly powerful in capturing complex decision boundaries but require careful tuning of additional hyperparameters. Hyperparameters The primary hyperparameter in SVMs is the regularization parameter C, often referred to as the box constraint. The parameter C controls the trade-off between achieving a low training error and a large margin. A smaller value of C allows for a wider margin at the cost of some misclassifications, promoting better generalization to unseen data. Conversely, a larger C prioritizes reducing training errors but may lead to overfitting, as it results in a narrower margin. When using non-linear kernels, an additional hyperparameter must be optimized, such as the γ (gamma)parameter in the Gaussian kernel. The γ parameter determines the influence of individual training samples on the decision boundary. A low γ value implies that the influence extends far, resulting in smoother decision boundaries, while a high γ value leads to a more complex model with decision boundaries that closely follow the training data [ 43 ]. Proper calibration of these hyperparameters is crucial to the performance of the SVM, as they directly influence the classifier’s capacity to generalize to new data. 3.1 Fundamentals of Machine Learning 15 3.1.3 Model Selection and Error Estimation Training an algorithm and evaluating its performance on the same data usually yields overfitting, the event when an algorithm becomes too specific for the trained data and fails in generalizing and predicting to new, unseen data. This phenomenon was first explored in the early 30s by Larson et. al., [ 44 ] and, consequently, many efforts were made to fix this issue. As a result, Cross Validation (CV) was raised in the 70s [ 45 , 46 , 47 ] proving that testing the output of an algorithm on a new set of data – the so-called test set– brought to more reliable performance estimates. At this point, we can define model selection as the process of choosing the best-performing model among a set of candidate models and/or a set of hyperparameter ranges based on their relative performance. In classification tasks, CV is a popular strategy for model selection, based on splitting data into multiple subsets: training the model on the subset of data called the training set, and evaluating its performance on another subset called the validation set. Then, CV selects the configuration with the smallest estimated risk. The main foundation of CV relies on the assumption that data are identically distributed and the training and validation sets are independent, i.i.d. This makes this method well suited to almost any algorithm in almost any framework, for instance in classification as demonstrated in previous works [ 48 , 49 ]. Furthermore, Arlot et al. in 2010 [ 50 ], proved through empirical experiments that in the framework of binary classifications CV yielded almost always to the best performance. In the present work, the CV strategy and its modification are used to determine the optimal hyperparameters to train the support vector machines. Then, an algorithm AH characterized by a set of hyperparameters, H , permits the design of a rule ℜ∈R whose performance can be measured through the loss function ℓ . The quantity we want to measure is the generalization error, which is the error that the model will perform on new unseen data. L(ℜ) = L(f) = Ezℓ(f,z)(3.2) Since the probability distribution over the set of points in the space Z is unknown, L(ℜ) cannot be computed and therefore, must be estimated. This yields to the empirical error expression: ˆ L(ℜ,Dn) = 1 n∑ z∈Dn ℓ(f,z)(3.3) 3.1 Fundamentals of Machine Learning 16 In addition, to select the best algorithm and hyperparameters configurations, A∗H∗, in a set of possible ones, we will define f∗ as the model built with the algorithm A∗ and set of hyperparameters H∗, which allows achieving a performance close to the optimal one. Summarizing, the CV technique is intended to select the best algorithm with the optimal hyperparameters in a set of possible algorithms with a set of possible hyperparameters. Since we assume data is i.i.d, the optimal algorithm should be able to achieve a small error on a dataset that is independent of the training set. Double-step Cross Validation A novel validation procedure, first introduced in the research of Donini M., Oneto L., et al. [ 51 ], is used for the hyperparameter selection. This procedure, in two steps using 10 folds, is expected to improve not only the hyperparameter selection in terms of accuracy but also in fairness. The first step of the double-step CV focuses on maximizing the accuracy by evaluating different hyperparameter configurations and identifying the set of values that yield the best metric values, which correspond to a pre-set value of above 97% of the best accuracy. Then, in the second step, the CV procedure is repeated, taking into account only the earlier best-selected hyperparameters and choosing the optimal values that generate the lowest negative flip rate difference between the sensitive and non-sensitive groups. An exemplification of its foundation is shown in Figure 3.3. The double-step CV algorithm is implemented in the present work to examine which is the effect of enhancing the model selection phase on the accuracy and fairness metrics we assess. This approach is critical in scenarios where high accuracy can sometimes lead to unintended biases against certain groups. By incorporating the double-step CV, we aim to create a more balanced model that not only performs well overall but also adheres to fairness principles. This methodology is tested on all the selected datasets, comparing traditional single-step CV results with those obtained through the double-step CV. 3.2 Bias and Fairness in Machine Learning 17 Figure 3.3 Double step cross validation exemplification. This method is employed to determine the hyperparameters by taking into account both accuracy and fairness metrics. A filtered list of the best accuracies is used for a second cross validation where the negative flip metric is considered. 3.2 Bias and Fairness in Machine Learning As prediction-based decision algorithms are increasingly adopted by several organizations, concerns about the bias and (un)fairness in the models used arise. Systems that have an impact on people’s lives create ethical responsibilities about making fair and unbiased judgments regardless of social aspects such as race, gender, class, and the like [ 52 ]. Recognizing and reducing bias and unfairness can be a tough undertaking task since different notions may be perceived between cultures [ 53 ]. Consequently, (un)fairness criteria are influenced by many factors such as user experience, as well as cultural, social, historical, political, legal, 3.2 Bias and Fairness in Machine Learning 18 and ethical factors [ 54 ]. However, in this dissertation, state-of-the-art definitions and notions are used to address the main goal of building a fair algorithm under newly introduced fair metrics. One of the most relevant and orotund cases of racial bias is found on the COMPAS dataset (Correctional Offender Management Profiling for Alternative Sanctions) from which judges and parole officers use a popular commercial algorithm for scoring criminal defendant’s likelihood of reoffending (recidivism). It has been shown that the algorithm is biased in favor of white defendants, and against black inmates, based on a 2-year follow-up study (i.e who actually committed crimes or violent crimes after 2 years) [ 1 ]. In such analysis, Larson et. al. showed a notable pattern of mistakes measured by precision and sensitivity. Figure 3.4 A famous example of two criminals that were scored using the COMPAS algorithm. Bernard Parker, left, was rated high risk; Dylan Fugett was rated low risk despite of his critical history. Source: Josh Ritchie for ProPublica [1]. To understand the basics and main causes for the present bias in machine learning and the consequent unfair algorithms, in the following subsections various sources of bias and their impact on fairness are explored. 3.2.1 Definitions and Forms of Bias Bias can be defined as a systematic error that, under the context of fairness, places the privileged groups at the advantage of having a positive outcome. We understand a positive outcome as a favorable prediction to the recipient, such as receiving a loan, being hired for a job, or not being arrested. 3.2 Bias and Fairness in Machine Learning 19 The ways in which human bias can affect a dataset used to train a ML model are, unfortunately, still copious [ 7 , 12 , 36 ]. Between these several means in how human misperception can be transferred to the algorithms, we can distinguish between different ways through which bias in machine learning models is introduced, according to [7]: • Training data: since machine learning models learn from training data, if this is corrupted, the resulting model will be so. • Label definitions: when the target label contains unclear information about the outcome, incorrect predictions may result, leading to biased decisions. • Feature selection: when using features that are not significant for the real-world model application, bias against protected groups can occur. • Proxies: proxies are variables that are not explicitly sensitive variables such as gender or ethnicity, but that may represent them. For instance, using height and body weight as proxies for gender can introduce bias in certain applications. • Masking: even when deleting any sensitive attributes or proxies, to achieve a new representation of the data, new features, known as masked features, might be created to take the place of the other attributes. As a consequence, bias will still be present. Overall, bias is a significant problem to address and can manifest in various ways, as previously mentioned. This issue is particularly concerning because it can be subtle and not easily detected without a thorough analysis of the data and models. Additionally, individuals are not always aware of their own prejudices, which can inadvertently contribute to unfairness in machine learning. 3.2.2 Sensitive Variables: the Unprivileged Groups The sensitive variable concept, also often referred to as protected attribute, was first introduced when researchers began to study the field of fairness in machine learning in the early 2010s [ 55 ]. The nature of the problem of proving models to be biased and unfair, developed the need to identify and categorize those variables that were found to be discriminated, so that received an unfavorable treatment. Not as a surprise, those attributes for which predictions were biased, corresponded to unprivileged classes such as colored-skin people, women, the LGTBIQA+ collective, foreigners, disabled people, and/or aged individuals. 3.2 Bias and Fairness in Machine Learning 20 One pioneer work discussing sensitive variables’ role in machine learning was Moritz Hardt, Eric Price, and Nathan Srebro’s paper, "Equality of Opportunity in Supervised Learning," presented at the 2016 Neural Information Processing Systems (NeurIPS) conference [ 30 ], where a criterion for fairness in machine learning models that consider sensitive attributes was introduced to ensure equal opportunity. From now on, several studies have been carried out that aim to formalize and establish a detailed methodology to address this issue, as well as to discuss what can be considered a protected attribute. In the present work, we will focus on the groups based on ethnicity, gender, and origin, the sensitive variables being racial people, women, and foreigners, respectively. Our goal is to mitigate any kind of bias towards any group, removing unfair predictions. The methodology through which this is achieved is based on the implementation of a fair constraint in the Support Vector Machine formulation, making it an in-processing approach to bias mitigation. 3.2.3 Metrics for Predictive Analysis and Fairness Defining fairness has become a huge topic in machine learning since is a complex and multifaceted aspect and thus many notions and perspectives may be considered. Far from now, there is no unique, comprehensive definition of fairness but a set of proposed metrics that measure fairness instead. According to previous works [ 52 , 56 ], more than twenty different notions of fairness have been proposed, and which to use in each circumstance is still up for debate [ 51 , 57 ]. Nevertheless, a general notion of fairness can be defined as a quantification of how much undesired bias exists in training data or a model. As a result, researchers have been working on defining mathematical expressions that serve as metrics to assess (un)fairness. As mentioned, more than 20 expressions are found in the literature, however, all of them fall into two larger categories that allow us to represent different perspectives on what means for an algorithm to be fair. The first category is denoted as group fairness, which is also known as statistical fairness, and aims to achieve equality by focusing on group membership, such as gender or ethnicity. Meanwhile, the second group, individual fairness, aims to achieve equitably at the level of individuals, regardless of their group. Further remark, is that most of the fairness definitions rely on the well-known statistical metrics retrieved from the confusion matrix. From this table, the different definitions can be taken out: • True positive (TP): when the predicted and true outcomes both correspond to the positive class. 3.5 SVM Under Fairness Constraints: Unfair-Regression-Free SVM 27 Post-processing Lastly, post-processing techniques are those that allow fairness to be met without modifying the classifier [ 30 ], as the mitigation attack is done after the model is trained, i.e. by modifying the outcome decision. Such methods can be used to optimize most of the fairness constraints except for counterfactual fairness. Some techniques are thresholding and calibration. Figure 3.7 Overview of the fair approaches in the machine learning pipeline. The new methodologies presented in this work are part of in-processing techniques, which modify directly the learning phase of the machine learning system. 3.5 SVM Under Fairness Constraints: Unfair-Regression- Free SVM With the novel metric introduced to address fairness, unfair regression, a new algorithm emerges for the support vector machine under fairness constraints. Subject to the UR constraint: UR =|NFRS=a−NFRS=b|=0 (3.13) Let I be the cardinality of samples of a dataset with a correct predicted outcome in the old model: I={i:fold(xi) = yi}(3.14) Where ISi=ais the number of samples that belong to the sensitive attribute: ISi=a=Ia={i:fold(xi) = yi&Si=a}(3.15) And similarly for the non-sensitive attributes Si=b: 3.5 SVM Under Fairness Constraints: Unfair-Regression-Free SVM 28 ISi=b=Ib={i:fold(xi) = yi&Si=b}(3.16) Then, our linear support vector machine problem becomes: 1 nIa ∑ i∈Ia f(xi)−1 nIb ∑ i∈Ib f(xi) = 0 (3.17) Since f(xi)is defined by f(xi) = ∑ i wxi+b (3.18) Combining 3.17 and 3.17 we obtain: (1 nIa ∑ i∈Ia wxi−1 nIb ∑ i∈I=b wxi)+b−b=0 (3.19) Finally, reorganizing terms, w(1 nIa ∑ i∈Ia xi−1 nIb ∑ i∈Ib xi)) = 0,(3.20) where a =1 nIa∑i∈Iaxi−1 nIb ∑i∈Ibxi Similarly, the SVM problem using the Gaussian kernel, can be defined as: 1 nIa ∑ i∈Ia ( n ∑ j=1 αjyjK(xi,xj)+b)−1 nIb ∑ i∈Ib ( n ∑ j=1 αjyjK(xi,xj)+b) = 0 (3.21) Again, reorganizing and simplifying terms: n ∑ j=1 αjyj(1 nIa ∑ i∈Ia K(xi,xj)−1 nIb ∑ i∈Ib K(xi,xj)) = 0 (3.22) To conclude, the adaptation of the Support Vector Machine framework to incorporate fairness constraints (i.e. UR) is a determinant step in developing more equitable machine learning models. We can consistently reduce prediction bias by explicitly including measures that consider deviations among sensitive variables. This adaptation not only maintains the algorithm’s predictive performance while improving its fairness but also aligns with legal and ethical requirements. The mathematical formulations presented here illustrate that it is feasible to address fairness by changing classic SVM methodologies, and thereby provide 3.5 SVM Under Fairness Constraints: Unfair-Regression-Free SVM 29 the foundation for future study and development in this field. In the following subsection, the optimization problem under fairness constraints set up in Python is presented. 3.5.1 Optimization Problem To reach our goal, the support vector machine method must be implemented with fairness constraints under an optimization problem. This optimization problem is solved with the Gurobi Optimizer, and in a nutshell, it is implemented by the functions below. The objective function to be optimized is the regularized loss function, commonly used in Support Vector Machines (SVMs). For the linear case, we use the following expressions. min w,b,ξ ||w||2 2+C N ∑ i=1 ξi(3.23) Within the optimization problem, the constraints include the SVM margin constraints and the non-negativity of the slack variables ξ , as well as a fairness constraint that adjusts the decision boundary, as described below. The margin constraints: yi(wTxi+b)≥1−ξi,∀i(3.24) Non-negativity constraints for the slack variables: ξi≥0,∀i(3.25) And the fairness constraints: wT 1 |Si=a|∑ i∈Si=a xi−1 |Si=b|∑ i∈Si=b xi!=0 (3.26) For the non-linear scenario, we have to minimize the following expression: min 1 2 N ∑ i=1 N ∑ j=1 αiαjyiyjK(xi,xj)− N ∑ i=1 αi(3.27) Subject to the following constraints: N ∑ i=1 αiyi=0 (3.28) 3.6 Challenges in Bias Mitigation: the Trade-off Between Accuracy and Fairness 30 N ∑ i=1 αiyifi=0 (3.29) 0≤αi≤C,for i=1,...,N(3.30) Where fiis defined as: fi= 1 |Si=a|∑ i∈Si=a K(xi,xj)−1 |Si=b|∑ i∈Si=b K(xi,xj)!(3.31) By creating the algorithm that solves this optimization problem, we can conduct a support vector machine under fairness constraints that maximize the space between the two classes while minimizing the errors we allow to occur in our problem subject to the defined constraints. As a result, we hypothesize we will obtain an unbiased and trustworthy classifier. 3.6 Challenges in Bias Mitigation: the Trade-off Between Accuracy and Fairness The impact of using fairness metrics on the accuracy performance strongly relies on the fairness definition used, on the nature of the dataset, and on the algorithms used. Either way, previous studies on algorithmic fairness showed that in most cases, imposing fairness can conflict with accuracy: increasing the fairness of solutions concerning subgroups often leads to a decrease in overall accuracy [ 21 , 59 , 64 ]. This is not a surprise since the objective is redirected from accuracy to both accuracy and fairness. Therefore, determining potential trade-offs between both goals is needed. Nowadays, it is still not well understood which is the actual trade-off to achieve fairness while maintaining the good performance of the predictor, which is closely related to the regression in both metrics when a model is updated. Nevertheless, some present works in the current literature allow a systematic evaluation of potential trade-offs between accuracy and fairness metrics, such as the research done by Haas et al., 2019, named The Price of Fairness, see [57]. In the cited study, Haas et al. propose a framework that in a nutshell, calculates the Pareto fronts to optimize hyperparameters and uses these trade-offs to establish the most appropriate level of fairness for each algorithm. Despite that, finding the optimal trade-off between accuracy and fairness metrics is out of the scope of this research, instead, we focus on evaluating the performance by setting our 3.6 Challenges in Bias Mitigation: the Trade-off Between Accuracy and Fairness 31 fairness constraint to a fixed value of zero. This way, we will not only be able to reduce unfairness, but also assess how the accuracy is affected by the new SVM configuration. Part II Section Two Chapter 4 Methodology 4.1 Research Design Study Overview When new data becomes available or new algorithms are proposed in the literature, it is mandatory to ensure the optimal quality of the deployed model by updating (or upgrading) it, [ 9 ], [ 8 ]. For this reason, in our methodology, we define f∗ old the "old" model (i.e. the model trained with the original data and algorithms), and f∗ new the "new" model (i.e. the model trained with the updated data and upgraded algorithms). Then, two different ways to make updates 1 are studied, going from f∗ old to f∗ new , in such way to continue to improve the accuracy of f∗ new with respect to f∗ old , but also minimizing the unfair regression. To do so, a couple of strategies have been defined: (i) adjusting only the tuning phase, i.e. model selection phase, by using a refined cross validation method (double-step cross validation); or (ii) modifying the learning algorithm to account for the unfair regression phenomenon as well as adjusting the tuning phase. In both cases, performance and fairness metrics are assessed, and the same set of hyperparameters for the cross validation are selected. Additionally, to ensure reliable and robust outcomes, we trained the classifiers using 30 different random states for splitting the data. The final metric results are computed as the average across these multiple runs together with the standard deviations, allowing us to tackle the variability of the results. In the following subsections, the methodology is carefully set out. Data sources and preparation are exposed in the first place, followed by the model configurations chosen to 1 From now on, we will use the word update for both update and upgrade scenarios for language simplicity 4.1 Research Design Study Overview 34 Figure 4.1 Machine learning sysems-based pipeline. conduct the analysis. Next, the algorithm design is described and finally, the evaluation metrics used are defined. 4.1.1 Study Questions and Hypothesis In this section we list the questions and hypotheses made as a starting point. Questions 1. Does the type of model update, (i.e. the subset size and kernel function) affect the model performance when an update is done? 2. What is the mitigation strategy’s impact on the accuracy and fairness metrics? 3. Can we obtain fair classifiers without sacrificing too much accuracy? Hypothesis 1. Larger subset sizes will generally lead to better model performance due to the increased amount of training data available, and the non-linear kernels (like Gaussian kernel) are expected to perform better on datasets with complex, non-linear relationships. However, within the same dataset, resulting metrics are expected to be more or less 4.2 Data Collection and Preparation 35 equal within the different types of updates, indicating the robustness of the mitigation strategy applied. 2. An enhancement of the fairness metrics (UR) when applying a mitigation strategy is expected. However, a trade-off between both measures must be studied as we add a second constraint to the problem. 3. The overall performance can be compromised when the optimization problem is doubleconstraint set. However, since we are assessing metrics in model updates which are hypothesized to perform better, a reasonable increase in accuracy while imposing UR is expected within the proposed strategies. 4.2 Data Collection and Preparation This section outlines the sources of data used, providing a detailed overview of the most important characteristics of each dataset. Note that, the data used to train our models was not collected but retrieved from pre-existing datasets. Furthermore, data cleaning, preprocessing, and normalization steps are described. 4.2.1 Data Sources To conduct the research, four well-known datasets used in fair machine learning (Adult, Arrhythmia, COMPAS, and German Credit) were employed to evaluate our algorithms. Further description of each set of data is done next and highlighted specifications are summarized in Table 4.1. Adult Dataset Adult dataset [ 68 ] is a database from the UCI repository that contains 12 features of demographic characteristics for 32,560 examples, where 2,399 are missing values. The prediction task is to determine whether a person earns over 50K $ a year. Due to time and computational resources, the dataset has been randomly downsized 30 times in order to make it possible to achieve the task. Arrhythmia Dataset The Arrhythmia dataset [ 17 ] from the UCI repository, contains 279 attributes for 452 instances gathered from the study of H. Altay Guvenir, intending to distinguish between the 4.2 Data Collection and Preparation 36 presence and absence of cardiac arrhythmia and to classify them in one of the 16 groups. In the our work, the classification task is reduced to a binary classification problem: to determine whether there is or not an arrhythmia disease. Therefore the target variable is binarized in our algorithm to "no illness" against "arrhythmia illness" outcome for any of the 15 different arrhythmia categories. COMPAS Datset The COMPAS dataset, an acronym for Correctional Offender Management Profiling for Alternative Sanctions, is a popular algorithm used in the US criminal justice system and has recently faced critical examination for being proven biased towards ethnicity. In particular, the algorithm is used for scoring criminal defendant’s probability of recidivism. The dataset used for this algorithm contains 10 binary variables and over 6,000 observations. In this dataset as well, we randomly downsized by six times the number of samples to 1,028 examples due to limitations on time and computational resources. German Credit Dataset The German Credit Dataset [ 69 ] is a commonly used dataset for evaluating credit risk and is also employed to assess the presence of bias in machine learning models. It contains information on about 1,700 loan applicants and includes 20 attributes (7 numerical and 13 categorical) that describe each applicant, such as the purpose of the loan, amount requested, marital status, age, gender, job, and housing status. Moreover, the target attribute is included to describe the classification prediction: whether the applicant should be granted with a credit or not. Summary In table 4.1 an overview of the data’s most relevant specifications is done. Note that for Adult and COMPAS datasets a significant size drop is made, and the final number of features is 1,025 and 1,028 respectively. An important aspect to be highlighted is the sensitive data representation. The most balanced dataset regarding the protected attribute, is the Arrythmia dataset, being equally represented. Adult and COMPAS are shown to be quite unbalanced: Adult has a higher representation of the non-protected group (66%), while COMPAS has more data for the sensitive attribute (66%). While this unbalancing is not significant in these last two datasets, for the German dataset we can report several proportion issues, as up to 96 % of the observations correspond to the protected group of foreigners. 5.1 Reference Models: Standard SVM 43 Table 5.1 Performance and fairness metrics for the datasets with different kernel methods and dataset sizes. Dataset ACC B-ACC DEO DDP f∗ old: 20% of dataset size with linear kernel Adult 0.80 ±0.03 0.67 ±0.05 0.14 ±0.10 0.10 ±0.05 Arrhythmia 0.67 ±0.04 0.65 ±0.04 0.46 ±0.11 0.17 ±0.03 COMPAS 0.72 ±0.03 0.69 ±0.03 0.23 ±0.15 0.22 ±0.10 German 0.69 ±0.03 0.63 ±0.04 0.34 ±0.20 0.20 ±0.13 f∗ old: 20% of dataset size with Gaussian kernel Adult 0.79 ±0.03 0.67 ±0.06 0.17 ±0.10 0.11 ±0.06 Arrhythmia 0.68 ±0.05 0.65 ±0.05 0.40 ±0.13 0.25 ±0.04 COMPAS 0.72 ±0.03 0.70 ±0.04 0.23 ±0.16 0.24 ±0.10 German 0.69 ±0.03 0.64 ±0.04 0.42 ±0.20 0.22 ±0.14 f∗ old: 100% of dataset size with linear kernel Adult 0.71 ±0.07 0.78 ±0.04 0.10 ±0.08 0.31 ±0.07 Arrhythmia 0.74 ±0.04 0.74 ±0.03 0.72 ±0.06 0.15 ±0.04 COMPAS 0.72 ±0.03 0.73 ±0.02 0.12 ±0.08 0.22 ±0.05 German 0.74 ±0.02 0.64 ±0.04 0.35 ±0.13 0.17 ±0.07 f∗ old: 100% of dataset size with Gaussian kernel Adult 0.74 ±0.06 0.79 ±0.03 0.12 ±0.09 0.29 ±0.05 Arrhythmia 0.69 ±0.04 0.71 ±0.04 0.84 ±0.08 0.24 ±0.05 COMPAS 0.72 ±0.02 0.73 ±0.02 0.15 ±0.09 0.25 ±0.06 German 0.74 ±0.02 0.62 ±0.03 0.37 ±0.15 0.11 ±0.07 Figure 5.1 Fairness metrics for the standard SVM. On the left, the normalized difference in equal opportunity is plotted against the normalized misclassification error. On the right, the same is done for the difference in demographic parity. Note that, the closer a point to the origin is, the better the results are in both accuracy and fairness. 5.1 Reference Models: Standard SVM 44 Next, we simulate model updates according to Table 4.3 with no mitigation strategy applied. The key aspect of this analysis is to observe whether such negative flips occur in an unbalanced way toward a specific class, i.e. if regression is disproportionately unbalanced. In such a case, we could say that we are in front of a model update that is promoting bias and providing unfair predictions. Table 5.2 Accuracy gain (ACCG) and unfair regression (UR) tested on a model update scenario, for the different cases considered going from f∗ old to f∗ new. Dataset UR ACCG Update Scenario 1: from f∗ old to f∗ new enlarging dataset size maintaining Linear SVM Adult 0.28 ±0.02 0.01 ±0.07 Arrhythmia 0.14 ±0.06 0.01 ±0.07 COMPAS 0.03 ±0.02 0.00 ±0.04 German 0.12 ±0.06 0.00 ±0.05 Update Scenario 2: from f∗ old to f∗ new enlarging dataset size maintaining Gaussian kernel SVM Adult 0.28 ±0.02 0.03 ±0.09 Arrhythmia 0.27 ±0.09 -0.05 ±0.06 COMPAS 0.03 ±0.02 0.00 ±0.03 German 0.12 ±0.06 0.00 ±0.03 Update Scenario 3: from f∗ old to f∗ new enlarging dataset size plus upgrading the kernel function Adult 0.28 ±0.02 -0.06 ±0.07 Arrhythmia 0.25 ±0.09 0.02 ±0.06 COMPAS 0.03 ±0.02 0.00 ±0.04 German 0.13 ±0.07 0.05 ±0.04 Figure 5.2 shows how disparities between sensitive and non-sensitive groups happen within model updates. Specifically, on the German, Adult, and Arrhythmia datasets, such differences are bigger than on the COMPAS dataset. From these results, we have a starting point for a forthcoming comparison and to examine potential trade-offs between accuracy and fairness. 5.2 Mitigation Strategy (i): Double-Step Cross Validation Method 45 Figure 5.2 Normalized percentage of lost accuracy in model updates and unfair regression (UR). The closer the data point to the origin, the better performance in both accuracy and fairness. Note that the subscript numeration for the model notation designates the model configuration in terms of dataset size and kernel function, as listed in Table 4.2. 5.2 Mitigation Strategy (i): Double-Step Cross Validation Method Enhanced cross validation procedures play a crucial role in our study, allowing us to observe and examine how refinements in the tuning phase impact both accuracy and UR. The novel methodology of double-step cross validation, recently introduced in the literature [ 51 ], has been shown to provide notable improvements in model performance. While these improved models help fine-tune the model selection process and improve the robustness of results, it is important to emphasize that they do not incorporate fairness constraints within the SVM algorithm but in the model selection task. As a drawback, the learning phase does not know our intentions to incorporate fairness. 5.3 Mitigation Strategy (ii): Unfair-Regression-Free SVM Method 46 Table 5.3 Overall accuracy (ACC), balanced accuracy (B-ACC), unfair regression (UR), and accuracy gain (ACCG) obtained when using the 2-step CV method on the three different updating scenarios for various datasets with f∗ old →f∗ new. Dataset ACC B-ACC UR ACCG Update Scenario 1: from f∗ old to f∗ new enlarging dataset size maintaining Linear SVM Adult 0.81 ±0.01 0.61 ±0.01 0.12 ±0.01 0.16 ±0.01 Arrhythmia 0.67 ±0.04 0.65 ±0.04 0.11 ±0.05 0.01 ±0.01 COMPAS 0.73 ±0.01 0.72 ±0.01 0.05 ±0.04 0.01 ±0.02 German 0.69 ±0.04 0.62 ±0.05 0.10 ±0.06 0.01 ±0.06 Update Scenario 2: from f∗ old to f∗ new enlarging dataset size maintaining Gaussian kernel SVM Adult 0.81 ±0.01 0.61 ±0.02 0.10 ±0.01 0.18 ±0.06 Arrhythmia 0.68 ±0.04 0.66 ±0.04 0.14 ±0.07 0.05 ±0.06 COMPAS 0.74 ±0.01 0.72 ±0.01 0.06 ±0.04 0.00 ±0.00 German 0.70 ±0.03 0.64 ±0.05 0.10 ±0.06 0.01 ±0.01 Update Scenario 3: from f∗ old to f∗ new enlarging dataset size plus upgrading the kernel function Adult 0.81 ±0.01 0.61 ±0.01 0.10 ±0.01 0.18 ±0.01 Arrhythmia 0.67 ±0.04 0.65 ±0.04 0.14 ±0.06 0.05 ±0.03 COMPAS 0.73 ±0.01 0.72 ±0.01 0.06 ±0.04 0.00 ±0.00 German 0.69 ±0.04 0.62 ±0.05 0.10 ±0.06 0.01 ±0.03 5.3 Mitigation Strategy (ii): Unfair-Regression-Free SVM Method Our Unfair-Regression-Free Support Vector Machine (URFSVM) model is the newly developed algorithm, used to mitigate the unfair regression phenomena. Such an algorithm, accounts for the fairness constraint within the SVM framework, by minimizing the unfair regression occurrences. In other words, this method incorporates a modification in the learning phase so that the model is aware of our desire to mitigate the unfair regression. Moreover, the refinement in the model selection phase is also considered. As a result, this method is not only expected to perform well but also must not exhibit any unfair disparities towards a specific group when doing model updates. Table 5.4 gathers the 5.4 Comparison through Methods 47 results of accuracy, balanced accuracy, unfair regression, and accuracy gained from training the new model on the specified updating scenario. Table 5.4 Overall accuracy (ACC), balanced accuracy (B-ACC), unfair regression (UR), and accuracy gain (ACCG) obtained when using the unfair-regression-free SVM (URFSVM) method on the three different updating scenarios for various datasets with f∗ old →f∗ new. Dataset ACC B-ACC UR ACCG Update Scenario 1: from f∗ old to f∗ new enlarging dataset size maintaining Linear SVM Adult 0.80 ±0.04 0.78 ±0.03 0.05 ±0.04 0.00 ±0.04 Arrhythmia 0.69 ±0.09 0.71 ±0.08 0.08 ±0.05 0.38 ±0.12 COMPAS 0.72 ±0.05 0.73 ±0.05 0.03 ±0.03 0.44 ±0.07 German 0.74 ±0.02 0.62 ±0.04 0.11 ±0.11 0.43 ±0.04 Update Scenario 2: f∗ old to f∗ new enlarging dataset size maintaining Gaussian kernel SVM Adult 0.78 ±0.06 0.67 ±0.14 0.05 ±0.03 -0.02 ±0.06 Arrhythmia 0.58 ±0.07 0.62 ±0.06 0.04 ±0.03 0.27 ±0.08 COMPAS 0.69 ±0.06 0.70 ±0.07 0.04 ±0.03 0.41 ±0.08 German 0.73 ±0.03 0.55 ±0.07 0.09 ±0.07 0.43 ±0.04 Update Scenario 3: f∗ old to f∗ new enlarging dataset size plus upgrading the kernel function Adult 0.77 ±0.05 0.70 ±0.13 0.05 ±0.03 -0.03 ±0.04 Arrhythmia 0.55 ±0.05 0.58 ±0.04 0.08 ±0.06 0.27 ±0.05 COMPAS 0.69 ±0.07 0.70 ±0.08 0.04 ±0.02 0.41 ±0.08 German 0.73 ±0.03 0.55 ±0.07 0.08 ±0.07 0.42 ±0.04 5.4 Comparison through Methods Standard classifiers have been proven to have unfairness issues since inequity performance can be seen through metrics such as DEO and DDP, as reported in Figure 5.1. From this initial analysis, we demonstrated that fairness issues go beyond the representation of the sensitive class in the data. While the Arrhythmia dataset (which indeed is extremely unbalanced being 96% of the data representing the sensitive class) has the highest ratio of DEO in the Gaussian kernel models, the Adult dataset (which is exemplary balanced), has a high rate of unfairness as well when referring to the DDP metric. Contrarily, the linear examples of Arrhythmia have a similar value of DEO as the German dataset, in which the unbalance is not as notable. 5.4 Comparison through Methods 48 Therefore, we can confirm fairness issues in ML are more complex than just considering the imbalance in data (a detailed explanation is outlined in Section 3.2). On the other side, higher occurrences of UR clearly appear when no mitigation strategy is used, as expected (see Figure 5.2). When performing model updates on the standard SVM and going from f∗ old to f∗ new with no mitigation strategy applied, it is seen that while very little or no accuracy improvement is done, the regression on fairness is disproportionately unbalanced towards a particular group. Instead, after the mitigation strategies are applied, a significant decrease in the misclassification error and unbalanced regression is seen. Unfair regression across the accuracy loss is plotted (see Figure 5.3) for the three updating scenarios and the three studied methods. Red-colored data points represent the Standard- SVM-trained classifiers, yellow-colored points the models trained with the mitigation strategy (i), and green ones stand for the mitigation strategy (ii). A significant improvement is observed in the models trained under fairness constraints since they are generally clustered towards the lower half of the y-axis, which represents a low ratio of UR. This suggests that both of the proposed mitigation strategies effectively reduce disparities in standard SVM models. Figure 5.3 Normalized UR (the smallest the better) and inverted accuracy gain (the smallest the better) for each dataset and updating scenario. Gray lines join the results of the different methods on the same dataset. Note that, for meaningful plots, the inverted accuracy gain has been computed by subtracting the max value from each accuracy gain value and then normalized. Results retrieved from Table 5.2. Chapter 6 Discussion 6.1 Interpretation of Findings The results clearly show that performing model updates without any fairness mitigation leads to unbalanced regressiveness in accuracy and fairness. This disproportionate behavior affecting particular groups is evident in datasets like Arrhythmia and Adult where Standard SVM models exhibited a high degree of bias, leading to unfair outcomes. However, the incorporation of the Double-Step Cross Validation (2-step CV) and the Unfair-Regression-Free SVM (URFSVM) strategies effectively reduced unbalanced regressiveness both in accuracy and fairness. This last mitigation strategy, URFSVM, consistently performed better in reducing unfair regression while maintaining or even increasing the overall performance. While the Gaussian kernel SVM is proven to yield better results in terms of performance, it resulted in poorer fairness metrics when compared to the Linear SVM. We hypothesize this is happening due to the simplicity of the Linear SVM, which can indeed promote more equitable treatment in some cases, leading to better fairness outcomes. Results further demonstrate the importance of the 2-step CV method in balancing fairness and accuracy during the hyperparameter tuning, showing significant improvements in both aspects for all datasets. In particular, the Adult dataset marked significant improvements in fairness when this single first mitigation strategy was applied. On the other side, when the second mitigation strategy was introduced, the Adult dataset did not perform as good in accuracy metrics, but the Arrhythmia, COMPAS, and German datasets significantly increased their classification accuracy. 6.2 Comparison with Prior Studies 50 6.2 Comparison with Prior Studies Several studies have been done in the field of fairness in machine learning, focusing on bias mitigation through the different processing techniques. For example, the work of Agarwal et. al., A Reduction Approach to Fair Classification, introduces a new methodology to deal with unfair classification by reducing a fair classification to a sequence of cost-sensitive classification problems, achieving fair outcomes. However, some limitations arise since the method cannot be applied if the protected attribute is not accessible during training-time, making it adequate for any type of data. Zafar et. al. introduced through the research Fairness Constraints: A Flexible approach for Fair Classification, a flexible constraint-based framework to enable the design of fair margin-based classifiers. Despite the efforts, the strategy may not be extendable to every scenario since it does not work well if data is unbalanced, as contrarily seen in our work. A similar work, made by Kamishima et. al., named Fairness-Aware Classifier with Prejudice Remover Regularizer, proposed a regularization approach applicable to any prediction algorithm however, the problem lacked convexity of the objective function and consequently, the method was trapped on the local minima. Yet, the listed studies differ from our investigation since they focus on model outputs and not on the regressiveness observed in continuous updates. Instead, our approach goes beyond traditional fairness adjustments by embedding fairness constraints directly in the learning problem and considering unfair regression in model updates. Accordingly, our method would be more comparable to the research of Yan et. al. on positive congruent training. However, we extend the concept by considering sensitive attributes during model updates, tackling both accuracy and fairness. 6.3 Limitations of the Study While our method resulted in satisfactory results, we also consider some limitations. On the first hand, the focus on the Support Vector Machines architecture as the primary machine learning method may limit the generalization to other learning structures. However, this is already planned to be expanded in our next research. On the other hand, our algorithm can perform its task only if the sensitive attribute is properly labeled and separable from the data since it is needed to start the optimization problem. Lastly, the computational cost of the 6.3 Limitations of the Study 51 proposed strategies, particularly on the URFSVM, is relatively high, which could restrict their application in real-time systems. Chapter 7 Conclusions This work contributes to the advancement of fairness in ML by developing and validating a novel fairness metric, namely Unfair Regression (UR), designed to quantify the unbalanced occurrences of negative flips in ML model updates. This fairness metric allowed us to develop two mitigation strategies to address the technical issues of unbalanced regressiveness in accuracy and fairness that occur when using standard methodologies. The first method, Double-Step Cross Validation (2-step CV), which integrates fairness constraints into the hyperparameter tuning process, demonstrated a significant fairness improvement by dramatically decreasing the occurrences of UR. This strategy not only confirmed an enhancement in performance but also provided evidence of the importance of considering fairness metrics during the model selection phase. The second approach, Unfair- Regression-Free SVM (URFSVM), an algorithm created within the standard SVM framework for a binary classification problem, modifies the learning algorithm itself to minimize UR directly during the training process. The second set of experiments in real-world data, which used both of the strategies proposed, showed a further improvement in fairness but above all, a significant gain in accuracy. Adding this intermediate step of evaluating the model’s performance by only modifying the tuning phase has given us an insight into the importance of incorporating fairness constraints both in the model selection and learning process. In addition, by systematically evaluating the impact of such novel methodologies in realworld datasets, this research provides empirical evidence that improving fairness is indeed compatible with the maintainability of the model’s performance. Altogether, this work contributed to the development of trustworthy AI by addressing both technical and ethical debt in ML systems. References 59 [62] Niels. Bantilan. Themis-ml: A fairness-aware machine learning interface for end-to-end discrimination discovery and mitigation. Journal of Technology in Human Services, 36(1):15–30, 2018. [63] Matt J. Kusner, Joshua R. Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness, 2018. [64] Faisal Kamiran and Toon Calders. Data preprocessing techniques for classification without discrimination. Knowledge and Information Systems, 33(1):1–33, 2012. [65] Sorelle A. Friedler, Carlos Scheidegger, Suresh Venkatasubramanian, Sonam Choudhary, Evan P. Hamilton, and Derek Roth. A comparative study of fairness-enhancing interventions in machine learning. http://arxiv.org/abs/1802.04422, Feb 2018. Accessed: 2024-04-10. Code available at https://github.com/algofairness/fairness-comparison. [66] Toon Calders and Sicco Verwer. Three naive bayes approaches for discrimination-free classification. Data Mining and Knowledge Discovery, 21(2):277–292, 2010. [67] Toon Calders, Faisal Kamiran, and Mykola Pechenizkiy. Building classifiers with independency constraints. In 2009 IEEE International Conference on Data Mining Workshops, pages 13–18, 2009. [68] Barry Becker and Ronny Kohavi. Adult. UCI Machine Learning Repository, 1996. DOI: https://doi.org/10.24432/C5XW20. [69] Hans Hofmann. Statlog (German Credit Data). UCI Machine Learning Repository, 1994. DOI: https://doi.org/10.24432/C5NC77.