There are real-life effects of machine bias in courtrooms. American lives are completely changed based on criminal sentencing, which can mean the difference between rehabilitation and recidivism. This issue is urgent and finding a solution to ensure equality is imperative.
We investigated how artificial intelligence creates bias in the US criminal justice system. Recidivism prediction algorithms used in courtrooms have been shown to produce unnecessarily harsh risk assessment scores against Black individuals, leading them to have more strict bail guidelines. This contributes to a greater narrative against Black Americans. In order to explore how different algorithms might be biased in predicting recidivism, we used 3 different classification models to predict whether individuals in the Virginia Felony Database dataset would recidivate. We tested three different (optimized) machine learning algorithms — Logistic Regression, Random Forest, and k-nearest-neighbors and compared the resulting confusion matrices to determine which was the most effective. The final Logistic Regression model had a final accuracy of 70.44%; the Random Forest algorithm had the best at 75.64% and K-nearest-neighbors had 72.24%. All algorithms had a greater false positive (false arrest prediction) for white individuals, likely due to the dataset containing many examples of white criminals. In our model white defendants were discriminated against because of data bias, which demonstrates how algorithms can treat different racial groups differently depending on the data that goes in. Given historical bias, we can see how this same pattern could occur in the opposite direction favoring white individuals more frequently in other datasets.
Related Projects