Skip to content
Snippets Groups Projects
experiments.tex 16.3 KiB
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.

\section{Experiments}

\todo{Michael}{We should make sure that what we describe in the experiments follows what we have in the technical part of the paper, without describing the technical details again. This may require a light re-write of the experiments. See also other notes below.}
\todo{Michael}{Create and use macros for all main terms and mathematical quantities, so that they stay consistent throughout the paper. Already done for previous sections}

We thoroughly tested our proposed method, CFBI (countefactual-based imputation) for evaluating decision maker performance in terms of accuracy, variability and robustness. We employed both synthetic and real data, including decision of several different kinds of decision makers. We compare performance especially to the state-of-the-art contraction technique of \citet{lakkaraju2017selective}. The implementation using Python 3.6.9 and PyStan v.2.19.0.0 with cmdstanpy 0.4.3 will be made available online.
Antti Hyttinen's avatar
Antti Hyttinen committed
\subsection{Synthetic Data} \label{sec:syntheticsetting}
Antti Hyttinen's avatar
Antti Hyttinen committed
For our experiments with synthetic data, we build on the simulation setting of \citet{lakkaraju2017selective}.
We sampled a total of  $\datasize=5k$ subjects. 
The features \obsFeatures and \unobservable were drawn independently from standard Gaussians.
Outcomes for the subjects were sampled from:
\begin{eqnarray}
\prob{\outcome=0~|~\obsFeaturesValue, \unobservableValue} & =&
	\invlogit(\alpha_\outcome + \beta_\obsFeatures \obsFeaturesValue + \beta_\unobservable \unobservableValue + \epsilon_\outcome )	
Antti Hyttinen's avatar
Antti Hyttinen committed
\end{eqnarray}
where values for the coefficients $
%\gamma_\obsFeaturesValue,~\gamma_\unobservableValue,
~\beta_\obsFeatures$ and $\beta_\unobservable$ were all initially set to $1$.
Antti Hyttinen's avatar
Antti Hyttinen committed
%
Antti Hyttinen's avatar
Antti Hyttinen committed
The intercept $\alpha_\outcome$ determining the baseline probability for a negative result was set to $0$.
Antti Hyttinen's avatar
Antti Hyttinen committed
Stochasticity was added to the behaviour of the subjects by including $\epsilon_\outcome$ which has a zero-mean Gaussian distribution with variance $0.1$.
The subjects were assigned to the decision makers (described in the next subsection) randomly such that each decision maker received a total of 100 subjects.
The leniencies \leniency for the $\judgeAmount=50$ decision makers \human were then drawn from Uniform$(0.1,~0.9)$.
Antti Hyttinen's avatar
Antti Hyttinen committed
%
Antti Hyttinen's avatar
Antti Hyttinen committed
%The error terms $\epsilon_\decisionValue$ and $\epsilon_\outcomeValue$ were sampled independently from zero-mean Gaussian distributions with variance $0.1$.
Antti Hyttinen's avatar
Antti Hyttinen committed
%
The data set was finally split to training and test data sets containing the decision from 25 judges each at random for training the models for the machine decision makers.
Antti Hyttinen's avatar
Antti Hyttinen committed


Antti Hyttinen's avatar
Antti Hyttinen committed
\subsection{Decision Makers} \label{sec:decisionmakers}

Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed
We used several different kinds of decision makers in the experiments, both as providing simulated decisions for the data set and as candidate decision makers to be evaluated. Recall from Section~\ref{sec:setting} that the portion of subjects each decision maker makes a positive decision for, can be controlled by leniency level $\leniency$.
Antti Hyttinen's avatar
Antti Hyttinen committed

The simplest decision maker, \textbf{Random}, simply selects portion $\leniency=\leniencyValue$ of the subjects assigned to it at random, makes a positive decision $\decision=1$ from them and a negative decision $\decision =0$ for the remaining subjects.
%
It should be however noted, that whenever a random decision maker makes the decisions in the data, the resulting data set is not selectively labeled as the decision does not imply anything about the outcome or conversely how the missingness of the outcome does not depend on the outcome. 
%
We still chose to analyse the effect of using poor decision-makers in the data to see how well the proposed imputation method would perform when the assumptions of it were violated.

