Fighting for fairer sentences with data and AI

By | 4 minute read | February 17, 2022

I’ve always been excited about artificial intelligence and the potential for it to enhance everything – whether that is in the workplace or in society. So when the Call for Code for Racial Justice initiative emerged in 2020 I just felt like I had to get involved in the AI-based projects that were proposed by the Black community in IBM and their allies. Of all the projects the Black community in IBM incubated, I was attracted to Open Sentencing as it had a close connect to the voluntary work I do around community policing. At its core, this solution is about using data to highlight where there are disparities in the judicial system: where individuals may face harsher sentencing purely based on the color of their skin. The initial data we obtained showed that Black people are more likely to be charged with a higher sentence for petty crime than those from other communities. We realized that we would be able to present this data through a dashboard – but where could this information have the biggest impact?

Finding the right end user

We originally thought that judges would be the best recipients for this data when making decisions on the sentences they pass down. However, we realized there are many stages in the criminal justice system before a trial even begins, and it would make sense for us to work earlier in the process, potentially even being able to stop many of these cases from getting to trial.

Public defenders are involved from the outset and can petition to stop cases going to trial, especially if they can make the case that a Black defendant may be prejudiced by the system. So we focused our efforts on building a dashboard specifically for public defenders. We conducted design thinking workshops to get feedback from this group and one thing that came through was the need for a dashboard that was incredibly easy to use and understand, as time is often at a premium.

The Open Sentencing solution

The Open Sentencing model uses AI to detect bias in sentencing. This API-based application uses two trained models: one focused on US Federal sentencing and the other trained on data obtained at the State level. The IBM AI Fairness 360 toolkit is used to identify bias by comparing benchmark data with an individual case that a public defender enters into the system. The Open Sentencing solution then highlights if there is a disparity – say a particularly harsh sentence being proposed for a first-time defendant from the Black community. A public defender can use this data to make the case for a more reasonable sentence or settlement.

Getting hold of the data

To build a dashboard, we needed data on sentencing rates by demographic. One big surprise for us was that although many court houses will publish this data, there is no standardization in the legal system so the format of the data can vary widely at a court level, county level or state level. We had to do a lot of manual work to get the data into a common format so that it could be compared and benchmarked against. This is not a small issue, especially when we think about scaling the solution.

One observation from working on this project is that open standards for data will help bring more technology into the judicial system in a way that will benefit us all. The easier it is for data scientists to get hold of standardized data, the greater the role they can play in fighting for social justice. Learn more about how to make sure you’re standardizing and able to access the right data by reading about a new approach, Data Fabric.

The power of open source teaming

As I said, this project started internally in the summer of 2020. Later that year, it was released as an open source model and published to GitHub. There have been many different contributors along the way and in fact I’m one of the few people that was involved with this project since its inception. There have however been core skills that are useful for us across the board. We’ve needed front-end development, back-end development and data science skills to bring this project to life. We also have the need for someone who can help collect data and organize it into a common format, and a strong project manager and system to keep the team focused.

It has been encouraging for me to know that this project has been the focus of a class at Rensselaer Polytechnic Institute (RPI) who are using the project to learn about open source and its potential for taking on the greatest challenges we face. On that note, I look forward to seeing how this solution could make a difference not just here in the US, but potentially throughout the world.

For more details on the importance and value of using AI for good, visit

This post is part of a series during Black History Month covering the relationship between artificial intelligence and social justice.