The distinction between better rules and rules as code is not clear cut: it is also not clear whether high profile advocates of either approach consistently see or maintain any distinction between them.
Even in the original better rules discovery report, it is clear that one of the main goals was to produce coded rules for use in automated decision-making systems and that there would be little if any gap between the coded version of the legislation and the legislation itself.
Nevertheless, we think the better rules and rules as code distinction can be adopted more consistently going forward. Broadly, a better rules approach has many significant advantages, but rules as code approaches require significant care and attention to avoid negative implications for the rule of law. To summarise:
With that high level conclusion in mind, we express executive level conclusions and recommendations as follows.
Coded systems are and should remain legally subordinate to natural language legal instruments passed with legislative or Parliamentary authority. The law itself – primary legal materials – should be the instrument from which interpretations are developed. Computational models are at best non-judicial interpretations of primary legal materials. Where they are developed through co-drafting, they may help to illustrate the drafter’s intent at the time they were made, but the text and purpose of any subsequent legal instrument (and the associated case law) should remain dominant.
There should generally be mechanisms that allow people to contest the accuracy or reliability of a coded interpretation of the law. New Zealand’s constitutional system relies on a relationship between Parliament and the Judiciary, where Parliament expresses its will in legislation using natural language, and the Judiciary ascertains the meaning of that language through statutory interpretation. When law is represented in code, this relationship is disrupted, because code cannot be subject to statutory interpretation in the same way as natural language and lacks the features of natural language to shift in meaning over time in response to context.
We are not persuaded that it is possible to directly translate natural language rules into machine readable languages without any loss of semantic meaning. We think this is justified based on decades of scholarship. This is true even where parallel drafting of legislation and coded rules takes place simultaneously. While some contend one-to-one translation between natural language and code may be possible in the future, we have not come across any situations where it is possible during the course of this research.
While the phrase “legislation as code” appears to suggest that a single statute can be translated into a single computational model, this is incorrect. In nearly every situation where legislation is being modelled, a computational model of the law will need to draw from more than one primary source of law.
There are some situations where a reliable interpretation of the law can be turned into computational rules, which can be used to model the law’s effect in computer systems. This holds promise, insofar as the computational model is reliable and its reliability can be tested. If it is unreliable, then the consequences of relying on that model are significant.
The process of creating models of legal instruments (like legislation) requires time and multidisciplinary expertise. As a result, this process is difficult to upscale and cannot be automated: it is not possible to set a computer program to extract all the relevant rules from a piece of legislation in any reliable fashion. It takes human judgement, time and effort. There is an extensive research history of attempts to automatically extract norms from written documents and we have not seen any successful attempt in the course of our research that can account for the principled issues we have raised.
There are obvious benefits to processes such as a better rules approach which provide detailed ways of enhancing the coherence and consistency of government policy development, and the accompanying rule sets (whether expressed in computational or natural languages).
There is obvious benefit to adopting processes such as better rules that result in greater conceptual coherence and logical consistency in policy development, and consequential improvements in legislation giving effect to that policy intent. More effective, logical and coherent policy makes for better legislation, and consequently makes it easier for people to model the effect of that legislation in computer systems, based on their interpretation of it.
The risks and benefits of “code as law” applications may be understood by comparison with the use of standard forms in law. A useful example of this is the Auckland District Law Society’s standard forms for sale and purchase of real estate, among other standard forms. These forms are reliable tools informed by persuasive interpretations of a range of different legal instruments (both legislation and case law). They are the foundation for repeatable processes which minimise transaction costs. Their widespread adoption has made the transactions for which they are designed much more efficient. Moreover, they have reduced the cost and skill barriers to accessing justice, and have helped improve legal certainty in a constitutionally sustainable way.
If coded models or AES are to be used more frequently, it is likely that expert evidence will be required to assist the judiciary to understand the nature and effect of a coded system wherever these systems are used to give effect to the law. The operation of the model should be treated as a matter of fact. The question of what the proper interpretation of the law is in a particular case, and whether or not the system accurately reflects that interpretation, should be treated as a question of law.
In many situations, a Court may not be called upon to assess a computational model itself, particularly in cases of a general right of appeal where the original decisions is put aside and made afresh. Some models may never be scrutinised for their lawfulness by the judiciary. Therefore, there is some risk that models are treated as having been judicially approved even if they have not been examined in any meaningful detail.
We do not anticipate significant problems arising from the fact that “code as law” models are subject to copyright, subject to the usual debates about the merits of open source software. Because coded models are not and should not have the status of law, it remains that they are only interpretations. The law has not therefore been copyrighted. By contrast, robust copyright helps to promote and incentivise the development of instruments, while also providing a mechanism for preserving the integrity and reliability of those instruments. An example of this is the success of the ADLS Sale and Purchase Agreement.
By contrast, we firmly believe that copyright should not present a justifiable barrier to the scrutiny of code-as-law AES. This is particularly important if the coded system is being used by a government entity or similar. It should generally be possible to disclose the code behind an AES without infringing copyright in order to scrutinise its legal reliability. This should be taken into account at the procurement and development stage of adopting a model. If authors of coded systems are not prepared for their work to be scrutinised, it should not be used in legal settings where scrutiny might be required.
For government agencies considering using a law as code approach:
We strongly advise caution when deploying coded models of the law in any way that confers legal authority on those models to act with the force of law. There is a well-developed literature examining how “automated decision-making” systems can create risks and benefits for various people creating, using, and subjected to those systems. These risks exist whether or not machine learning algorithms are incorporated into ADM systems. They also exist regardless of how closely an AES is thought to reflect relevant legal instruments,
New Zealand utilises a repeated statutory drafting scheme for the implementation of “automated electronic systems” that can be used to make decisions or exercise lawful functions. This pattern of statutory drafting should be bolstered to provide more detailed Parliamentary guidance on how the “reasonable reliability” of a system should be assessed. It is appropriate that an identified person be made accountable for the reasonable reliability of any code-as-law system.
If AES are to be adopted more widely as a matter of government Policy, then Official Information access regimes should be bolstered in support.
Regardless of whether Parliament bolsters its guidance as to “reasonable reliability” of AES, Chief Executives of government agencies should proactively consider and state how the reasonable reliability of such systems is to be assessed in a transparent way. The question of what “reasonable reliability” means should be assessed as a matter of statutory interpretation by reference to the text, purpose and context of the relevant enactment, and other enactments such as the Privacy Act 2020 and the New Zealand Bill of Rights Act 1990.
Where Government agencies are proposing to create coded interpretations of legislation, it is vital that they consider how significant it is to confer the power on an agency to stipulate a binding conclusion as to how the law will be interpreted. Government agencies in particular should be alive to te Tiriti o Waitangi and the way that different communities may have different understandings of core concepts and the way they are expressed in natural language. The history of the two versions of the Treaty are an important reminder of how “translating” natural language can lead to miscomprehension between groups, and the way that interpretation has the power to stipulate whose comprehension will be authoritative.
Finally, we note that this report is directly relevant to a bill before the New Zealand House of Representatives which would formalise the use of new automated internet censorship systems (“filters”). If enacted, the legislation would regulate the use of computer systems by means of computer systems, so as to achieve the will of parliament expressed in the legislation. In this case and in others, it is obvious that law as code has direct implications on important constitutional and democratic freedoms, such as freedom of expression and association in the New Zealand Bill of Rights Act 1990 and associated international human rights instruments. As presently drafted, too much discretion is left to executive agencies to develop this AES.
We also note that New Zealand is about to embark on a process of re-writing its Resource Management Act 1991. A significant goal of the legislation is to facilitate development of the urban environment including the processing of applications under the Act. It is highly likely that part of this approach will involve the implementation of the Act in digital systems.
We endorse the use of a better rules approach early on in the legislative drafting process for the re-written Resource Management Legislation to ensure that whatever is being drafted is capable of being delivered from a service design perspective. The ability to model such policy is also likely to be extremely useful.
We concluded that “law as code” approaches offer substantial benefits if effectively understood and implemented. Parties with an interest in the successful development of better rules and rules as code approaches can collaborate to foster effective growth of such initiatives.
We say law-as-code approaches can be fostered in New Zealand by taking the following steps.