Skip to Content

Justice in the Grip of Algorithms:

Has Artificial Intelligence Become the Supreme Judge?
9 June 2026 by
Al-Zahraa Ahmed

I.  Introduction

The ancient maxim that 'justice is blind' has long served as the foundational metaphor of impartial adjudication a reminder that the judge must set aside personal bias, cultural conditioning, and social affiliation in order to discharge the solemn duty of deciding a fellow citizen's fate. Yet the twenty-first century has ushered in a development that challenges this ideal in a manner unprecedented in the history of law: the algorithmic colonisation of the courtroom. Artificial intelligence (AI) systems are no longer mere administrative utilities; they now participate, often decisively, in determinations that deprive individuals of liberty. This transformation demands urgent scholarly attention, for it implicates not only procedural rights but the very conception of justice itself.

The deployment of predictive risk-assessment tools in criminal proceedings raises three interlocking questions.[1] First, whether algorithmic outputs can ever satisfy the legal standard of individualised sentencing. Second, whether the proprietary opacity of such systems is reconcilable with the constitutional right to confront adverse evidence. Third, whether the legal frameworks currently in force across different jurisdictions are adequate to govern an instrument whose inner workings remain inaccessible to the very courts that rely upon them.

This article advances the thesis that algorithmic risk assessment, as presently constituted, poses a structural threat to the right to a fair trial. It proceeds in five parts. Part II outlines the legal and technical framework governing the integration of AI into criminal justice. Part III interrogates the myth of digital neutrality. Part IV analyses the leading judicial precedents and the transparency crisis they reveal. Part V surveys the comparative landscape across the European Union, the United States, and Egypt. The article concludes with targeted recommendations aimed at preserving the rule of law in an age of algorithmic decision-making.

II.  The Legal and Technical Framework

The integration of AI into criminal justice systems rests upon a particular class of machine-learning architecture: supervised learning models trained on historical criminal justice data to generate predictions about an individual's likelihood of reoffending—a probability commonly expressed as a 'recidivism risk score.' The most widely discussed instrument in the United States is the COMPAS system (Correctional Offender Management Profiling for Alternative Sanctions). [2] COMPAS and analogous tools generate scores derived from answers to standardised questionnaires, combined with prior criminal history, and present those scores to sentencing judges as evidence of future dangerousness.

From a constitutional standpoint, the pivotal development is the Supreme Court's recognition in Carpenter v. United States (2018) that digital data carries weighty constitutional implications under the Fourth Amendment. [3] While Carpenter concerned cell-site location data rather than risk-assessment algorithms, its analytical frameworkemphasising the qualitative difference between digital information and conventional evidence is directly relevant to the AI context. The Court's reasoning supports the proposition that when the State deploys digital instruments to influence the exercise of judicial discretion, heightened constitutional scrutiny is warranted.

The critical legal distinction that must be preserved is between 'predictive accuracy' and 'legal justice.' Machine-learning developers frequently tout the statistical power of their models; however, the law is not primarily concerned with aggregate correlation. Legal proceedings demand individualisation of justice. [4] The sentencing judge is required to evaluate the defendant's unique circumstances history, character, prospects for rehabilitation factors that are inevitably reduced to noise in the binary world of algorithmic classification. This reductionism threatens the principle of individualised sentencing, because a 'risk score' acts as a cognitive anchor that subtly but powerfully constrains judicial discretion, in effect outsourcing that discretion to an opaque computational model.

III.  The Myth of 'Digital Neutrality'

One of the most seductive and dangerous assumptions attending the deployment of AI in criminal justice is the belief that algorithmic outputs are neutral that because a machine, rather than a human, generates the prediction, the output is free from the prejudices that have historically distorted judicial decision-making. This assumption is empirically unfounded and legally consequential. Algorithmic bias is not an accidental imperfection susceptible to easy correction; it is a structural feature of systems trained on historically biased datasets.

