Algorithmic Evidence in Criminal Trials

Computer software source code on screen

Guest Blog

Kori Khan
Assistant Professor
Department of Statistics, Iowa State University


We are currently in an era where machine learning and algorithms offer novel approaches to solving problems both new and old. Algorithmic approaches are swiftly being adopted for a range of issues: from making hiring decisions for private companies to sentencing criminal defendants. At the same time, researchers and legislators are struggling with how to evaluate and regulate such approaches.

The regulation of algorithmic output becomes simultaneously more complex and pressing in the context of the American criminal justice system. U.S. courts are regularly admitting evidence generated from algorithms in criminal cases. This is perhaps unsurprising given the permissive standards for admission of evidence in American criminal trials. Once admitted, however, the algorithms used to generate the evidence—which are often proprietary or designed for litigation—present a unique challenge. Attorneys and judges face questions about how to evaluate algorithmic output when a person’s liberty hangs in the balance. Devising answers to these questions inevitably involves delving into an increasingly contentious issue—access to the source code.

In criminal courts across the country, it appears most criminal defendants have been denied access to the source code of algorithms used to produce evidence against them. I write, “it appears,” because here, like in most areas of the law, empirical research into legal trends is limited to case studies or observations about cases that have drawn media attention. For these cases, the reasons for denying a criminal defendant access to the source code have not been consistent. Some decisions have pointed out that the prosecution does not own the source code, and therefore is not required to produce it. Others implicitly acknowledge that the prosecution could be required to produce the source code and instead find that the defendant has not shown a need for access to the source code. It is worth emphasizing that these decisions have not found that the defendant does not need access to source code; but rather, that the defendant has failed to sufficiently establish that need. The underlying message in many of these decisions, whether implicit or explicit, is that there will be cases, perhaps quite similar to the case being considered, where a defendant will require access to source code to mount an effective defense. The question of how to handle access to the code in such cases does not have a clear answer.

Legal scholars are scrambling to provide guidance. Loosely speaking, proposals can be categorized into two groups: those that rely on existing legal frameworks and those that suggest a new framework might be necessary. For the former category, the heart of the issue is the tension between the intellectual property rights of the algorithm’s producer and the defendant’s constitutional rights. On the one hand, the producers of algorithms often have a commercial interest in ensuring that competitors do not have access to the source code. On the other hand, criminal defendants have the right to question the weight of the evidence presented in court.

There is a range of opinions on how to balance these competing interests. These opinions run along a spectrum of always allowing defendants access to source code to rarely allowing defendants access to the code. However, most fall somewhere in the middle. Some have suggested “front-end” measures in which lawmakers establish protocols to ensure the accuracy of algorithmic output before their use in criminal courts. These measures might include an escrowing of the source code, similar to how some states have handled voting technology. Within the courtroom, suggestions for protecting the producers of code include utilizing traditional measures, such as the protective orders commonly used in trade secret suits. Other scholars have proposed a defendant might not always need access to source code. For example, some suggest that if the producer of the algorithm is willing to run tests constructed by the defense team, this may be sufficient in many cases. Most of these suggestions make two key assumptions: 1) either legislators or defense attorneys should be able to devise standards to identify the cases for which access to source code is necessary to evaluate an algorithm and 2) legislators or defense attorneys can devise these standards without access to the source code themselves.

These assumptions require legislators and defense attorneys to answer questions that the scientific community itself cannot answer. Outside of the legal setting, researchers are faced with a similar problem: how can we evaluate scientific findings that rely on computational research? For the scientific community, the answer for the moment is that we are not sure. There is evidence that the traditional methods of peer review are inadequate. In response, academic journals and institutes have begun to require that researchers share their source code and any relevant data. This is increasingly viewed as a minimal standard to begin to evaluate computational research, including algorithmic approaches. However, just as within the legal community, the scientific community has no clear answers for how to handle privacy or proprietary interests in the evaluation process.

In the past, forensic science methods used in criminal trials have largely been developed and evaluated outside the purview of the larger scientific community, often on a case-by-case basis. As both the legal and scientific communities face the challenge of regulating algorithms, there is an opportunity to expand existing interdisciplinary forums and create new ones.

