Hacker News new | past | comments | ask | show | jobs | submit login
Computational Law, Symbolic Discourse, and the AI Constitution (backchannel.com)
82 points by steven on Oct 12, 2016 | hide | past | favorite | 65 comments



I can't help but completely disagree with both the idea and the probability that this will ever happen.

Modern law is supposed to be open, so that anyone can read it. Reencoding laws, for whatever reason, strikes me as being fundamentally undemocratic.

The argument can be made that if legal "code" is taught in schools, then it's no more undemocratic than writing down law, but the chances of that happening seem slim to none.

Another argument is that law is already written in "special" English that most people can't figure out, but I think that having it in English alone is a big step toward having it being readable by almost anyone.

It would be neat to have law written as code and to have AI be able to parse it for you in lay language -- that is, you could ask it questions or pose situations to get a legally-binding answer. But then the question for me is, why don't we just have said AI read the current legalese and parse it?


Another aspect here is that people think writing contracts as code will eliminate errors. But just look at our software, it's full of bugs. The DAO episode is a perfect example of what will happen with contracts as code: bugs and loopholes, just like now, but harder to address.


Now imagine how buggy legal documents are when they're rewritten fresh each time, rather than using open source libraries and subroutines.


Luckily things are interpreted by human judges who can use discretion and interpret things in a sort of "do what I mean" way, so "bugginess" isn't as big of an issue as it is in coding.


This is as true as ever changing compiler extensions like undefined behaviour optimizations have proven a success for maintainable and portablility.


this is the crux of the thing.


Well, until we reach smarter-than-human AI, you ultimately have to base everything in society on trust. That's why I actually find the ideas around trustless systems to be potentially dangerous.

Discretion of a human judge is grease on the gears of law.


Legal documents are hardly "rewritten fresh each time". Lawyers have standard legal templates for things like contracts for example, where only few things change.

Moreover the content and legal rules predetermines what will be written in such legal documents down to the phrasing. While there will be differences, it's not "free writing"/"express yourself" kind of thing.


In software, it's considered poor coding practice for code to be repeated more than once. If lawyers use templates so often and only a few things change, why don't they employ something similar? E.g. here's standardLeaseContract(); difference1(); difference2(); difference3();

To me it seems this would make things much clearer to parties involved, and reduce opportunities for abuse compared to many pages of boilerplate and only a few lines that matter.


Because as in software, so in law, you must deliver an end product that has the instructions expanded with the differences included in. You don't give templates, you dive the rendered result. A tech savvy law firm could of course use templates to define what that would be.

That said, a lot of state law is kind of like what you describe. An initial law, and tons of differences applied on it. E.g. article 3242 clarifies article 432 and adds the provision to do so and so.


I don't think that's quite right. There is often a "standard" way write certain things. Then there's a bug exposed - that wording lost in a court case. Now people stop using that wording. They try different alternate wordings. Eventually, there's kind of a convergence on a new "standard" way to write it.

Two disclaimers. First, IANAL. Second, "standard" really means "a lot of people do it this way", not "this is recognized as the right way to do it".


