dashaasienga / Statistics-Senior-Honors-Thesis

0 stars 0 forks source link

Week 7 Summary and Questions -- Fairness Conflicts & Fair Regression #13

Closed dashaasienga closed 2 months ago

dashaasienga commented 8 months ago

@katcorr

This week, as I wait for us to get set up with the cluster so that I can continue with my experimentation with the Seldonian algorithm, I decided to go back to the literature to:

  1. Learn about how the fairness definitions fit in/ can be applied to a linear regression framework.
  2. Continue to understand the fairness definitions and conflicts in a classification framework, which is where I hope to eventually be able to focus on with time.

I read a lot, which has started to give me a clear idea of the direction I hope to head in.

Classification Conflicts

In thinking about the COMPAS algorithm, which is the data set I hope to use, one study found that it was fair because it had the same classification accuracy/ error rate across both White and Black defendants. Another study, however, found that it was unfair because the prediction failed differently for Black defendants. That is, Black defendants were twice as likely to be labelled as high risk but not reoffend than White defendants. The converse is true: White defendants were much more likely to be labeled as low risk and go on to commit other crimes.

Another study investigated this phenomenon to better understand why the 2 different fairness definitions failed to agree. The primary contribution of this paper was to show that disparate impact can result from the use of a recidivism prediction instrument that is known to be free from predictive bias. Balancing error rates overall may not be sufficient (does not produce models that are free from predictive bias as it does not guarantee balance at finer levels of granularity). One needs to decide the level of granularity at which error rate balance is desirable to achieve.

A direct implication of their research showed that when the recidivism prevalence differs between 2 groups, a test fair score Sc cannot have equal false positive and negative rates across those groups. Indeed, the recidivism rate is 51% among black defendants, but 39% for white defendants.

Regression Conflicts

Similar to the classification example above, the same phenomenon is observed when dealing with real-valued targets in a regression setting.

Phil Thomas found that standard ML algorithms over-predicted male GPAs by 0.15 and under-predicted female GPAs by 0.15 on average – even though the “error rates” are the same, the fact that they are in different directions is concerning. However, because male and female applicants had different average GPAs in the real world, they couldn’t satisfy these 2 definitions simultaneously:

This is violated if, on average, we will predict a higher or lower GPA based on your gender.

This is with regard to bias (error rate). This is violated if, on average, we overpredict for one gender and under-predict for another gender or if we over-predict/ under-predict more or less for one gender.

We can evaluate both of these applications with the Seldonian algorithm! (starting with the GPA example).

Fair Regression

Other than the 2 definitions I've listed above, there is not a lot of literature out there on fairness in a regression setting. Most of the work is done in a binary classification setting, so it was hard for me to find very concrete definitions of fair regression metrics. I found a couple of papers that went in-depth on the topic. One discussed is equal means/ balanced residuals, which refers to having an equal amount of error or the same expected prediction.

Another method discussed is attaching a fairness regularizer to the loss function. Instead of minimizing MSE, we can minimize the associated regularized loss function = MSE + some fairness regularizer. Can vary \lambda to determine the extent of fairness regularization. It made me think of LASSO and Ridge, which we've covered in Stat 495. This lends itself to a nice study of accuracy/ fairness tradeoffs as we vary the extent to which we enforce the fairness requirement and observe how accuracy is changing.

Statistical parity has been defined in a regression setting as follows:

Screen Shot 2023-10-23 at 16 44 45

Finally, bounded loss seems similar to the MSE constraints we set in the QSA tutorial, but now, partitioned by group:

Screen Shot 2023-10-23 at 16 45 44

Everything else was too technical to understand :(, but here are some example data sets:

Questions

One of the papers related the PPV (positive predicted value), which is the probability of a positive value P(Y=1|Sc=HR, R=r), with FNR (P(Sc=LR|Y=1)) and FPR(P(Sc=HR|Y=0)) as follows to show that test fairness is in direct conflict with FPR and FNR. However, I'm having trouble understanding it:

Screen Shot 2023-10-23 at 16 26 21

There are a few other equations in the paper that were quite confusing.

Supplementary

I read a lot on fairness definitions within the classification setting just to continue to cement my understanding more. I'll save the details on that since this is already getting long, but just as a quick summary, I thought this screenshot is a good way to summarize some of the fairness definition conflicts:

Screen Shot 2023-10-23 at 16 34 31

With that in mind, I'm thinking that we could generate synthetic data that mimics different scenarios and then test those scenarios by imposing different fairness definitions (using the Seldonian algorithm) and then examining metrics such as accuracy and bias (over many trials). This will highlight the conflicts under certain conditions but also which fairness definitions make the most sense in each scenario (since we cannot satisfy all because of the inherent conflicts). Finally, check which conditions the COMPAS data set satisfies and fit a model with the appropriate fairness constraints! This would be the direction of simulation I have at the moment and is more of a long-term plan as I continue to organize and formulate my thoughts. I'd love to hear your thoughts :)

katcorr commented 8 months ago

@dashaasienga

For some reason, none of the screenshots are coming through (they just say "screenshot" and then have a link, but the link doesn't go anywhere for me). Regarding the question about PPV, though, that we briefly discussed on Tuesday . . . I think this relates back to a concept (very briefly) explored in Stat135 when using Bayes Rule. For example, here are two of the textbook examples I've used in my class, which demonstrates how the PPV (e.g., P(D+|T+)) is going to be highly dependent on the prevalence of the outcome (e.g., P(D+)), given the same sensitivity (P(T+|D+)) and specificity (P(T-|D-)). These are both in the context of disease, but we can see how these could be any binary classifications.

bayes_135example

bayes_135example2

For example, given a prevalence $p$, sensitivity $s_e$, and specificity $s_p$, we can derive $PPV = \frac{s_e p}{s_e p + (1-s_p)(1-p)}$. If $p$ is different between two groups, then we can see how PPV will also be different (assuming equal $s_e$ and $s_p$), e.g.: image

Happy to talk more about it next Tuesday!

katcorr commented 8 months ago

Similar for negative predictive value, P(D-|T-): $NPV = \frac{s_p (1-p)}{(1-s_e) p + s_p (1-p)} $

image

katcorr commented 8 months ago

So, to derive their equation in these terms . . . (apologies for the poor picture! Happy to walk through together...): IMG-0060

katcorr commented 8 months ago

For example, assuming same PPV and sensitivity $s_e$, we can see how the FPR varies as a function of prevalence. If one group has a higher prevalence, then the false positive rate (FPR) will be higher, even if the sensitivity and PPV are the same.

image

dashaasienga commented 8 months ago

@katcorr

I'm looking through this at the moment, so I will definitely have questions soon. Thank you so much for the elaborate explanation!

Regarding the screenshots, is that still a problem for you? They show up just fine for me. What about the other issues? Let me know if you still can't see them so we can look into why that might be the case :)