Using a computer algorithm to calculate the likelihood of a person committing a future crime or failing to show up to court, which judges then use to help decide whether to grant bail or set a sentence.
Using a computer algorithm to calculate the likelihood of a person committing a future crime or failing to show up to court, which judges then use to help decide whether to grant bail or set a sentence.
Algorithmic risk assessments (like the widely used COMPAS tool) analyze historical data—such as criminal history, age, employment status, and sometimes social factors—to output a risk score. The goal is to introduce data-driven objectivity into judicial decisions, reducing human inconsistency and jail overcrowding. However, they are highly controversial due to concerns over due process, transparency, and embedded historical biases.
# Conceptual: Auditing a Risk Assessment model for Disparate Impact using Fairlearn
# Checking if the model falsely flags one demographic group at a higher rate than another.
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from fairlearn.metrics import MetricFrame, false_positive_rate
# Mock dataset: Features, actual recidivism (y_true), model prediction (y_pred), and race (sensitive feature)
data = pd.DataFrame({
'y_true': [0, 1, 0, 1, 0, 0, 1, 1],
'y_pred': [0, 1, 1, 1, 0, 1, 1, 1], # Model predictions
'race': ['A', 'B', 'A', 'B', 'A', 'B', 'A', 'B'] # Sensitive attribute
})
# Calculate False Positive Rate (FPR) grouped by race
# FPR = Out of the people who DID NOT re-offend, how many did the AI wrongly flag as high risk?
metric_frame = MetricFrame(
metrics=false_positive_rate,
y_true=data['y_true'],
y_pred=data['y_pred'],
sensitive_features=data['race']
)
print("False Positive Rates by Group:")
print(metric_frame.by_group)
# If Group A has an FPR of 0.33 and Group B has 0.0, the model is legally and ethically biased.
Judicial Efficiency: Helps courts process high volumes of bail hearings quickly. Civil Rights Litigation: Heavy exposure to lawsuits alleging violations of the Equal Protection Clause or fair housing/credit laws if the model exhibits racial bias. Regulatory Scrutiny: Classified as a "High-Risk AI System" under the EU AI Act, requiring strict fundamental rights impact assessments and human oversight.
A credit score, but for a person's likelihood of re-offending. Just as a credit score uses financial history to predict loan repayment, a risk assessment uses criminal and demographic history to predict court appearance or re-arrest.
Using a computer algorithm to calculate the likelihood of a person committing a future crime or failing to show up to court, which judges then use to help decide whether to grant bail or set a sentence.
Algorithmic risk assessments (like the widely used COMPAS tool) analyze historical data—such as criminal history, age, employment status, and sometimes social factors—to output a risk score. The goal is to introduce data-driven objectivity into judicial decisions, reducing human inconsistency and jail overcrowding. However, they are highly controversial due to concerns over due process, transparency, and embedded historical biases.
Judicial Efficiency: Helps courts process high volumes of bail hearings quickly. Civil Rights Litigation: Heavy exposure to lawsuits alleging violations of the Equal Protection Clause or fair housing/credit laws if the model exhibits racial bias. Regulatory Scrutiny: Classified as a "High-Risk AI System" under the EU AI Act, requiring strict fundamental rights impact assessments and human oversight.