Newer
Older
%!TEX root = sl.tex
% The above command helps compiling in TexShop on a MAc. Hitting typeset complies sl.tex directly instead of producing an error here.
We test the accuracy and robustness of \cfbi (countefactual-based imputation) in evaluating the performance of decision makers of different kinds.
%
Towards, this end, we employ both synthetic and real data.
%
We compare \cfbi especially with the recent {\it contraction} technique of \citet{lakkaraju2017selective}, {KDD 2017}.
\spara{Reproducibility}. Our manuscript contains a full specification of the parameters of the models and synthetic datasets we used, as well as links to the real public datasets.
%
The implementation uses Python 3.6.9 and PyStan v.2.19.0.0 with cmdstanpy 0.4.3 -- and will be made available online upon publication.
\subsection{Synthetic Data}
\label{sec:syntheticsetting}
We begin our experiments with synthetic data, in order to demonstrate various properties of our approach.
To set up the experimentation, we follow the setting of \citet{lakkaraju2017selective}.
Each synthetic dataset we experiment with consists of $\datasize=5,000$ randomly generated cases.
%
The features \obsFeatures and \unobservable of each case are drawn independently from standard Gaussians.
%
Each case is assigned randomly to one out of $\judgeAmount=50$ decision makers, such that each decision maker receives a total of $100$ cases.
%
The leniency \leniency of each decision maker is drawn independently of other decision makers from Uniform$(0.1,~0.9)$.
%
As soon as a case is assigned to a decision maker, a decision $\decision$ is made for the case.
%
The exact way this happens for different types of decision makers is described in the next subsection (Sec.~\ref{sec:dm_exps}).
%
If the decision if positive, then an outcome is assigned to the case according to Eq.~\ref{eq:defendantmodel}
%
with $\alpha_\outcome = 0$ and $~\beta_\obsFeatures = \beta_\unobservable = 1$.
%
Note that, in the event of a positive decision, the intercept $\alpha_\outcome$ determines the base probability for a negative result -- and the choice of $\alpha_\outcome = 0$ means that positive and negative outcomes are equally likely to appear in the dataset (expected proportion is $50\%-50\%$) among cases with positive decisions.
%
Additional noise is added to the outcome of each case via $\epsilon_\outcome$, which was drawn from a zero-mean Gaussian distribution with small variance, $\epsilon_\outcome\sim \gaussian{0}{0.1}$.
Our experimentation involves two categories of decision makers: (i) the set of decision makers \humanset, the decisions of which are reflected in a dataset, and (ii) the decision maker \machine, whose performance is to be evaluated on the log of cases decided by \humanset.
Among cases that receive a positive decision, the probability to have a positive or negative outcome is higher or lower depending on the quantity below (see Equation~\ref{eq:defendantmodel}), to which we refer as the `{\it risk score}' of each case
\begin{equation}
\text{risk score} = \beta_\obsFeatures \obsFeaturesValue + \beta_\unobservable \unobservableValue .
\end{equation}
%
Lower values indicate that a negative outcome is more likely.
%
For the {\it first} type of decision makers we consider, we assume that decisions are rational and well-informed, and that a decision maker with leniency \leniencyValue makes a positive decision only for the \leniencyValue fraction of cases that are most likely to lead to a positive outcome.
Specifically, we assume that the decision-makers know the cumulative distribution function $G$ that the risk scores $s = \beta_\obsFeatures \obsFeaturesValue + \beta_\unobservable \unobservableValue$ of defendants follow.
This is a reasonable assumption to make in settings where decision makers have accurate knowledge of the joint feature distribution \prob{\obsFeatures = \obsFeaturesValue, \unobservable =\unobservableValue}, as well as the risk parameters $\beta_\obsFeatures$ and $\beta_\unobservable$ -- as such knowledge allows one to calculate $G$.
For example, a seasoned judge who has tried a large volume and variety of cases may have a good idea about the various cases that appear at court and which of them pose higher risk.
Considering a decision maker with leniency $\leniency = \leniencyValue$ who decides a case with risk score $s$, a positive decision is made only if $s$ is in the \leniencyValue portion of the lowest scores according to $G$, i.e. if
\begin{equation}
s \leq G^{-1}(\leniencyValue).
\end{equation}
%
See Appendix~\ref{sec:independent} for more details.
%
Since in our setting the distribution $G$ is given and fixed, such decisions for different cases happen independently based on their risk score.
%
Because of this, we refer to this type of decision makers as \independent.
\todo{MM}{Make sure Appendix~\ref{sec:independent} is correct.}
In addition, we also experiment with a different type of decision makers, namely \batch.
%
Decision makers of this type are assumed to consider all cases assigned to them at once, as a batch; sort them by risk score; and, for leniency \leniency = \leniencyValue, release $\leniencyValue$ portion of the batch with the best risk score.
Such decision makers still have a good knowledge of the relative risk that the cases assigned to them pose, but they are also shortsighted, as they make decisions for a case \emph{depending} on other cases in their batch.
For example, if a decision maker is randomly assigned a batch of cases that are all very likely to lead to a good outcome, a large portion $1-\leniencyValue$ of them will still be handed a negative decision.
Finally, we consider a random version of \batch as a third type of decision maker, namely \random.
%
Decision makers of this type simply select uniformly at random a portion $\leniency=\leniencyValue$ of cases from the batch assigned to them, make a positive decision for them -- and make a negative decision for the remaining cases.
%
\random decision makers make poor decisions -- but they do not introduce selection bias, as their decision is not correlated with the possible outcome.
%
For this reason, including them in the experiments is useful, as it allows us to test performance of different evaluation approaches in the `extreme' scenario of absence of selection bias in the data.
\mpara{Decisions by \machine}\newline
%
For \machine, we consider the same three types of decision makers as for \humanset above, with one difference: decision makers \humanset have access to \unobservable, while \machine does not.
%
Their definitions are adapted in the obvious way -- i.e., for \independent and \batch, risk score involves only on the values of feature \obsFeatures -- but we still refer to them with the same names.
\includegraphics[width=1.1\linewidth]{./img/with_epsilon_deciderH_independent_deciderM_batch_maxR_0_9coefZ1_0_all}
\caption{Evaluation of batch decision maker on synthetic data with independent decision makers in the data. Error bars denote the standard deviation of the \failurerate estimate across data splits. In this basic setting, both our \cfbi and contraction are able to match the true evaluation curve closely but the former exhiblower standard deviations as shown by the error bars.
}
\label{fig:basic}
\label{sec:evaluators}
The purpose of the experiments is to investigate the performance of different methods in evaluating \machine on a dataset that records cases decided by \humanset.
%
We call those methods ``evaluators''.
%
For an evaluator, desired properties are accuracy (i.e., the evaluator should estimate well the failure rate of \machine), but also robustness (i.e., besides performing well on average, an evaluator is desired to perform consistently for all cases).
The first evaluator we consider is \cfbi, the proposed method of this paper, described in Section~\ref{sec:imputation}.
%
To summarize: \cfbi uses the dataset to learn a model, i.e., a distribution for the parameters involved in formulas~\ref{eq:defendantmodel} and~\ref{eq:judgemodel}; using this distribution, it predicts the outcome of the cases for which \humanset made a negative decision and \machine makes a positive one; and finally it evaluates the failure rate of \machine on the dataset.
The second evaluator we consider is \contraction, proposed in recent work~\cite{lakkaraju2017selective}, KDD'17.
It is designed specifically to estimate the true failure rate of a machine decision maker in the selective labels setting.
Contraction bases its evaluation only on the cases assigned to the most lenient decision maker in the data.
%
These cases are sorted according to the lowest leniency level at which they would be released by the evaluated decision maker $\machine$.
%
Then the failure rate estimate for a given leniency level $\leniencyValue$ can be computed as labeled outcomes after contracting the positive decisions on the cases released only at higher rates.
%
\todo{MM}{Re-write the last two sentences.}
In addition, we experiment with a few baselines.
%
As a first baseline, we consider the method that evaluates the failure rate \machine based only on those cases that received a positive decision by \humanset.
%
We refer to it as \labeledoutcomes.
As a second baseline, we consider a method that performs straightforward imputation:
given a training dataset, it considers only those cases that were accompanied with a positive decision and builds a logistic regression model on them;
it then uses the prediction of this logistic regression to impute the outcome in the test data for those cases where \machine makes a positive decision but \humanset had made a negative decision.
%
We refer to this evaluator as \logisticregression.
Finally, all evaluators are compared with the optimal evaluator that has access to actual outcomes.
%
While such an evaluator is not realistic to have in practice, it is available for synthetically generated data.
%
We refer to it as \trueevaluation.
\subsection{Pipeline}
\label{sec:pipeline}
Having described the synthetic data, decision makers, and evaluators, we now summarize how the above components are put together into the experimental pipeline.
As a first step, we generate three synthetic datasets (Section~\ref{sec:syntheticsetting}).
%
The decisions in each dataset \dataset have been made by a different type of decision maker (Section~\ref{sec:dm_exps}) -- the leniency of which is set uniformly at random over discrete values $\{0.1, 0.2, \ldots\}$.
%
As a second step, we create three instances of decision maker \machine -- again, one for each type of decision maker.
%
The role of \machine is to act as an automated system that makes decisions based on observed features \obsFeatures alone.
%
To train the \independent and \batch instances of \machine (\random does not require training) we separate a training subset from dataset \dataset.
%
To do that, we randomly mark the decisions of half of the decision makers as `training' data points -- while data points from the other half are marked as `test'.
%
Subsequently, the training subset is used to train a logistic regression model to predict outcomes \outcome from observed features \obsFeatures alone.
%
In a third step, \independent and \batch instances of \machine use the previously learned model to make decisions on the test data points in the way described in Section~\ref{sec:dm_exps} -- while \random decides randomly.
%
Each execution of the pipeline is parameterized by the leniency level of \machine, which is given as input.
%
And finally, in a fourth step, all evaluators are employed to estimate the failure rate on the decisions that different instances of \machine made on the test dataset.
\label{sec:results}
For the results we describe immediately below, we executed the pipeline for multiple random train-test splits and different leniency levels for \machine.
Figure~\ref{fig:basic} shows some representative results from this process.
%
Specifically, the plot shows the estimated failure rate for each of the evaluators, at different leniency levels.
%
The same leniency level was used for decisions in the data and for decisions by \machine.
%
For the results included in the figure, decisions in the data were made by \batch decision maker, while \machine was of \independent type.
%
In interpreting this plot, we should consider an evaluator to be good if its curve follows well that of the optimal evaluator, i.e., \trueevaluation.
%
In this scenario, we see that \cfbi performs best, but with \contraction being a very close second.
%
At the same time, the naive evaluation of \labeledoutcomes, but also the straightforward imputation by \logisticregression perform quite poorly.
%
To obtain the error bars, we divided the data $10$ times to training and test datasets.
We learned the decision maker \machine from the training set and evaluated its performance on the test sets using different evaluators.
The error bars denote the standard deviation of the estimates in this process.
\includegraphics[width=\linewidth]{./img/sl_errors_betaZ1}
Error bars denote standard deviation of the error. The presented method (\cfbi) is able to offer stable estimates with low variance robustly across different decision makers, ce of contraction
varies considerably within and across different decision makers.}
However, the picture changes somewhat when we restrict leniency to take values from a more restricted range.
This is because \contraction depends crucially on the most lenient decision maker to estimate the performance of the rest.
For example, consider Figure~\ref{fig:results_rmax05}.
The figure was generated in the same way as Figure~\ref{fig:basic}, with the only difference that the leniency of decision makers in the data was allowed to take values only among $\{0.1, 0.2, ..., 0.5\}$, and not up to $0.9$ as was the case for Figure~\ref{fig:basic}.
Figure~\ref{fig:results_rmax05} demonstrates that \contraction is only able to estimate the failure rate up to $0.5$, which is the highest leniency of decision makers in the data -- but for higher leniency rates it does not output any results.
On the contrary, the proposed method \cfbi produces failure rate estimates for all leniencies.
%
We note of course that, when we compare with \trueevaluation, we see that the accuracy \cfbi decreases for the largest leniencies -- a fact to be expected, as such cases do not exist in the data.
%
This observation is vitally important in the sense that decision makers based on elaborate machine learning techniques, such as \cfbi, may well allow for evaluation at higher leniency rates than those (often human) employed in the data.
\includegraphics[width=1.1\linewidth]{./img/with_epsilon_deciderH_independent_deciderM_batch_maxR_0_5coefZ1_0_all}
\caption{Evaluating batch decision maker on data employing independent decision makers and with leniency at most $0.5$. The proposed method (\cfbi) offers good estimates of the failure rates for all levels of leniency, whereas contraction cailure rate only up to leniency $0.5$.}
\label{fig:results_rmax05}
\end{figure}
This picture painted by Figures~\ref{fig:results_errors} and~\ref{fig:results_rmax05} is representative for all combinations of types of decision makers in the data and for \machine.
While we do not have space to include the corresponding figures for all other settings, we do provide summary results in Figure~\ref{fig:results_errors}.
Specifically, Figure~\ref{fig:results_errors} shows the aggregate error rates for the best evaluators (\cfbi and \contraction), for different types of evaluators in the data and for \machine, when the full range of leniencies is present in the data (like in Figure~\ref{fig:basic}).
The overall result is that \cfbi evaluates the decision makers accurately and robustly.
%
It is able to learn model parameters that capture the behavior of decision makers employed in the data and use that model to evaluate any decision maker \machine using only selectively labeled data.
%
\contraction shows consistently poorer performance, but not dramatically worse.
Again, our interpretation is that this is due to the fact that \contraction crucially depends on the data points that correspond to the most lenient decision makers, while \cfbi makes full use of all data.
\spara{The effect of unobservables.} So far in our synthetic experiments, we have assumed that observed and unobserved features are of equal importance in determining possible outcomes, an assumption encoded in the value of parameters $\beta_\obsFeatures = \beta_\unobservable = 1$ (see Section~\ref{sec:syntheticsetting}).
%
To explore situations where the importance of unobservables is higher, we now also consider settings with
$\beta_\obsFeatures = 1$, $\beta_\unobservable = 5$.
%
The results are shown in Figure~\ref{fig:highz}, which is produced just like Figure~\ref{fig:results_errors}, the only difference being the parameters $\beta_\obsFeatures$, $\beta_\unobservable$.
%
In these settings, the decisions in the data are made mostly based on background factors not observed by the decision maker $\machine$ being evaluated, thus the performance $\machine$ is expected to be as good as in Fig.~\ref{fig:results_errors}.
%
Nevertheless, the proposed method (\cfbi) is able to evaluate different decision makers $\machine$ accurately.
%
Contraction shows again consistently worse performance in comparison, also in comparison to \contraction in Fig.~\ref{fig:results_errors} (again, this was to be expected due to the higher weight of $\beta_\unobservable$).
Thus overall, in these synthetic settings our method achieves more accurate results with considerably less variation than \contraction, allowing for evaluation in situations where the strong assumptions of contraction inhibit evaluation altogether.
Riku-Laine
committed
COMPAS (Correctional Offender Management Profiling for Alternative Sanctions) is equivant's (formerly Northpointe\footnote{\url{https://www.equivant.com}}) set of tools for assisting decision-making in the criminal justice system.
%
COMPAS provides needs assesments and risk estimates of recidivism.
%
The COMPAS score is derived from prior criminal history, socio-economic and personal factors among other things and it predicts recidivism in the following two years \cite{brennan2009evaluating}.
Riku-Laine
committed
%
The system was under scrutiny in 2016 after ProPublica published an article claiming that the tool was biased against black people \cite{angwin2016machine}.
Riku-Laine
committed
%
After the discussion, \citet{kleinberg2016inherent} showed that the criteria for fairness used by ProPublica and Northpointe couldn't have been consolidated.
The COMPAS dataset used in this study is recidivism data from Broward county, California, USA made available by ProPublica\footnote{\url{https://github.com/propublica/compas-analysis}}.
%
Judges and defendants in the data correspond to decision makers and cases in our setting (Section~\ref{sec:setting}), respectively.
Riku-Laine
committed
%
The original data contained information about $18 610$ defendants who were given a COMPAS score during 2013 or 2014.
%
After removing defendants who were not preprocessed at pretrial stage $11 757$ defendants were left.
%
Additionally, defendants for whom the COMPAS score couldn't be matched with a corresponding charge were removed from analysis resulting in a data set consisting of $7 214$ observations.
%
Following ProPublica's data cleaning process, finally the data consisted of $6 172$ offenders.
Riku-Laine
committed
%
Data includes the subjects' demographic information such as gender, age and race together with information on their previous offences.
For the analysis, we deployed $\judgeAmount \in \{12, 24, 48\}$ synthetic judges with fixed leniency levels 0.1, 0.5 and 0.9 so that a third of the decision-makers shared a leniency level.
Riku-Laine
committed
%
The $\datasize=6 172$ subjects were distributed to the \judgeAmount judges uniformly at random.
Riku-Laine
committed
%
In this scenario, the judges based their decisions on the COMPAS score, releasing the fraction of defendants with the lowest score according to their leniency.
Riku-Laine
committed
%
E.g. if a synthetic judge had leniency $0.5$, they would release $50\%$ of defendants with the lowest COMPAS score.
Riku-Laine
committed
%
Those who were given a negative decision had their outcome label set to positive $\outcome = 1$.
%
After assigning the decisions, the data was split 10 times to training and test sets containing the decisions of half of the judges each.
%
A logistic regression model was trained on the training data to predict recidivism from categorised age, race, gender, number of prior crimes and the degree of crime COMPAS screened for (felony or misdemeanour) using only observations with positive decisions.
As the COMPAS score is derived from a larger set of predictors then the aforementioned five \cite{brennan2009evaluating}, the unobservable information would then be encoded in the COMPAS score.
Riku-Laine
committed
%
The built logistic regression model was used in decision maker \machine in the test data and the same features were given as input for the counterfactual imputation.
The deployed machine decision maker was defined to release \leniencyValue fraction of the defendants with the lowest probability for negative outcome.
\begin{figure}
\begin{center}\includegraphics[width=\linewidth]{img/sl_errors_betaZ5}
\end{center}
\caption{Error of estimate w.r.t true evaluation when the effect of the unobserved $\unobservable$ is high ($\beta_\unobservable=\gamma_\unobservable=5$). Although the decision maker quality is poorer, the proposed approach (\cfbi) can still evaluate the decision accurately. Contraction shows higher variance and less accuracy}
\label{fig:highz}
%\subsection{Results}
\begin{figure}
%\centering
\includegraphics[width=\linewidth]{./img/sl_errors_compas}
\caption{Results with COMPAS data, error bars represent the standard deviation of the \failurerate estimate errors across all levels of leniency with regard to true evaluation. \cfbi gives both accurate and precise estimates despite of the number of judges used. Performance of ets notably worse when data includes decisions by increasing number of judges.
Riku-Laine
committed
Figure~\ref{fig:results_compas} shows the failure rate errors of the batch machine decision maker as a function of the number of judges in the data (also batch decision makers).
The mean error of our \cfbi at all levels of leniency is consistently lower than that of \contraction for each number of judges used in the experiments.
%
Quite notably, the error of \contraction gets larger when there are more judges in the data and the variance of the failure rate estimates it produces increases as the most lenient judge are assigned fewer and fewer subjects.
Again, we attribute this behavior to the fact that \contraction crucially depends on the most lenient decision makers, while \cfbi makes full use of the data.