When a recidivism-prediction algorithm is trained on decades of arrest and conviction data, it learns and replicates the patterns embedded in that data including patterns that reflect systemic racial disparities in policing, prosecution, and sentencing. The machine does not merely observe these disparities; it codifies and amplifies them, presenting the product of historical injustice as scientific truth. [5] The result is a feedback loop: biased data produces biased predictions, which inform biased decisions, which generate the future data on which subsequent models will be trained.

The English Court of Appeal's decision in R v. Bridges (2020) is instructive in this regard, even though it arose in the context of facial recognition rather than sentencing. [6] The court held that the deployment of automated facial recognition technology by South Wales Police was unlawful on the grounds, inter alia, that the data protection impact assessment was inadequate and that the legal framework governing the use of such technology lacked sufficient clarity. The broader principle that algorithmic tools cannot be presumed to be neutral and must be subjected to rigorous legal scrutiny is fully applicable to risk-assessment instruments.

The concept of 'digital neutrality' thus functions as a form of laundering: human prejudice is transmitted into the training data, processed by a mathematical function, and returned as a 'score' a figure that carries the false imprimatur of scientific objectivity. The score is, in reality, a quantification of historical injustice, and courts that accept it without critical examination become complicit in perpetuating that injustice. [7]

IV.  Judicial Precedents and the Transparency Crisis

The definitive American precedent on algorithmic sentencing is State v. Loomis (2016), decided by the Wisconsin Supreme Court. Eric Loomis was sentenced in part on the basis of a high-risk COMPAS score. [8] He challenged the sentence on two grounds: first, that reliance on a proprietary algorithm violates the Due Process Clause of the Fourteenth Amendment because the defendant cannot examine or challenge the tool; and second, that the algorithm's use of gender as a variable violates the Equal Protection Clause.

The Wisconsin Supreme Court rejected both challenges and upheld the sentence, holding that the COMPAS score was used as only one factor among many and that the sentencing judge had not mechanically deferred to it. However, the reasoning is deeply problematic. The court treated the algorithm's opacity as an unfortunate but tolerable feature, rather than as a constitutional defect. [9] In doing so, it established a precedent that effectively creates a new category of evidence digital evidence immune to cross-examination—which sits in direct tension with the constitutional right to confront adverse evidence.

The right-to-confrontation problem is not merely procedural. The Sixth Amendment's Confrontation Clause, as interpreted in Crawford v. Washington (2004), ensures that defendants have the opportunity to test the reliability of evidence through adversarial examination. Where that evidence is a risk score generated by a proprietary algorithm whose source code is shielded by trade-secret protections, meaningful confrontation is impossible. [10] The defense is compelled to challenge a black box, armed only with the output and denied access to the mechanism that produced it.

More recent jurisprudence signals growing judicial unease with this state of affairs. In Lomax v. State (2020), courts began to insist that defendants possess the right to examine the logic applied against them. [11] This emerging line of authority reflects a broader recognition that the legitimacy of a criminal judgment depends not only on its outcome but on the intelligibility of the reasoning that produced it. An unexplained risk score cannot satisfy that requirement, regardless of the weight actually accorded to it by the sentencing judge.

The developer-liability dimension is equally pressing. In People v. Superior Court (2020), the legal community confronted the question of whether software developers bear professional responsibility for the foreseeable discriminatory outputs of their systems. [12] The principle of 'algorithmic liability' posits that a line of code is a normative judgment that the choice of training data, model architecture, and optimisation metric reflects value commitments that cannot be sheltered behind a claim of technical neutrality. Developers must be held to a duty of care commensurate with the magnitude of the interests at stake when their software is deployed in criminal proceedings.

V.Comparative Perspectives: The European Union, the United States, andEgypt

The regulatory divergence between jurisdictions reveals the absence of any global consensus on the governance of AI in criminal justice, and underscores the urgency of developing coherent normative frameworks.