Learn about source code in criminal trials by attending the Source Code on Trial Symposium on March 12 at 2:30 to 4 p.m. Register at



Publications and Websites Used in This Blog:

How AI Can Remove Bias From The Hiring Process And Promote Diversity And Inclusion

Equivant, Northpoint Suite Risk Need Assessments

The Case for Open Computer Programs

Using AI to Make Hiring Decisions? Prepare for EEOC Scrutiny

Source Code, Wikipedia

The People of the State of New York Against Donsha Carter, Defendant

Commonwealth of Pennsylvania Versus Jake Knight, Appellant

The New Forensics: Criminal Justice, False Certainty, and the Second Generation of Scientific Evidence

Convicted by Code

Machine Testimony

Elections Code, California Legislative Information

Trade Secret Policy, United States Patent and Trademark Office

Computer Source Code: A Source of the Growing Controversy Over the Reliability of Automated Forensic Techniques

Artificial Intelligence Faces Reproducibility Crisis

Author Guidelines, Journal of the American Statistical Association

Reproducible Research in Computational Science

OSAC’s New Process Map Focuses on Firearms Examinations

Overview of the Firearms Process Map.

The Organization of Scientific Area Committees (OSAC) for Forensic Science, in partnership with the Association of Firearm and Tool Mark Examiners (AFTE), has just released a process map that describes the process that most firearms examiners use when analyzing evidence. The Firearms Process Map provides details about the procedures, methods and decision points most frequently encountered in firearms examination.

From the OSAC press release:

“This map can benefit the firearm discipline by providing a behind-the-scenes perspective into the various components and complexities involved in the firearms examination process. It can also be used to identify best practices, reduce errors, assist in training new examiners and highlight areas where further research or standardization would be beneficial.”

The Firearms Process Map was developed by the National Institute of Standards and Technology (NIST) Forensic Science Research Program through a collaboration with OSAC’s Firearms & Toolmarks Subcommittee and the Association of Firearm and Tool Mark Examiners (AFTE).

Additional process maps are available from OSAC, including a Friction Ridge Process Map and Speaker Recognition Process Map.

Read the OSAC press release.

Closed Source Forensic Software: Confronting the Evidence?

There is a persistent underlying flaw in the criminal justice system, stemming from unvalidated forensic science cloaked in intellectual property. Not only does this pose a risk when forensic evidence is a key factor in criminal convictions, but it also reveals how confidential forensic technology could violate defendants’ constitutional rights. 

Forensic analysis software, used to generate evidence in criminal trial proceedings, frequently contains closed source code. Such proprietary software prevents the scientific community, the public, juries, attorneys, and defendants from accessing the fundamental methods — or potential errors therein — that can ultimately influence verdicts. This creates a pathway for individuals to be wrongly convicted as a result of jurors being swayed by flawed evidence disguised as good science. 

An excellent example is the case of United States v. Ellis, in which DNA was the key evidence used against the defendant accused of illegal firearm possession. The police forensic lab found the DNA analysis inconclusive, prompting further analysis by third-party-owned software. With multiple hypotheses and test variations run on the sample, the prosecution relied on the result of one particular analysis based on the assumption that the defendant was one of four possible contributors to the DNA sample. 

When Mr. Ellis’ attorney requested access to the source code, “…the government refused to disclose it, arguing that the information is protected by trade secrets.” 

In response, the Electronic Frontier Foundation (EFF) and American Civil Liberties Union of Pennsylvania filed an amicus with the United States District Court of the Western District of Pennsylvania, outlining the inconsistency between closed source code, the defendants’ Sixth Amendment rights, and the right of the public to oversee the criminal trial. 

Source code, and other aspects of forensic software programs used in a criminal prosecution, must be disclosed in order to ensure that innocent people do not end up behind bars,” said the EFF. “Or worse — on death row.”

