Abstract
Modelling that exploits visual elements and information visualisation are important areas that have contributed immensely to understanding and the computerisation advancements in many domains and yet remain unexplored for the benefit of the law and legal practice. This paper investigates the challenge of modelling and expressing structures and processes in legislation and the law by using visual modelling and information visualisation (InfoVis) to assist accessibility of legal knowledge, practice and knowledge formalisation as a basis for legal AI. The paper uses a subset of the well-defined Unified Modelling Language (UML) to visually express the structure and process of the legislation and the law to create visual flow diagrams called lawmaps, which form the basis of further formalisation. A lawmap development methodology is presented and evaluated by creating a set of lawmaps for the practice of conveyancing and the Landlords and Tenants Act 1954 of the United Kingdom. This paper is the first of a new breed of preliminary solutions capable of application across all aspects, from legislation to practice; and capable of accelerating development of legal AI.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Visual representation of law and legal processes has potential to systematise decision-making in a way that mitigates risk and improves efficiency for lawyers, and lessens confusion and misunderstanding for their clients (Leiman 2016); both of which could decrease costs, especially those incurred relitigating matters (Fang 2014). In a system which is largely client funded this means there is potential for greater access to good quality legal assistance that a larger portion of the community can afford. Historic visual approaches like Wigmore Charts (Fig. 1) and Beardsley Diagrams have been proposed for analysis of trial evidence (Reed et al. 2007),Footnote 1 and newer methods like Araucaria Diagrams and Bayesian Networks (Fig. 2) have been used as visual steps to computational representation of legal argument in construction of AI (Reed et al. 2007; Fenton et al. 2013). However, in a recently published literature review it was found that in spite of calls for legal visualisations, use of diagrams to describe the inner workings of legislation or lawyerly processes remains rare (McLachlan and Webley 2020). This means that while diagrams and AI exist that exemplify a particular argument type, individual case or court judgment, there are very few exposing broader legal issues, legislation or categories of cases.
Wigmore diagram reproduced from Reed et al. (2007)
Bayesian Network for the case of R v Adams reproduced from Fenton et al. (2013)
Visualisations of law and justice can be an important component for how lawyers and society more widely engage with the legal system. Legislation is infused with structure, and not just the visible structure of chapters, headings and statutory sections, but also an implicit structure that only becomes apparent when different sections and subsections interact as that legislation is analysed or when they are applied to a particular set of circumstances. The complex, verbose and abstruse nature of legislation means that it is difficult for those not trained in the law to comprehend the structure and meaning of legislation.
The systematic collation of interactions between legal provisions, processes and decision points could provide a formidable tool to support lawyer’s decision-making and a powerful representation of the law and legal system. Information visualisation (infovis) provides a map** between discrete data and visual representations in order to improve memory, cognition and comprehension of otherwise abstract information (Huron 2014; Manovich 2011). Infovis reduces the variability of what is specific to individual instances of data or an activity to visually represent only the core characteristics in order to reveal the patterns and structures inherent to that data or activity. The process of develo** infovis draws on two core principles (Manovich 2011):
-
The reduction of complex data and relationships to graphical primitives such as points, lines, curves and simple geometric shapes, and;
-
Use of spatial variables such as position, size, shape, colour and movement to represent key differences in data and reveal patterns.
Lawyers make countless decisions in the course of daily practice. Decisions about the relevant legal provisions that apply to a given matter, the scope of advice they give, the investigations they undertake on behalf of their client, and the context of submissions they draft. The vast array of complex legislation, practice rules and precedent all serve to make legal decision-making a challenging task (James 2007; Johnson 1999; Mulvenna and Hughes 1995). Lawyers adhere to relatively traditional ways of doing things, even as professionals in other domains adopt new technologies (Becerra 2018). While there have been numerous calls to develop approaches and train lawyers using infovis (Koch 2010; Leiman 2016; McCloskey 1998), these calls presently remain unanswered (Leiman 2016; McLachlan et al. 2020a, 1997; Rissland 1990). More recent projects have developed formulaic or rule-based approaches for performing routine tasks including predictive coding processes for e-Discovery, ranking of precedents during legal research, and predetermined routine document generation (Becerra 2018). While there have been a number of forays into predictive analytics these have usually sought to provide a limited prediction as to the potential outcome if a matter proceeds to trial, or the decision a particular judge might be expected to make based on past rulings (Becerra 2018). Issues have been raised with other predictive approaches that have drawn critical attention in the media, with claims that systems such as COMPASFootnote 2 and PredpolFootnote 3 are racist and prejudicially biased. However, these applications of AI more correctly exist within the policing and justice domains and are not routinely used by lawyers. For this reason, while their striking ethical issues should be foremost in the minds of all who are develo** intelligent solutions, we consider them to exist outside the scope of AI for legal practice.
Real-world problems generally comprise multiple related but uncertain variables and data (Constantinou et al. 2016). Develo** effective AI involves two major tasks: (1) determining the structure; and (2) specifying the computational parameters and values (Kyrimi et al. 2020). It can be difficult to determine the most appropriate inputs when develo** a new AI. However, one approach that has shown success is when data is combined with expert knowledge (Constantinou et al. 2016; Kyrimi et al. 2020). The process of deriving knowledge from experts, or expert elicitation (Constantinou et al. 2016; Kyrimi et al. 2020), allows for interdisciplinary collaboration between those develo** the AI and experienced practitioners from the domain under investigation. The goal should not be wholesale replacement of the expert practitioner. Rather, the goal should be to develop tools that can aid or enhance their practice, and reproduce elements of their expertise that may assist the untrained or inexperienced to identify when and why they have an issue that requires expert input.
With this in mind we have been develo** lawmaps in a discrete set of legal domains. Figure 3 describes the relationships on our pathway to develo** legal AI. Lawmaps (which we will define formally in Sect. 3) are developed from legislation, precedent and procedural rules, all framed by expert input that illuminates flow, meaning, decision-making and reasoning processes. We believe lawmaps provide a logical structure which, when combined with relevant legal datasets and a common data model (CDM) for law, can support production of Legal AI.
3 Lawmaps: an approach for representing legislation and legal processes
Lawmaps grew from a need for infovis in the legal domain and out of the prior efforts of several of this works’ authors to develop standard diagrams incorporating knowledge from clinical practice guidelines, published texts and clinical expertise in the medical domain. Known as caremaps (McLachlan et al. 2019), the resulting medical visualisations use a custom set of familiar unified modelling language (UML) elements to represent diagnostic and treatment activities, clinical decisions and the pathway a patient takes during the course of treatment for a given medical condition. Scaffolding a new infovis approach with an established presentation model that is familiar to the practitioner mitigated the need for extensive explanation and training of the representation framework, allowed the user to engage more freely with the knowledge content of the diagram, and resulted in an approach that practitioners agreed was simpler and easier to use than the text-based clinical guidelines and literature on which the caremap had, in part, been based (McLachlan et al.
As legislation is amended or new legal judgements reported, the lawmap may be updated through reprise of the lawmap development lifecycle with the updated source materials.
The design process described below assumes that the process being mapped has been identified and begins with collection of the source materials. The process for resolving the structure and flow of a lawmap follows an iterative per-node standard process described in points iii-vi below, with addition of the Extract step which is used to prepare legislation for direct application in that iterative standard process.
-
i.
Locate
-
Input: the selected legislative or lawyerly process to me mapped
-
Process: locate and collect relevant source materials to the process under investigation.
-
Output: a collection of relevant source material for use in development of the lawmap.
-
Relates to: the green phase in the Lawmap Development Lifecycle
-
ii.
Extract (for legislation)
-
Input: legislation from the source material collection
-
Process: extract plain language logic from the law, making the legislation approachable and explaining its core elements, activities and application.
-
Output: a plain language process flow that describes the source legislation in simple terms.
-
Relates to: the blue phase in the Lawmap Development Lifecycle.
-
iii.
Identify
-
Input: output from the Locate and Extract steps.
-
Process: identify the requirement for a node. Such requirement will be indicated from the plain language logic of legislation, conditions of a judgement or common law test, the structure of a legal idiom, or as a necessary step in procedural rules or lawyerly process being undertaken.
-
Output: a collection of identified nodes with analysis of their requirements, dependencies and operative rules.
-
Relates to: the blue phase in the Lawmap Development Lifecycle.
-
iv.
Distinguish
-
Input: output from the Identify step.
-
Process: distinguish the type of node by its action and the effect it will have on the process flow. For example: where a node is an action or step to be undertaken and will be followed by another action or step, this will most likely be an activity node. Where there will be multiple pathways diverging from the identified node, this is most likely a decision point and necessitates identification of criterion to define the metric for selecting the individual divergent path to be taken.
-
Output: a complete set of nodes classified as activities or decision points.
-
Relates to: the red phase in the Lawmap Development Lifecycle.
-
v.
Sequence
-
Input: output from the Identify and Distinguish steps.
-
Process: the process to sequence a node requires identification of: (i) those activities that must be completed or that are necessary to the activity or decision to be undertaken in this node and which this node would have to follow; and (ii) any activities that depend on the outcome or completion of the activity or decision of this node and which this node must precede.
-
Output: the constructed lawmap.
-
Relates to: the purple phase in the Lawmap Development Lifecycle.
-
vi.
Traceability
-
Input: Output of all previous steps.
-
Process: this step annotates the lawmap and enables traceability back to the legislation, case law or source material for nodes and the overall structure. Where the node has been resolved from a particular subsection of legislation, this should be indicated. In cases where a node arises from application, discussion or refinement of the law in judgement, the case law should be referenced with attention drawn to the legal reasoning that is required.
-
Output: annotations for key nodes and pathways in the completed lawmap.
-
Relates to: the purple phase in the Lawmap Development Lifecycle.
There is of course a major leap from step ii to step iii and there has been no single universally agreed method for doing this. However, simple Boolean algebra can greatly assist in this process. Use of Boolean Algebra (Boole, 1847) for expressing the final structure of law or legal rules after thorough analysis, including rules of precedence, is not new (Kort 1963; Allen and Caldwell 1963). More recently this approach has been applied in the form of Temporal and Boolean Logic to model traffic law and road rules (Prakken 2017; Alves et al. 2020). It’s application in this work would help as the basis for develo** machine interpretable visualisations in the form of Lawmaps that can aid lawyers and clients to better understand the law and legal processes, as well as AI developers and decision scientists in their efforts to develop machine learning (ML), neural networks (NN) and other forms of AI. This process of deconstructing law and lawyerly process means each lawmap has a sound formal basis, which also promotes future bi-directional automatic generation of Lawmaps-based output from NLP methods, and the incorporation into and validation of laws in AI. For law and regulation the process begins with investigation of the underlying structure and infers the inherent intention and flow; identifying the key points, actors, processes and chronology of operations and representing them by application of Boolean logic and algebra.
5 Demonstration of the lawmap approach
It is beyond the space limitations of this paper to reproduce an entire stepwise case study for develo** either type of Lawmaps: legislative or lawyerly. Instead, this section demonstrates a number of component examples from each lawmap type using the terminology and activities described in the six-step design process described in Sect. 4.
5.1 Legislative process: the United Kingdom road rules
As a simplified example, if we were examining the requirements of Sect. 5(1) of The Motor Vehicles (Wearing of Seat Belts) Regulations 1993 (MVWSBR) shown in Fig. 7, which are already the underlying basis for Road Rule 99 shown in Fig. 8, we see that: (a) the actors are adults and persons over the age of 14 years; (b) that they are driving or riding in a motor vehicle; and (c) they must wear a seat belt; (d) where that seat belt has been fitted or is available.
Table 2 provides the resulting Boolean logic pseudocode meeting the requirements of MVWSBR s5(1) as expressed by Road Rule 99.
Road Rule 99 could be written in Boolean logic and expressed in pseudo-English as follows:
Boolean Algebra is well-established, mathematically sound, complete, and utilizes the following operators: conjunction ( ×), disjunction ( +), and negation ( ~). This algebra is simple and is sufficient to express most legal rules in a way that most people would understand. In Boolean Algebra, the Boolean logic of Rule 99 would be expressed as:
These logic models simplify creation of LawmapsFootnote 6; giving Lawmaps a sound formal basis. The resulting Lawmap for Road Rule 99 combined with its partner rule Road Rule 100, is shown in Fig. 9. Lawmaps are an intelligent, clear and concise but democratised tool for visualising the structure and flow of law and lawyerly processes.Footnote 7 These Lawmaps provide a visual primer of the potential paths and decision points that result from review of a particular law, regulatory rule or legal process. Exemplar Lawmaps are provided for Road Rules in the practical evaluation section of this work.
Finally, many legal practitioners would be familiar with logical thinking and expressing laws and legal rules in the form of Boolean expressions (Aldisert 2001). They are also aware of the need for probabilistic extensions like Bayesian theory when applying the law to the cases, e.g., Bayesian Theory (Fenton et al. 2013; McLachlan 2019; Olsen et al. 2019; Yu and Alì 2019). One who is subject to a decision made by or with the assistance of AI has the same right to explainability as another receiving a jury or judge-alone verdict. Overall, the need for explainability is intended to avoid judgments made at random or in circumstances of uncertainty (Englich et al. 2006). Lawmaps support explainability for both human and algorithmic decision-makers by providing an approachable visual chart of the structure of rules, legislation and precedent used in the decision-making process.
Recent articles provide diametrically opposed views on plain language law, AI and other technologies: while some welcome technology and promote new working models for lawyers, others engender fear through dire warnings that technology’s sole purpose is wholesale replacement of the lawyer.Footnote 14 The latter may be the intention of some technology companies, however legal AI, democratising law and other approaches that produce digital disruption in the legal domain need not bring redundancy for the skilled practitioner. Legal training and practice must accept the inevitability of disruption and begin seeking approaches for transformation. If acknowledged and adopted within the legal domain, rather than replacing lawyers, approaches that may bring disruption can be used to: (i) streamline and improve delivery of legal services, (ii) reduce potential for errors and malpractice; and (iii) increase metaphorical foot traffic through the law firm door by providing those not trained in the law with a way to identify when, and why, they have an issue that should be brought to the expert practitioner.
Digitising lawmaps, merging them with data using a common data model and other structures like legal idioms and ontologies like SALI (www.sali.org) will extend, and may actually simplify, the pathway to develo** Legal AI. Figure 14 shows the approach currently employed by the Innovate UK funded Engine B project (www.engineb.com) which delivered complete versions of the examples presented in Sect. 5. Engine B is in the final stages of develo** a Common Data Model (CDM) and Knowledge Graphs for commercial property transactions (conveyancing and leasing). These will be used, along with Lawmaps, to develop practitioner-facing AI that will collect and aggregate property data from multiple sources and inform the practitioner’s legal decision-making process.
7 Conclusion
Lawmaps are a simple tool for visualising legislation and legal processes that present otherwise complex topics in a way that is approachable to all while, at the same time, facilitating formalisation to allow incorporation into AI paradigms for supporting legal experts. With inherent clarity, Lawmaps are able to expose the implicit flow, knowledge and reasoning of a domain that has clung to incomprehensible text. Lawmaps represent one possible solution to mitigating access to justice issues by providing the untrained person with a visual primer to navigate their way through the intricacies of our legal system while also allowing communicating the law for formalisation by AI technology experts. We believe, and have observed first-hand as part of the Engine B project, that information visualisations like Lawmaps improve comprehension of the rights and duties imposed by law, and represent a significant step on the pathway to develo** ethical, accurate and useable legal AI.