The European Union. The EU AI Act (Regulation (EU) 2024/1689), which entered into force in 2024, represents the most comprehensive regulatory response to date. The Act classifies AI systems used by competent authorities for risk assessment in the context of criminal proceedings as 'High-Risk' applications. [13] High-Risk systems are subject to a demanding set of ex ante conformity requirements, including: adequate data governance measures to address bias; technical documentation sufficient to enable post-hoc scrutiny; automatic logging of operations; transparency obligations toward users; and human oversight requirements designed to ensure that algorithmic outputs do not displace human judgment. The Act thus operationalises the principle that AI must remain a tool in the hands of the judge, not a substitute for the judge's deliberative function.

The United States. The American approach is markedly more fragmented. In the absence of federal legislation specifically governing algorithmic sentencing, the field is governed by a patchwork of state statutes, judicial decisions, and soft-law instruments. The result is a system of profound inconsistency in which the constitutional protections available to a defendant are determined in part by the state in which he or she is sentenced. Some states have enacted disclosure requirements for risk-assessment tools; most have not. The federal courts have declined, thus far, to hold that the opacity of a proprietary algorithm is per se unconstitutional, leaving defendants without effective remedies. [14]

Egypt. The Egyptian legal order is rooted in the civilian tradition inherited from the Napoleonic codes, mediated through the Egyptian Civil Code of 1949. Criminal adjudication is governed by the principle of 'innermost conviction' ( ), pursuant to which the judge forms a free and personal assessment of the

evidence presented orally in court. Article 96 of the Constitution of the Arab Republic of

Egypt (2014) enshrines the presumption of innocence and the right to a fair trial. [15]

Any integration of AI risk-assessment tools into Egyptian criminal proceedings would confront a structural incompatibility: the requirement that judicial decisions be accompanied by reasoned grounds ( ) cannot be satisfied if the judge cannot articulate the underlying logic of the algorithmic output upon which reliance is placed. [16] A sentence that incorporates an unexplained risk score would, on this analysis, be legally defective. The Egyptian model must therefore adopt a precautionary framework in which AI is strictly prohibited from influencing substantive sentencing unless and until its processes are made fully intelligible both to the judge and, through the reasoned judgment, to the defendant and the appellate courts.

VI.  The Ethics of Code: Professional Responsibility and Algorithmic Liability

The question of who bears responsibility for the discriminatory outputs of risk-assessment algorithms represents one of the most contested frontiers of contemporary legal theory. Traditional tort doctrine locates liability at the point where a duty of care is breached; however, the distributed nature of algorithmic development involving data scientists, software engineers, corporate vendors, and governmental procurers complicates the attribution of responsibility in ways that existing frameworks have not adequately addressed.

The emerging doctrine of 'algorithmic liability' proceeds from the proposition that a line of code is a normative judgment. The choice of training data, the selection of proxy variables, the setting of decision thresholds, and the optimisation of performance metrics all reflect value commitments with foreseeable distributional consequences. Developers who design systems for deployment in high-stakes legal contexts cannot credibly claim that they are engaged in a purely technical enterprise devoid of moral and legal significance. [17]

The professional responsibility framework applicable to lawyers who deploy or recommend algorithmic tools is also underdeveloped. Model Rules of Professional Conduct require competence in the tools employed; it is increasingly arguable that competence in AI-assisted legal practice demands not merely the ability to operate a risk-assessment platform, but an understanding of its methodological assumptions, its documented failure modes, and the populations on which it was validated. Prosecutors who present algorithmic risk scores to sentencing courts, and defence counsel who fail to challenge them, may both be falling short of their professional obligations. [18]

VII.   Conclusion and Recommendations

Justice is a moral experience, not an optimisation problem. The deployment of algorithmic risk-assessment tools in criminal proceedings represents a profound challenge to the foundational values of the legal order: individualised adjudication, confrontation of adverse evidence, and the intelligibility of judicial reasoning. The analysis presented in this article demonstrates that these tools, as presently constituted, cannot satisfy the constitutional and jurisprudential requirements of a fair criminal trial in any of the jurisdictions examined.

