Implementing Computational Law in Wolfram Language for the Governance of Artificial Intelligence
This paper presents a Wolfram Language implementation of Reified Input/Output Logic for AI governance, demonstrating its ability to translate legal norms into executable code for auditable agent behavior while highlighting current limitations in using large language models to automate this formalization process.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a super-smart robot how to behave in a world full of rules. The problem is, the robot's brain is a "black box." You can't peek inside to see exactly how it thinks or why it makes a decision. It's like asking a magician to explain a trick while they are still performing it. Usually, we try to fix this by hoping the robot learns to think like a human, but that's risky because human language is messy, full of hidden meanings, and full of loopholes.
This is where Computational Law comes in. Think of it as turning a messy, handwritten rulebook into a strict computer program. Instead of writing "Don't be mean," you write code that says, "If Action X happens, then Result Y must occur." This field tries to make legal rules so precise that a computer can read them, follow them, and prove it followed them. The paper we are looking at explores a specific way to do this using a special programming language called Wolfram Language. It treats laws like math equations where you can check if a robot is obeying the rules, even if you don't understand how the robot's brain works. The big question is: Can we just ask a super-smart AI (like the one writing this text) to translate our messy English laws into perfect computer code?
The Paper's Big Experiment: Can AI Write the Rules?
The author, James K. Wiles, decided to test this idea. He built a system in Wolfram Language that acts like a "legal translator." This system uses a special logic called Reified Input/Output Logic. To understand this, imagine a vending machine. You put in a coin (Input), and the machine gives you a soda (Output). In this legal system, the "Input" is a fact (like "It is night time") and the "Output" is a rule (like "You must stop"). The system also handles complex ideas like "reification," which is just a fancy way of turning an event (like "Alice giving a book to Bob") into a physical object that the computer can hold, measure, and talk about.
The author then asked a powerful AI (GPT-4) to act as the translator. He gave the AI four simple English legal sentences and asked it to turn them into the computer code the system needed.
The Results: A Mix of Magic and Glitches
The experiment showed that while the AI is fast and can write code that looks correct, it is not yet safe to trust it alone. Here is what happened with the four test sentences:
- The "Tie and Blond" Test: The AI was asked to translate a rule about people who aren't wearing ties or are blond having to leave a room. The AI wrote code that seemed to work. However, when the author checked the math, he found a silent bug: the code was broken in a way that made it say "True" for everyone, even people who were wearing ties and had dark hair. The AI had created a rule that didn't actually check anything.
- The "Every Man" Test: The AI was asked to translate "Every man is obliged to run." The AI wrote code that worked, but it made a mistake in how it defined "man." Instead of checking if a person was actually a man, the code just assumed the person was a man because the rule said so. This is like a bouncer at a club who lets everyone in because he decided everyone is a VIP, rather than checking IDs.
- The "Manager and Secretary" Test: The AI tried to translate a rule where a secretary must write down a manager's tasks. The AI wrote code that looked perfect and even added a comment saying, "Dave is not a manager, so no obligation." But when the code actually ran, it forced the secretary to write down the task anyway, ignoring the comment. The AI's code and its own explanation contradicted each other.
- The "Satellite" Test: The AI was asked to write a rule that a satellite must stay 200 kilometers away from the International Space Station. The AI wrote code that used real satellite data, which was impressive. But the math was wrong: it measured the distance along the Earth's surface (like driving on a road) instead of the straight-line distance through space. Two satellites could be 400 kilometers apart vertically, but the code would say they were touching.
The Verdict
The paper concludes that AI is a great assistant, but a terrible boss. It can draft the rules quickly, but it makes "silent errors"—mistakes that don't crash the program but make the robot do the wrong thing. The author argues that we cannot just let AI write the laws for other AIs. Instead, we need a team approach: the AI drafts the code, but humans must check every single line with strict tests to make sure the logic holds up.
The "Fluffy" Case Study: A Robot Guard Dog
To show what this looks like in the real world, the author created a case study of a robot guard dog named Fluffy. Fluffy is owned by an AI company and operates under a "computational contract." This isn't a paper contract; the rules are written directly into Fluffy's brain.
The contract had three simple rules:
- Stop intruders: If a person gets within 100 meters of the home at night, Fluffy must stop them.
- Stay close: Fluffy must stay within 200 meters of the home.
- Permission to use force: Fluffy is allowed to use its taser, but not forced to.
The cool part is that Fluffy's actions are auditable. If Fluffy uses its taser, the system doesn't just say "I did it." It produces a symbolic receipt that says, "I used the taser because: Fact A (Person at 80m) + Fact B (It is Night) + Rule 1 = Obligation to Stop." This creates a clear, unchangeable paper trail that proves the robot followed the law.
Why This Matters
The paper argues that we need to stop hoping robots will "understand" our laws and start giving them laws they can execute. We can't wait until we can see inside the black box of an AI's mind. Instead, we need to wrap the black box in a cage of executable rules.
The author suggests that while we can't turn every law into code (some things are too vague, like "be reasonable"), we definitely can and should turn the rules for safety-critical machines into code. The goal isn't to replace human judges, but to give us tools that can check if a robot is following the rules right now, in real-time.
The paper ends with a warning: We are building powerful machines, and if we don't give them clear, executable rules, we might end up with a future where a robot makes a terrible decision, and we have no idea why. By using computational law, we can ensure that even if the robot is a black box, its rules are crystal clear, and we can always check if it did what it was supposed to do.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.