Except this doesn't happen. If a lawyer plots a 1k+ page contract down on your table to sign, he probably didn't write it from scratch for you. If the lawyer has been at this for a while, he or she has a list of likely vary similar contracts that they drew most of the language from and then modified for the needs of you and the other entities (we don't like the clause, we want to be protected against this, etc.).


> Modern law is supposed to be open, so that anyone can read it.

This is already not the case -- at least in a common law system like is practiced in most of the US (and other Anglo-Saxon countries). Even if a normal person can understand the legalese, they can't be expected to know about the history of court cases that have reinterpreted and redefined the laws in question in various ways.

Why else would it take so much training to become a lawyer?


I must disagree, not having the implications of laws obvious and runnable and checkable by anyone owning a computer is a big impediment to the democratic ideal. To have interpretations running in the brain of a specialized workers takes away from the ideal that anyone can know plainly what are the implications of laws. These laws can tie into economic models and make the ethical choices a law makes more obvious and checkable by anyone. There is are parallel between mathematical proof checking and computer proofs where flaws, loop holes in arguments can be more easily checked for. It also allows one to run counter simulations for alternative laws. And ideally can allow us to shift away from representative democracy to a more direct form allowing anyone to contribute to laws when they can show the new law can be better in some practical utilitarian ethical model. It also forces us to make our models of what a free ethical society should be more concrete rather than sticking to abstract buzzwords with open interpretations. Just a personal opinion.


It's a common misconception that the law can be so fine-grained. As the saying goes, the law is a sledgehammer, not a scalpel. If you look at cases with even a modicum of detail, you very quickly find situations which don't cleanly submit to classification. Code isn't very good at dealing with edge cases or fuzzy inputs.

Similarly, applying rigid code to law can make some crazy results, like the guy who got 25 years for stealing a slice of pizza. It was his 'third strike', and because the slice was stolen from a minor, it was classified as a felony. No sane person would argue for 25 years for a slice of pizza. However, the 'hardcoded' law demanded that, so the people are left picking up the bill for 25 years of imprisonment over a $1 food item (independent of any moral arguments on the issue).

Finally, 'ethics' is ridiculously hard to clearly classify, and if we can't classify it, we can't encode it.


Not saying that any of this is even remotely easy. Simply pointing out what should be some form of ideal. The laws are not meant to be rigid or hardcoded but to be striving for some ideal. The ideal are the axiomatic input to the systems and thus the center of the flaws in our thinking. Thus society that keep redefining what it means to live in an ideal society by looking at the consequences of our laws. But not considering any of this is simply to avoiding thinking about the consequences of the current state of affairs, where many get disenfranchised by the current system as can been seen quite clearly in racial/economic skews of populations in the prison system. The three strikes law is a perfect example of a law where the consequences of the laws which though not perfectly predictable are also not perfectly unpredictable but a consequence the inherent prejudices of people being arbitrarily enacted into laws with little examination of the consequences. To have an explicit legal system would need the explicit spelling out of these prejudices and at least provide a coherent narrative which can be argued against with data and alternatives.


> To have an explicit legal system would need the explicit spelling out of these prejudices and at least provide a coherent narrative which can be argued against with data and alternatives.

I really can't see how this is so.

What about a law


To claim that law was written in a special dialect, that hardly anyone speaks, but that almost anyone could read it, yet to suggest that noone could learn proper symbolic logic strikes of cognitive dissonance. To propose that it could be broken down to laymen terms by AI, i.e. in a nondeterministic way is questionable as well.


I remember thinking that this was a good idea, in my first year of law.

By the third year I had rather given up on the idea.

Legal writing is already well-specified. The problem is not with the language that the law is written in. The problem is that the world is irreducibly complex and the law cannot shrink its domain from "everything humans have done, do, will do, or could do; interacting with other humans, dead, alive, unborn; interacting with objects, in their homes, in public, on private property, belonging to them, belonging to others, belonging to nobody; on the surface of the earth, underneath the earth, in the seas, in the international seas, in the skies, in orbit, on the moon, the limits of human space; with ideas, owned and unowned, with multiple kinds of ownership; in concert with other legal systems, or in contrast, or in direct mutually incompatible conflict; without limit, forever".

Which is probably a fraction of it.

Quite aside from scope, there is ordinary fuzzy logic: in coming to a conclusion, judges must give consideration to concepts that cannot be crisply, discretely encoded: "the buyer without notice at arm's length", the "reasonable person, similarly circumstanced" and so forth.

These are all supported by cases. Mounds and mounds of cases. Case-based reasoning is a well-explored area of AI, but it hasn't been to any avail. Civil legal systems try to go without caselaw and have pure statute in the fashion that this kind of idle daydream typically tries to express.

And they've had hundreds and hundreds of years to get the "perfect" drafting. Bugs are still showing up. All that it does is shift the burden of adjustment to a slower, central bureaucracy from a self-correcting, distributed, multi-level system.

We still need humans to make sense of humans. For the foreseeable future this can be expected to continue. The law isn't going anywhere.


> Legal writing is already well-specified. The problem is not with the language that the law is written in.

I was initially happy with the title of the article but this is exactly the reason why the content left me disappointing. It is very difficult to capture law in a computational context and there are interesting forums these days.

That said, there are interesting questions to ask.

* What are the properties to make a law (fully/partially) computational?

* What stages of time could law be made computational? Time, number of cases etc.

* What laws could be made computational and what can not? Are there laws that could never be made computational? Are there laws that could be made fully computational? Are there laws that could be partially computational?

* What are the effects of computational law on the legal ecosystem? Would it give rise to less better lawyers and judges?

I think such questions need investigation (if not already done).


Indeed. All law relies on the inductive judgements of the, well, judge. You can't write inductive reasoning in Coq, and you probably won't be able to for a rather long time.


Ambiguity is a feature of natural languages, it's not a bug.

It's because of this ambiguity that you can pass a law and assume other laws will update their meaning accordingly. For instance, civil rights.

A law is an abstraction, and its meaning gets clarified or even updated when cases occur. For instance, marriage discrimination is now unconstitutional. The text of the constitution didn't change, its meaning did.


> Ambiguity is a feature of natural languages, it's not a bug. It's because of this ambiguity that you can pass a law and assume other laws will update their meaning accordingly.

Which is huge problem. It means that laws can be interpreted any which way we want, which essentially means that the law only retains its meaning for a certain period of time until, until people forget their meaning, or judges make enough exceptions to those laws to render them useless but "true in principle", or judges decide at whim to change the interpretation. Since laws can change, what reliance have we upon any of it? What guarantee do we have that we can keep our "rights"? It's an incredibly stupid system. Is there something better? - Not one we can implement, to say the least. So we're stuck with it. It's not a blessing, it's a curse.


It is a huge and unjustified leap to go from "ambiguity is a feature of natural languages" to "it means that laws can be interpreted any which way we want". It is interesting that this appears in a discussion of this topic.

In reality, natural language can be precise - consider a textbook on logic, for example. It is humans that are ambiguous, and if you force them to use a language that has a precise meaning, they will simply write things that do not mean exactly what they intend. We know this is so from observing how programming errors are made.


It's not that big of a leap. And a text book is actually a poor counter example. Can modern Greeks read ancient Greek? No. Culture degrades language. Gradually, words will mean something else. Consider the word "cool". How many people these days actually associate it with temperature first? Or "ass". How many people think "donkey"? Those are simple examples. We could go back to older English, but I think my point has been demonstrated.

Admittedly, I keep shortening my responses before posting, so sometimes I don't explain some logic that seems obvious to me. Apologies.


No one is disputing the possibility of ambiguity, but a few single-word examples is still a long way from "interpret any way you want." If you need to be precise about temperature or fashion or animal taxonomy or physiology, you can be, and a textbook is a better example than the observation that few people understand a language that is no longer in general use.


Notably, I wasn't talking about precisely-defined textbook words. If you go back, my original comment is directed at the fact that the Constitution can be liberally interpreted because the meanings of words change, which is due to cultural influence. Sure, we could go back and look at the history of America and figure out what "right" probably meant to the founding fathers (or "electricity" or yada yada for that matter), but to Joe Shmoe, the original meaning is either gone or no longer relevant. The only reason certain words' meanings don't change is because people aren't using them.

That said, I would still say natural language is, when you try to fully examine it without relation to reality, arbitrary (in a completely different argument), and while it doesn't mean "any which way we want" (initially), we could make a deep philosophical examination of the topic and come to that conclusion, but that's off topic. Though I feel like that's partly what you may have thought I was arguing initially.


We can only go by what you write, and you are making a more thoughtful point now. I do not think, however, that you can exclude "precisely defined textbook words" when the issue is whether natural language is necessarily imprecise (not that my textbook example is only about word definitions, FWIW.)


It's not completely arbitrary. Language still has meaning, but there is room for interpretation.

Think of it as a model of the world. To launch a rocket you need a pretty good model of how physics works, but you don't need to simulate and describe every single quantum interaction. Or you wouldn't be able to do anything.

Laws are like models, they describe our norms in (more or less) broad terms, but there is still a degree of uncertainty in each and every real world case.


Please explain to me what the word "know" means. We could debate about it for hours on end. Same with tons of other words. What exactly is "spicy"? Is there such a flavor as "savory"? How far is "close"? And your telling me it's not ambiguous? The fact is, while a defining feature might hold for a certain amount of time, a person's idea of "closeness" or "spicyness" or millions of other things will gradually change over time. Albeit alittle. Of course, I said all that to counter your rocket example, as it's not particularly answering the question about language.

With regards to language: As I said to other guy, can modern Greeks read ancient Greek? No. Culture degrades language. Gradually, words will mean something else. Consider the word "cool". How many people these days actually associate it with temperature first? Or "ass". How many people think "donkey"? Those are simple examples. We could go back to older English, but I think my point has been demonstrated.

Admittedly, I keep shortening my responses before posting, so sometimes I don't explain some logic that seems obvious to me. Apologies.


This is contradictory:

- A system of law is needed to settle disputes happening in the so-called "real world".

- Often, these disputes involve what people say.

- The decision therefore needs to account for the meaning of what was said.

- If you could algorithmically derive the "true meaning" of anything people say, you could also derive the "true meaning" of any law, because both use the same medium, i. e. "language".

-> You could just use that system to derive the "true meaning" of laws without translating into any sort of code.


The primary problem with law is the technicality of the language, aka "legalese".

At the moment, expecting someone off the street to properly understand a legal document is broadly equivalent to expecting them to understand what's going on with a command line (assuming they use computers only casually).

Law needs the equivalent of a GUI.

It's possible. Some other lawyers and I are working on an open source system of "defined phrases" that can be used like software functions. Lawyers already define words, there's no reason you can't do the same with phrases.

Each plain english phrase represents a module of legalese that can be manipulated with "arguments" specified in conjunction with the phrase. Like a GUI, a comprehensible representation is there for the user, and the technical legalese still does all the work underneath.

You can take a look at it here http://lawpatch.org. Previous HN discussion here: https://news.ycombinator.com/item?id=10597778


Two words: 'event calculus'. A type of predicate logic constructed to precisely specify the types of relationships that we use language to do with law and contracts:

'Formalizing Legislation in the Event Calculus': http://www.marcellodibello.com/files/research_files/theses/c...

Yes, it uses a library of obscure symbols to describe these relationships, but can be algorithmically translated into any number of natural languages, thus making these descriptions understandable to most people.

It's my belief that event calculus + blockchain (I'm looking at tauchain as an ideal platform) to enable the construction of massively scalable, voluntary, commons-based social coordination, production, politics and law.



