NZ Herald
  • Home
  • Latest news
  • Herald NOW
  • Video
  • New Zealand
  • Sport
  • World
  • Business
  • Entertainment
  • Podcasts
  • Quizzes
  • Opinion
  • Lifestyle
  • Travel
  • Viva
  • Weather

Subscriptions

  • Herald Premium
  • Viva Premium
  • The Listener
  • BusinessDesk

Sections

  • Latest news
  • New Zealand
    • All New Zealand
    • Crime
    • Politics
    • Education
    • Open Justice
    • Scam Update
  • Herald NOW
  • On The Up
  • World
    • All World
    • Australia
    • Asia
    • UK
    • United States
    • Middle East
    • Europe
    • Pacific
  • Business
    • All Business
    • MarketsSharesCurrencyCommoditiesStock TakesCrypto
    • Markets with Madison
    • Media Insider
    • Business analysis
    • Personal financeKiwiSaverInterest ratesTaxInvestment
    • EconomyInflationGDPOfficial cash rateEmployment
    • Small business
    • Business reportsMood of the BoardroomProject AucklandSustainable business and financeCapital markets reportAgribusiness reportInfrastructure reportDynamic business
    • Deloitte Top 200 Awards
    • CompaniesAged CareAgribusinessAirlinesBanking and financeConstructionEnergyFreight and logisticsHealthcareManufacturingMedia and MarketingRetailTelecommunicationsTourism
  • Opinion
    • All Opinion
    • Analysis
    • Editorials
    • Business analysis
    • Premium opinion
    • Letters to the editor
  • Politics
  • Sport
    • All Sport
    • OlympicsParalympics
    • RugbySuper RugbyNPCAll BlacksBlack FernsRugby sevensSchool rugby
    • CricketBlack CapsWhite Ferns
    • Racing
    • NetballSilver Ferns
    • LeagueWarriorsNRL
    • FootballWellington PhoenixAuckland FCAll WhitesFootball FernsEnglish Premier League
    • GolfNZ Open
    • MotorsportFormula 1
    • Boxing
    • UFC
    • BasketballNBABreakersTall BlacksTall Ferns
    • Tennis
    • Cycling
    • Athletics
    • SailingAmerica's CupSailGP
    • Rowing
  • Lifestyle
    • All Lifestyle
    • Viva - Food, fashion & beauty
    • Society Insider
    • Royals
    • Sex & relationships
    • Food & drinkRecipesRecipe collectionsRestaurant reviewsRestaurant bookings
    • Health & wellbeing
    • Fashion & beauty
    • Pets & animals
    • The Selection - Shop the trendsShop fashionShop beautyShop entertainmentShop giftsShop home & living
    • Milford's Investing Place
  • Entertainment
    • All Entertainment
    • TV
    • MoviesMovie reviews
    • MusicMusic reviews
    • BooksBook reviews
    • Culture
    • ReviewsBook reviewsMovie reviewsMusic reviewsRestaurant reviews
  • Travel
    • All Travel
    • News
    • New ZealandNorthlandAucklandWellingtonCanterburyOtago / QueenstownNelson-TasmanBest NZ beaches
    • International travelAustraliaPacific IslandsEuropeUKUSAAfricaAsia
    • Rail holidays
    • Cruise holidays
    • Ski holidays
    • Luxury travel
    • Adventure travel
  • Kāhu Māori news
  • Environment
    • All Environment
    • Our Green Future
  • Talanoa Pacific news
  • Property
    • All Property
    • Property Insider
    • Interest rates tracker
    • Residential property listings
    • Commercial property listings
  • Health
  • Technology
    • All Technology
    • AI
    • Social media
  • Rural
    • All Rural
    • Dairy farming
    • Sheep & beef farming
    • Horticulture
    • Animal health
    • Rural business
    • Rural life
    • Rural technology
    • Opinion
    • Audio & podcasts
  • Weather forecasts
    • All Weather forecasts
    • Kaitaia
    • Whangārei
    • Dargaville
    • Auckland
    • Thames
    • Tauranga
    • Hamilton
    • Whakatāne
    • Rotorua
    • Tokoroa
    • Te Kuiti
    • Taumaranui
    • Taupō
    • Gisborne
    • New Plymouth
    • Napier
    • Hastings
    • Dannevirke
    • Whanganui
    • Palmerston North
    • Levin
    • Paraparaumu
    • Masterton
    • Wellington
    • Motueka
    • Nelson
    • Blenheim
    • Westport
    • Reefton
    • Kaikōura
    • Greymouth
    • Hokitika
    • Christchurch
    • Ashburton
    • Timaru
    • Wānaka
    • Oamaru
    • Queenstown
    • Dunedin
    • Gore
    • Invercargill
  • Meet the journalists
  • Promotions & competitions
  • OneRoof property listings
  • Driven car news

