How Algorithms Expose the Law

68 Pages Posted: 2 Aug 2021 Last revised: 13 Dec 2021

See all articles by Colin Doyle

Colin Doyle

Loyola Law School Los Angeles; Harvard Law School

Date Written: October 31, 2021


Legal algorithms seem up to no good, particularly in the domain of criminal law, where they have been shown to produce biased and inequitable outcomes. But oftentimes legal algorithms are not causing harm. Instead, they are revealing harm inherent to the laws that they apply.

Algorithms have an overlooked capacity to reveal information about law. So far, machine learning has been used to optimize legal predictions. But machine learning could also be used to explore and demarcate the limits of legal predictions. By generating models that capture the full range of ways that a prediction can be made under a particular law, algorithms can reveal how accurately a legal outcome can be predicted, how a law’s outcomes will be distributed across the population, and the strength of factors used to predict a particular outcome. These insights can be used to ascertain a law’s systemic limits: how a law falls short of its intended purpose; how a law necessarily affects certain groups; how a law works in arbitrary, inefficient, or redundant ways; and how seemingly neutral predictions include value judgments that may conflict with other legal principles and goals.

Algorithmic exposure should be adopted as a routine, best practice for diagnosing the efficacy and fairness of predictive laws, particularly in the domain of criminal law. This Article uses pretrial incarceration doctrine as lens for surveying how algorithmic exposure could be incorporated within political advocacy, legislation, and agency policy. By using algorithms to reveal the limits of contemporary pretrial incarceration laws, advocacy groups could refine their policy positions and galvanize the public. Likewise, legislatures could use algorithms as a diagnostic tool for assessing and calibrating potential pretrial reforms. Independent of statutory changes, prosecutors could use algorithmic analysis of pretrial doctrine to justify internal policy reforms — both in court and to the public. Taken together, these examples reveal algorithms’ potential as a tool for exposing and transforming the law.

Keywords: algorithms, risk assessment, criminal law, technology, progressive prosecutor, algorithmic fairness

Suggested Citation

Doyle, Colin, How Algorithms Expose the Law (October 31, 2021). Harvard Public Law Working Paper No. 21-45, Available at SSRN: or

Colin Doyle (Contact Author)

Loyola Law School Los Angeles ( email )

919 Albany Street
Los Angeles, CA 90015-1211
United States

Harvard Law School ( email )

Do you have negative results from your research you’d like to share?

Paper statistics

Abstract Views
PlumX Metrics