While it is understandable that developers of forensic software wish to protect their intellectual property, it raises a fundamental question: should IP be protected at the expense of civil rights? To protect the innocent, maintain public oversight, and ensure the advancement of forensic science practices, the curtain must be pulled back on protected methodologies. Arguably, the benefits of doing so would lead to fairer trials and greater trust in the scientific tools utilized within the criminal justice system.

Click here to learn more about CSAFE’s commitment to open source tools.

NIST and Noblis Seek Participants for Bullet Black Box Study

Are you a US firearms examiner who has conducted operational casework in the past year? NIST and Noblis are seeking participants for a bullet black-box study to evaluate the accuracy, repeatability, and reproducibility of bullet comparisons by firearms examiners.

Study Overview

Participants will conduct 100 comparisons over a period of approximately 6-7months. The test will be conducted by sending the physical samples to the participants in 10 packets, each of which contains 10 bullet sets for comparison. The test samples will be a range of bullets that will be collected under ground-truth controlled conditions, attempting to be as broadly representative of casework as practical. Firearms, calibers, and ammunition frequently encountered in casework will be used. Custom web-based software will be used to record examiner responses, and transmit responses back to the test administrators.

Interested in participating? Email Additional details can be found on the NIST flyer.

Now Available Online: NIJ Forensic Science Research and Development Symposium

NIJ Forensic Science Research and Devlopment Symposium

Did you miss the 2020 National Institute of Justice (NIJ) Forensic Science Research and Development Symposium at the AAFS Annual Meeting? You can now watch the program online. In this session, NIJ brings together practitioners and researchers to work towards moving research from theory to practice.

The NIJ Forensic Science R&D Program funds both basic and applied research projects to:

(1) Increase the body of knowledge to guide and inform forensic science policy and practice

(2) Result in the production of useful materials, devices, systems, or methods that have the potential for forensic application.

Watch the symposium or review the proceedings to learn more about new forensic science approaches and applications and how the community can work together to elevate the status of forensic science.

NIST Releases New Report on Human Factors’ Role in Handwriting Evaluation

pen and handwritten text

All human activities carry a risk of error, and handwriting examination is no exception. To reduce errors in this field, NIST convened the Expert Working Group for Human Factors in Handwriting Examination. This expert panel sponsored by NIJ and NIST examined strategies to improve handwriting evaluation methods and outline best practices.

The Group produced a new report, Forensic Handwriting Examination and Human Factors: Improving the Practice Through a Systems Approach. The document takes a closer look at how human factors impact all aspects of handwriting examination, from documenting discriminating features, reporting results and testifying in court. 

In the report, you’ll also find a discussion of education, training, certification, and the role of quality assurance, quality control, and management in reducing errors.

CSAFE Resources for Improving Handwriting Evaluation 

CSAFE researchers are also working to improve objectivity and reduce errors in handwriting analysis. Our work aims to rigorously assess the role of complexity in signature analysis and relate complexity to examiner performance. We are also developing open-source software and publicly available statistical algorithms for writing comparison to help handwriting examiners integrate quantitative approaches in their work.

Handwriting Database

The CSAFE Handwriting Database is an interactive, public database designed for the development of statistical approaches to forensic handwriting evaluations.  


CSAFE automatic matching algorithms provide objective and reproducible scores as a foundation for a fair judicial process. This R package utilizes a variety of functions to identify letters and features from handwritten documents.


Tips for Students Pursuing Careers in Forensic Science

The exciting role of forensic scientist combines the power of observation, inference and research-based analysis to fight crime. From identifying the time of death to taking a closer look at fingerprints found at the scene, these scientists play an essential role in forensic examinations and linking suspects to specific evidence. 

The expert training and education of different types of forensic scientists is key to the investigation process and trial proceedings. Are you interested in joining the field? The U.S. Bureau of Labor Statistics anticipates jobs for forensic scientists will grow at twice the anticipated rate for other occupations, with a 17 percent increase between 2016 and 2026.  

Tips on Preparing to Become a Forensic Scientist