Puzzles & Quizzes

  • Puzzles
    • All Puzzles
    • Sudoku
    • Code Cracker
    • Crosswords
    • Cryptic crossword
    • Wordsearch
  • Quizzes
    • All Quizzes
    • Morning quiz
    • Afternoon quiz
    • Sports quiz

Regions

  • Northland
    • All Northland
    • Far North
    • Kaitaia
    • Kerikeri
    • Kaikohe
    • Bay of Islands
    • Whangarei
    • Dargaville
    • Kaipara
    • Mangawhai
  • Auckland
  • Waikato
    • All Waikato
    • Hamilton
    • Coromandel & Hauraki
    • Matamata & Piako
    • Cambridge
    • Te Awamutu
    • Tokoroa & South Waikato
    • Taupō & Tūrangi
  • Bay of Plenty
    • All Bay of Plenty
    • Katikati
    • Tauranga
    • Mount Maunganui
    • Pāpāmoa
    • Te Puke
    • Whakatāne
  • Rotorua
  • Hawke's Bay
    • All Hawke's Bay
    • Napier
    • Hastings
    • Havelock North
    • Central Hawke's Bay
    • Wairoa
  • Taranaki
    • All Taranaki
    • Stratford
    • New Plymouth
    • Hāwera
  • Manawatū - Whanganui
    • All Manawatū - Whanganui
    • Whanganui
    • Palmerston North
    • Manawatū
    • Tararua
    • Horowhenua
  • Wellington
    • All Wellington
    • Kapiti
    • Wairarapa
    • Upper Hutt
    • Lower Hutt
  • Nelson & Tasman
    • All Nelson & Tasman
    • Motueka
    • Nelson
    • Tasman
  • Marlborough
  • West Coast
  • Canterbury
    • All Canterbury
    • Kaikōura
    • Christchurch
    • Ashburton
    • Timaru
  • Otago
    • All Otago
    • Oamaru
    • Dunedin
    • Balclutha
    • Alexandra
    • Queenstown
    • Wanaka
  • Southland
    • All Southland
    • Invercargill
    • Gore
    • Stewart Island
  • Gisborne

Media

  • Video
    • All Video
    • NZ news video
    • Herald NOW
    • Business news video
    • Politics news video
    • Sport video
    • World news video
    • Lifestyle video
    • Entertainment video
    • Travel video
    • Markets with Madison
    • Kea Kids news
  • Podcasts
    • All Podcasts
    • The Front Page
    • On the Tiles
    • Ask me Anything
    • The Little Things
  • Cartoons
  • Photo galleries
  • Today's Paper - E-editions
  • Photo sales
  • Classifieds

NZME Network

  • Advertise with NZME
  • OneRoof
  • Driven Car Guide
  • BusinessDesk
  • Newstalk ZB
  • Sunlive
  • ZM
  • The Hits
  • Coast
  • Radio Hauraki
  • The Alternative Commentary Collective
  • Gold
  • Flava
  • iHeart Radio
  • Hokonui
  • Radio Wanaka
  • iHeartCountry New Zealand
  • Restaurant Hub
  • NZME Events

SubscribeSign In
Advertisement
Advertise with NZME.
Home / New Zealand

OPINION: We built an algorithm that predicts the length of court sentences – could AI play a role in the justice system?

By Andrew Lensen and Marcin Betkier
Other·
30 Nov, 2022 11:21 PM5 mins to read

Subscribe to listen

