Adversarial Bias: Data Poisoning Attacks on Fairness Thanks: This work is supported by NSF (2134079). Eunice Chan, Hanghang Tong Abstract With the growing adoption of AI and machine learning systems in real-world applications, ensuring their fairness has become increasingly critical. The majority of the work in algorithmic fairness focus on assessing and improving the fairness of machine learning systems. There is relatively little research on fairness vulnerability , i.e., how an AI system’s fairness can be intentionally compromised. In this work, we first provide a theoretical analysis demonstrating that a simple adversarial poisoning strategy is sufficient to induce maximally unfair behavior in naive Bayes classifiers. Our key idea is to strategically inject a small fraction of carefully crafted adversarial data points into the training set, biasing the model’s decision boundary to disproportionately affect a protected group while preserving generalizable performance. To illustrate the practical effectiveness of our method, we conduct experiments across several benchmark datasets and models. We find that our attack significantly outperforms existing methods in degrading fairness metrics across multiple models and datasets, often achieving substantially higher levels of unfairness with a comparable or only slightly worse impact on accuracy. Notably, our method proves effective on a wide range of models, in contrast to prior work, demonstrating a robust and potent approach to compromising the fairness of machine learning systems. I Introduction Ensuring fairness in AI and machine learning systems is a critical concern alongside their growing real-world deployment. Current research efforts largely prioritize building [ 18 ] and evaluating [ 10 , 6 ] the fairness of such systems. In contrast, the vulnerability of existing systems to targeted adversarial attacks on their fairness is a crucial area that remains significantly under-explored. Targeted adversarial attacks on fairness are a class of poisoning attacks that introduce adversarially crafted samples into a training dataset, leading to a system that exhibits worse fairness compared to one trained only on the clean samples. A common approach in prior work involves generating poisoned samples through loss optimization techniques [ 21 , 16 , 19 , 20 , 13 ] . However, these methods rely on the assumption that the base system is differentiable, which limits their applicability. While some existing approaches do not require a differentiable base system, they fall short in fully exploiting the poisoned dataset available to the adversary [ 19 , 20 ] . Fig. 1 : Our method consistently occupies a Pareto-dominant front, achieving higher disparity (EOD) and better trade-offs compared to other methods. In this work, we introduce a novel fair data poisoning attack that does not assume a differentiable base system and more effectively utilizes the poisoned dataset to degrade fairness while maintaining the overall system performance. Our method strategically injects adversary-controlled samples into the dataset, reducing the fairness of a data-driven system trained on it. The key idea of our method is to leverage a surrogate model to identify and poison data points that are most influential in skewing the decision boundary against the targeted protected group, while carefully preserving overall predictive accuracy. Furthermore, we dynamically adjust the proportion of poisoned samples based on the surrogate model’s intermediate outputs to maximize the fairness degradation effect. If fairness with respect to the attacked group is not actively monitored, this attack remains stealthy and may go unnoticed. To illustrate the practical effectiveness of our method, we benchmark our approach against existing methods across four base models. As visualized in Figure 1 , our empirical results highlights the weakness of prior work in that it does not work well across a wide variety of base models. Furthermore, we demonstrate that our method is significantly more effective in attacking fairness than prior work: achieving the maximum fairness disparity for multiple models on several datasets. The main contributions of this paper are: 1. Problem Formulation : We formally define the problem of a targeted fairness poisoning attack against a machine learning system, aiming to maximize disparity with respect to a protected group while maintaining acceptable overall performance, without requiring differentiability of the base model. 2. Theoretical Analysis : We provide a formal theoretical analysis of the vulnerability of naive Bayes classifiers to the key ideas of our fairness attack strategy. We prove that a poisoning strategy with certain properties is guaranteed to induce maximally unfair behavior, establishing a theoretical foundation for the existence and efficacy of such attacks. 3. Novel Attack Method : We propose a novel and effective fair data poisoning attack, Proportional Fairness Attack (PFA), which leverages a surrogate model and a dynamic proportional sampling strategy to strategically craft and inject poisoning samples, achieving significant fairness degradation with minimal impact on accuracy. 4. Extensive Evaluation : Through comprehensive experiments on multiple real-world datasets and a diverse set of base models, we demonstrate the superior performance and robustness of our approach compared to existing state-of-the-art methods, highlighting their limitations and providing valuable insights into the vulnerabilities of machine learning systems to fairness attacks. The rest of the paper is organized as follows: first, we review related work on data poisoning attacks and fairness in machine learning. Then, we detail our proposed fairness poisoning attack method. Following that, we present the experimental results and discussion of the results. Finally, we conclude the paper and outline directions for future work. II Related Work II-A Fair Machine Learning Much of the research in fair machine learning focus on defining measures of fair machine learning [ 10 , 6 ] and developing algorithms to create fair systems [ 18 ] . Such fairness algorithms can be broadly categorized into three stages: pre-processing, in-processing, and post-processing. Pre-processing techniques pre-processes the data before training the classifer. This is frequently done with reweighing, subsampling, or feature engineering [ 4 , 11 , 3 ] . In-processing techniques modify the training process itself, such as by adding fairness regularizers to the loss function [ 1 , 23 , 12 ] or designing fairness-aware model architectures [ 9 , 2 , 8 ] . Finally, post-processing techniques can be done after the training process by adjusting the outputs directly [ 4 , 14 , 17 ] . While extensive work has focused on developing fair machine learning methods, these interventions must be intentionally applied. In practice, many deployed models operate without any such modifications. This reality motivates our focus on base models when examining how data poisoning can systematically degrade fairness. Furthermore, studying these unmodified base models reveals worst-case scenarios that fairness methods aim to mitigate. This motivates our work, which explores the impact of data poisoning on fairness and proposes a novel attack that effectively reduces fairness while minimizing the effect on overall accuracy. II-B Fair Data Poisoning Fair data poisoning attacks aim to reduce the fairness of a machine learning model by injecting carefully crafted samples into the training dataset. A common approach involves generating these poisoned samples through loss optimization techniques [ 21 , 16 , 19 , 20 , 13 , 22 ] . However, these methods typically require the base model to be differentiable, restricting their application to a limited set of scenarios. Existing approaches that do not rely on differentiability often fail to fully leverage the adversary’s control over the poisoned dataset [ 19 , 20 , 22 ] . To address these limitations, we propose a novel fair data poisoning attack that operates without differentiability assumptions and effectively utilizes the poisoned dataset to degrade fairness while minimizing the impact on overall accuracy. III Problem Statement Symbol Description \mathcal{D} Original training dataset: (\mathbf{X},S,Y) \mathcal{D}_{e} Evaluation dataset \mathcal{D}_{p} Poisoned dataset generated by adversary \mathbf{X} Non-sensitive input features V_{j} Set of possible values for the j -th non-sensitive input feature S\in\{0,1\} Binary sensitive attribute Y\in\{0,1\} Binary outcome label S=1 Advantaged group: \mathbb{P}[Y=1|S=1]\geq\mathbb{P}[Y=1|S=0] N Number of poisoning iterations (candidate datasets generated) m_{\mathcal{D}\cup\mathcal{D}^{\prime}} Classifier trained on \mathcal{D}\cup\mathcal{D}^{\prime} \varepsilon\in[0,1] Poisoning budget (fraction of \mathcal{D} used for poisoning) \alpha,\beta\geq 0 Parameters controlling fairness-performance trade-off TABLE I : Main notation In this paper, we focus on attacking the group fairness properties of a classifier which predicts a binary outcome ( Y ) using a set of K non-sensitive features ( \mathbf{X}=(X_{1},\dots,X_{K}) ) and one binary sensitive attribute ( S ). In particular, we focus on the statistical parity difference (SPD) [ 10 ] and equalized odds difference (EOD) [ 6 ] measures of fairness. The training dataset is notated as \mathcal{D} : ( \mathbf{X} , S , Y ). Subsets of the dataset are indicated using subscripts to specify the selection criteria. The labels associated with each sample in a dataset \mathcal{D} is denoted as \mathcal{Y}(\mathcal{D}) . We define the advantaged group S=1 as the group that has a higher proportion of positive outcomes in the dataset \mathcal{D} ( \mathbb{P}[Y=1|S=1]\geq\mathbb{P}[Y=1|S=0] ). Table I summarizes the primary notation used throughout the paper. The adversary has access to the dataset \mathcal{D} with which to generate a poisoned dataset \mathcal{D}_{p} with \varepsilon|\mathcal{D}| samples where \varepsilon\in[0,1] controls the poisoning budget. The attacked classifier m , which takes ( \mathbf{X} , S ), as input, is then trained on \mathcal{D}\cup\mathcal{D}_{p} . The data poisoning attack aims to satisfy two dual goals: (1) to preserve overall classification performance so that if the fairness of the sensitive attribute group is not monitored, the attack will go undetected, and (2) to attack fairness, that is, increase the disparity in outcomes between the advantaged and disadvantaged groups. Algorithm 1 Proportional Fairness Attack Input : Train Dataset \mathcal{D} , Evaluation Dataset \mathcal{D}^{e} , Surrogate Model m , Trade-off Parameters \alpha,\beta , Poison Proportion \varepsilon , Number of Candidates N Output : Poisoned Dataset \mathcal{D}_{p} 1: \mathcal{D}^{c}\leftarrow[\emptyset,\dots,\emptyset] where the i -th item \mathcal{D}^{c}[i] of the list represents the candidate dataset generated in the i -th iteration. 2: \mathcal{B}\leftarrow[b_{0},\dots,b_{k}] s.t. b_{i}\geq 0 and \sum_{b\in\mathcal{B}}b=\varepsilon|\mathcal{D}| . 3: for n\in[1,\dots,N] do 4: for B\in\mathcal{B} do 5: \hat{Y}\leftarrow m_{\mathcal{D}\cup\mathcal{D}^{c}[n]}(\mathcal{D}^{e}) 6: Select a group for sampling with Equation 1 . 7: if CDM_{n,0}score_{NB}(\mathbf{x},s,1-s) . The adversary can achieve this by injecting poisoned samples, which we formalize in Theorem 1 . Theorem 1 (Inducing Maximally Unfair Behavior in Naive Bayes via Adversarial Score Biasing) . Suppose, for both sensitive attribute group s , a set of k_{s} poisoned samples are generated, each of the form (\mathbf{x}_{s},S=s,Y=s) , where the feature vector \mathbf{x}_{s}=(x_{s,1},\dots,x_{s,K}) is constructed so that, as the number of added samples approaches infinity, the feature distributions become uncorrelated with the label. That is, for each feature X_{i} and for y\in Y : \lim_{k\to\infty}\mathbb{P}[X_{i}=x_{i}\mid Y=y]=\mathbb{P}[X_{i}=x_{i}]. Let a new classifier \mathcal{M}_{p} be trained on \mathcal{D} augmented with these poisoned samples, such that the class priors are balanced: |\mathcal{D}_{Y=1}|+k_{1}=|\mathcal{D}_{Y=0}|+k_{0} . There exists a sufficiently large number of poisoned samples such that the classifier \mathcal{M}_{p} is guaranteed to exhibit maximally unfair behavior (e.g. \hat{Y}=s , as detailed by Lemma 1 ). Proof. If \mathcal{M}_{p} exhibits maximally unfair behavior for an input (\mathbf{x},s) , score_{NB}(\mathbf{x},s,1-s)1 , this poisoning strategy will converge to the maximally unfair behavior on the naive Bayes model. ∎ In Theorem 1 , we present a poisoning attack that, when given an unlimited budget, is guaranteed to force a naive Bayes classifier to exhibit maximally unfair behavior. The attack achieves this by carefully constructing the feature vector, increasing the correlation between the sensitive attribute and the label, and controlling the number of each type of sample added. This strategic addition of poisoned samples causes the posterior probabilities for the groups to diverge, while simultaneously neutralizing the influence of the class prior and feature likelihood terms. A critical component of this attack is the ability to construct feature vectors that asymptotically cause the likelihood ratio to converge to 1, \frac{\mathbb{P}[X_{i}=x_{i}\mid Y=s]}{\mathbb{P}[X_{i}=x_{i}\mid Y=1-s]}\to 1 ( Lemma 4 ). This objective can be achieved through uniform sampling each feature in the feature vector \mathbf{x}_{s} , which we formalize as follows: Theorem 2 (Feature-Label Independence Through Uniform Feature Assignment) . Let \mathcal{D} represent the clean dataset. An adversarial feature vector \mathbf{x}_{s}=(x_{s,1},\dots,x_{s,K}) is constructed such that for each feature X_{j} , the value x_{s,j} is drawn independently from a discrete uniform distribution over the set V_{j} . That is, for v\in V_{j} : \mathbb{P}[x_{s,j}=v]=\frac{1}{|V_{j}|}. As the number of these poisoned samples k in the poisoned dataset \mathcal{D}_{p} approaches infinity, the empirical distribution of feature X_{j} in the augmented dataset \mathcal{D}^{\prime}=\mathcal{D}\bigcup\mathcal{D}_{p} becomes independent of the label Y . That is, for feature value x_{j}\in V_{j} and any label y\in Y : \lim_{k\to\infty}\mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}\mid Y=y]=\mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}]. Proof. We prove this by showing that the empirical conditional probabilities on \mathcal{D}^{\prime} converge to the same value. Lemma 5 (Conditional Probability Converges to Uniform) . As the number of poisoned samples for label y , k_{y} , approaches infinity, the empirical conditional probability of feature X_{j} on the augmented dataset \mathcal{D}^{\prime} converges to a constant value for each possible feature value, reflecting a uniform distribution: \lim_{k_{y}\to\infty}\mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}\mid Y=y]=\frac{1}{|V_{j}|}. Proof. The empirical conditional probability is \mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}\mid Y=y]=\frac{|\mathcal{D}^{\prime}_{X_{j}=x_{j},Y=y}|}{|\mathcal{D}^{\prime}_{Y=y}|}. As k_{y} goes to infinity, approximately \frac{1}{|V_{j}|} of the k_{j} samples added will have X_{j}=x_{j} and Y=y . Thus, in the limit: \lim_{k_{y}\to\infty}\frac{|\mathcal{D}^{\prime}_{X_{j}=x_{j},Y=y}|+k_{j}\frac{1}{|V_{j}|}}{|\mathcal{D}^{\prime}_{Y=y}|+k_{j}}=\frac{1}{|V_{j}|}. ∎ The empirical marginal probability is \mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}]=\sum_{y\in Y}\mathbb{P}_{\mathcal{D}^{\prime}}[Y=y]\mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}\mid Y=y]. Using Lemma 5 and the law of total probability, we show this probability converges to \frac{1}{|V_{j}|} as the number of poisoned samples k approaches infinity: \displaystyle\lim_{k\to\infty}\sum_{y\in Y}\mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}\mid Y=y]\mathbb{P}_{\mathcal{D}^{\prime}}[Y=y] \displaystyle=\sum_{y\in Y}\left(\lim_{k\to\infty}\mathbb{P}_{\mathcal{D}^{\prime}}[X_{j}=x_{j}\mid Y=y]\lim_{k\to\infty}\mathbb{P}_{\mathcal{D}^{\prime}}[Y=y]\right) \displaystyle=\frac{1}{|V_{j}|}\sum_{y\in Y}\lim_{k\to\infty}\mathbb{P}_{\mathcal{D}^{\prime}}[Y=y] \displaystyle=\frac{1}{|V_{j}|}. Thus, we have shown the marginal probability and conditional probabilities are the same at the limit. ∎ While Theorem 2 provides a theoretical guarantee for the feature-label independence in the asymptotic limit, correlation between the features and the label may be more efficiently reduced via the following iterative strategy: 1. Train a model on the poisoned dataset generated so far. 2. Use the model’s predictions on the training data to identify the most important adversarial samples and add them to the poisoned dataset. 3. Retrain the model on the augmented dataset. 4. Repeat until the poisoning budget is exhausted. The key idea of this strategy is to select feature vectors from the subset of the training data where the behavior is contrary to our objective ( Lemma 1 ), \mathcal{D}_{S=s,\hat{Y}=1-s} , the set of samples from the protected group s where the predicted outcome does not match the group. By injecting the samples into the training data with the label Y=s , the empirical probability \mathbb{P}[X_{i}=x_{i}\mid Y=1-s] remains unchanged while \mathbb{P}[X_{i}=x_{i}\mid Y=s] increases. This strategy relies on the assumption that the majority of the samples in \mathcal{D}_{S=s,\hat{Y}=1-s} is due to the feature vector \mathbf{x} being is more correlated to Y=1-s than Y=s . For these samples, this implies that the conditional probabilities are, on average, biased toward the undesired label: \mathbb{P}[X_{i}=x_{i}\mid Y=s]<\mathbb{P}[X_{i}=x_{i}\mid Y=1-s] . Adding those samples into the training data with the label Y=s results in the probabilities become closer, reducing the correlation. Furthermore, this new strategy directly nudges the model towards the desired unfair behavior. By adding poisoned samples that target samples that have outcomes contrary to our desired behavior, we increase score_{NB}(\mathbf{x},s,s) while reduce score_{NB}(\mathbf{x},s,1-s) ( Lemma 6 ). Lemma 6 (Impact of Sample Injection on Naive Bayes Scores) . Adding a sample (\mathbf{x},s,y) results in an increase in score_{NB}(\mathbf{x},s,y) and a reduction in score_{NB}(\mathbf{x},s,1-y) . Proof. To prove this, we show that adding (\mathbf{x},s,y) increases the value of each term score_{NB}(\mathbf{x},s,y) while it reduces or does not effect each term in score_{NB}(\mathbf{x},s,1-y) . Let the original dataset be \mathcal{D} and the new dataset be \mathcal{D}^{\prime}=\mathcal{D}\bigcup\{(\mathbf{x},S=s,Y=s)\} . The probabilities associated with each dataset will have \mathcal{D} or \mathcal{D}^{\prime} subscripts respectively. • Change to score_{NB}(\mathbf{x},s,y) : The empirical prior \mathbb{P}_{\mathcal{D}^{\prime}}[Y=y] increases as the new sample has Y=y . Similarly, the empirical conditional \mathbb{P}_{\mathcal{D}^{\prime}}[S=s\mid Y=y] also goes up since the new sample has S=s and Y=y . The empirical likelihoods \mathbb{P}_{\mathcal{D}^{\prime}}[X_{i}=x_{i}\mid Y=y] for each feature x_{i} in \mathbf{x} also increase due to the new sample. These changes collectively increase the value of \text{score}_{NB}(\mathbf{x},s,y) . • Change to score_{NB}(\mathbf{x},s,1-y) : The empirical prior \mathbb{P}_{\mathcal{D}^{\prime}}[Y=1-y] decreases as the total number of samples in the denominator increases, while the count of samples where Y=1-y remains the same. All other terms in the score are conditional on Y=1=y . Since no samples are added where Y=1-y , these terms are unaffected. These changes collectively decrease the value of \text{score}_{NB}(\mathbf{x},s,1-y) . ∎ This strategy of utilizing the prediction of a surrogate model is more effective than the uniform, blind injection strategy. Since the samples are drawn from the true data distribution, they represent the types of inputs the model is likely to encounter in the real world. Furthermore, by prioritizing the reduction of the correlation of realistic samples, this strategy is able to achieve a strong attack with relatively few samples in practice compared to the strategy outlined in Theorem 2 . Using the intuition provided in Theorem 1 , we present a general strategy to generate poisoned samples. Given a sensitive attribute group s\in S we want to add to, we set the sensitive attribute group S and label Y to be s (Lines 17 - 19 ) and generate the input feature vector \mathbf{x}_{s}=(x_{s,1},\dots,x_{s,K}) by selecting \mathbf{x} from \mathcal{D}_{S=s,\hat{Y}=1-s} (Lines 5 - 11 ). If \mathcal{D}_{S=s,\hat{Y}=1-s}=\emptyset , then \mathbf{x}_{s} is generated by uniformly selecting a value from |V_{j}| for feature x_{s,j} (Lines 12 - 16 ). Theorem 2 shows this results in poisoned samples of the form (\mathbf{x}_{s},S=s,Y=s) , where the feature vector \mathbf{x}_{s}=(x_{s,1},\dots,x_{s,K}) is constructed so that, as the number of added samples approaches infinity, the feature distributions become uncorrelated with the label. IV-C Batch Group Selection So far, we have outlined how to generate poisoned samples given a sensitive attribute group. In this section, we outline how to select the poisoned samples’ sensitive attribute group, motivated by an analysis of how adding specific samples affects SPD disparity in a naive Bayes classifier, under the simplifying assumption that non-sensitive features are independent of the label. German Drug COMPAS Metric Method GNB LR DT KNN GNB LR DT KNN GNB LR DT KNN \Delta Acc RAA-P -0.030 0.025 -0.015 -0.005 -0.031 -0.057 -0.057 -0.070 -0.015 -0.003 -0.013 -0.053 NRAA-P -0.105 0.010 -0.070 -0.020 -0.075 -0.088 -0.135 -0.078 -0.032 -0.028 -0.019 -0.053 RAA-F -0.065 -0.065 -0.100 -0.015 -0.112 -0.145 -0.132 -0.070 -0.065 -0.134 -0.017 -0.055 NRAA-F -0.105 0.010 -0.070 -0.020 -0.075 -0.088 -0.135 -0.078 -0.032 -0.028 -0.019 -0.053 Ours -0.410 -0.235 -0.215 -0.185 -0.405 -0.244 -0.205 -0.249 -0.419 -0.281 -0.306 -0.044 \Delta SPD RAA-P -0.023 -0.013 -0.142 -0.108 0.146 0.184 -0.106 0.025 -0.032 0.155 -0.072 0.017 NRAA-P -0.023 0.030 -0.055 -0.127 0.285 0.218 -0.041 0.030 -0.088 0.195 -0.065 0.016 RAA-F 0.046 0.372 -0.041 -0.083 0.340 0.385 0.027 0.035 0.259 0.608 -0.057 0.044 NRAA-F -0.023 0.030 -0.055 -0.127 0.285 0.218 -0.041 0.030 -0.088 0.195 -0.065 0.016 Ours 0.273 0.782 0.637 0.152 0.776 0.787 0.575 0.672 0.776 0.768 0.775 0.114 \Delta EOD RAA-P 0.154 -0.018 -0.058 -0.116 0.200 0.251 -0.003 0.073 0.132 0.336 -0.050 0.034 NRAA-P -0.047 0.050 0.174 -0.144 0.327 0.270 0.007 0.064 0.046 0.367 -0.043 0.034 RAA-F 0.306 0.370 0.214 -0.010 0.419 0.439 0.113 0.082 0.373 0.665 -0.036 0.053 NRAA-F -0.047 0.050 0.174 -0.144 0.327 0.270 0.007 0.064 0.046 0.367 -0.043 0.034 Ours 0.453 0.828 0.765 0.324 0.825 0.834 0.729 0.749 0.775 0.770 0.775 0.159 TABLE II : Performance comparison of attack methods when adding |\mathcal{D}| poisoned samples to the dataset. The highest value is in bold and the second-highest is underlined . Values are marked in gray and ignored if both SPD and EOD are reduced. Lemma 7 (Simplified Prediction Probability under Feature Independence) . Given a naive Bayes classifier where all non-sensitive features are independent of the label, that is, \mathbb{P}[X_{i}=x_{i}|Y=y]=\mathbb{P}[X_{i}=x_{i}]~\forall x_{i}\in V_{i},~y\in\{0,1\} , the probability of predicting the positive class ( \hat{Y}=1 ) for a sample with a given sensitive attribute value S=s is \mathbb{P}(\hat{Y}=1\mid S=s)=\mathbb{I}\left[score^{\prime}_{NB}(s,1)>score^{\prime}_{NB}(s,0)\right] where \mathbb{I}[\cdot] is the indicator function. Proof. For a given sensitive attribute value s , this condition is either true for all samples or false for all samples, as the simplified scores are constant with respect to the non-sensitive features. Therefore, the probability of predicting \hat{Y}=1 for a sample with attribute S=s is simply the proportion of samples in the dataset with that attribute for which the classifier predicts \hat{Y}=1 : \mathbb{P}(\hat{Y}=1\mid S=s)=\frac{|\mathcal{D}_{\hat{Y}=1,S=s}|}{|\mathcal{D}_{S=s}|} Since the decision is the same for all samples with S=s , this simplifies to: \frac{\sum_{\mathbf{x}\in\mathcal{D}_{S=s}}\mathbb{I}[score^{\prime}_{NB}(s,1)>score^{\prime}_{NB}(s,0)]}{|\mathcal{D}_{S=s}|} The indicator function’s value is constant for all samples where S=s , so we can take it outside the summation: \frac{|\mathcal{D}_{S=s}|\cdot\mathbb{I}[score^{\prime}_{NB}(s,1)>score^{\prime}_{NB}(s,0)]}{|\mathcal{D}_{S=s}|} Which simplifies to: \mathbb{I}[score^{\prime}_{NB}(s,1)>score^{\prime}_{NB}(s,0)]. ∎ SPD is defined as follows: \left|\mathbb{P}(\hat{Y}=1\mid S=1)-\mathbb{P}(\hat{Y}=1\mid S=0)\right|. Lemma 7 shows that in our simplified scenario, \mathbb{P}(\hat{Y}=1\mid S=1) can only take on binary values, posing a challenge for analysis. To overcome this, we approximate this with a continuous score: the margin of preference. We define the margin of preference for the positive class for group s as the difference between the simplified scores: \displaystyle M_{s} \displaystyle=score^{\prime}_{NB}(s,1)-score^{\prime}_{NB}(s,0) \displaystyle=\mathbb{P}[Y=1]\mathbb{P}[S=s\mid Y=1]-\mathbb{P}[Y=0]\mathbb{P}[S=s\mid Y=0]. A change in SPD occurs only when the sign of a margin flips (i.e., when M_{s} crosses zero). Since we are interested in the sensitivity of the classifier’s decisions, we propose a continuous alternative to the SPD, which we will call the Continuous Disparity Margin (CDM), defined as the difference between the margins of the two sensitive groups: CDM=|M_{1}-M_{0}|. (1) Let CDM_{n,s} represent the CDM after adding n samples with S=s and Y=s . Our strategy for selecting the sensitive attribute group to add n poisoned samples is to first calculate CDM_{n,1} and CDM_{n,0} , then add the samples to the group corresponding with the higher value. IV-D Dataset Selection The final poisoned dataset adopted is the one that that achieves the best score on a separate hold-out test set (Line 23 ). The candidate dataset’s score is determined by considering its impact on both performance and fairness. \mathcal{F}_{perf} denotes the set of functions to evaluate performance metrics on the model output. \mathcal{F}_{fair} is the set of functions to evaluate fairness metrics. Each function maps model predictions \hat{Y} and true labels Y to a value in the range [0,1] , where higher values favor the attacker (better model performance or greater fairness disparity between groups). We define the aggregated output of each set as the mean of its constituent functions, denoted \overline{\mathcal{F}_{perf}} and \overline{\mathcal{F}_{fair}} respectively. The goal of the candidate dataset score is to assign a higher value to a candidate dataset that balances the trade-off between the performance and fairness of the model. However, in practice, the trade-off is not static. The relative importance of performance and fairness may change depending on the scenario: 1. If the utility of the compromised model is worse than that of the clean model, ( m_{clean} ), the victim may not deployed the model. The attacker may want to avoid this situation by trading off attack effectiveness for performance. 2. Meanwhile, if the performance is equivalent or better than the performance of the clean model, the above concern is alleviated and the attacker may want to focus on the effectiveness of the attack. (a) Gaussian Naive Bayes (b) Logistic Regression (c) Decision Tree (d) K-Nearest Neighbor Fig. 2 : Our method consistently achieves the most significant degradation fairness compared to other attack methods against the base models over a varying number of poisoned samples. Let the percentage change of a metric be notated as f_{\Delta\mathcal{F}}(\hat{Y},Y):=\frac{\overline{\mathcal{F}}(\hat{Y},Y)-\overline{\mathcal{F}}(m_{clean}(\mathcal{D}),Y)}{\overline{\mathcal{F}}(m_{clean}(\mathcal{D}),Y)} The candidate dataset score is defined as follows: \displaystyle f(\hat{Y},Y)= \displaystyle~f_{\Delta\mathcal{F}_{fair}}(\hat{Y},Y)+\alpha f_{\Delta\mathcal{F}_{perf}}(\hat{Y},Y)~+ \displaystyle\beta\cdot\mathbb{I}\left[f_{\Delta\mathcal{F}_{perf}}(\hat{Y},Y)<0\right]\cdot f_{\Delta\mathcal{F}_{perf}}(\hat{Y},Y) (2) where \alpha\geq 0 controls the fairness-performance trade-off and \beta\geq 0 controls the additional weight applied when performance is negatively impacted by the attack (as indicated by the condition \mathbb{I}[f_{\Delta\mathcal{F}_{perf}}(\hat{Y},Y)<0] ). This scoring function f aligns with our goals. When the performance is equivalent or better than the performance of the clean model, the fairness-performance trade-off is controlled by \alpha . However, when the performance is worse than the clean model’s (case 2), the score f is f_{\Delta\mathcal{F}_{fair}}(\hat{Y},Y)+(\alpha+\beta)f_{\Delta\mathcal{F}_{perf}}(\hat{Y},Y) . Since \alpha,\beta\geq 0 , the performance term may be upweighed, reducing the relative influence of the fairness term. V Experiment German Drug COMPAS # Features 58 13 8 # Samples Overall 800 1500 5771 S=1 255 753 1095 S=0 545 747 4676 % Y=1 Overall 29.87% 55.07% 55.05% S=1 36.47% 63.88% 65.48% S=0 26.79% 46.19% 52.61% TABLE III : Dataset statistics V-A Datasets We use three widely used datasets in the field of algorithm fairness: the German credit dataset [ 7 ] , the drug use prediction dataset [ 5 ] , and the COMPAS recividism dataset [ 15 ] . We evaluate each method using gender as the sensitive attribute. Each dataset is normalized and divided into an 80-20 train-test split. The German dataset is the smallest, followed by the drug dataset, and the COMPAS dataset is the largest. Table III is a table of the statistics associated with each dataset used in the evaluations. V-B Metrics The performance metric we evaluate is accuracy. For the fairness metric, we evaluate using two measures of group fairness: statistical parity difference (SPD) [ 10 ] and equalized odds difference (EOD) [ 6 ] . SPD measures the difference in favorable outcomes between the advantaged and disadvantaged groups. \text{SPD}=\left|\mathbb{P}(\hat{Y}=1\mid S=1)-\mathbb{P}(\hat{Y}=1\mid S=0)\right|, whereas EOD measures the maximum difference in the true and false positive rates between the advantaged and disadvantaged groups \displaystyle\text{EOD}= \displaystyle\max_{y\in\{0,1\}}\Big|\mathbb{P}(\hat{Y}=1\mid Y=y,S=1) \displaystyle-\mathbb{P}(\hat{Y}=1\mid Y=y,S=0)\Big|. Fig. 3 : Our method consistently offers the best balance, achieving notably higher fairness degradation when comparing the trade-off between the fairness attack methods for each dataset and base model across all epsilon. V-C Methods We compare against two methods. The first method is the Random Anchoring Attack (RAA) [ 19 ] . A positive and negative sample is selected uniformly at random from the disadvantaged and advantaged group and the label flipped. Then, this sample is projected to the feasible set. The samples are duplicated so that the overall proportions of positive and negative samples are unchanged. The second method is the Non-Random Anchoring Attack (NRAA) [ 19 ] which differs from RAA in that instead of selecting samples uniformly at random, the selected samples are the ones with the largest number of nearby samples with the same sensitive attribute group and label. To show the range of trade-offs achieved by each fairness attack method, we employ both a performance-based selection method and a fairness-based selection method as proposed in prior work to select the evaluation dataset [ 19 , 16 , 20 ] . The performance-based selection method scores each dataset on the accuracy on an evaluation dataset. The fairness-based selection method assigns a score to each candidate datasets that is the sum of the SPD and EOD. Both selection methods then select the candidate dataset that has the highest score. To denote the selection method used, we append a suffix to the fairness attack’s name: “+P” if the performance-based selection method is used, and “+F” if the fairness-based selection selection method is used. V-D Results We compare the performance of our method against the existing methods over four machine learning classification models: Gaussian naive Bayes (GNB), logistic regression (LR), decision tree (DT), and K-nearest neighbors (KNN). We vary the proportions of adversary-injected samples (as controlled by \varepsilon ) and apply each method to generate 100 candidate datasets. The final dataset with is selected with the specified selection criteria (the performance-based, fairness-based, or our trade-off-based selection criteria). For our dataset selection score function, we set the trade-off parameters \alpha and \beta of the dataset selection score function to be 0.5 to consider both performance and fairness. The effects of varying these hyperparameter are explored in the ablation. Table II shows the trade-off of each method over all combinations of datasets and models examined (visually summarized in Figure 1 ). This table compares the change in accuracy and fairness (SPD and EOD) to the performance of the clean model for \varepsilon=1 . Notably, while our method generally has the largest reduction in accuracy than the other methods, our method is able to increase (SPD, EOD) significantly more than the existing methods with the same poisoning budget. In fact, when \varepsilon=1 , our method is the only one that reaches maximum EOD value of 1 for four of the twelve settings (33%) while the other methods never achieve maximum EOD. We find that, compared to the other fairness attack methods, our method empirically achieves greater reduction in both fairness metrics. We investigate the relationship between the number of poisoned samples as controlled by \varepsilon and the evaluation metrics for each base model: Gaussian naive Bayes ( Figure 2(a) ), logistic regression ( Figure 2(b) ), decision tree ( Figure 2(c) ), and K-nearest neighbors ( Figure 2(d) ). At most values of \varepsilon , our method is generally able to achieve a significantly stronger effect on the fairness measures compared to the other fairness attack methods. For the logistic regression and Gaussian naive Bayes models, PFA is generally competitive to RAA-F with greater unfairness at the expense of a higher rate of error. For the decision tree and K-nearest neighbor models, PFA is able to effectively reduce the fairness measures while the other attacks generally has negligible to positive effect on those measures. Figure 3 illustrates the trade-off between accuracy and fairness (EOD) for each dataset. Across the model architectures and the datasets, PFA consistently demonstrate a trend of maintaining comparable trade-offs to the other fairness attack strategies while achieving significantly higher EOD values. For many of the settings, PFA generally maintains a comparable accuracy range while achieving significantly higher EOD values, thus demonstrating a clear and substantial advantage. Fig. 4 : Comparison of PFA using \hat{Y} versus Y against a Gaussian naive Bayes model over a varying number of poisoned samples. Using \hat{Y} generally results in a stronger attack. Fig. 5 : Comparison of candidate dataset selection methods against a Gaussian naive Bayes model over a varying number of poisoned samples. Our selection method allows users to select a dataset with their desired trade-offs. V-E Ablation PFA has three main components: (1) sampling from a subset controlled by \hat{Y} , (2) using the subset sampling heuristic rather than the uniform sample generation strategy, and (3) varying the proportion sampled from each subset based on the intermediary results of a surrogate model. We first investigate the first aspect: the use of \hat{Y} versus Y . Results using the Gaussian naive Bayes model is shown in Figure 4 (results for all models in Appendix A ). Using \hat{Y} generally results in higher error and unfairness, resulting in a stronger attack with a good trade-off. On the German and Drug datasets, errors are similar while on the COMPAS dataset, error is significantly higher, but so is the SPD and EOD values. For small values of \varepsilon , the performance of PFA using \hat{Y} and Y are similar, but as \varepsilon grows, so does the advantage of using \hat{Y} as both SPD and EOD is higher with that variation. For poisoned sample generation, we compare PFAś method of using a heuristic of selecting real samples and setting the label to match the sensitive attribute group value versus generating feasible samples (as presented in Theorem 2 ). Results using the Gaussian naive Bayes model is shown in Figure 6 (results for all models in Appendix A ). Generally, the trends are similar between the two variants. The heuristic-based generation strategy generally has similar or higher error than the feasible generation strategy but much higher unfairness (EOD and SPD values), resulting in better tradeoffs. Fig. 6 : Comparison of PFA generating poisoned samples with subset sampling versus feasible sample generation against a Gaussian naive Bayes model over a varying number of poisoned samples. Using real samples for the poisoned samples generally results in a stronger attack. The final aspect of PFA is the dataset selection strategy, where we introduce a new candidate dataset scoring method Section IV-D to control the trade-off between performance and fairness. We compare the impact of the dataset selection criteria on the evaluation metrics for a Gaussian naive Bayes model for each dataset in Figure 5 . The figures for the remaining base models can be found in Appendix A . We compare the effect of our selection method with the selection methods introduced in prior work: the performance selection method [ 19 ] and the fairness selection method [ 20 ] . When the parameters ( \alpha,~\beta ) are small (0.1), the fairness values of the model selected by our selection method exactly matches those selected by the fairness selection method while larger values of \alpha and \beta results in the metrics of the selected samples getting closer to those of the performance selection method. The comparison on the COMPAS dataset shows an advantage of the combined method over just performance or fairness. Since there are candidate models with the same high fairness values but varying error rates, the combined method with ( \alpha,~\beta=0.1 ) is able to select the candidate with a high fairness value matching the candidate selected with the fairness selection method while having a low error rate that matches the candidate selected by the performance selection method. These results show that our selection strategy provides a controllable mechanism for users to tune their preference for the trade-off between the extent of performance degradation and the strength of the fairness attack. This tunability allows for a more nuanced and user-driven approach to generating poisoned datasets. VI Conclusion Our work highlights a novel and stealthy method that can degrade equitable outcomes while maintaining overall performance for any classifier, highlighting the vulnerability of fairness in real-world deployment. The key idea is to iteratively generate poisoned datasets using a surrogate model to guide targeted sample additions based on a principled decision rule maximizing disparity in group-conditional probabilities. Through extensive benchmarking on four base models, we demonstrate that our method is significantly more effective at attacking fairness compared to existing approaches. These findings underscore the importance of actively monitoring fairness metrics and motivate future research to develop robust defenses against such attacks to ensure that machine learning models remain fair and trustworthy in practice. Future work can explore robustness against a variety of different settings such as against fairness-enhanced models, a surrogate model mismatch, different modalities, and extend theoretical analysis to other model families. Appendix A Results Across All Models Figure 7 shows the impact of each of the three dataset selection criteria applied to our method on the evaluation metrics for each of the base models. (a) Gaussian Naive Bayes (b) Logistic Regression (c) Decision Tree (d) K-Nearest Neighbors Fig. 7 : Comparison of the dataset selection strategies against the base models over a varying number of poisoned samples. Figure 8 shows the impact of using \hat{Y} versus Y in PFA across each of the three dataset selection criteria applied to our method for each of the base models. (a) Gaussian Naive Bayes (b) Logistic Regression (c) Decision Tree (d) K-Nearest Neighbors Fig. 8 : Comparing our approach using \hat{Y} versus Y shows that the use of a surrogate model is essential for achieving a strong adversarial effect. (a) Gaussian Naive Bayes (b) Logistic Regression (c) Decision Tree (d) K-Nearest Neighbors Fig. 9 : Comparing our approach using our heuristic sample-based poisoned sample generation method versus feasible poisoned sample generation method shows that the use of generating poisoned samples with sampling is much more efficient.