PART FIVE: Recommendations and Actions

Distinction between better rules and rules as code / law as code

  1. 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.

  2. 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.

  3. 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:

    1. where one is using a better rules approach to produce superior policy and better express policy intent, this can have a beneficial impact on a drafter’s ability to improve legislative drafting. There is little to concern us about the use of a service design approach to the point where a natural language legal instrument is approved democratically. We also agree that following a better rules approach will help to minimise the extent to which interpretive gaps are left to the judgement of executive agencies. As a result, the risk that incorrect interpretations of the law are encoded by executive agencies in service delivery can be minimised.
    2. At a certain point, most advocates of better rules and rules as code then make a further jump and conclude that the coded interpretation of the law produced through the policy process can be deployed immediately in automated and semi-automated systems. Further, they conclude that there will be no significant risk of an interpretive gap at all between the coded rule set and the natural language legal instrument. Some even suggest that the coded instrument should take priority over the legal instrument, or its effects be preferred. To that extent, the approach is better described as “rules as code”. At this point, we conclude there has been an uncritical failure to acknowledge that there will always remain a gap between code and law, and that law as expressed in natural language should retain its primacy.
  4. With that high level conclusion in mind, we express executive level conclusions and recommendations as follows.

Conclusions on the equivalence of law and code

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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).

  8. 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.

  9. 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.

  10. 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.

  11. 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.

  12. 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.

  13. 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.

Recommendations for Executive government

  1. For government agencies considering using a law as code approach:

    1. We endorse the use of a better rules approach that aims to simultaneously develop policy programmes, service design, natural language rules in legal instruments, and machine-executable models in parallel using multidisciplinary teams. We believe this has promise for producing policy programs and legal instruments that are conceptually coherent and logically consistent. We make that endorsement subject to the following two points.
    2. Our first caveat is that in any situation where natural language legal instruments are going to be created and deployed, it is vital that traditional checks and balances on the constitutional and democratic process are maintained. If this circumscribes the operationalisation of a given policy via computational modelling, so be it.
    3. Our second caveat is that before operationalising any computational model (coded rule set) of a regulatory system, policy programme or natural language legal instrument, it is vital that the usual safeguards in policy, operational and legislative processes are applied. There can be no assumption that a computational model is always legally correct, as it is only a single interpretation of the primary natural language materials that comprise the written law. Ultimately, a court or a regulator may conclude that a computational model used in developing a legal instrument is an erroneous interpretation of the legal instrument it has interpreted. The natural language legal instrument will always prevail as “the law”, not the computational model.
    4. Taking a better rules approach is a beneficial way of generating public trust and confidence in automated decision-making systems.
  2. 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,

  3. 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.

  4. If AES are to be adopted more widely as a matter of government Policy, then Official Information access regimes should be bolstered in support.

  5. 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.

  6. 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.

Better rules approaches to current legislative projects

  1. 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.

    1. As drafted, the empowering framework for the legislation should be separated from the wider initiatives in the Bill. It leaves too much legislative power to executive agencies in setting the final design and form of the system.
    2. If the Executive wishes to proceed with legislation to empower and constrain the use of internet filtering, it should adopt a multi-disciplinary better rules approach to developing the policy behind the filter and introduce a dedicated legislative instrument.
    3. The empowering legislation for the filter should include a set of minimum requirements for the software system and a model of how the regulatory system is intended to work. Key statutory concepts should be clarified using a better rules approach. This may include a rules as code model that can be operationalised.
    4. A better rules approach could incorporate service design approaches and operational insights, which is the exact detail lacking from the Bill presently.
    5. We urge extreme caution before proceeding with this policy initiative.
  2. 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.

  3. 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.

A multi-stakeholder incubator should be founded and funded

  1. 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.

  2. We say law-as-code approaches can be fostered in New Zealand by taking the following steps.

    1. Fund a New Zealand centre of expertise that fosters collaboration on law as code and incubates developments. This will facilitate the growth of practical experience and theoretical confidence in law as code approaches.
    2. Anchor the development of law as code to specific use cases and be transparent with whatever process is followed in the parallel drafting or subsequent conversion of law into code. This will improve reliability in the outputs, as well as trust and confidence.
    3. Explore optimal ways for multidisciplinary teams to work effectively and in a way that reduces the impact of “knowledge bottlenecks” in modelling law in code. There is a need for potential members of those teams to be identified and trained not just in the way their own disciplinary methods apply to the topic, but also in the way that others outside of their discipline think about the topic and approach it.
    4. Build bodies of best practice on how to demonstrate to lawyers, judges, policymakers and potential litigants that a coded model is a reliable interpretation of all relevant law. This is a precursor to having such models implemented in government or by people dealing with government.