Posted in BC Legal Management Association Periodical (Fall 2023), by Jason Fakidis, CEO Deep Insight Analytics Inc.
The emergence and wide scale dissemination of modern Artificial Intelligence (AI) technology has captured the imagination of the public and has left humanity with a sense of both excitement and anxiety regarding the broader implications of AI in society.
WHAT IS ARTIFICIAL INTELLIGENCE?
Artificial intelligence as a formal academic discipline surfaced in the mid 1950’s. The field experienced varied levels of public confidence up until the early 1990’s when machine learning techniques based on probabilistic reasoning matured. Today, the convergence of vast amounts of publicly available data, specialized computer hardware and algorithmic innovation has secured deep learning (a machine learning paradigm which employs statistical models influenced by biological neurons) as the de-facto approach to engineering intelligent systems. Specifically, foundation models (such as the ChatGPT large language model) have experienced exceptional success and have accelerated the commercialization of artificial intelligence.
LEARNING MACHINES
Modern artificial intelligence algorithms are based on statistical models which use training data to make predictions or decisions without the need for explicit programming or direct human intervention. Deep learning models, called artificial neural networks, function in a way that is loosely analogous to a human brain. To elucidate the learning process let’s imagine that we would like to train a neural network to determine whether a given piece of text (such as a document containing a review of a product) has a positive or negative sentiment (or affective value). First, we would collect a large dataset of product reviews which we would label appropriately. Next, we would input each of these documents into the neural network one at a time. The network will make a prediction as to whether the image is in favor of or against a product. It will then use the label we provided to calculate a score or error which quantifies the accuracy of its prediction. The network will then use this error to update its internal state such that the predictive error of the model decreases as new examples are seen. In this way, the neural network improves its accuracy on this task as it is exposed to more and more examples.
LANGUAGE AND THE LAW
Legal professionals rely heavily on the use of language. Large volumes of text are produced and stored digitally in documents such as legal briefs, contracts, patents and judicial decisions. Language employed by judges, lawyers and regulators is complex. It is historically informed and rich with semantic nuance. The grammar of legal language is different from that of regular language and is marked by its use of pedantic phrasing and culturally informed stylistic norms. The need for tools to automate the analysis and processing of legal language is paramount given that the complexity and volume of relevant documentation required to do appropriate diligence is ever increasing.
NATURAL LANGUAGE PROCESSING
Today Natural Language Processing (NLP), an interdisciplinary subfield of AI, plays a central role in legal technology. NLP algorithms have advanced to the point where they can learn to ”understand” both the content and context of a document in a meaningful way. Broadly speaking, these algorithms can be used in two ways. First, for classification, by assigning text to one or more categories. Second, for generation, by synthesizing novel text. Legal applications of NLP such as e-discovery, legal research, contract review, and due diligence can be reduced to a set of fundamental tasks. These tasks, with examples, are as follows:
1. TEXT CLASSIFICATION
Identification of fraud is a pervasive problem. Investigators with access to historic corporate records may be interested in isolating language that signifies potential fraud. A machine learning algorithm trained with many examples of fraudulent
language can learn to deduce whether a phrase in a document signifies potential fraud or not. Once trained, the algorithm can analyze large volumes of text to identify fraudulent language.
2. ENTITY CLASSIFICATION
Analyzing the language of a document requires the ability to identify words (or ”entities”) that are semantically similar. For instance, we could teach a machine to identify whether a word is the name of a person (”John”) or an organization
(”ATCO”). We can use the machine to read a document (such as a contract or judicial decision) and extract names of people and organizations. Extracting these named entities automatically from a document allows legal professionals to streamline the process of legal research.
3. ENTITY RELATION CLASSIFICATION
If we extract entities from a document that represent people and organizations, we can use that information to train a new machine learning model to predict the type of relationship between pairs of entities (“works for”, “owns shares of”, or “is
obligated to”). This model could then be employed to locate all instances in a document where action statements such as “John is employed by ATCO” occur. When analyzing case law, this application can be used to automate extraction of the factual matter of a case without the need to read it directly.
4. TEXT GENERATION
To train a model to generate text we give it the task of predicting the next word in a document given previous words. Training a generative model on a large corpus of text (such as the internet) will allow the model to produce highly coherent language. We can sample from this model to generate text that is both novel and very convincing. For example, we can train a generative model on a large number of real estate contracts. Once trained, the model will be able to synthesize a new contract with statistically similar properties to the contracts it has read during training.
The legal profession, which relies heavily on the use of text, has the potential to be transformed by AI systems that learn from data. The field of NLP offers legal professionals a set of applications which allow them to improve efficiency
and reduce costs. These applications allow practitioners the opportunity to automate analysis and processing of documents containing complex domain specific language. Due to its accessibility and affordability, AI is now becoming increasingly essential to stay competitive in a fast-evolving legal sector.
Jason Fakidis, B.A.Sc., is CEO of Deep Insight Analytics Inc, a
SaaS software solutions company that uses AI and ML
technologies to improve productivity by helping clients streamline
legal research and automate document analysis and processing.
DIA are also the creators of the legal app LawAI. Learn more at
insight-analytics.ai