Damn it. Every time I read a Stephen Wolfram entry I am so divided between if what I read is there for its own sake or is it just another shameful plug for his products.

I wish he could simply write for once in a neutral way. He has good messages, even if some disagree. But makes it so distasteful by these Wolfram mentions again and again...


This is how I feel too. It doesn't help that the links posted on HN always come from another URL and the article starts out without giving any indication of what it will be about. It feels like a bait-and-switch every time it goes from some really interesting, difficult to tackle issue being posed to "My product, Wolfram Language, was built to do exactly this." By the end of it, I'm left feeling like I just read a massive advertisement.


I think the self promotion would be much more well received if he open sourced more of this stuff for the benefit of humanity in a Musk/Stark manner. The company could continue with other business models like hosting Alpha etc. If that were the case, we really could consider positions like OP on its own merits instead of underpinned by marketing.


Laws are not in anything that can be called in natural language; they are in a code called "legalese".

Legalese doesn't have to be formalized into program-like code. Rather, perhaps into mathematical language, with some of the notations that go with it. It needs to use clear logic, and set theoretic descriptions and reasoning. Law is all about logic and sets: what rule applies under what conditions, and what is included and excluded and so forth.


Reality is a fractal, thus any language that precisely represents all the corner cases will by necessity be infinite.

