Notes
May 11, 2021

Wrong Way Sign: What Can Go Wrong When Applying ML To Legal Domain

Photo by NeONBRAND on Unsplash

Here I brief on 3 problems I faced when applying Machine Learning (‘ML’) tools in the legal domain —

  1. data
  2. single short, and
  3. understanding results.

For ML definition and reservations please consult the Notes section below.

Data

  • Data is scarce, and data is poor

Legal data is frequently anything but good data.

A legal dataset is anything but a good dataset if it lacks relevant information, uniform format, neat formalization, or sufficient volume.

Many factors contribute to such state of affairs —for example, deficit of reliable and detailed legal data, minimal depth of relevant data history, absenting uniform and stable methodology, inconsistent data application, out-of-sync data publication, regular and large-scale revisions of data, etc.

Legal data depth is relatively small, but forecast horizon is huge.

Consider a developer who seeks a regulatory approval for release of a self-driving car on public roads.

The developer has to drive a self-driving car for more than 1,000,000 kilometers and more than 100,000 hours in test mode. (These figures are arbitrary and are subject to varying requirements.)

That is to confirm by use of huge dataset that the algorithm embedded into the self-driving car is adequate to predict any road situation within seconds and cope with any road situation adequately.

On the contrary, an ordinary legal dataset will highly probably fail to become comparable in depth and scale with the dataset generated for the self-driving car.At the same time, such legal datasets will highly probably be used to build strategies affecting the legal standing for years to come.

Cross-validation may be frequently undermined.

In practice, it is hard to assume that legal observations are independent from each other and are taken from the single distribution.Also information may leak from the training dataset to the test dataset due to data overlay and autocorrelation.

The algorithm will find the structure in the data, even if it is not there.

This becomes quite a peculiar and sensitive issue when it comes to, for example, legal predictions.What should we conclude if a ML model identifies correlation between the outcome of the court hearing and weather conditions?As Ronald H. Coase said, if you torture the data long enough, it will confess.

Single Short

  • To practice law is not like to play Go

The capacity to build experience and evaluate outcomes of alternative decisions is limited.

One who plays Go can do it a million times, can accumulate experience with each new game won or lost, and, ultimately, can build more and more successful strategy.

By contrast, one who practices law has only one chance to make the right decision, has no possibility to redo, and, consequently, has no opportunity to gain experience by observing what would happen with the alternative decision. (This is legitimate, unless the lawyer is like Griffin from Men in Black III.)

Also there rarely are extensive legal datasets from the same distribution to apply transfer learning.

Understanding Results

  • To build a ML model is arguably easier than to understand a ML model

Understanding task (what is the problem being solved), data (what are the features, limitations, and risks associated with data) and methods (how do methods work) becomes a challenge, even for IT specialists.

Lack of knowledge makes it difficult to accurately interpret a good model, to identify a bad model, and — due to lack of trust — to apply the model in the decision-making.

Imagine we assign an ML model to draw the hidden part of the image — a frog’s foot — based on the open part of the image — the rest of the frog’s body.

The model generates a synthetic image and combines the original image with that synthetic image.

At first glance, we believe the result is good: the model guessed the core features —like color, contours, background — approximately correctly.

However, if we look under the hood, the result is not good: based on the open part of the image, the model generated a chicken instead of a frog, and then inscribed the chicken’s wing in the place of the frog’s foot.

If we do not understand all the nuances of the task, the peculiarities of data, and the mechanism of operation of the model, we risk to face a situation when the model inscribes a chicken’s wing in place of the frog’s foot — and we don’t know about it.

The interpretability heavily on whether the ML method chosen fits the task.

For example, face recognition models will highly probably fail if applied to classify litigation documents, make legal predictions, or assist legal discovery.

Notes

In this story, ML means a method of data analysis that automates analytical model building and is based on the idea that systems can learn from data, identify patterns and make decisions with minimal human intervention.

The problems discussed —

  • originate partly from that fact that ML methods were not originally designed for legal datasets
  • may be relevant for the sectors other than law
  • vary in their scope and relevance depending on the application field
  • exist along with other ML problems like high error susceptibility, and
  • call for caution and diligence when applying ML in the legal domain.


Originally published on https://dearall.medium.com/wrong-way-sign-adbbe2148c85.


Disclaimer: This is my personal blog. This is neither a legal opinion nor a piece of legal advice. The opinions I express in this blog are mine, and do not reflect opinions of any third party, including employers. My blog is not an investment advice. I do not intend to malign or discriminate anyone. I reserve the right to rethink and amend the blog at any time, for any or no reason, without notice.