Law and Technology

On AI, Legal Informatics, and Rule-Based Systems with Prof. Guido Governatori

Keshav Soni & Anant Prem Joshi

In this episode, Keshav Soni and Anant Joshi (Editors, LSPR) sit down with Professor Guido Governatori, professor of Information and Communication Technology at Central Queensland University, to discuss the application of AI in rules-based systems. We discuss key challenges in implementing these technologies, including feasibility and legal changes such as transparency, law-making, and protecting judicial discretion

LISTEN TO THE PODCAST


Keshav: 

Hello. My name is Keshav Soni, and I am an editor at law school policy review.

Anant:

Good evening. I am Anant, and I’m also an editor at LSPR. And a good friend of Keshav.

Keshav: 

We have Professor Guido Governatori, who is a Professor of Information and Communication Technology at Central Queensland University, and a research fellow in responsible AI at the Artificial Intelligence and Cyber Futures Institute at Charles Sturt University.

Anant:

He received his PhD in legal informatics from the University of Bologna. He held academic and research positions in universities and research centers in Australia and across the world. His main research focus is on the formal logical representation of legal reasoning and its application in different fields.

Keshav: 

We are glad to have you. So my first question would be that one of the projects that you have worked on is Legal Rules ML, can you please tell us more about it and what and what does it seek to achieve?

Prof. Guido:

Okay, good, so LegalRuleML, it’s an international standard for the representation for the logical representation of legal documents, and it’s a project that essentially started back in 2005. At that time, I’ve published a paper where I propose an XML representation for foreign arms and legal rules. And then after that, I work with some colleagues, many colleagues from many parts of the world, in particular with Monica Palmirani from the University of Bologna, and she was involved with OAS already for some other standard. So essentially, we decided to start that work, and we tried to get support from many colleagues around the world, also from the standard organization and so on. So the general idea behind legal Rule ML is to have a format for representing legal knowledge in an executable format. And the key aspect is that the language is agnostic about the implementation. So essentially, it just provides a schema for how to model, how to formalize legal rules, and then essentially it is possible to implement those norms, those rules of law in many different languages. So this is the key advantage. So essentially, we are able to have a representation that can be then implemented in some, let’s say, legal some programming languages, or some languages that can be executed by machine, but then it does not depend on any specific implementation language,

Anant:

Right. That’s interesting, Professor, you’ve worked on many projects related to AI and law, and especially in the field of business compliance, for example, among others, using AI and automated decision making such as RAC rules as code are better suited to Business Law in particular, compared to, say, criminal law, where judicial discretion becomes a big thing and we consider it important many times. For example, how would an AI handle the concept of a reasonable person standard that we see in common law very often?

Prof. Guido:

Excellent question. Now, first of all, I would like to dispel, let’s say the meat that will have scored cannot be used. Let’s say in areas such as crime law in similar areas. Well, definitely, I think it will be more suitable in other parts of the law. Definitely it will be suitable for administrative law where, essentially the issues about discretion is minor than in other areas and essentially, there are more benefits. Let’s say, when you work in administrative law, in some cases, you have probably 1000 of let’s say situations you want to handle. So just like, for example, when you apply for a permit for just open a business activity. So this is something quite common, and essentially you have to do a legal procedure, you have to apply, and you have to provide the relevant documentation, etc, etc. So there are definitely more benefits of applying, let’s say rule as code and automated legal decision support in those area, but it can be applied also in other areas.

Now, your question was about, well, what about those terms that are typically are left open for interpretation? Well, one of the solutions is, well, and it’s what we applied in some of our products. It’s, let’s ask the judge, let’s ask the human. And essentially what we do, we identify is when you do the formal decision, or when you do the encoding, you identify the terms that need a human to be in the loop and to decide whether they are true or false. Now this introduces some discretion, one way to limit this discretion is to look at past cases, to look at the jurisprudence, and to look at what were the decisions, what were the rationale, what were the definitions used in the previous case and to build another set of rules providing the definitions, the time and context specific definitions. So essentially, what we will have is two different set of rules, one set of rules which will be the encoding of the of the Act, the existing jurisprudence, the existing cases and so on, and another part which will be contextual, time dependent, and so on. And essentially it will have, let’s say will be less enforceable, and essentially, where you can look at past cases and to build a database of the definition and to give an appropriate, or the most appropriate definition based on existing cases, and of course, that is where you have more discretion, and where, essentially, where there is more opportunities for debate if you have to go to a legal proceeding into a dispute.

