RobinVogel / Learning-Fair-Scoring-Functions

Contains the code associated to the ArXiV paper: Learning Fair Scoring Functions: Fairness Definitions, Algorithms and Generalization Bounds for Bipartite Ranking
2 stars 1 forks source link

Inconsistent cost and auc? #1

Open zhenhuan-yang opened 2 years ago

zhenhuan-yang commented 2 years ago

First of all, it is a great work! I read through the code and have one question.

In models, it seems that you guide the optimizer to solve a min problem optim_step = optim_step.minimize(self.rel_cost) but you define the cost as auc itself.

self.rel_cost = (self.rel_auc + self.reg*self.l2_weights) self.cost = self.auc

Can you explain why this will work? Maybe I miss something.

RobinVogel commented 2 years ago

Hello Zhenhuan,

My notation may be misleading, but I refer here by cost to the empirical cost denoted by $\hat{L}_\lambda$ in the paper. I refer by rel_cost to the relaxed cost defined as `\tilde{L}_\lambda$ in Appendix E of the paper.

Note that I am optimizing the relaxed cost rel_cost, which is a differentiable function and thus can be optimized. Therefore I am not trying to optimize the non-differentiable empirical AUC in my code.