As artificial intelligence moves into the courtroom, much has been written about sentencing algorithms with hidden biases. Daniel L. Chen, a researcher at both the Toulouse School of Economics and University of Toulouse Faculty of Law, has a different idea: using AI to help correct the biased decisions of human judges.

Chen, who holds both a law degree and a doctorate in economics, has spent years collecting data on judges and US courts. “One thing that’s been particularly nagging my mind is how to understand all of the behavioral biases that we’ve found,” he says. For example, human biases that can tip the scales when making a decision. In a new working paper, Chen lays out a suggestion for how large datasets combined with artificial intelligence could help predict judges’ decisions and help us nudge them to make sentencing fairer.

The Verge spoke to Chen about the many factors that can influence judicial bias and the future of AI in law.

This interview has been lightly edited for clarity.

It’s very well-known by now that judges’ decisions are often biased by factors that aren’t relevant to the case at hand. That said, can you give me some specific examples of studies in this area?

Sure. One published finding is the gambler’s fallacy. If I’m an assigning judge and I assign asylum too many times in a row, I may worry that I’m becoming too lenient. Then I actively try to autocorrect. So the next time, I’ll deny asylum. That’s an extraneous influence because how I ruled on the previous case wrongly affects the ruling on the current case. Another finding is that in circuit courts, you see behavior varying over the presidential election cycle. When election season comes around, they start to disagree more and vote along partisan lines.

We have a paper on early predictability where we used machine learning to try to predict judges’ decisions in asylum cases. It turns out, we can make a very good prediction as to how the judge will rule before the case even opens, using only information on the judge’s identity and the nationality of the asylum seeker. That raises the question: why are the judges so predictable early before observing the facts? One interpretation is that maybe the judges are resorting to more snap judgments and heuristics to decide a case rather than the facts of it.

Right. So your idea is that if we can spot which judges tend to be “predictable” — implying that they might rely more on snap judgments — we can alert them to this fact and suggest that they deliberate more carefully?

Yes. It can be a way of noticing when judges resort to snap judgments that aren’t accounted for by the legally relevant factors. Then we can suggest something like, “Can you spend a few more hours or a few more days on this case? Based on what you’ve done in the past, you tend to be a little bit more biased in this direction.”

In the early predictability study, you only used limited information on a judge’s identity and nationality. More broadly, you suggest that we can use other datasets, combined with artificial intelligence, to detect instances when judicial decisions can be predicted by extraneous factors. How would this work?

I’d love to have a large dataset on the history of the judge’s decisions and all of the potential contextual extraneous factors. Then you could analyze the data and see what factors, relevant and not relevant, might have affected the judge’s decision. A big dataset can help us say that in these certain situations, the judge is more likely to be influenced in a given direction.

What types of extraneous factors might we want to take into account?

There’s so much we’ve learned from psychological economics and political science — everything from mood or weather. For example, there’s a paper that says that Louisiana football losses affect judge sentencing. Others look at how temperature affects assigning decisions. We have a paper showing that judges tend to be more lenient on defendant’s birthdays. So we could try to get all of these data and put it together. That would be a starting point.

Once it looks like there might be bias, what would you do? One suggestion is the nudge to deliberate more carefully. In the paper, you also mentioned a possible training program?

Letting people know that they’re affected by biases can help reduce them. Maybe giving judges more training would help. I’m not talking about showing them a litany of biases, which can be hard to keep track of, but about offering a theoretical framework to understand a lot of different phenomenon and all the ways and reasons we’re influenced.

There’s some controversy over AI in law and sentencing right now. How do you think that’ll change?

More and more, people are using the tools of natural language processing and AI and big data with court opinions. That’s a promising area of research, and I’m interested in seeing how it translates into policy.

There’s certainly a lot of interest in how algorithms can improve decision-making. I’ve also been thinking about how and why people are so resistant to this idea of predictions and machines assisting in judgment. I think it’s a little related to the fact that people like to think we’re unique and so being compared to someone else in this way isn’t quite recognizing my individuality and dignity. On the one hand, people might just get used to big data helping judges make decisions. On the other, I’m an individual, so don’t treat me like yet another data point.

Of course, all of this is subject to the usual concerns of how good predictions are. Your predictions can be based on biased data, and thinking carefully about how it can affect your results is important. That said, it’s still a balancing act. Even if it’s based on biased data, if you have biased humans who are currently making decisions, maybe a slightly biased prediction is still slightly fairer.