Keshav:

Right. That sounds, that sounds very  insightful. So we talked how we can use such technology to also sort of deal with cases where there might be some sort of application of mind. So, my next question would be, do you think we can also use it to draft the law, because one of the most common issues which we face is lawmakers might have meant something else, but that some word might end up getting misinterpreted. So can using logic structures, using symbols, using codes. Can solve the issue of, you know, vagueness, confusion that words often face.

Prof. Guido: 

Well, this is a very debatable issue, and it’s a very deep issue in in the legal domain, and I would say also it will depend on the jurisdictions. So in some jurisdictions, the only authority who has the power to provide an interpretation, an authentic interpretation, it’s the judiciary, and only they can provide an interpretation when a case is in front of them. So essentially, they cannot provide the bind interpretation of a statute. So this will be one of the matter where, essentially we will still have some ambiguity and some vagueness. But definitely I can think that a logic based approach to the technical drafting might be useful. However, I will not just use for drafting alone, simply because the cost of creating the rule base could be too high if you just want to use it for legal drafting, I would say there will be more benefit if, in addition to legal drafting, it is used to support the decision in whatever context that they are suitable.

Now in some other jurisdictions, it will be definitely more beneficial in particular, where the unauthentic interpretations can be given not only by the judiciary, but also from the authority who created the statute. So for example, in Italy, where I am now at the moment well, the parliament and the government have the opportunity to provide a legal interpretation, and sometimes the judges, when they are faced with an ambiguity, whenever possible, they should go back to the original source and ask eventually, well, often doesn’t happen, but it is possible where they ask, Well, what was your original interpretation, and if we have the formalization, then it could be one way to to use as some supplementary material to provide a proper interpretation and to see whether the interpretation is consistent with the intuition and the intent from the legislator. So definitely, there will be some benefits also for legal drafting. But I wouldn’t just use it only for legal drafting, simply because it will be too expensive to use it just for those purposes.

Anant:

Right, Professor. So most of the AI models. So this is deviating from how we were discussing a systemic logical model to perhaps an AI model, right? Can AI models as we see be used in law on the sort of the other side, on the lawyer side, and most of the AI models that are used in law are r a g based models, right? Could you please explain to our audience what an r a g model is and how it would be useful for law.

Prof. Guido:

Okay, it’s not exactly my area, so I have a general understanding I know a little bit. So essentially, the well, let me start with with an analogy. So most of the current LLMns are based on absolutely huge, let’s say, training sets, and then there are training sites built from billions of documents. Now, when you use RG, what you want to do is to restrict the data, and essentially you want to ground on a particular subset. So essentially, I would say, if I just put in, in the context of University, an LLM, it’s when you have a closed book exam, while RG will be when you have an open book exam. So essentially, say, now when you go from the LLM, essentially I look at all the possible realms and a look of the memory was I’ve learned in the past, etc, etc, when you look at RAG, right then, essentially. So now I want to have your answer only from the from the book. So essentially, what you do you start from an LLM, and then you supplement the LLM in particular in the you have an additional training or indexing phase where, essentially you provide some specific documents, and essentially are the documents from where the model has To take the particular answers. And essentially there are some additional techniques. And essentially these reduce the uncertainty, and also should reduce the possibility for hallucinations, simply because they say, Well, you also you can set some parents say that if you don’t find an answer in these given set, say that you don’t have an answer, and essentially do not generate an additional answer. And essentially can limit hallucination. And can be more precise, because it depends on specific data.

Anant:

Professor, would you say the difference is, in terms of cost and computing power required, is it closer to, for example, giving the model a particular document and asking it to use that document to answer the question. Or is it closer to training a model on only a particular set of documents?

Prof. Guido: 

Well, I would say you have to give it; you just do training on a particular subset of documents. So if you just give one single document, in most cases, is not enough, and essentially, you have to do an additional training on a on a new set of documents. However, let’s see what it will be. So technology evolving every, every day in this field. So we have to see whether it is possible just to give some small set of samples instead of reasonably large set of documents. But this is something that’s still an active area of research.

Keshav:

Right. So, the actual reason why we asked this question, was because we had read one of your works which dealt with changes in legal systems and logic. So this made me think, let’s say we have a model for law, or basically, you know, our RAG model, or what happens when the law changes? What happens when a court comes up and says that, says that, says that this is not how the not how the law should be. This is how, this is how, how it will be from now. How do we make those changes in these in these large language models? Do we have to go back and change it? Would it not be too costly to do that?

