The Role of Rules in
Computational Law

Summary of a panel on Computational Law at Future Law 2017

Michael Genesereth
Stanford University

Michael Mills
Neota Logic
  Abhijeet Mohapatra
Stanford University
Manik Suri
  Sarah Thornton
Stanford University

Harry Surden
University of Colorado, Boulder

Abstract: Computational Law is the branch of Legal Informatics concerned with the mechanization of legal analysis (whether done by humans or by computers). Data-driven technologies, such as Predictive Analytics, have brought the power of big data to predicting the odds of various legal outcomes in certain situations. On the other hand, rule-based technologies, such as Logic Programming, offer significant advantages in mechanizing legal analysis. This panel brings together experts to help us understand the prospects and problems associated with this classic approach to Computational Law.

Introduction - Michael Genesereth

Michael Genesereth is a professor of Computer Science at Stanford University and research director of CodeX.

There are some people who use the phrase Computational Law to refer to anything having to do with computers and law. At Codex, we use the phrase more narrowly. For us, Computational Law is the branch of Legal Informatics concerned with the mechanization of legal analysis (whether done by humans or by computers). (See Computational Law - The Cop in the Backseat.)

From a pragmatic perspective, Computational Law is important as the basis for computer systems capable of doing legal calculations, such as compliance checking, legal planning, regulatory analysis, and so forth. Some systems of this sort already exist. Turbotax is a classic example, but there are many others.

And the potential for deployment of such applications is substantial due to technological developments like the Internet, mobile systems (such as smart phones and smart watches), and the emergence of autonomous systems (such as self-driving cars and robots).

Applications of this technology are democratizing the law. They are taking law out of the courtroom and the law office and making it available to people who are not legal professionals. They are embedding it in the real world, making it available to ordinary decision makers at the point of decision, when they are about to act or planning how to act. On the Internet when we are deciding whether to buy that drug from Canada or ship that alcohol to Virginia. In cars when we want to know if we can make that left turn at this tie of day. In planes when we want to know where we can fly and at what altitude. And even out in nature when we want to know whether we can pick that flower.

In a sense, Embedded Computational Law is the natural next step in a progression that began millenia ago. Around 1750 BC, Hammurabi had the laws of the land encoded in written form (literally cast in stone) so that citizens could know what was expected of them and what would happen if they violated those expectations. Since then, it has been the norm to encode rules in written form and disseminate first via books and more recently via the Internet. However, with the proliferation of rules and regulations, just writing things down is not enough when the laws are voluminous and difficult to understand. In a way, Computational Law is the first revolutionary bit of progress in this regard since the days of Hammurabi.

The question that concerns many of us in the Computational Law community is how best to build such systems.

Data-driven technologies, such as Predictive Analytics, bring the power of big data to predicting the odds of various legal outcomes. Unfortunately, there are limits to this technology, e.g. in areas where there are not many cases to analyze or where that analysis is impractical or unnecessary, e.g. deciding whether to drive through a red light.

By contrast, rule-based technologies, such as Logic Programming, rely on explicitly represented behavioral constraints rather than vast quantities of data. Rule-based technologies have significant advantages in mechanizing legal analysis and work in many cases where data-driven technologies do not.

This panel brings together five experts to help us understand the prospects and problems associated with this classic approach to Computational Law.

Decision Trees - Michael Mills

Michael Mills is the co-founder and chief strategy officer of Neota Logic, developers of a software platform that enables non-programmers to build and deploy rule-based dialog systems for professional services in general and legal services in particular.

Checklists - Manik Suri

Manik Suri is the co-founder and CEO of MeWe, a technology company that specializes in building online checklists to support regulatory compliance checking.

I like to joke with my friends that I'm a "recovering lawyer," so perhaps it's appropriate that I'm going to focus on non-lawyers -- and specifically how rule-based systems can benefit those outside the legal profession. I'm going to focus on one type of rule-based system, "checklists," that my company MeWe uses to help organizations improve compliance outcomes and lower costs.

Let's start with the assumption that legal regulations are complex, change frequently, and impose real costs--but that the net benefits (in terms of fairness, safety, equity) outweigh these compliance costs. My central argument is that rule-based systems, enabled by technology, can make the law a) more efficient, b) more democratic, and c) more just. I'm going to illustrate these argument by highlighting 3 case studies across industry, government, and consumers.

Case Study #1 (Industry): We've deployed "compliance checklists" to help a 1,000-location restaurant chain, replace third-party expert auditing services with more efficient self-assessment compliance software.

Case Study #2 (Government): We've designed "compliance checklists" to help government inspectors reduce misinterpretation and misapplication of regulatory requirements, by making reference information available to heath and safety inspectors via checklists.

Case Study #3: (Consumers): We've utilized "compliance checklists" to provide student tenants with access to legal information regarding consumer protection and housing standards, to empower them in making housing decisions.

In sum, rule-based systems, enabled with technology, can make administration and application of the law more efficient, more accessible, and more just.

Worksheets - Abhijeet Mohapatra

