You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: paper/sections/empirical.rmd
+22-26Lines changed: 22 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -4,37 +4,33 @@ This section presents the exact ingredients and parameter choices describing the
4
4
5
5
## $M$ -- Classifiers and Generative Models {#empirical-classifiers}
6
6
7
-
For each dataset and generator we look at three different types of classifiers all of them built and trained using `Flux.jl`[@innes2018fashionable]: firstly, a simple linear classifier - **Logistic Regression** - implemented as single linear layer with sigmoid activation; secondly, a multilayer perceptron (**MLP**); and finally, a **Deep Ensemble** composed of five MLPs following @lakshminarayanan2016simple that serves as our only probabilistic classifier. We have chosen to work with deep ensembles both for their simplicity and effectiveness at modelling predictive uncertainty. They are also the model of choice in @schut2021generating. The actual neural network architectures are kept simple (Table \@ref(tab:mlp)), since we are only marginally concerned with achieving good initial classifier performance. For the real-world datasets we using mini-batch training and dropout regularization.
7
+
For each dataset and generator we look at three different types of classifiers all of them built and trained using `Flux.jl`[@innes2018fashionable]: firstly, a simple linear classifier - **Logistic Regression** - implemented as single linear layer with sigmoid activation; secondly, a multilayer perceptron (**MLP**); and finally, a **Deep Ensemble** composed of five MLPs following @lakshminarayanan2016simple that serves as our only probabilistic classifier. We have chosen to work with deep ensembles both for their simplicity and effectiveness at modelling predictive uncertainty. They are also the model of choice in @schut2021generating. The actual neural network architectures are kept simple (top half of Table \@ref(tab:architecture)), since we are only marginally concerned with achieving good initial classifier performance.
8
8
9
-
The Latent Space generator relies on a separate generative model. Following the authors of both REVISE and CLUE we use Variational Autoencoders (**VAE**) for this purpose. As with the classifiers, we deliberately choose to work with fairly simple architectures (Table \@ref(tab:vae)). More expressive generative models generally also lead to more meaningful counterfactuals produced by Latent Space generators. But in our view this should simply be considered as a vulnerability of counterfactual generators that rely on surrogate models to learn what realistic representations of the underlying data.
9
+
The Latent Space generator relies on a separate generative model. Following the authors of both REVISE and CLUE we use Variational Autoencoders (**VAE**) for this purpose. As with the classifiers, we deliberately choose to work with fairly simple architectures (bottom half of Table \@ref(tab:architecture)). More expressive generative models generally also lead to more meaningful counterfactuals produced by Latent Space generators. But in our view this should simply be considered as a vulnerability of counterfactual generators that rely on surrogate models to learn what realistic representations of the underlying data.
We use four synthetic binary classification datasets consisting of 1000 samples each. The datasets are presented in Figure \@ref(fig:synthetic-data) (see also Appendix A for a formal description). Samples from the negative class are marked in blue while samples of the positive class are marked in orange.
55
+
We use four synthetic binary classification datasets consisting of 1000 samples each: **Overlapping**, **Linearly Separable**, **Circles** and **Moons**. The datasets are presented in Figure \@ref(fig:synthetic-data). Samples from the negative class are marked in blue while samples of the positive class are marked in orange.
60
56
61
-
```{r synthetic-data, fig.cap="Synthetic classification datasets used in our experiments."}
57
+
```{r synthetic-data, fig.cap="Synthetic classification datasets used in our experiments. Samples from the negative class ($y=0$) are marked in blue while samples of the positive class ($y=1$) are marked in orange."}
To recap, we can answer our research questions as follows: firstly, endogenous dynamics do emerge in our experiments and we find them substantial enough to be considered costly; secondly, the choice of the counterfactual generator does matter, with Latent Space search generally having a dampening effect. The observed dynamics therefore seem to be driven by a discrepancy between counterfactual outcomes that minimize costs to the individual and outcomes that comply with the data generating process.
Copy file name to clipboardExpand all lines: paper/sections/introduction.rmd
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Research on Algorithmic Recourse has also so far typically addressed the issue f
10
10
11
11
Figure \@ref(fig:poc) illustrates this idea for a binary problem involving a probabilistic classifier and the counterfactual generator proposed by @wachter2017counterfactual: the implementation of AR for a subset of individuals immediately leads to a visible domain shift in the (orange) target class (b), which in turn triggers a model shift (c). As this game of implementing AR and updating the classifier is repeated, the decision boundary moves away from training samples that were originally in the target class (d). We refer to these types of dynamics as **endogenous** because they are induced by the implementation of recourse itself. The term **macrodynamics** is borrowed from the economics literature and used to describe processes involving whole groups or societies.
12
12
13
-
```{r poc, fig.cap="Dynamics in Algorithmic Recourse: we have a simple linear classifier trained for binary classification (a); the implementation of AR for a random subset of individuals leads to a noticable domain shift (b); as the classifier is retrained we observe a corresponding model shift (c); as this process is repeated, the decision boundary moves away from the target class (d)."}
13
+
```{r poc, fig.cap="Dynamics in Algorithmic Recourse: (a) we have a simple linear classifier trained for binary classification where samples from the negative class ($y=0$) are marked in blue and samples of the positive class ($y=1$) are marked in orange; (b) the implementation of AR for a random subset of individuals leads to a noticable domain shift; (c) as the classifier is retrained we observe a corresponding model shift; (d) as this process is repeated, the decision boundary moves away from the target class."}
Here $\mathbf{s}^\prime=\left\{s_k^\prime\right\}_K$ is the stacked $K$-dimensional array of counterfactual states and $f: \mathcal{S} \mapsto \mathcal{X}$ maps from the counterfactual state space to the feature space. In Wachter, the state space is the feature space: $f$ is just the identity function and the number of counterfactuals $K$ is equal to one. Both REVISE and CLUE search counterfactuals in some latent embedding $S \subset \mathcal{S}$ instead of the feature space directly. The latent embedding is learned by a separate generative model that is tasked with learning the data generating process (DGP) of $X$. In this case $f$ in Equation \@ref(eq:general) corresponds to the decoder part of the generative model, in other words the function that maps back from the latent embedding to the feature space. Provided the generative model is well-specified, traversing the latent embedding typically results in realistic and plausible counterfactuals, because they are implicitly generated by the (learned) DGP [@joshi2019towards].
18
18
19
19
CLUE distinguishes itself from REVISE and other counterfactual generators in that it aims to minimize the predictive uncertainty of the model in question, $M$. To quantify predictive uncertainty the authors rely on entropy estimates for probabilistic models. The approach proposed by @schut2021generating, which we shall refer to as **Greedy**, also works with the subclass of models $\tilde{\mathcal{M}}\subset\mathcal{M}$ that can produce predictive uncertainty estimates. The authors show that in this setting the cost function $\text{cost}(\cdot)$ in Equation \@ref(eq:general) is redundant and meaningful counterfactuals can be generated in a fast and efficient manner through a modified Jacobian-based Saliency Map Attack (JSMA). Schut et al. [@schut2021generating] also show that by maximizing the predicted probability of $x^\prime$ being assigned to target class $y^*$ we also implicitly minimize predictive entropy - as in CLUE. In that sense, CLUE can be seen as equivalent to REVISE in the Bayesian context and we shall therefore refer to both approaches collectively as **Latent Space** generators^[In fact, there are a number of other recently proposed approaches to counterfactual search that also broadly fall in this same category. They largely differ with respect to the chosen generative model: for example, the generator proposed by @dombrowski2021diffeomorphic relies on normalizing flows.].
20
20
21
-
Finally, DiCE [@mothilal2020explaining] distinguishes itself from all other generators considered here in that it aims to generate a diverse set of $K>1$ counterfactuals. Wachter et al. [@wachter2017counterfactual] show that diverse outcomes can in principal be achieved simply rerunning counterfactual search multiple times using stochastic gradient descent (or by randomly initializing the counterfactual). In @mothilal2020explaining diversity is explicitly proxied via Determinantal Point Processes (DDP): the authors simply introduce DDP as a component of the cost function $\text{cost}(\mathbf{s}^\prime)$ and therebt produce counterfactuals $s_1, ... , s_K$ that look as different from each other as possible. The implementation of DiCE in the our library of choice - `CounterfactualExplanations.jl` - uses that exact approach. It is worth noting that for $k=1$, DiCE reduces to Wachter since the DDP is constant and therefore does not affect the objective function in Equation \@ref(eq:general).
21
+
Finally, DiCE [@mothilal2020explaining] distinguishes itself from all other generators considered here in that it aims to generate a diverse set of $K>1$ counterfactuals. Wachter et al. [@wachter2017counterfactual] show that diverse outcomes can in principal be achieved simply rerunning counterfactual search multiple times using stochastic gradient descent (or by randomly initializing the counterfactual)^[Note, in fact, that \@ref(eq:general) naturally lends itself to that idea: setting $K$ to some value greater than one and using the Wachter objective essentially boils down to computing multiple counterfactuals in parallel. Here, $yloss(\cdot)$ is first broadcasted over elements of $\mathbf{s}^\prime$ and then aggregated. This is exactly how counterfactual search is implemented in `CounterfactualExplanations.jl`.]. In @mothilal2020explaining diversity is explicitly proxied via Determinantal Point Processes (DDP): the authors simply introduce DDP as a component of the cost function $\text{cost}(\mathbf{s}^\prime)$ and thereby produce counterfactuals $s_1, ... , s_K$ that look as different from each other as possible. The implementation of DiCE in the our library of choice - `CounterfactualExplanations.jl` - uses that exact approach. It is worth noting that for $k=1$, DiCE reduces to Wachter since the DDP is constant and therefore does not affect the objective function in Equation \@ref(eq:general).
22
22
23
23
## ... towards collective recourse
24
24
25
25
All of the different approaches introduced above tackle the problem of Algorithmic Recourse from the perspective of one single individual^[DiCE recognizes that different individuals may have different objective functions, but it does not address the interdependencies between different individuals.]. To explicitly address the issue that individual recourse may affect the outcome and prospect of other individuals, we propose to extend Equation \@ref(eq:general) as follows:
Here $\text{cost}(f(s_k^\prime))$ denotes the proxy for private costs faced by the individual as before and $\lambda_1$ governs to what extent that private cost ought to be penalized. The newly introduced term $\text{extcost}(f(s_k^\prime))$ is meant to capture and address external costs incurred by the collective of individuals in response to changes in $\mathbf{s}^\prime$. The underlying concept of private and external costs is borrowed from Economics and well-established in that field: when the decisions or actions by some individual market participant generate external costs, then the market is said to suffer from negative externalities and considered inefficient [@pindyck2014microeconomics]. We think that this concept describes the endogenous dynamics of algorithmic recourse oberserved here very well. As with individual recourse, the exact choice of $\text{extcost}(\cdot)$ is not obvious, nor do we intend to provide a definite answer in this work, if such even exists. That being said, we do propose a few potential mitigation strategies in Section \@ref(mitigate).
33
+
Here $\text{cost}(f(\mathbf{s}^\prime))$ denotes the proxy for private costs faced by the individual as before and $\lambda_1$ governs to what extent that private cost ought to be penalized. The newly introduced term $\text{extcost}(f(\mathbf{s}^\prime))$ is meant to capture and address external costs incurred by the collective of individuals in response to changes in $\mathbf{s}^\prime$. The underlying concept of private and external costs is borrowed from Economics and well-established in that field: when the decisions or actions by some individual market participant generate external costs, then the market is said to suffer from negative externalities and considered inefficient [@pindyck2014microeconomics]. We think that this concept describes the endogenous dynamics of algorithmic recourse observed here very well. As with individual recourse, the exact choice of $\text{extcost}(\cdot)$ is not obvious, nor do we intend to provide a definite answer in this work, if such even exists. That being said, we do propose a few potential mitigation strategies in Section \@ref(mitigate).
0 commit comments