Prof. Guido: 

Yes. So I would say, when you use some machine learning based approaches, when you have a new piece of legislation, when you have some new law, where there are some changes in law, those models, in most cases, will be useless because, namely, they have data to be trained on. So on day zero, when a new piece of legislation enters into force, or there are some changes, then essentially, those models will not able to give a suitable answer. So essentially, they will give an answer based on the previous training data. And essentially it means, well, you need to have new data, new cases, to update the existing knowledge base, and essentially to change the parameters.

Now you referred to my paper. Well, our paper was essentially how to deal with some particular type of changes. Mostly we were focusing on what are called annulment and abrogation and essentially also tools to see how to deal from a logical point of view of the effects on the legal effects of annulment in changes. And essentially we show that yes. So it’s it is possible to model them from a logical point of view and to do some changes and so on. Now, from a practical point of view, I would say probably we shouldn’t really look at those models, simply because they are very, very expensive computationally. And I would say, whenever you have a new piece of legislation, my suggestion is, well, typically, the changes are reasonably limited. So if you have some amendments, typically you just change some of the articles. You don’t change an entire act. You just do some small modifications. So the best approach is just to change the ENCODE to change, and just to do the encoding and novel encoding of the parts that have been modified. And then, if you use the appropriate languages, and you use the appropriate models for the representation. So for example, if you use legal ML, what you have, it’s the so called legal isomorphic principle that, well, it’s a very, very, let’s say, Alison name, but the idea is that, well, when you do an encoding, the encoding should correspond just to one part of the legal text of the legal provision, and when you modify those legal provisions, then it should only affect the encoding for that part and not other components. So if you’re able to do that encoding. Then essentially you just change what need to be changed, and keep the rest as it was. And then essentially you can still obtain some suitable, appropriate outcomes when you have new cases.

Anant:

Right, Professor. In high-stakes situations where the decision could lead to, for example, someone getting convicted of a crime. And for this question, of course, we exclude the cases where juries are required, because, of course, no machine could substitute a jury, but in cases where judges themselves can convict people of crimes, how do we balance the need for transparency with innovation? How can we make AI systems more explainable, and even if it’s not an AI, if it’s a decisive model that follows an encoding, how do you digress between following rules to the T and the need, for example in criminal cases where certain laws may have been broken, but often convictions are not reached by the judges themselves.

Prof. Guido:

Okay. So essentially, let me text to distinguish into phases. So essentially, the first phase is about transparency and accountability, and explainability. The second one, essentially, if you have understood correctly, well, what about if we realize there were some breaches in the law? But essentially, the conventions was not recorded or was not adjudication in that case. So let me distinguish between those two aspects. Now, I would say, first of all, when you look at legal system, the vast majority of legal system have multiple degrees of adjudication. And essentially, in some legal system, the first degrees are not definitive, and then essentially you have to go up to the Supreme Court or something similar. Now, what about if in to introduce, let’s say, some decision support in the initial phases, in the initial degrees, where essentially we just look, we just provided, let’s say, the cases, the facts of a case, and then essentially we provide a support to the judge to show or a yes or no answer. And again, it really depends on the the language and the model you have. So in our model, whenever you have a decision, whenever you have a yes or no decision, you are able to have a complete trace of all the legal rules used, and all the all the facts used. And essentially also you know which rules have been overridden by other rules and so on. So essentially you have a complete trace, and essentially you have a strong justification in terms of of what are the specific article, what are the specific provisions from a statute applied in a particular case, and what are the facts that trigger the application of those rules and those provisions? So essentially, you have a full, complete description. And essentially this is saying, Yes, somebody did or somebody didn’t do some particular one. Now, of course, the what we have to understand. And as I mentioned before, in many legal system, the rule system will be just an interpretation. It might be a high level interpretation, but it’s still an interpretation. So at the end, it up to the judiciary to decide whether to accept the recommendation of the system because you have a full explainability, and you say, now, yeah, this is a good interpretation. This is an interpretation that is compatible with what I would have done, but other parties, or the defense or the prosecution, depending on the outcome of the case or the particular case, they can provide alternative interpretations. And in that case, you have to see whether those interpretations are compatible or not, and whether they prevail over yours or not. And essentially, I would say it’s not to remove the human from the loop, but to provide a support to the human to provide more consistent, reliable, transparent, repeatable outcomes. Now, of course, the machine, it’s not able to do balancing, so essentially, to balance whether the gravity of a case deserve a particular punishment or not, so that it will be on the second part. So it’s, I would say, in most cases, I would not use that kind of decision system to fully support, let’s say automated sentencing. These sentences should be evaluated, possibly by a human where it has a complete, transparent, repeatable, accountable description of the case and the principle of the law and the article in the provision of the law used for that particular decision.