Following~\citet{lakkaraju2017selective}, we also used \textbf{Batch} decision maker. This decision maker sorts its subjects by some risk scores and then releases $\leniencyValue$ portion of the subjects with the lowest score. In the experiments the risk scores were computed using expression given in Equation~\ref{eq:defendantmodel}.%expression 
Antti Hyttinen's avatar
Antti Hyttinen committed
%\begin{equation} \label{eq:riskscore}
%\invlogit(\gamma_\obsFeatures\obsFeaturesValue + \gamma_\unobservable\unobservableValue + \epsilon_\decisionValue).
%\end{equation}
Antti Hyttinen's avatar
Antti Hyttinen committed

The previous decision maker may seem unfair as it makes decisions based on a subject \emph{depending} on other subjects. To put it simply, they may need to make a negative decision for a subject today in order to make a positive decision for some subject tomorrow. To this end, we formulated an \textbf{Independent} decision maker, generalizing the batch decision maker, in the following way.
 The risk scores of all defendants have some distribution which subsequently has some cumulative distribution function $G$. Now, given a decision maker with leniency $r$, the independent decision maker deals a positive decision if a defendant's risk score is in the \leniencyValue portion of the lowest scores, i.e. if the risk score of the defendant is lower than the inverse cumulative distribution function $G^{-1}$ at \leniencyValue. In the experiments the risk scores were computed by logistic regression according to equation~\ref{eq:defendantmodel}. See Appendix~\ref{sec:independent} for in-depth details. 
Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed
The decision makers in the data and the evaluated decision makers differ in the observability of  \unobservable: the former have access to \unobservable and include it in their logistic regression model while the latter omit \unobservable completely. All parameters of the logistic regression models for evaluated decision makers are learned from the training data set; evaluation is solely based on the test set. 

% WHAT ABOUT ADDING NOISE!!!! LEAVING IT OUT NOW.
Antti Hyttinen's avatar
Antti Hyttinen committed
%
Antti Hyttinen's avatar
Antti Hyttinen committed

\begin{figure}
\includegraphics[width=1.1\linewidth]{./img/_deciderH_batch_deciderM_batch_maxR_0_9coefZ1_0_all} 
\caption{Evaluation of batch decision maker on synthetic data with batch 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 exhibits markedly lower standard deviations as shown by the error bars.
\acomment{Why no error bars for true evaluation? How exactly were the error bars determined?}
 }\label{fig:basic}
\end{figure}

Antti Hyttinen's avatar
Antti Hyttinen committed
\subsection{Evaluators}
Antti Hyttinen's avatar
Antti Hyttinen committed
In addition to counterfactual-based imputation (\textbf{CFBI}) presented in this paper, we consider three other ways of evaluating decision makers. For the synthetic data, we can obtain the outcomes even for subjects with negative decisions. We call the acceptance rate failure rate tradeoff curve obtained by using the true outcomes \textbf{True evaluation}. Note that for a realistic setting the true evaluation would not be available. We also report the failure rate using only the subjects that were released in the data as \textbf{Labeled outcomes}. This naive baseline has already been previously shown to considerably underestimate the true failure rate \citep{lakkaraju2017selective}.
Antti Hyttinen's avatar
Antti Hyttinen committed

