November 2021 | Volume 23 No. 1
Using AI to Predict Trafficking Sentences
Under the auspices of the Law and Technology Centre, the research team led by Professor Ben Kao of the Department of Computer Science and Professor Anne Cheung of the Faculty of Law have developed a Stage-1 model of HKU AI Lawyer, which can predict sentencing associated with eight different types of dangerous drugs. Users simply provide information, in the form of answering four straightforward questions, and the AI Lawyer will predict what sentencing will be, as well as breaking down individual factors that will lead to the sentence.
“We wanted to find an answer to the challenging issue of how legal knowledge that is embedded in previous court judgments can be captured and modelled using machines,” said Professor Cheung. “Lawyers have to familiarise themselves with previous court cases or ‘precedents’ which serve as important guidelines to future cases. In Hong Kong alone, there are more than 80,000 historical judgments.
“Although there are guidelines on determining prison term ‘starting points’, these starting-point penalties have to be adjusted based on various mitigating and aggravating factors specific to each case. Predictions are more difficult for more complicated cases, such as those involving multiple drug types.”
It would be a Herculean task for a human lawyer to recall all relevant precedents when he or she is researching and preparing for a new case. The team therefore took on the task of studying how to train a machine to comprehend and memorise court judgments using AI techniques and to reason based on the logic discovered from judgments.
Professor Anne Cheung (left) and Mr Michael Cheung (right) from the Faculty of Law and Professor Ben Kao (centre) from the Department of Computer Science presenting the HKU AI Lawyer: Sentencing Predictor for Drug Trafficking.
Asked to describe how it works, Professor Kao said: “In a nutshell, the AI component of the sentencing predictor was taught two kinds of knowledge, one provided by law experts and another by computer science experts. First, our law experts provided the basic framework and logic of drug-trafficking sentencing. This knowledge includes: the basic sentencing guidelines for determining starting-point penalties based on drug type and weight; the aggravating and mitigating factors that a judge would usually consider in sentencing; guilty-plea penalty discount; and the legal principles judges usually apply for more complex cases such as those that involve multiple drugs.
“Based on this framework, our AI experts determined how each element is assessed quantitatively in terms of a prison term (in months) and how the prison term is adjusted based on the aggravating and mitigating factors (again, quantitatively). This is achieved by applying neural network techniques with the machine reading and understanding around 3,000 drug-trafficking court judgments that were published from 1998 to 2019. The machine then deduces the computation of final sentences mimicking the decision of a human judge. Also, given a scenario (in terms of drug dealt, mitigating and aggravating factors), the machine would try to recall any precedents that are similar to the given scenario, and retrieve those cases (if any) for the user’s reference.”
From the users’ point of view, the four questions they must answer address the following: drug types and weights; whether the defendant pleads guilty; aggravating factors; and mitigating factors.
In order to demonstrate the feasibility of the idea with real cases and applications, the team worked closely with an NGO, the Hong Kong Federation of Youth Groups (HKFYG), which has a Youth Crime Prevention Centre that provides counselling to young people, particularly those at risk of drug-related crimes.
“Social workers need to know about sentencing for drug offences so they can educate young people on the serious consequences of drug trafficking and help young offenders plan their future as they face jail time in correctional institutions,” said Professor Cheung.
Although social workers from the HKFYG occasionally consulted lawyer colleagues about potential penalties and consequences of drug-trafficking offences, most of the time they simply acquired the knowledge themselves from cases which they had handled, previous judgments and newspaper reports.
Based on the drug type and amount, guilty plea, aggravating and mitigating factors, the HKU AI Lawyer can predict sentences in drug-trafficking cases.
Target drug trafficking
The AI Lawyer started with drug offences for several reasons. First, sentencing guidelines for drug-trafficking cases are quite clear, making it easier for a machine to capture the underlying sentencing logic. Second, drug-trafficking cases are the most numerous among all criminal judgment topics, and since the AI techniques the team employed are data-driven it made sense to start with offences for which there is more data. Third, through the youth crime prevention programme, the team were able to work with HKFYG to develop a sentencing predictor for HKFYG workers – a very useful and meaningful application of the work.
The team are now working on applying AI to personal injury (PI) cases too, with the objective of training the machine to assess PI compensation. “We believe that it would be useful to the public as PI compensation computation is rather complex – there are more varieties in injuries than in drug offences,” said Professor Cheung.
The predictor is already online and open to the public, and the reaction has been good. “On average, the predictor is consulted about 50 times daily, or more than a thousand times per month,” said Professor Kao.
Learn more about the HKU AI Lawyer here.
Social workers need to know about sentencing for drug offences so they can educate young people on the serious consequences of drug trafficking and help young offenders plan their future as they face jail time in correctional institutions.
PROFESSOR ANNE CHEUNG
Photo credit: Tai Ngai Lung