New Zealand Law Society - Machine learning and the future of law

Machine learning and the future of law

This article is over 3 years old. More recent information on this subject may exist.

Since the late 1990s, information technology has been radically changing the law and the legal profession, in the same way as it is changing almost every aspect of our lives.

New legal issues are raised, such as electronic contracts, online privacy and internet fraud. Information technology also affects how the legal sector operates, giving rise to new phenomena like e-discovery, virtual law firms and online dispute resolution.

While such changes are by no means insubstantial, they are not revolutionary. For example, the legal doctrines regarding contracts written on paper can be applied to contracts concluded through emails; e-discovery is simply an extension of the traditional discovery process through information systems.

However, in the recent couple of years, machine learning, a new approach for computer programming, has taken the world of technology by storm.

Machine learning algorithms are now used in scientific research, education, health care, retail, social media, and the list goes on. Yet many technology experts predict that this is only the beginning.

There seems to be little question that machine learning will be applied to the legal sector. It is likely to fundamentally change the legal landscape.

What is machine learning?

When computers were first invented in the 1950s, it was believed by some futurists that human-level artificial intelligence (AI) would appear in 25 years.

As it turned out, this prediction was overly optimistic. While computers are very good at solving complex but strictly defined problems, they are hopeless when facing cognitive tasks which are very easy for humans, such as spotting a coffee mug in a picture or answering a simple question based on a short news story.

The breakthrough came in 2011. Armed with 200 million pages of information (including the full text of Wikipedia), a supercomputer designed by IBM – Watson – handsomely beat past human champions in the quiz show Jeopardy! on live TV. During the competition, after receiving a question posed in natural language, Watson would then search the pre-loaded information database and present the answer, also in natural language.

The reason why Watson is so smart is because it is fitted with machine learning technologies. In essence, machine learning involves mathematical model-based algorithms for computers to study patterns in data to make predictions.

In fact, the theory behind machine learning is not new. It was first discussed by academic researchers a few decades ago. But because of the availability of large amounts of data and enormous computing power we have today, computer scientists are now able to turn the theory into practice.

The machine learning approach adopted by Watson is called supervised learning. Under this approach, a computer program will first be given a labelled dataset (eg, a bunch of questions and the corresponding answers). The program will analyse the dataset and figure out the patterns which best describe the relationship between the questions and answers.

After the program is “trained”, it can answer new questions, relying on the information (eg, Wikipedia) and the identified patterns.

Watson can be used to address more important questions than competing in quiz shows. In fact, Watson is already helping doctors to diagnose lung cancer with a 90% success rate, compared to 50% for human doctors.

Early this year, a group of students at the University of Toronto designed a computer program called Ross. By taking full advantage of Watson’s super learning power, Ross is able to answer specific legal questions, in contrast to other legal search programs which would simply return a list of documents.

What Watson has achieved is nothing short of amazing. But it still requires human intervention. A sufficiently large dataset has to be labelled to train the computer, which is why this approach is called supervised learning.

In contrast, an even more promising approach is the so-called “unsupervised learning”. In 2011, a group of scientists from Stanford University and Google uploaded 10 million pictures taken from YouTube videos to a computer network consisting of 1,000 computers. After three days of digesting, without ever being told what a cat was, the network started to recognise cats, and other features such as human faces and human bodies.

With the unsupervised learning programs becoming more and more powerful and sophisticated, it might not be a far stretch to imagine that some day we may have a computer program which is able to answer almost every question of law after it has absorbed massive amounts of data such as all the statutes, judgments and journal articles ever written on common law.

Algorithmic trading

Unlike normal programs, computers with machine learning algorithms do things in ways which have not been envisaged by the programmers at all. This could lead to new and challenging legal issues.

For example, unknown to most retail investors, nowadays the majority of all securities transactions are done by trading algorithms with little or no human involvement. Based on a wide range of data such as timing, price, volume, volatility, news releases, internet chatters etc, these algorithms decide whether to buy or sell a certain stock. In fact, they are considered to be the reason behind two highly publicised events.

In 2011, Dan Mirvish, an American filmmaker and author, discovered that after Anne Hathaway (the famous Hollywood actress) hosted the Oscars, the share price of Berkshire Hathaway (founded and led by Warren Buffet) went up. His guess was that automated trading algorithms picked up the chatter on the internet about “Hathaway”, and decided to buy the Berkshire Hathaway shares.

While Mirvish’s “Hathaway effect” theory is light-hearted (yet plausible), the stock market crash in 2010 was much more serious. On May 6, 2010, within less than an hour, stock indexes, such as the S&P 500, collapsed and then miraculously bounced back.

During this period, the share prices of major corporations swung wildly: the price of Apple shares shot up to over US$100,000, while Accenture (the global consultant giant) dropped to one cent. A human trader would not sell Accenture shares at this price; only a computer with no common sense would do such things.

Difficult issues

Algorithmic trading raises difficult issues for securities market regulators. For example, if a human trader places a buy order with intent to cancel the order before it is filled (such strategy being called “spoofing”), he or she will be criminally liable.

However, if a machine places and then cancels a buy order, how do we decide whether the machine has an “intent” to cancel the order before it is filled? Does a machine even have an “intent”? And lastly, assuming that we can identify the intent of a machine, should the intent be attributed to a human being? There is no easy answer.

The key feature of machine learning is that computers can identify and apply new ways to address a task. The programmer who designed the relevant algorithms may have no idea that the algorithm can figure out the strategy of spoofing.


We are entering into the era of cognitive systems. Computer scientists are now building machines with “artificial general intelligence”, meaning they can learn and become an expert in any field, just like a human being.

Shane Legg, a New Zealander who co-founded DeepMind Technologies and sold it to Google for US$400m, expects that human level AI could be reached in the early 2020s.

The future of cognitive technologies is mind-blowing and somewhat scary. Perhaps we should start thinking about whether there should be a general legal framework for the developments and uses of AI.

In particular, a question for the legal profession is whether we should set limits to the application of AI in law.

In many fields, AI will certainly benefit humanity. Self-driving cars are much safer than cars driven by humans, and a robot surgeon can far outperform a human doctor.

However, the law seems to be different. While there should be no harm to let machines give free legal advice to people who cannot afford a lawyer, it is altogether a different matter if we allow a machine to decide a case. Arguably, it is a basic human right to have his or her fate decided by fellow human beings, not a machine.

Benjamin Liu is a commercial law lecturer at Auckland University. His research interests include securities law, financial derivatives and information technology and law. He is qualified in New Zealand and England and Wales (although not currently practising).

Lawyer Listing for Bots