This post is by Tim de Sousa, editor of the Rules as Code Handbook
- **The problem: **The thinking about Rules as Code is often focused on initial steps.
- Why it matters: We can’t build what we can’t imagine.
- The solution: Imagine the ideal Rules as Code enabled future, so we can design towards it.
In 2021, Rules as Code (RaC) is truly hitting its stride. More governments are exploring the concept of machine-consumable legislation, regulation and policy, research institutes have been established, papers and reports are being published, tools and platforms are being built, and multi-disciplinary teams are learning new ways to draft and implement rules by getting their hands dirty.
RaC is still an emerging practice. Much of the current discussion about RaC is centred on introductory questions such as why and how we should code rules (and we’ve tried to answer those questions here), but to understand the true potential of RaC, we have to take a longer view.
In this two-part series, I set out some possible optimistic futures that could be enabled by RaC. We have to ask ourselves what kind of world we want to build with coded rules. so we can better plan how to get there.
Trustworthy automated decisions
The first reaction that RaC practitioners are often faced with is the fear of the killer robot. What happens if the automated system makes a wrong decision? What if that decision hurts someone? This is not an unfounded fear - we have seen poorly implemented and poorly used automated systems raise debts that are not owed, and lead to the arrest of innocent people. All human-built systems have flaws, and RaC-enabled systems are not immune.
As a former administrative lawyer and someone who grapples with the ethical uses of technology on a daily basis, the use of RaC to help people understand what decisions are being made and how they’re being made - that is, to enable trustworthy automated decisions - is particularly compelling.
Administrative law is the body of law that regulates how governments make decisions. In common law countries, this generally includes requirements that only relevant matters should be taken into account, irrelevant matters should not be, reasons should be given for decisions, and there should be workable avenues for merits reviews of decisions.
In the optimistic future, governments have recognised and adapted to the fact that machines are significant users of their rulesets.
What admin law gives us is a tried and tested framework for trustworthy and accountable decision-making. One vision of the future is that we fully and consistently integrate those principles into RaC-enabled decision-making systems. In this future, we have more automated decisions, but we don’t need to trust that those decisions are correct because they are demonstrably trust_worthy_.
Making better decisions
For me, the true potential of RaC is not faster decision-making through automation, but better decision-making. Businesses and organisations are strongly motivated to automate decision-making processes — the potential cost savings and efficiency benefits are just too great to ignore. However, automated decision-making processes based on an optimal RaC implementation can ensure that the decision is completely transparent and traceable. Specifically, we can build a decision-making system based on an open and inspectable ruleset, so it’s clear what rules are being applied. We can also deliver the decision together with information about which rules were applied, to which facts or evidence - this provides fully traceable reasons for the decision.
An excellent example of this approach is Austlii’s DataLex platform, which automatically generates a report with each decision that explains how the decision was arrived at based on the rules and the user’s input (see, for example, this consultation that tells you whether you are eligible to run for Federal office in Australia). This offers the possibility of automated decisions that are actually more trustworthy than decisions currently made by humans - we’ll be able to prove, conclusively, that only relevant matters were considered and that only the correct rules were applied to the correct evidence. In that respect, optimal RaC implementations offer us a possible tool to combat issues like implicit bias in human-made decisions.
Such a system would also make any appeals much easier to make and to determine - either there is an error in the rules, or in the evidence to which the rules have been applied. Either way, with fully transparent and traceable decision-making, a person who disagrees with the decision already has everything they need to appeal, and the appeal should be much easier for the decision-maker to determine.
Designing away from black boxes
That’s why my optimistic future vision of RaC includes clear, foundational regulatory requirements for automated decision-making, explicitly requiring that automated or partially-automated decisions are transparent, traceable, accountable and appealable. That is, regulation should impose a baseline for automated decisions that reflects the core principles of administrative decision-making. We’re already seeing some movement towards this - the EU’s General Data Protection Regulation restricts the use of automated decision-making without a ‘human in the loop’ (Art. 22), and jurisdictions all over the world are implementing AI ethics frameworks and policies. In the optimistic future, transparency, traceability of automated decisions is widely accepted and routinely implemented, and governments and companies take it as a given that ‘black box’ systems are not suitable for decisions that affect peoples’ wellbeing. People are aware when a decision affecting them has been automated, can easily understand the decision that’s being made and how it’s being made, and it’s simple and easy for them to appeal if they think there’s an error.
This is likely to be an easier proposition in government, which generally has an expectation of transparency and appealability, but companies might be concerned about revealing proprietary information via open rulesets - for example, creditworthiness calculations, which are a closely guarded secret in the financial services industry. Still, RaC approaches may be adopted in corporate environments to enable internal transparency and continuity of decision-making; that is, to ensure that companies themselves understand how they made their decisions and are better able to explain it to their customers.
Either way, automated decisions will be more trustworthy, citizens will gain more transparency and understanding of how decisions are made and better options to address problematic decisions, and decision-makers will spend less time on complaints and appeals - a win/win scenario.
Modelling outcomes to support evidence-based laws
In the optimistic future, governments have recognised and adapted to the fact that machines are significant users of their rulesets. As such, they’ve redeveloped the way they create laws, simultaneously co-drafting human and machine-readable versions of prescriptive rules, and allowing the disciplines of law and code to influence the drafting process. With draft coded rulesets, governments are more easily able to conduct policy simulations and modelling – once the draft rules are coded, and a system is built to apply them, it’s as simple as changing the inputs, or tweaking the rules, and observing the outcomes. It’s similar to what used to be considered traditional economic modelling, but faster and more flexible. Where policy intent is not totally reflected in projected outcomes, policy teams go back to the drawing board – assisted by the transparency and traceability of the RaC-enabled system.
Of course, modelling policy outcomes is not new and does not rely on RaC. However, RaC offers an opportunity to speed up modelling and integrate it into more policy development processes, and thus support more evidence-based policy. This work is already underway – for example, the Mes Aides set of tools, originally built by the French Government and now a non-profit civilian project, helps French citizens understand how different tax and social benefits laws apply to them and to their society. Amongst other things, it provides tax calculators that help users experiment and simulate different tax settings and outcomes.
Similarly, the Canadian Government is working on developing a Policy Difference Engine; a tool that will, amongst other things, iterate how policies evolve and iterate over time, and whether they are meeting stated objectives. — Tim de Sousa
In Part 2, we’ll discuss how RaC could help make laws easier to understand and apply, and build better compliance processes.
👋 You can create a post like this one! Share your thoughts with a community of public servants. Learn more.
(Photo credit: Unsplash)

Log in or sign up to continue the conversation