(The law currently deals with this problem by only solving questions that come before it, not by solving every potential problem.)


Ethereum's smart contracts were a good example of why this probably won't happen anytime soon...


Solidity is a terrible language for designing contracts in. It's not an effective counterexample as it seems to be such a poorly considered construct to begin with.


The problem with Ethereum is not 'just' a poor language, it is the general difficulty of verifying a Turing-complete anything.

http://blog.paralleluniverse.co/2016/07/23/correctness-and-c...

The same applies to all 'formal law language' proposals.


I didn't say the problem was "just" a poor language. I said that Solidity is a poor example of a language for writing contracts in. I didn't say it would be easy to develop one, certainly not a universal one. But Solidity is not a counterexample, itself, to the idea of a "formal law language". It's just an example of a language totally unsuited for its intended domain.


>I didn't say the problem was "just" a poor language.

It was the only specific point you made in support of your position.


Sorry, I wrote it at 2am and my girlfriend distracted me from finishing my thought. Maybe I shouldn't have hit "reply", but I did. Even so, a post making one point doesn't mean it's the author's only point or what they consider "just" the problem. Take it at face value, it was a post making a singular point: Solidity (Ethereum's language) is a bad language for writing contracts in, so it makes it difficult to consider Ethereum an example of problems with formalized/programmatic contracts.


"There can be no Justice so long as Laws are absolute".


The idea itself is rather beautiful, I used to believe it was the only way things should be, but the more I think about it and its presentation here, the more I feel uncomfortable about it.

The contents of the article are fairly heavy on the technical side of things, but seem to hand-wave the human aspect of the whole operation, or tend to mostly point out human flaws and rarely qualities. I'm not sure whether it's cynicism or me reading too much into it, but it bothers me a little.

Should this idea (and others alike) ever be implemented, I personally believe they should only ever be decision-support systems that members of society (humans and possibly AIs) would ultimately decide upon. Such a system would be designed for humans first-and-for-all ; I think consistently making it decide for humans would likely remove the relative aspect of morality over time, leaving all your decisions to a "greater entity" and all that entails.

I did enjoy the article, if only as a very interesting thought exercise, but I sincerely hope not too many people take it to heart.


I have to say this is one of the more thought-provoking ideas to be posted here in a while. I agree with the cynics that it's probably not a good solution to the problem of codifying laws. Legalese is already intended to act like code, but what separates it is the requirement for human interpretation, especially in applicability to unforeseen circumstances.

For example, how do you codify concepts like, from easy to hard: assault; theft; copyright infringement; or software patents, in terms of the underlying social benefits and harms that these concepts are supposed to enshrine? Ideas about exactly what is "harm" or "benefit" (and their highly subjective nature) have been well explored in sci-fi. The short story "Liar!" by Isaac Asimov springs to mind in particular.

On the other hand, I can see these ideas being more immediately useful for digital contracts. Some have pointed out that software can have bugs, but so can contracts. Some have pointed out that code isn't as accessible as plain writing, but contracts already aren't written in plain language. The very clear advantage of a purely code based contract is that you can query it without a lawyer. Imagine having a contract that you can literally ask questions, like "what will happen in the event of Foo?" and get a clear, unambiguous answer. Contracts today are open to interpretation. If you try to query a contract, you'll have to pay a lawyer a lot of money and get an answer like "Most likely this, but it may depend on a judge's opinion".

Another advantage of code is that it can be refactored. This means if you have a large, complex contract, you can restructure it to produce smaller, simpler contracts that focus on specific areas that may be of more or less interest to different parties. This can be done while provably not destroying any information. That isn't possible if you merely summarise a contract.


Putting aside the improbability of the notion that we are about to make a breakthrough in writing precisely what we mean in code, virtually none of the difficulties that arise in law and governance are of the sort that can be resolved by formal logic. The law is primarily about human relationships and conflict resolution, not rules.


I think this paper is more important for AI than for law. Wolfram correctly considers that we're bad at giving complex instructions to AI and that the way Law does it is very good. Thus, getting inspiration from legal systems to code AI is a great idea - I actually worked a lot on this during my PhD in 2000/2005.

On the contrary, trying to use AI to regulate legal systems is... well actually we already do it a lot! Smart Contracts? Just look at the way an invoice is generated today. Taxes? You really think there is a guy putting the numbers in your tax declaration? Etc.

There will be more AI in Law in the future. But that's about it. It won't change its nature. It will allow Law to evolve more quickly and to become ever more precise - creating more and more rules instead of simplifying it. Contrary to most people, I think that more Law is always better than less. So I guess it's a good thing.


Why not keep it in english and add some unit tests that demonstrate the intent of the law?


They are called precedents.


I mean in a more TDD approach, precedents are regression tests.


I thought about the similarities between law and computer code several years back - see http://greenash.net.au/thoughts/2008/08/legislation-and-prog...

Nice to see that Stephen Wolfram goes into much more depth than I do, about what would be required for this to happen. He's also more optimistic than I am!


the piece seems too founded on symbolic representation and building a world model, but the vast amount of AI systems deployed don't use either of those, or only use a bit of 'knowledge'. His example with 'You should eat a banana' should be replaced with 'You went banana crazy'. This highlights the ambiguity that we may want to tell a machine, that any symbolic system would utterly fail at.

He touched on machine-learning, but I think the most powerful systems in the future will be heavily built upon data driven algorithms will (and presently) be able to handle ambiguity and understand what this means.


SW; DR. But I think SW is partly right. I think AI systems will parse and assess new legal documents and laws, but not to compile them into code. Instead the AI-based legal engine will simplify, disambiguate, and debug informally specified legal documents of all kinds into a form that is logically consistent and narratively standardized. Every AI-post-processd document will follow a legal template, simplified. clarified, and systematized by the bot.

I'm sure it'll be a while yet before AI-processed legalese can make deep use of common sense or real world knowledge. But I think it should be possible soon to at least symbolize the concepts specified and confirm that the logical premises and constraints are well formed, based on a small domain-specific knowledgebase customized to each use case.

For example: real estate contracts. The terms used in leases should be fairly few, and the relations between owner, lessor, lessee, et al should be straightforward enough to allow a bot to build and maintain a sufficient world model of relations to represent all the necessities to capture any property's purchase, sale, or lease.

The advantage then is that the AI processor could look for anomalies or unusual attributes (present or missing) and reveal them to the signatories, perhaps interactively, as well as rewrite the legalese into a very standard format that any human could understand quickly, since all terms and constraints would be presented in the same standard sequence every time.

If such an AI capability then could be extended to handle contracts of other kinds, I don't see why, one day, all contracts could not be subsumed by the bot. Plausibly, as the model grows, the bot might scale up to accommodate other application areas of law and all the other uses for legalese.

Once the models for each application area of law are induced derived and matured, such an AI bot should be able to create and flesh out any legal document simply by applying an efficient Q&A with the consumer or lawmaker, meanwhile offering advice on potential gaps, unintended consequences, and loopholes. Then the need for encoded legalese like what SW proposes would disappear as the fundamental tenets of legal verbiage disappear into the representational workings of the [Deep Net or whatever].


I've always wondered, why is the tax code called the "tax code" Is it written in English and how many lines is it?


Not sure if you're a native English speaker, but anyway this usage is not specific to tax. All bodies of law can be called a "code".

For example, the body of federal law in the U.S. is called the "United States Code". http://uscode.house.gov/


Not all bodies of law would be called a code. "Code" is, I think, always legislative in nature, and specifically indicates a codified or organized and self-contained body of law. For a good example of the difference, compare the United States Statutes at Large with the U.S. Code. I'm not sure if that distinction carries over into the civil law countries, but I'd think it would (in order to revise or add to the civil code, you'd have to enact various statutes).

There's also the "model code" category in the US, where what you're codifying is typically common law principles distilled from court decisions, subject to some attempt at reform by the people involved in developing the model code.


Yes, I'm a native.


Code just mean "a codified (formalized) set of rules".

It's computer code that got it's name from legal code (back to the original latin word "codex" -- a list of laws).


Many other areas of law are commonly referred to as a code, for example the "penal code" for criminal offenses. That said, you have a good point: no doubt the tax code is one of the least comprehensible (to laymen) parts of the law in most countries.


"Code" didn't originate to refer to computer code. See "code of conduct", etc.



Isn't this a Wolfram blog? Why is it here?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: