Post-processing for Individual Fairness

Abstract: Post-processing in algorithmic fairness is a versatile approach for correcting bias in ML systems that are already used in production. The main appeal of post-processing is that it avoids expensive retraining. In this work, we propose general post-processing algorithms for individual fairness (IF). We consider a setting where the learner only has access to the predictions of the original model and a similarity graph between individuals, guiding the desired fairness constraints. We cast the IF post-processing problem as a graph smoothing problem corresponding to graph Laplacian regularization that preserves the desired "treat similar individuals similarly" interpretation. Our theoretical results demonstrate the connection of the new objective function to a local relaxation of the original individual fairness. Empirically, our post-processing algorithms correct individual biases in large-scale NLP models such as BERT, while preserving accuracy.


Reviews and author responses:

In this paper, the authors consider the problem of enforcing individual fairness via post-processing. In particular, the authors characterize the post-processing of individual fairness into a graph smoothing problem and propose a novel individual fairness notion (Definition 4.1 Local Individual Fairness), as well ways to achieve it (graph Laplacian regularizers, GLIF and GLIF-NRW). Theoretical and empirical studies are also presented.  The post-processing way of achieving individual fairness is an interesting topic. Overall, the paper is relatively well-written and the assumptions, as well as results, are clearly presented. It would be better if the authors can further clarify the following points:

1. What is the exact difference between "global" and "local" individual fairness constraints?

  I understand the fact that Dwork et al. (2011) is enforcing the Lipschitz condition with one single parameter $L$ (which I would assume is the "global" sense of IF). As mentioned in the paper, this way of projecting the prediction is sub-optimal. If I understand correctly, the proposed GLIF regularizer (as in Equation 3.1) is in essence a weighted sum of the pairwise difference between new outputs. Some additional intuitions/insights into the advantage of the proposed method would be really helpful. What exactly is the localness the paper is mentioning? Why local IF is better than global IF in terms of the two drawbacks of Dwork et al. (2011)?

2. Notation in Definition 4.1

  The notation is quite confusing. Based on the intuition of the definition, $y$ here is not target, but another instance in $\mathcal{X}$ (if I understand correctly). Please kindly comment on this to avoid misunderstanding.

---
### Post-rebuttal

In the rebuttal, the authors resolved my concern. In light of this, I update my evaluation from 5 to 6. The applicability of local IF (which can be viewed as a relaxation of IF) really depends on the problem setting, which, just like mentioned in the paper, should always be considered by the practitioners.

Minor typo: line 210, Figure 2 --> Figure 1.

The paper proposes to relax the notion of individual fairness to a notion of "local" individual fairness, in which similar outcomes are enforced for pairs of instances whose similarity exceeds a given threshold. The authors propose to achieve this using graph Laplacian regularization and provide several extensions of this method, such as to the multiclass setting.  The experiments provide good support to the proposed method compared to the traditional notion of individual fairness.  The paper proposes to relax the notion of individual fairness to a notion of "local" individual fairness, in which similar outcomes are enforced for pairs of instances whose similarity exceeds a given threshold. Note that by contrast, individual fairness by itself is often defined using Lipschitz continuity over the entire domain of instances. Because of this thresholding rule, the authors encode similarity as a graph over instances and propose to achieve individual fairness by forcing the predictions to be smooth within the graph (i.e. nearby nodes receive similar predictions). This is achieved using graph Laplacian regularization. The authors motivate the choice of the regularization in two ways: (1) by computing it exactly for the unnormalized Laplacian matrix and showing that it corresponds to the intuitive notion of individual fairness (Equation 3.2), and (2) by proving that when the similarity/distance is measured using the Mahalanobis metric, enforcing Laplacian regularization leads to a limiting form of local individual fairness. 

Overall, the paper is well-written and the authors have studied several extensions of the proposed method, such as by solving it using coordinate descent and the multiclass setting. The experiments also provide good support to the proposed method compared to the traditional notion of individual fairness by showing that it yields better accuracy subject to the same level of fairness. They also demonstrate that this improvement comes from relaxing the fairness constraints for dissimilar instances. 

The only major downside that I could see is that the algorithm does not operate naturally in the inductive setting. The authors mention that one can use standard techniques that transform transductive methods to inductive, but I think they are not well-motivated. For example, does the predictor need to keep track of all instances that are observed to ensure that similar instances continue to receive similar outcomes in the future? If yes, this is quite expensive. If not, individual fairness may not be guaranteed. However, given that this is a post-processing approach that works well in the transductive setting, I think it is a worthwhile contribution to the community. 

Some minor comments:
- The captions should be sufficient to understand the tables and figures. In the present form, they do not provide any information whatsoever besides being points to what is mentioned in the main text. 
- In Definition 4.1, y and X are both instances. Is this correct? If yes, please use similar symbols (e.g. x1 and x2) to avoid confusion. 
- Typo in line 165: "is not immediately scalable" --> "it is not immediately scalable". 


============= 
Post Rebuttal:
I am fine with the author response and will keep my score as is. In light of the other reviews and the discussion, I suggest that the authors add the missing references highlighted by reviewer YBcz with a discussion of similarities/differences and adding a bit more discussion on how to control complexity in the inductive setting.
 Yes

 We thank the reviewer for helping us improve the paper. We will incorporate your suggestions in a revision. 

This paper proposes a post-processing method GLIF in enforcing individual fairness. The key idea is to build a similarity graph based on an oracle fair metric and then apply laplacian regularization on model output and the similarity graph. The optimization problem is strongly convex and reveals a linear equation in obtaining global minima. Coordinate descent is use to scale up the computations. Moreover, the paper introduces extenstion to the inductive setting, as well as theoretical analysis on guarantees of enforcing individual fairness.  This paper proposes a post-processing method GLIF in enforcing individual fairness. The key idea is to build a similarity graph based on an oracle fair metric and then apply laplacian regularization on model output and the similarity graph. The optimization problem is strongly convex and reveals a linear equation in obtaining global minima. Coordinate descent is use to scale up the computations. Moreover, the paper introduces extenstion to the inductive setting, as well as theoretical analysis on guarantees of enforcing individual fairness. Please see my concerns below.

- Limited novelty in methodology. Laplcian regularization is not a new technique in enforcing individual fairness (see [1] and [2]). Moreover, the technical content before section 3.2.2 is almost identical to the 'debiasing the mining result' method described in [2]. I would say the main differences between method in [2] and GLIF lie in the different strategy of building similarity graph and the different solver for the linear equation (coordinate descent vs. conjugate gradient). The novelty of this paper is more in the exntension of inductive setting and theoretical analysis.

- For inductive setting, is the unseen point included in the similarity graph? If so, is it still a good way to call it inductive setting (since we already have this node in the similarity graph)? If not, how much does it cost to append the graph with the new unseen point?

- The authors mention that GLIF can scale up to large pretrained LM like BERT. What is the running time of debiasing such large LM? It should be a key part to support section 3.2.2.

Overall, I think the theoretical analysis of GLIF is interesting but the current version is not ready for a publication due to limited novelty in methodology as well as some missing details.

[1] Lahoti, Preethi, Krishna P. Gummadi, and Gerhard Weikum. "Operationalizing individual fairness with pairwise fair representations." arXiv preprint arXiv:1907.01439 (2019).

[2] Kang, Jian, Jingrui He, Ross Maciejewski, and Hanghang Tong. "Inform: Individual fairness on graph mining." In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 379-389. 2020.
 Please see main review.

 Thank you to the authors for timely reply and addressing my concerns. Given our discussion, I will raise my score a bit. However, I do believe the paper could be further improved by additional content on 

- the difference with [1,2]
- more discussion/experiments on inductive setting
- discussion on the topics in q7wC's thread

Thanks for your efforts in the discussion.

 We are aware of a more general result for exponential families and Bregman divergences in the context of clustering [1]. Their results do not directly apply to our setting (i.e. graph Laplacian regularization).

We agree that the result in Thm 3.1 can be extended beyond KL divergence. We stated it in the paper for KL divergence because we wish to make it obvious that the method is applicable to classification problems, but we will state the more general result in a revised version of the paper. To generalize our result to an arbitrary Bregman divergence, we only need to replace the map between the mean and natural parameters with the gradient of the strictly convex function inducing the Bregman divergence (see update rule for $y_i$ after line 128 in the Supplement). Thank you for the insightful question!

[1] Banerjee, A., Merugu, S., Dhillon, I.S., Ghosh, J. and Lafferty, J., 2005. Clustering with Bregman divergences.

 Thank you to the authors for their response.

I just have an addition question regarding Section 3.2.4 / Theorem 3.1. The discussion in the section doesn't point to any citations. I am wondering if similar results have been found in prior work (as far as you know)?

It seems that a more general results could be achieved by exploiting general exponential family distributions / Bregman divergence duality.

Thanks in advanced.

 The reviewer is correct that dropping restrictions on dissimilar inputs is equivalent to zeroing out entries in the adjacency matrix. However, this is not a mere "trick in preprocessing". Without it, Laplacian regularization does not enforce local IF. 

We note that our method and the methods in [1,2] are superficially similar because they all rely on the general approach of Laplacian regularization. However, the methods all have different goals. For example, the goals of [1] and [2] are different (i.e. [1] is for representation learning and [2] is for graph mining) despite both relying on Laplacian regularization on a high level. Similarly, our goal is enforcing local IF, and this goal is **not** shared by [1,2]. This leads to many other differences, such as differences in the empirical and theoretical results. Please see our previous answer where we discuss these differences in more detail.

 Thank the authors for addressing my questions. I agree with the authors that [2] is more in the domain of graph learning area. My follow-up question is from problem formulation's perspective. 

The authors claims that neither [1] or [2] drop the constraints on dissimilar inputs. Since all methods we are talking here (i.e., authors' proposed method vs. methods in [1, 2]) are based on Laplacian regularization, **what is the key difference in having zero entry on dissimilar pairs vs. 'dropping' dissimilar inputs?** Otherwise, it is more like a trick in preprocessing step which have been done in the references.

 Thanks in advance.

 We thank the reviewer for acknowledging that our theory provides insights into connections between Laplacian regularization, IF, and local IF. New theory is one of the key contributions of our work. Below, we discuss the novelty of local IF.

Local IF is a **new definition** of IF introduced in our work. In particular, we are unable to find a similar definition in the literature. Specifically, Definition 1 in [2] is an average-case version of Dwork et al's original definition of IF. It does not drop the restrictions on dissimilar inputs. Also, unlike the Definition 1 in [2], our definition of local IF does **not** involve a graph. Our method for enforcing local IF does involve the construction of a graph, but it is possible to use other methods that do not construct a graph to enforce local IF.

**The key difference between [1], [2] and this submission is more about choosing a proper similarity function to construct the similarity matrix.** 

While this is one difference between our paper and [1,2], it is not a key difference. The key differences are:

- Our goal is to enforce local IF; [1] seek to enforce Dwork et al's original definition of IF, while [2] seek to enforce an average-case version of Dwork et al's original definition of IF (see definition 1 in [2]). Crucially, neither [1] nor [2] drop the restrictions on the outputs of the ML model on dissimilar inputs.
- We provide theoretical justification that Laplacian regularization enforces variants of local IF. There are no such guarantees in [1,2]. Our theoretical results guide practitioners in picking a Laplacian regularizer based on which notion of local IF they wish to enforce. The reviewer has acknowledged this point, but we're including it here for completeness.
- Our method is applicable to any supervised learning problem. In [2] the authors consider the problem of enforcing individual fairness on graph mining tasks, i.e. their results are applicable to data with the graph structure. Regarding [1], their goal is to learn *fair representations* - this is a completely different problem setting that is hard to directly compare to our work.

**Different solvers for the linear equation may not make much difference in the performance.**

The key advantage of our coordinate descent approach is its low memory requirement. The methods in [1,2] assume it is possible to load the entire Laplacian matrix into memory to either factorize it (in a direct solver method) or compute matrix-vector products (in a Krylov subspace method). For large datasets, the entire Laplacian matrix may not fit in memory. Coordinate descent allows us to load the Laplacian matrix in mini-batches. This is important in the applications of large language models considered in our work, and novel in comparison to [1] and [2]. 

**Inductive setting example:** The use case for the inductive setting is an online/streaming setting, in which new test points arrive one at a time.

---

To summarize, we thank the reviewer for pointing us to [1,2]. These papers are related and will be discussed in the revised version of the paper; however, we believe that the existence of [1] and [2] does not limit the key contributions of our work, primarily due to the following reasons: 

- *different problem settings*: post-processing for IF in supervised learning (ours), learning fair representations [1], and IF on graph mining [2]. 
- *new theoretical results*: we introduce the definition of local IF and present new theoretical results, which can also be useful to improve understanding of the problems considered in [1,2].
- *different application scope*: we focus on post-processing of large language models which is not considered in [1,2].

We hope the reviewer will reconsider their score in light of our discussion. If there are any remaining concerns, we are happy to elaborate.

 Thank the authors for the responses and clarifications.

**Local IF**:
To my understanding, local IF or Laplacian regularization is like a sparse and relaxed version of original IF by Dwork et al. since you consider pairs with small distance (analogous to high similarity). And both [1] and [2] are enforcing local IF, so local IF is not something new essentially. 

Theoretical-wise, I believe the theorems in the paper provide more insights about the connections between (local) IF and Laplacian regularization. 

My concern is more on the technical side. If my understanding is correct, the key difference between [1], [2] and this submission is more about choosing a proper similarity function to construct the similarity matrix. Different solvers for the linear equation may not make much difference in the performance. 

**Inductive setting**:
I agree that transductive setting is more natural. Could you please provide some use cases for the inductive setting (like examples that we have to stick with inductive setting instead of transductive setting)?

**Runtime on BERT**: 
Thanks for providing the pointer.



 We thank the reviewer for the comments. Please find our responses below.

**The algorithm does not operate naturally in the inductive setting. Does the predictor need to keep track of all instances that are observed to ensure that similar instances continue to receive similar outcomes in the future? If yes, this is quite expensive. If not, individual fairness may not be guaranteed. However, given that this is a post-processing approach that works well in the transductive setting, I think it is a worthwhile contribution to the community.**


We agree that our method is primarily geared towards the transductive setting for post-processing problems. Arguably, this setting is more common in the applications of the post-processing algorithms. You are right that the predictor needs to keep track of the previously observed instances and consequently the prediction time is $\mathcal{O}(n)$ (i.e. the cost of adding a new instance to the graph). It might be possible to improve upon this to achieve constant prediction time and constant memory by adapting heuristics to select a fixed amount of "pivot" points instead of keeping track of all the past points. Alternatively, using nearest neighbor graphs can reduce the prediction time but not the memory consumption. This could be an interesting problem to explore in the future work.

**Minor comments**

You are right regarding Definition 4.1. We will change the notation in the revised version of the paper and address other minor comments.

 We thank the reviewer for the comments. Please find our responses below.

**Sec 3.2.4: there seems to be ambiguity with $y$ in (3.8). Especially with the last subscript $y_j$ (which I believe should be $\tilde y_j$?).**

Thank you for pointing this out. You are right, the $y_j$ should actually be $\tilde y_j$.

**Suggestions regarding notations**

We will improve the notations per your suggestions.

**Sec 2.1's title and initial text says post-processing, but in-processing algorithms are also discussed.**

We mention some in-processing algorithms in Section 2.1 because it is possible to adopt their objective functions for post-processing. More concretely, we can use the objective function to fine-tune a model so that its outputs are individually fair. We will clarify this in a revision.

 We thank the reviewer for the comments and questions. Please find our responses below.


**What is the exact difference between "global" and "local" individual fairness constraints? Why local IF is better than global IF in terms of the two drawbacks of Dwork et al. (2011)?**

Dwork et.al.'s original definition of IF imposes a Lipschitz type condition on all pairs of input points; i.e. for any two instances $x_1, x_2 \in \mathcal{X}$, the condition $d_\mathcal{Y}(h(x_1), h(x_2)) \le L d_{\text{fair}}(x_1, x_2)$ must be satisfied for some fair-metric $d_{\text{fair}}$ on the input space and $d_\mathcal{Y}$ on the output space. However when $d_{\text{fair}}(x_1, x_2)$ is large, then this Lipschitz condition is hardly meaningful, as the input points are dissimilar. Further, enforcing these constraints harms the accuracy of the post-processed outputs, while leading to no meaningful improvements in fairness metrics. The notion of local IF basically ignores such Lipschitz restrictions between dissimilar points; it only enforces Lipschitz constraint on those pairs for which $d_{\text{fair}}(x_1, x_2)$ is small; i.e. points that are local to each other. Finally, enforcing global IF is computationally expensive (it is a convex problem with large number of constraints), while local IF can be enforced via a simple graph Laplacian regularization that has a closed form solution. Our theoretical analysis in Section 4 verifies that graph Laplacian regularization does enforce local IF. In Section 5.1 we demonstrate empirically the advantages of local IF both in terms of run-time, and fairness-accuracy trade-offs (see Fig. 2 left and center). We also verify the intuition regarding the locality of our approach by investigating the global IF constraints that our method violates: the constraints that our method violates correspond to large values of $d_{\text{fair}}$ that do not affect the fairness metrics (see Fig. 2 right and lines 283-297).


**Notation in Definition 4.1. The notation is quite confusing. Based on the intuition of the definition, $y$ here is not target, but another instance in $\mathcal{X}$ (if I understand correctly). Please kindly comment on this to avoid misunderstanding.**

We are sorry for the confusing notation, and you are correct, $y$ is not used to denote the label, rather another instance in $\mathcal{X}$. We will fix it in the revised version. 

 We thank the reviewer for the comments. We address questions and concerns below.

**Laplacian regularization is not a new technique in enforcing individual fairness (see [1] and [2]).** 

We thank the reviewer for pointing out additional related works, and we will cite them in a revised version. We wish to point out that our study reveals new insights into the connections between the Laplacian regularization and individual fairness. For example, it turns out that Laplacian regularization does NOT enforce Dwork et al's original definition of IF. Rather, depending on the choice of the Laplacian matrix, graph Laplacian regularizers enforce various local notions of IF (see Thm 4.6) introduced in our paper. In particular, picking the random-walk Laplacian enforces local IF (see Def 4.1), and picking the unnormalized Laplacian enforces a density weighted version of our definition of local IF (see the first conclusion of Thm 4.6).
This theoretical insight is important: as we state in the conclusion (lines 348-350), some applications may require global IF in which case Laplacian-based methods should not be used, and in lines 298-304 we discuss practical implications of different Laplacian formulations, e.g., unnormalized Laplacian weighs higher density regions higher which could be good or bad depending on the context. The practitioner needs to be aware of all the trade-offs that our theory demonstrates when choosing a method for a specific application.

The main differences between our work and [1] and [2] are (i) the ML tasks we consider and (ii) [1] and [2] provide no theoretical justification that their methods actually enforce IF. Regarding ML tasks, [1] considers representation learning, while [2] considers graph mining tasks, such as clustering, representation learning, and ranking. We consider post-processing the outputs of models for supervised learning. In particular, our experiments show that our method is successful in debiasing large language models on Bios and Toxicity datasets. Regarding theory, our results show that the methods in [1] and [2] actually do not enforce Dwork et al's original definition of individual fairness. In fact, the unnormalized Laplacian regularizers in [1] and [2] actually enforce a weighted version of local IF as demonstrated in Thm 4.6.

**For inductive setting, is the unseen point included in the similarity graph? If so, is it still a good way to call it inductive setting (since we already have this node in the similarity graph)? If not, how much does it cost to append the graph with the new unseen point?**

In the inductive setting, the new point is not included in the original graph. Ideally, we would add it to the graph and solve the Laplacian smoothing problem again, but this is computationally costly (at least $\mathcal{O}(n^2)$ time). Instead, we add it to the graph (by computing all the edges incident to the new point) and perform a single coordinate descent update. This only costs $\mathcal{O}(n)$ time. Finally, we wish to point out that in post-processing, the transductive setting is more natural. 


**The authors mention that GLIF can scale up to large pretrained LM like BERT. What is the running time of debiasing such large LM? It should be a key part to support section 3.2.2.**

We have already presented the runtime and complexity analysis in our Supplementary document -- see Section 2.4 and Table 1.

The paper explores individual fairness post-processing as a graph smoothing problem. Specifically, the paper considers an atypical "local" individual fairness constrain (locally Lipschitz) and uses graph Laplacian regularization in the minimization objective to account for individual fairness.

Main Contributions:
 - Introduces a minimization problem with graph Laplacian regularization for local individual fairness, for Euclidean + KL Bregman generalization.
 - Proposes coordinate descent to optimize the minimization problem.
 - Thm 4.6: Proves that under assumptions, the specified Laplacian regularizer(s) asymptotically enforce weak local individual fairness.
 - Experiments to compare the normalized/un-normalized regularizers and baselines.  Overall, the paper is of good quality with an interesting exploration of the relaxation of the typical individual fairness problem. There are only minor issues regarding the clarity of the writing.

Originality & Significance:
The paper provides a novel outlook into the individual fairness problem through a logical weakening of the typical constraint, and then provides an algorithm for their optimization problem. The experiments provided further shows that weakening of the constraints and their method provides a useful alternative than prior work.

Quality & Clarity: The theoretical and experimental results seem technically sound. The paper is mostly clear, except for parts of Sec 3 (see below).

Strengths:
 - The introduced local individual fairness constraint is well motivated.
 - The method of coordinate descent + graph Laplacian regularization (and the KL/Bregman generalization)
 - Thm 4.6 identifying the changes caused by normalization is very nice.

Suggestions/Weaknesses/Questions:
 - Sec 2.1's title and initial text says post-processing, but in-processing algorithms are also discussed.
 - Sec 3.2.4: there seems to be ambiguity with $ y $ in (3.8). Especially with the last subscript $ y_{j} $ (which I believe should be $ \tilde{y}_{j} $ ?). Relabelling would help to make this clearer.
 - $ \tau $ ambiguity. It would be worth changing $ \tau $ in (2.2) or in Sec 3.2.4
 - There also seems be a bit of mixed notation regarding double indices subscripts, i.e., "ij" vs "i,j" (the SI also seems to be the opposite of that presented in Sec 3.2.4). Limitations and societal impact adequately addressed.

Meta-review: This paper proposes a post-processing method for enforcing individual fairness via graph-based smoothness. All four reviewers ultimately recommended acceptance. The main concern was novelty, which was partially (but not completely) addressed in the author response, but was not deemed significant enough to prevent acceptance.

Please be sure to make any changes that have been promised to the reviewers, and seriously consider attempting to address any other issues that they might have raised, in particular YBcz's novelty concern (by being careful with citations and the relationship to prior work).

Decision: accept