A forensic science job requires a minimum of a four-year bachelor’s degree in a field such as biology, chemistry or forensic science. Professionals recommend students seek out the following educational experiences to prepare for futures as a forensic investigator. 

  •     Search for a program with a strong academic core in natural sciences and math like biochemistry, toxicology, analytical chemistry and instrumental analysis. 
  • Obtain a thorough grounding in laboratory procedures and the use of scientific instruments. 
  • Build technical skills by taking courses in criminal justice, evidence handling and ethics.
  • Get acquainted with the criminal justice system and its processes through courses in criminology.
  • Develop strong written and oral communication skills to improve dialogue with law enforcement or explain findings to a judge and jury.
  • Seek out opportunities to gain additional hands-on experience through forensic science-related internships.

A Sneak Peek at an Advanced Degree

Students interested in jobs such as laboratory directors, professors or a specialist role can pursue advanced degrees. During a graduate program, you can choose a specialty such as ballistics, digital evidence or toxicology. In addition to classwork, master’s and Ph.D. students develop advanced skills in the laboratory. 

A Look at Continuing Education and Certifications

Education for the forensic scientist continues after the job begins with additional employer training. Certifications in various specialties such as blood pattern analysis, forensic photography and latent print analysis are available from organizations such as the International Association for Identification.

Impacting Society With A Career In Forensics

CSAFE offers students interested in pursuing forensic science careers the opportunity to discover how statistics apply to forensic evidence analysis. Learn more about our hands-on experiences for graduate and undergraduate students on our Forensic Education page and see how one student’s CSAFE research is preparing him for his dream job of DNA analyst.

Forensic science is a rigorous and demanding subject, but students committed to academic work and practical experience can stand out amongst other job applicants. Students can look forward to a gratifying career that contributes to the fair administration of justice.


First Interdisciplinary Training Standard Approved by OSAC

OSAC Registry Ribbon

The Organization of Scientific Area Committees (OSAC) for Forensic Science registry of approved standards now includes its first interdisciplinary training standard. This new standard provides guidelines to help laboratories ensure their team stays up-to-date on the latest forensic science methods and best practices. 


According to OSAC, ASTM E2917-19a Standard Practice for Forensic Science Practitioner Training, Continuing Education, and Professional Development Programs outlines what essential knowledge, skills and abilities laboratory training programs should address. Previously, these types of standards existed only in DNA and seized drug analysis disciplines. The standard also specifies continuing education requirements for forensic science professionals. 


OSAC Registry standards define minimum requirements, best practices, scientific protocols and other guidance to help ensure that the results of forensic analysis are reliable and reproducible.


Access Details:

OSAC, through the National Institute of Standards and Technology (NIST), has entered into a contract with ASTM International that gives 30,000 public criminal justice agencies free access to standards published under ASTM Technical Committee E30 on Forensic Science. To access these standards, click the green “ASTM Standards Access” button on OSAC’s Access to Standards webpage to enter the ASTM Compass website.

What Do Forensic Laboratories Need to Succeed? A DOJ Needs Assessment Explains

examiner analyzing a shoe

How can organizations like CSAFE and the federal government help forensic laboratories succeed? What would be most beneficial as they seek to address the needs of the field?

The National Institute of Justice recently released a report to Congress asking these questions and more as they examined the interconnected relationship between forensic laboratories and the criminal justice system. The report details the results of a national needs assessment of forensic science service providers conducted in 2017-2018.

From the report:

“Forensic laboratories and ME/C (medical examiner/coroner’s) offices are constantly working to address the needs of the field, balancing operational priorities to meet stakeholder requests while introducing innovative solutions to solve emerging criminal justice questions. This needs assessment compiled demonstrative evidence of how the field is adapting to advancements in technology, the volume and types of forensic evidence, and the evolving needs of the justice system.”

The report outlines key needs in a variety of areas, such as sufficient funding and strategic planning to process increasing amounts of forensic evidence and continued efforts to strengthen quality assurance measures. The report also highlights challenges and promising practices, as well as addresses special topics. The American Academy of Forensic Sciences responded positively to this effort, and thanks Congress for its long-time support of forensic science.

Review the full report to learn more, and discover other ways the Department of Justice works to improve forensic science on their website.