The state-of-the-art method for evaluating decision makers in this setting is \textbf{Contraction} of \citet{lakkaraju2017selective}.
Antti Hyttinen's avatar
Antti Hyttinen committed
It is designed specifically to estimate the true failure rate of a machine decision maker in the selective labels setting.
Antti Hyttinen's avatar
Antti Hyttinen committed
Contraction bases its evaluation only on the subjects assigned to the most lenient decision maker in the data. These subjects 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 subjects released only at higher rates.
Assuming that the distribution of subjects assigned to each subject is similar, this failure rate can be generalized to the whole data set.
Antti Hyttinen's avatar
Antti Hyttinen committed
\subsection{Results}
Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed
Figure~\ref{fig:basic} shows the basic evaluation of a batch decision maker on data employing batch decision makers over different leniencies. Here evaluation metric is good if it can match the true evaluation (only available for synthetic data) for any leniency.
Antti Hyttinen's avatar
Antti Hyttinen committed
%
In this basic setting, the proposed CFBI achieves estimates with considerable lower variance (given by the error bars) than the state-of-the-art contraction. 
Antti Hyttinen's avatar
Antti Hyttinen committed
%
Antti Hyttinen's avatar
Antti Hyttinen committed
The naive approach of comparing only cases where outcome is not masked by decision (labeled outcomes) underestimates the failure rate considerably.
Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed
\begin{figure}
%\centering
\includegraphics[width=\linewidth]{./img/sl_errors_betaZ1}
Antti Hyttinen's avatar
Antti Hyttinen committed
\caption{Error of estimate w.r.t true evaluation.
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, the performance of contraction varies considerably within and across different decision makers.  }
Antti Hyttinen's avatar
Antti Hyttinen committed
\label{fig:results_errors}
\end{figure}
Figure~\ref{fig:results_errors} shows the summarized error rates for top evaluators, using different decision makers being evaluated and also employed in the data. CFBI evaluates the decision makers with low error rates robustly. It is able to correctly detect the behaviour of the decision makers employed in the data and use that to evaluate any further decision makers using only selectively labeled data. Contraction shows markedly poorer performance here, this may be due to the strong assumptions it needs to make which may not hold for all decision makers.
%NOT TRUE:
%\footnote{More detailed plots similar to Figure~\ref{fig:basic} can be found in the supplementary material.}
\begin{figure}
\includegraphics[width=1.1\linewidth]{./img/_deciderH_independent_deciderM_batch_maxR_0_5coefZ1_0_all_fixed}
\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 can estimate failure rate only up to leniency $0.5$.
Antti Hyttinen's avatar
Antti Hyttinen committed
}
\label{fig:results_rmax05}
\end{figure}
Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed
Figure~\ref{fig:results_rmax05} shows the evaluation over leniencies similarly as~Figure~\ref{fig:basic} but this time the maximum leniencies of decision makers in the data were limited to below $0.5$. 
%
Contraction is only able to estimate the failure rate up to $0.5$, for higher leniency rates it does not output any results. 
%
Our method (CFBI) can produce failure rate estimates for all leniencies (although the accuracy of failure rate estimates for the largest leniencies are lower than with unlimited leniency).
Antti Hyttinen's avatar
Antti Hyttinen committed
%
This observation is vitally important in the sense that decision makers based on advanced machine learning techniques may well allow for the use higher leniency rates than those (often human) employed in the data.
Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed

Figure~\ref{fig:highz} still shows experiments where the effect of the unobserved $\unobservable$ is higher, i.e. we used $\beta_\unobservable=\gamma_\unobservable=5$ when generating the data. In this case 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 not too good. Nevertheless the proposed method (CFBI) is able to evaluate different decision makers $\machine$ accurately. Contraction shows markedly poorer performance in comparison, also when comparing to contraction in Figure~\ref{fig:results_errors} where the effect of $\unobservable$  on the decisions in the data was not as high.
Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed
Thus overall, in these synthetic settings our method achieves more accurate results with considerably less variation than the state-of-the-art contraction, allowing for evaluation in situations where the strong assumptions of contraction inhibit evaluation altogether.
Antti Hyttinen's avatar
Antti Hyttinen committed

Antti Hyttinen's avatar
Antti Hyttinen committed
\subsection{COMPAS data}

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}.
The system was under scrutiny in 2016 after ProPublica published an article claiming that the tool was biased against black people \cite{angwin2016machine}.
%
After the discussion, \citet{kleinberg2016inherent} showed that the criteria for fairness used by ProPublica and Northpointe couldn't have been consolidated.

The COMPAS data set used in this study is recidivism data from Broward county, California, USA made available by ProPublica\footnote{\url{https://github.com/propublica/compas-analysis}}.
%
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.
%
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.
The $\datasize=6 172$ subjects were distributed to the \judgeAmount judges as evenly as possible and at random.
In this 
%semi-synthetic %MAYBE NOT EMPHASIZE THIS TOO MUCH
 scenario, the judges based their decisions on the COMPAS score, releasing the fraction of defendants with the lowest score according to their leniency.
E.g. if a synthetic judge had leniency $0.4$, they would release $40\%$ of defendants with the lowest COMPAS score.
%
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.
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}
Antti Hyttinen's avatar
Antti Hyttinen committed
\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}
\end{figure}
Antti Hyttinen's avatar
Antti Hyttinen committed
%\subsection{Results}

\begin{figure}
%\centering
\includegraphics[width=\linewidth]{./img/sl_errors_compas}
\caption{Results with COMPAS data, error bars \acomment{what?}. CFBI gives both accurate and precise estimates despite of the number of judges used. Performance of contraction gets notably worse when data includes decisions by increasing number of judges.
Antti Hyttinen's avatar
Antti Hyttinen committed
}
\label{fig:results_compas}
\end{figure}
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 contractions regardless of number judges used in the experiments. The error of contraction gets larger when there are more judges in the data. Especially the variance increases as the most lenient judge gets fewer and fewer subjects.
Riku-Laine's avatar
Riku-Laine committed