From d1be93e67baad2efb4017638ea671baa42d26e52 Mon Sep 17 00:00:00 2001 From: Riku-Laine <28960190+Riku-Laine@users.noreply.github.com> Date: Mon, 17 Jun 2019 12:41:05 +0300 Subject: [PATCH] Lakkaraju on counterfactual inference --- analysis_and_scripts/notes.tex | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/analysis_and_scripts/notes.tex b/analysis_and_scripts/notes.tex index d7a4da8..2814405 100644 --- a/analysis_and_scripts/notes.tex +++ b/analysis_and_scripts/notes.tex @@ -112,19 +112,25 @@ The motivating idea behind the SL paper of Lakkaraju et al. \cite{lakkaraju17} i The general idea of the SL paper is to train some predictive model with selectively labeled data. The question is then "how would this predictive model perform if it was to make independent bail-or-jail decisions?" That quantity can not be calculated from real-life data sets due to the ethical reasons and hidden labels. We can however use more selectively labeled data to estimate it's performance. But, because the available data is biased, the performance estimates are too good or "overly optimistic" if they are calculated in the conventional way ("labeled outcomes only"). This is why they are proposing the contraction algorithm. -One of the concepts to denote when reading the Lakkaraju paper is the difference between the global goal of prediction and the goal in this specific setting. The global goal is to have a low failure rate with high acceptance rate, but at the moment we are not interested in it. The goal in this setting is to estimate the true failure rate of the model with unseen biased data. That is, given only selectively labeled data and an arbitrary black-box model $\mathcal{B}$ we are interested in predicting the performance of model $\mathcal{B}$ in the whole data set with all ground truth labels. +One of the concepts to denote when reading the Lakkaraju paper is the difference between the global goal of prediction and the goal in this specific setting. The global goal is to have a low failure rate with high acceptance rate, but at the moment we are not interested in it. The goal in this setting is to estimate the true failure rate of the model with unseen biased data. That is, given only selectively labeled data and an arbitrary black-box model $\B$ we are interested in predicting the performance of model $\B$ in the whole data set with all ground truth labels. On acceptance rate R: We discussed how Lakkaraju's paper treats variable R in a seemingly non-sensical way, it is as if a judge would have to let someone go today in order to detain some other defendant tomorrow to keep their acceptance rate at some $r$. A more intuitive way of thinking $r$ would be the "threshold perspective". That is, if a judge sees that a defendant has probability $p_x$ of committing a crime if let out, the judge would detain the defendant if $p_x > r$, the defendant would be too dangerous to let out. Now, it can be claimed that judges do have a threshold, even in Lakkaraju's setting. Let $c$ be a judge's acceptance threshold. Now decision $T$ can be defined with function $f_T(x, z)$ as follows: \begin{equation} - f_T(x, z)=\begin{cases} - 1, & \text{if $f_T(x, z) < c$}\\ - 0, & \text{otherwise}. + \pr(T=0|x, z)=\begin{cases} + p_T, & \text{if $f_T(x, z) < c$}\\ + 1-p_T, & \text{otherwise}. \end{cases} \end{equation} If $c$ is defined so that the ratio of positive decisions to all decisions will be equal to $r$, we will arrive at a similar data generation process as Lakkaraju and as is presented in algorithm \ref{alg:data_with_Z}. +Finally, chapter from Lakkaraju \cite{lakkaraju17} about counterfactual inference, see references from their paper [sic]: + +\begin{quote} +Counterfactual inference. Counterfactual inference techniques have been used extensively to estimate treatment effects in observational studies. These techniques have found applications in a variety of fields such as machine learning, epidemiology, and sociology [3, 8–10, 30, 34]. Along the lines of Johansson et al. [16], counterfactual inference techniques can be broadly categorized as: (1) parametric methods which model the relationship between observed features, treatments, and outcomes. Examples include any type of regression model such as linear and logistic regression, random forests and regression trees [12, 33, 42]. (2) non-parametric methods such as propensity score matching, nearest-neighbor matching, which do not explicitly model the relationship between observed features, treatments, and outcomes [4, 15, 35, 36, 41]. (3) doubly robust methods which combine the two aforementioned classes of techniques typically via a propensity score weighted regression [5, 10]. The effectiveness of parametric and non-parametric methods depends on the postulated regression model and the postulated propensity score model respectively. If the postulated models are not identical to the true models, then these techniques result in biased estimates of outcomes. Doubly robust methods require only one of the postulated models to be identical to the true model in order to generate unbiased estimates. However, due to the presence of unobservables, we cannot guarantee that either of the postulated models will be identical to the true models. +\end{quote} + \section{Framework definition -- 13 June discussion} \label{sec:framework} First, data is generated through a \textbf{data generating process (DGP)}. DGP comprises of generating the private features for the subjects, generating the acceptance rates for the judges and assigning the subjects to the judges. \textbf{Acceptance rate (AR)} is defined as the ratio of positive decisions to all decisions that a judge will give. As a formula \[ AR = \dfrac{\#\{Positive~decisions\}}{\#\{Decisions\}}. \] Data generation process is depicted in the first box of Figure \ref{fig:framework}. @@ -309,13 +315,13 @@ The plotted curves are constructed using pseudo code presented in algorithm \ref \STATE $\D_q = \{(x, j, t, y) \in \D|j=q\}$ \STATE \hskip3.0em $\rhd$ $\D_q$ is the set of all observations judged by $q$ \STATE -\STATE $\mathcal{R}_q = \{(x, j, t, y) \in \D_q|t=1\}$ -\STATE \hskip3.0em $\rhd$ $\mathcal{R}_q$ is the set of observations in $\D_q$ with observed outcome labels +\STATE $\RR_q = \{(x, j, t, y) \in \D_q|t=1\}$ +\STATE \hskip3.0em $\rhd$ $\RR_q$ is the set of observations in $\D_q$ with observed outcome labels \STATE -\STATE Sort observations in $\mathcal{R}_q$ in descending order of confidence scores $\s$ and assign to $\mathcal{R}_q^{sort}$. +\STATE Sort observations in $\RR_q$ in descending order of confidence scores $\s$ and assign to $\RR_q^{sort}$. \STATE \hskip3.0em $\rhd$ Observations deemed as high risk by the black-box model $\mathcal{B}$ are at the top of this list \STATE -\STATE Remove the top $[(1.0-r)|\D_q |]-[|\D_q |-|\mathcal{R}_q |]$ observations of $\mathcal{R}_q^{sort}$ and call this list $\mathcal{R_B}$ +\STATE Remove the top $[(1.0-r)|\D_q |]-[|\D_q |-|\RR_q |]$ observations of $\RR_q^{sort}$ and call this list $\mathcal{R_B}$ \STATE \hskip3.0em $\rhd$ $\mathcal{R_B}$ is the list of observations assigned to $t = 1$ by $\mathcal{B}$ \STATE \STATE Compute $\mathbf{u}=\sum_{i=1}^{|\mathcal{R_B}|} \dfrac{\delta\{y_i=0\}}{| \D_q |}$. -- GitLab