Keshav:

Right. That was very, very helpful because I feel that most of the times when we talk on how AI would, sort of, you know, how thse tech would, basically,impact the law we take a , black and white sort of consideration. Oh, these tech would take all the jobs away. And I think your example of how the how the judges can pick which sort of you know, which sort of you know reasoning to take. I think that was very, sort of informative in the sense that that the whole thing is not just based on AI, there is still a human being who is sort of just, sort of just seeing it so as someone who has been in the field, I want to ask you, how do you think these technologies, such as rules as code and AI. How would they impact the legal field? Because right now, we are seeing, seeing lots of firms take up these sort of tools, and these AI tools to help them in, let’s say, make a draft research and all that. What else could we use it in?

Prof. Guido:

Okay, oh, well, first of all, thank you very much for your reflection, which is, I think it’s quite insightful, and so let me start from what you said. Now, I don’t think that AI in the use of technology will reduce the the number of lawyers I will try way some jobs. It is true that it essentially, it will provide black and white decision.

And let me go a little bit back also to what I said before. So it when you give a case, when you give the fact that the system will provide an answer, you can have the trace and so on. And suppose that you have an out of one authoritative let’s say interpretation. Let’s say the interpretation from the authority or the agency responsible for a particular, for a particular out of a particular legislation. So if the judge decide to deviate from the outcome, he has to, he or she has to provide a motivation. He has to provide a justification. So essentially, for me, it provides more accountability and more transparency on the judiciary, but also on the administration, and then essentially those the cases where there is a deviations that will be landmark cases, because, essentially, you have a human that so some possible well flow, or some possible misinterpretation, or some, let’s say, not complete correctness. So let’s put in this way of the of the encoding, and that’s why they will be more important. So it means that the main focus of law professional will be more creative, because essentially, they really have to thinks and to use their knowledge expertise to identify what are possible alternative interpretations. Or when you look at legal drafting, outer right, how to draft laws in a more effective way, and then essentially it means that it gives them more time to do those more high level I sophisticated tasks, instead of menial tasks. Of say, Okay, now somebody was, well, some a person was fine in a particular place with that particular piece of evidence in that particular situation, so that person has committed this particular type of crime, yeah.

Okay, easy, good. What about let’s go as to say, well, what are the possible excuses? What are the possible exceptions, etc, etc, where, essentially you have to use creativity and not just to do the menial tasks. So essentially, it will give more opportunities for a more satisfying and less, let’s say, menial job, and that it will be a, probably a big shift in the legal profession. And also, would say, probably they will shed, well, I would say probably the next generation of lawyers should be more accustomed with the technology.

Anant:

Professor, it’s quite rare that we have someone with a background in philosophy. So I’d like to ask you if someone from our audience wants to learn philosophy and formal logic in particular, given as you say, creativity is becoming important, really thinking about problems rather than just applying authorities would become more important. So how should they go about this acquisition of a command over philosophy and formal logic.

Prof. Guido:

Technically we can say that I have a background in Philosophy. I did my bachelor in Philosophy, mostly it was a covert mathematics and law degree. So I would not say I am a Philosopher by itself. However, I would say one of the advantage would be critical thinking, but also it is about learning and some of the courses I found interesting were on Philosophy of Science and essentially it is to learn what is the scientific matter? What does it mean to have a hypothesis? How to validate or disprove a hypothesis? And for many scientific method would be the key elements and would be the major aspect you should learn from, let’s say, from a philosophy background. Critical thinking, thinking about from a philosophical point of view, what is the methodology we use for our scientific endeavor, here scientific endeavor can be in a broad way. Also, you have to realise that no discipline is better than other, each has its own value and benefits and to understand how to use them properly. So, I would say this would be the added value from a background in philosophy – open mindedness and critical thinking.

Anant:

Thank you so much for being here professor, we apologize for the technical problem, but thank you so much for being here. We really appreciate this discussion, it is not often that a student run blog and law review can reflect on these sort of things which are cutting edge of what is going to happen in the future. So thank you for being with us.

Prof. Guido:

It was a pleasure and best of luck for your future endeavors!