Access to Herald Premium articles require a Premium subscription. Subscribe now to listen.
Already a subscriber?  Sign in here

Listening to articles is free for open-access content—explore other articles or learn more about text-to-speech.
‌
Save

    Share this article

AI machines are already used to predict some criminal behaviour, such as financial fraud. Photo / 123RF

AI machines are already used to predict some criminal behaviour, such as financial fraud. Photo / 123RF

Opinion by Andrew Lensen and Marcin Betkier

OPINION:

The rapid development of artificial intelligence (AI) has led to its deployment in courtrooms overseas. In China, robot judges decide on small claim cases, while in some Malaysian courts, AI has been used to recommend sentences for offences such as drug possession.

Is it time New Zealand considers AI in its own judicial system?

Intuitively, we do not want to be judged by a computer. And there are good reasons for our reluctance – with valid concerns over the potential for bias and discrimination. But does this mean we should be afraid of any and all use of AI in the courts?

In our current system, a judge sentences a defendant once they have been found guilty. Society trusts judges to hand down fair sentences based on their knowledge and experience.

Advertisement
Advertise with NZME.
Advertisement
Advertise with NZME.

But sentencing is a task AI may be able to perform instead – after all, AI machines are already used to predict some criminal behaviour, such as financial fraud. Before considering the role of AI in the courtroom, then, we need a clear understanding of what it actually is.

AI simply refers to a machine behaving in a way that humans identify as “intelligent”. Most modern AI is machine learning, where a computer algorithm learns the patterns within a set of data. For example, a machine learning algorithm could learn the patterns in a database of houses on Trade Me in order to predict house prices.

So, could AI sentencing be a feasible option in New Zealand’s courts? What might it look like? Or could AI at least assist judges in the sentencing process?

Advertisement
Advertise with NZME.

Can you make AI fairer than a judge? Play our courtroom algorithm game https://t.co/lJqrf29lc8 pic.twitter.com/l1upcfn75d

— MIT Technology Review (@techreview) October 22, 2019

Inconsistency in the courts

In New Zealand, judges must weigh a number of mitigating and aggravating variables before deciding on a sentence for a convicted criminal. Each judge uses their discretion in deciding the outcome of a case. At the same time, judges must strive for consistency across the judicial system.

Consistency means similar offences should receive similar penalties in different courts with different judges. To enhance consistency, the higher-level courts have prepared guideline judgements that judges refer to during sentencing.

But discretion works the opposite way. In our current system, judges should be free to individualise the sentence after a complete evaluation of the case.

Judges need to factor in individual circumstances, societal norms, the human condition and the sense of justice. They can use their experience and sense of humanity, to make moral decisions and even sometimes change the law.

In short, there is a “desirable inconsistency” that we cannot currently expect from a computer. But there may also be some “undesirable inconsistency”, such as bias or even extraneous factors like hunger. Research has shown that in some Israeli courts, the percentage of favourable decisions drops to nearly zero before lunch.

The potential role of AI

This is where AI may have a role in sentencing decisions. We set up a machine learning algorithm and trained it using 302 New Zealand assault cases, with sentences between zero and 14.5 years of imprisonment.

Based on this data, the algorithm built a model that can take a new case and predict the length of a sentence.

The beauty of the algorithm we used is that the model can explain why it made certain predictions. Our algorithm quantifies the phrases the model weighs most heavily when calculating the sentence.

Advertisement
Advertise with NZME.

To evaluate our model, we fed it 50 new sentencing scenarios it had never seen before. We then compared the model’s predicted sentence length with the actual sentences.

The relatively simple model worked quite well. It predicted sentences with an average error of just under 12 months.

The model learned that words or phrases such as “sexual”, “young person”, “taxi” and “firearm” correlated with longer sentences, while words such as “professional”, “career”, “fire” and “Facebook” correlated with shorter sentences.

Many of the phrases are easily explainable – “sexual” or “firearm” may be linked with aggravated forms of assault. But why does “young person” weigh towards more time in prison and “Facebook” towards less? And how does an average error of 12 months compare to variations in human judges?

The answers to those questions are possible avenues for future research. But it is a useful tool to help us understand sentencing better.

