Predicting the next hearing in a criminal case

A criminal case in the U.S. is a chain of decisions: initial appearance, bond, arraignment, continuances, plea negotiations, and less often trial and sentencing. Prior machine learning work predicts a single terminal decision - recidivism, failure to appear, pretrial release - and reduces a case to one label. The authors set a different task: given everything that has happened in a case so far, predict the outcomes of the next proceeding. The data are records of the criminal court of a mid-sized U.S. city, split into two courts by stage: Court A handles initial appearances and bond decisions, Court B arraignments, pleas, trials and sentencing. Each proceeding has a clerk note, the defendant’s race, gender and age, charges from a vocabulary of 2,139 types, the month and year, bond amounts, the Court A section and the defendant’s prior cases. Twenty outcomes are extracted from clerk notes with regular expressions; a manual check of 100 entries found no errors. The sample is balanced: all cases with outcomes occurring in fewer than 400 cases, plus random cases up to 2,533 cases and 19,459 proceedings, a median of 7 proceedings per case and a maximum of 61. The records themselves are not released because of expungement and mentions of victims and witnesses; the code and a synthetic dataset with the same schema are released.

Each proceeding is a vector combining an embedding of the clerk note (frozen bert-base-uncased) with structured features, including the outcomes of the previous proceeding. Proceedings occur at irregular intervals, so month and year are added to the positional embeddings. A transformer with a causal mask (4 layers, 8 heads, about 29.6M parameters) outputs, after each proceeding, probabilities for the 20 outcomes of the next one. It is compared with a classifier that picks labels by frequency, with an MLP that predicts one of 5 case-terminating outcomes from the features of the first proceeding, and with a GRU on the same inputs; evaluation uses 5-fold cross-validation. At the proceeding level the model selects as many labels as actually occurred, so precision, recall and F1 coincide; the authors note that this inflates absolute numbers, since in practice the number of outcomes is not known in advance.

The transformer reaches a micro-F1 of 0.5715 against 0.1812 for the random classifier, the GRU 0.5886, within fold-level variance; with a 0.5 threshold instead of the known number of labels, 0.5213. On case-terminating outcomes, the transformer with the full case history outperforms the MLP: 0.5695 against 0.4864 (p = 0.0015). Frequent outcomes are predicted best - initial appearance (F1 0.9926) and appointment of a public defender (0.7972) - and rare ones worst - charges accepted (0.1340), bond not set (0.1661), probable cause not found (0.2349). Without clerk-note text micro-F1 drops to 0.5335, without text and previous outcomes to 0.5096; Integrated Gradients also ranks text first. Under feature substitution the prior case count shifts predictions the most (mean probability shift 0.0032), age less (0.0017) and race least (0.0009). Clustering of case representations singles out, for example, 98 cases where charges were refused at the preliminary stage in 98% of them. Gaps between a confident prediction and the record point to possible procedural anomalies: in a domestic abuse case the model expected a stay-away order with 0.995 confidence, but the court did not issue it because no victim information had been provided to it.

The authors state the limitations themselves: one city, so the findings do not carry over to courts in general; labels come from regular expressions, and missed events are counted as absent; clerk records contain errors, up to proceedings filed under the wrong case; charges are encoded as unrelated features; differences in model errors across groups of defendants were not measured, so the small effect of race does not mean equal accuracy; without the court’s source records the numbers cannot be reproduced. The authors present the model as a tool for retrospective auditing by researchers, defenders and court watchers and explicitly rule out its use for decisions on bond, charging, pleas and sentencing. For court analytics, the paper shows that the unit of prediction can be a single proceeding, and that the main signal lies in the free text of clerk notes rather than in structured fields.

Paper: From Arraignment to Resolution: Transformer Models of Court Cases. Kory Rosen, Aron Culotta

Source: arXiv ← Journal