Three concrete reforms are advanced. First, mandatory algorithmic auditing: independent third-party audits of any risk-assessment instrument deployed in criminal proceedings, conducted at regular intervals and with results made available to defendants and their counsel. Such audits must examine not only predictive accuracy but disparate impact across racial, ethnic, and socio-economic groups. Second, the 'human-in-the-loop' mandate: judicial discretion must be preserved as the final, non-delegable authority in sentencing. Legislation should prohibit courts from treating algorithmic outputs as determinative and should require sentencing judges to document, in reasoned terms, the weight accorded to any algorithmic recommendation and the independent grounds for the sentence imposed.

Third, a legislative right to explanation: defendants must be entitled, as a matter of statutory right, to receive a meaningful explanation of any algorithmic output that has influenced a decision in their case. This right must be enforceable through disclosure obligations that override trade-secret protections, on the principle that no commercial interest can outweigh the constitutional right to a fair trial. The future of algorithmic justice will be determined not by the sophistication of the machines deployed, but by the rigour of the legal frameworks within which they are constrained. The obligation to construct those frameworks falls upon legislators, judges, and scholars and it is urgent.

Reference

[1].For a foundational treatment of the interaction between AI and legal process, see Ryan Abbott, The Reasonable Robot: Artificial Intelligence and the Law (Cambridge University Press 2020) ch 1, pp 3–28.

[2]. COMPAS is produced by Equivant (formerly Northpointe). For a critical empirical analysis, see Julia Dressel and Hany Farid, 'The Accuracy, Fairness, and Limits of Predicting Recidivism' (2018) 4 Science Advances eaao5580, p 2.

[3]Carpenter v. United States, 138 S Ct 2206 (2018) 2217–2223.

[4]. Lilian Edwards and Michael Veale, 'Slave to the Algorithm? Why a Right to an Explanation is Probably Not the Remedy You Are Looking For' (2017) 16 Duke Law and Technology Review 18, 26-31.

[5]. Cathy O'Neil, Weapons of Math Destruction: How Big Data Increases Inequality and Threatens Democracy (Crown Publishers 2016) 27–32.

[6]R v. Bridges [2020] EWCA Civ 1058, [2020] 1 WLR 4717, [190]–[199] (discussing data protection compliance failures and the absence of a clear legal framework).

[7]. O'Neil (n 5) 87–90; see also Sandra G Mayson, 'Bias In, Bias Out' (2019) 128 Yale Law Journal 2218, 2229–2237.

[8]State v. Loomis, 881 NW2d 749 (Wis 2016) 751–753.

[9]   ibid 769–771.

[10]Crawford v. Washington, 541 US 36 (2004) 50–68; see also Bernard Harcourt, Against Prediction: Profiling, Policing, and Punishing in an Actuarial Age (University of Chicago Press 2007) 165–172.

[11]Lomax v. State, No 17-1512 (2020) slip op 14–17.

[12]People v. Superior Court, No B304887 (Cal App 2020).

[13]. Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 on Artificial Intelligence (Artificial Intelligence Act) [2024] OJ L2024/1689, Annex III para 6; Arts 9–15.

[14]. Edwards and Veale (n 4) 54–60; see also Loomis (n 8) 768 (declining to find per se constitutional violation).

[15]. Constitution of the Arab Republic of Egypt 2014, Art 96.

[16]. For a comparative analysis of the reasoning requirement in civil-law systems, see Michele Taruffo, La Motivazione della Sentenza Civile (CEDAM 1975) 310–318 (noting that the duty to state reasons serves both appellate review and democratic accountability functions).

[17]. O'Neil (n 5) 204–211; see also Frank Pasquale, The Black Box Society: The Secret Algorithms That Control Money and Information (Harvard University Press 2015) 141–149.

[18]. American Bar Association, Model Rules of Professional Conduct (2023 edn) r 1.1 cmt 8 (competence in technology).

Al-Zahraa Ahmed 9 June 2026
Share this post
Category
Sign in to leave a comment