Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-alt committed Dec 23, 2022
2 parents fb4d788 + 04553cb commit 34856cf
Show file tree
Hide file tree
Showing 8 changed files with 250 additions and 7,772 deletions.
7,986 changes: 230 additions & 7,756 deletions bib.bib

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion paper/paper.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ knitr::opts_chunk$set(

# Appendix

Granular results for all of our experiments can be found in this supplementary [appendix](https://anonymous.4open.science/r/AlgorithmicRecourseDynamics/build/dev/notebooks/appendix.html).
Granular results for all of our experiments can be found in this online companion: [https://www.paltmeyer.com/endogenous-macrodynamics-in-algorithmic-recourse/](https://www.paltmeyer.com/endogenous-macrodynamics-in-algorithmic-recourse/). The Github repository containing all the code used to produce the results in this paper can be found here: [https://github.com/pat-alt/endogenous-macrodynamics-in-algorithmic-recourse](https://github.com/pat-alt/endogenous-macrodynamics-in-algorithmic-recourse).
Binary file modified paper/paper.pdf
Binary file not shown.
26 changes: 15 additions & 11 deletions paper/paper.tex

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion paper/sections/conclusion.rmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Concluding Remarks {#conclusion}

This work has revisited and extended some of the most general and defining concepts underlying the literature on Counterfactual Explanations and, in particular, Algorithmic Recourse. We demonstrate that long-held beliefs as to what defines optimality in AR, may not be suitable in contexts that involves large groups of individuals facing adverse outcomes. Specifically, we run experiments that simulate the application of recourse in practice using various state-of-the-art counterfactual generators and find that all of them induce substantial domain and model shifts. We argue that these shifts should be considered as an expected external cost of individual recourse and call for a paradigm shift from individual to collective recourse in these types of situations. By proposing an adapted counterfactual search objective that incorporates this cost, we make that paradigm shift explicit. We show that this modified objective lends itself to mitigation strategies that can be used to effectively decrease the magnitude of induced domain and model shifts. Through our work we hope to inspire future research on this important topic. To this end we have open-sourced all of our code along with a Julia package: [`AlgorithmicRecourseDynamics.jl`](https://anonymous.4open.science/r/AlgorithmicRecourseDynamics/README.md). The package is built on top of [`CounterfactualExplanations.jl`](https://github.com/pat-alt/CounterfactualExplanations.jl) and inherits its extensibility [@altmeyer2022counterfactualexplanations]. That is to say that future researchers should find it relatively easy to replicate, modify and extend the simulation experiments presented here and apply to their own custom counterfactual generators.
This work has revisited and extended some of the most general and defining concepts underlying the literature on Counterfactual Explanations and, in particular, Algorithmic Recourse. We demonstrate that long-held beliefs as to what defines optimality in AR, may not always be suitable. Specifically, we run experiments that simulate the application of recourse in practice using various state-of-the-art counterfactual generators and find that all of them induce substantial domain and model shifts. We argue that these shifts should be considered as an expected external cost of individual recourse and call for a paradigm shift from individual to collective recourse in these types of situations. By proposing an adapted counterfactual search objective that incorporates this cost, we make that paradigm shift explicit. We show that this modified objective lends itself to mitigation strategies that can be used to effectively decrease the magnitude of induced domain and model shifts. Through our work we hope to inspire future research on this important topic. To this end we have open-sourced all of our code along with a Julia package: [`AlgorithmicRecourseDynamics.jl`](https://anonymous.4open.science/r/AlgorithmicRecourseDynamics/README.md). Future researchers should find it relatively easy to replicate, modify and extend the simulation experiments presented here and apply to their own custom counterfactual generators.
2 changes: 1 addition & 1 deletion paper/sections/introduction.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Existing work in this field has largely worked in a static setting: various appr

Research on Algorithmic Recourse has also so far typically addressed the issue from the perspective of a single individual. Arguably though, most real-world applications that warrant AR involve potentially large groups of individuals typically competing for scarce resources. Our work demonstrates that in such scenarios, choices made by or for a single individual are likely to affect the broader collective of individuals in ways that many current approaches to AR fail to account for. More specifically, we argue that a strict focus on minimizing the private costs to individuals may be too narrow an objective.

Figure \@ref(fig:poc) illustrates this idea for a binary problem involving a probabilistic classifier and the counterfactual generator proposed by Wachter et al. @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.
Figure \@ref(fig:poc) illustrates this idea for a binary problem involving a linear classifier and the counterfactual generator proposed by Wachter et al. @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.

```{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."}
knitr::include_graphics("www/poc.png")
Expand Down
2 changes: 1 addition & 1 deletion paper/sections/limitations.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The experimental setup proposed here is designed to mimic a real-world recourse

## Causal Modelling

In this work we have focused on popular counterfactual generators that do not incorporate any causal knowledge. The generated perturbations therefore may involve changes to variables that affect the outcome predicted by the black-box model, but not the true outcome. The implementation of such changes is typically described as **gaming** @miller2020strategic, although they need not be driven by adversarial intentions: in Example \@ref(exm:student), student applicants may dutifully focus on acquiring credentials that help them to be admitted to university, but ultimately not to improve their chances of success at completing their degree @barocas2017fairness. Preventing such actions may help to avoid the dynamics we have pointed to in this work. Future work would likely benefit from including recent approaches to AR that incorporate causal knowledge such as Karimi et al. @karimi2021algorithmic.
In this work we have focused on popular counterfactual generators that do not incorporate any causal knowledge. The generated perturbations therefore may involve changes to variables that affect the outcome predicted by the black-box model, but not the true outcome. The implementation of such changes is typically described as **gaming** @miller2020strategic, although they need not be driven by adversarial intentions: in Example \@ref(exm:student), student applicants may dutifully focus on acquiring credentials that help them to be admitted to university, but ultimately not to improve their chances of success at completing their degree @barocas2022fairness. Preventing such actions may help to avoid the dynamics we have pointed to in this work. Future work would likely benefit from including recent approaches to AR that incorporate causal knowledge such as Karimi et al. @karimi2021algorithmic.

## Classifiers

Expand Down
2 changes: 1 addition & 1 deletion paper/sections/related.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ In the context of Algorithmic Recourse, domain and model shifts were first broug

## Benchmarking Counterfactual Generators {#related-benchmark}

Despite the large and growing number of approaches to counterfactual search, there have been surprisingly few benchmark studies that compare different methodologies. This may be partially due to limited software availability in this space. Recent work has started to address this gap: firstly, @deoliveira2021framework run a large benchmarking study using different algorithmic approaches and numerous tabular datasets; secondly, @pawelczyk2021carla introduce a Python framework---CARLA---that can be used to apply and benchmark different methodologies; finally, [`CounterfactualExplanations.jl`](https://github.com/pat-alt/CounterfactualExplanations.jl) [@altmeyer2022counterfactualexplanations] provides an extensible, fast and language-agnostic implementation in Julia. Since the experiments presented here involve extensive simulations, we have relied on and extended the Julia implementation due to the associated performance benefits. In particular, we have built a framework on top of [`CounterfactualExplanations.jl`](https://github.com/pat-alt/CounterfactualExplanations.jl) that extends the functionality from static benchmarks to simulation experiments: [`AlgorithmicRecourseDynamics.jl`]((https://anonymous.4open.science/r/AlgorithmicRecourseDynamics/README.md))^[The code is available from the following anonymized Github repository: [https://anonymous.4open.science/r/AlgorithmicRecourseDynamics/README.md](https://anonymous.4open.science/r/AlgorithmicRecourseDynamics/README.md).]. The core concepts implemented in that package reflect what is presented in Section \@ref(method-2) of this paper.
Despite the large and growing number of approaches to counterfactual search, there have been surprisingly few benchmark studies that compare different methodologies. This may be partially due to limited software availability in this space. Recent work has started to address this gap: firstly, @deoliveira2021framework run a large benchmarking study using different algorithmic approaches and numerous tabular datasets; secondly, @pawelczyk2021carla introduce a Python framework---CARLA---that can be used to apply and benchmark different methodologies; finally, [`CounterfactualExplanations.jl`](https://github.com/pat-alt/CounterfactualExplanations.jl) [@altmeyer2022counterfactualexplanations] provides an extensible, fast and language-agnostic implementation in Julia. Since the experiments presented here involve extensive simulations, we have relied on and extended the Julia implementation due to the associated performance benefits. In particular, we have built a framework on top of [`CounterfactualExplanations.jl`](https://github.com/pat-alt/CounterfactualExplanations.jl) that extends the functionality from static benchmarks to simulation experiments: [`AlgorithmicRecourseDynamics.jl`]((https://github.com/pat-alt/AlgorithmicRecourseDynamics.jl))^[The code has been released as a package: [https://github.com/pat-alt/AlgorithmicRecourseDynamics.jl](https://github.com/pat-alt/AlgorithmicRecourseDynamics.jl).]. The core concepts implemented in that package reflect what is presented in Section \@ref(method-2) of this paper.


0 comments on commit 34856cf

Please sign in to comment.