Outrage over rapist's home detention highlights the need for victims' voices in NZ's sentencing process https://t.co/sN6As6lr5V

— Newshub (@NewshubNZ) October 4, 2022

The future of AI in courtrooms

Advertisement
Advertise with NZME.

Clearly, we cannot test our model by employing it in the courtroom to deliver sentences. But it gives us an insight into our sentencing process.

Judges could use this type of modelling to understand their sentencing decisions, and perhaps remove extraneous factors. AI models could also be used by lawyers, providers of legal technology and researchers to analyse the sentencing and justice system.

Maybe the AI model could also help create some transparency around controversial decisions, such as showing the public that seemingly controversial sentences like a rapist receiving home detention may not be particularly unusual.

Most would argue that the final assessments and decisions on justice and punishment should be made by human experts. But the lesson from our experiment is that we should not be afraid of the words “algorithm” or “AI” in the context of our judicial system. Instead, we should be discussing the real (and not imagined) implications of using those tools for the common good.

· Andrew Lensen is a lecturer in Artificial Intelligence at Pūkenga, Te Herenga Waka - Victoria University of Wellington

· Marcin Betkier is a lecturer in Law at Te Herenga Waka - Victoria University of Wellington

Advertisement
Advertise with NZME.
Save

    Share this article

Latest from New Zealand

Premium
New Zealand

'Awful': Forestry skidder tipped over cliff after logging company goes bust

20 Jun 06:00 PM
New Zealand

'Save a lot more lives': Stage 4 cancer survivor's plea for earlier screening

20 Jun 06:00 PM
New Zealand

Brewing kindness: The volunteers bringing comfort one cuppa at a time

20 Jun 06:00 PM

Jono and Ben brew up a tea-fuelled adventure in Sri Lanka

sponsored
Advertisement
Advertise with NZME.

Latest from New Zealand

Premium
'Awful': Forestry skidder tipped over cliff after logging company goes bust

'Awful': Forestry skidder tipped over cliff after logging company goes bust

20 Jun 06:00 PM

Video of the tumble down the bank includes the caption '“pay ya bills or pay the price'.

'Save a lot more lives': Stage 4 cancer survivor's plea for earlier screening

'Save a lot more lives': Stage 4 cancer survivor's plea for earlier screening

20 Jun 06:00 PM
Brewing kindness: The volunteers bringing comfort one cuppa at a time

Brewing kindness: The volunteers bringing comfort one cuppa at a time

20 Jun 06:00 PM
Premium
Simon Wilson's Love this City: Dogs, dogs, dogs! (and cheaper public transport)

Simon Wilson's Love this City: Dogs, dogs, dogs! (and cheaper public transport)

20 Jun 05:00 PM
Help for those helping hardest-hit
sponsored

Help for those helping hardest-hit

NZ Herald
  • About NZ Herald
  • Meet the journalists
  • Newsletters
  • Classifieds
  • Help & support
  • Contact us
  • House rules
  • Privacy Policy
  • Terms of use
  • Competition terms & conditions
  • Our use of AI
Subscriber Services
  • NZ Herald e-editions
  • Daily puzzles & quizzes
  • Manage your digital subscription
  • Manage your print subscription
  • Subscribe to the NZ Herald newspaper
  • Subscribe to Herald Premium
  • Gift a subscription
  • Subscriber FAQs
  • Subscription terms & conditions
  • Promotions and subscriber benefits
NZME Network
  • The New Zealand Herald
  • The Northland Age
  • The Northern Advocate
  • Waikato Herald
  • Bay of Plenty Times
  • Rotorua Daily Post
  • Hawke's Bay Today
  • Whanganui Chronicle
  • Viva
  • NZ Listener
  • Newstalk ZB
  • BusinessDesk
  • OneRoof
  • Driven Car Guide
  • iHeart Radio
  • Restaurant Hub
NZME
  • About NZME
  • NZME careers
  • Advertise with NZME
  • Digital self-service advertising
  • Book your classified ad
  • Photo sales
  • NZME Events
  • © Copyright 2025 NZME Publishing Limited
TOP