Abhijeet Mohapatra is a doctoral student in Computer Science here at Stanford. He is a specialist in the technology of online worksheets, and he is the primary developer of Worksheets, Stanford's online worksheets service.

Worksheets are dynamic, interactive webpages, and generalize a large class of applications from the legal domain, e.g. online tax forms, and other government forms such as social security forms and DMV applications.

We have built a platform that enables the masses to build worksheets in a Do-It-Yourself fashion by characterizing the underlying interactions as logical constraints, analogous to formulas in a spreadsheet.

At Stanford, worksheets built using our platform help hundreds of CS students each year to comply with their academic program requirements.

Our model for creating Worksheets in unique in its the ability to manage constraint violations and ambiguities through user-specified policies, and visual feedback.

We envision worksheets as a key component in a "Citizen's Dashboard" of the future driving citizen's interactions with the government, and validating these interactions using "correct-on-capture" rules.

Autonomous Cars - Sarah Thornton

Sarah Thornton is a doctoral student in Stanford's Dynamic Design Lab. She is a contributor to the Lab's work on path planning under uncertainty and has written about ways to incorporate legal and ethical constraints in the control algorithms for self-driving cars.

My lab takes on the challenge of designing an autonomous race car to beat the best drivers on the planet. (See Stanford engineers test autonomous car algorithms in quest for safer driving.) We believe autonomous vehicles should be as safe as possible, so the algorithms running on an autonomous vehicle should understand what is required to safely maneuver in an emergency situation. It turns out we have made great success in our autonomous racing capabilities just by programming some relatively simple physics based models and control algorithms to reduce the error of our desired speed and position on the track.

There are several layers involved in autonomous vehicle design. The top three of the four layers in autonomous vehicle design are sensing, perception and decision where the fourth layer is actuation, typically conducted through by-wire systems. The sensors gather information about the vehicle itself and the environment surrounding the vehicle. The perception and decision layers then do the heavy computations. The perception layer takes all the sensor data and intelligently parses it to pass on in a form most useful to the decision layer. With the perception information, the decision layer can determine what path to follow to traverse the environment in real-time. Because an autonomous vehicle has to navigate highly dynamic environments, it is crucial that these perception and decision layers operate at a rate fast enough to react to changes in the environment. In navigating traffic situations, clear cut solutions don't always exist.

My work has been to take philosophical concepts and map them to mathematical concepts used to program our vehicles. In particular, I have mapped the idea of consequentialism to aspects of our cost function and deontology with physical constraints of the vehicle and environment. (See Incorporating Ethical Considerations Into Automated Vehicle Control and Prescriptive and proscriptive moral regulation for autonomous vehicles in approach and avoidance and these videos.

Perspective - Harry Surden

Harry Surden is a professor of Law at the University of Colorado in Boulder, and he is one of CodeX's affiliated faculty members. He has written and talked extensively about Legal Informatics in general and computational law in particular. He is the author of the seminal paper on computable contracts. (See Computable Contracts.) And he is the author of a recent paper on the embedding of social values in Artificial Intelligence systems. (See Values Embedded in Legal Artificial Intelligence.)

We are increasingly using technological systems in the application and administration of law. Judges, for example, use computer systems to determine criminal sentences for defendants, and lay people use software like Turbotax to compute their personal income tax. These legal technological systems often involve the use of computer rules that aim to replicate the meaning and logic of some area of law, such as the personal income tax code.

It is well known that social values can be unintentionally embedded in technological systems. When engineers design technological systems, they often have a series of engineering decisions to make: how to implement the system, what the system can and can't do, its limits, capabilities, etc. The core idea of "embedded values" is that when such systems become widely used, the technological design choices made by engineers can end up having the effect of promoting certain social values over others or advantaging or disadvantaging or some societal subgroups, over others.

Very little attention has been give to the way that values can be similarly embedded in rules-base legal technological systems. One issue is that the very act of translating a law in a rule for a computer system, actually masks a series of subjective and contestable decisions about the meaning and scope of the law. Most laws involve uncertainty - uncertainty about the meaning of words, or the scope of legal terms, or when the laws apply, or the intent of the law, or the outcome of the law when applied to particular facts. In a typical case, there are multiple, equally plausible interpretations of a law, with slightly different meanings all of which are perfectly reasonable.

However, in rules-based technological systems, programmers (and others) examine a set of laws (such as the personal income tax code) and attempt to translate the logic and meaning of those laws into a set of comparable rules that a computer can follow, all the while attempting to faithfully represent the logic, intent, and meaning of those laws. However, such a “translation” is actually a commitment to one particular interpretation over another. Such computer translations actually involve a series of subjective and contestable decisions about the meaning of the law and these subjective interpretations are then committed to fixed computer rules. In the case of something like Turbotax, where the product is shipped world-wide one subjective interpretation about the meaning of the law becomes multiplied when the software is used by millions of people. The problem is that value judgments about the meaning of laws can become embedded and baked into technology and multiplied around the world, when they are translated into software rules.