Showing posts with label Richard Montague. Show all posts
Showing posts with label Richard Montague. Show all posts

Monday, March 18, 2024

Formal Logic in SF: 'Foundation'

Below is the extract from "Foundation" by Isaac Asimov that I’m mulling over. As a young teenager it first got me interested in Predicate Calculus, which much later I studied in my AI research.


The Foundation Trilogy by Isaac Asimov

Here's the extract.

---

"Said Yate Fulham: "And just how do you arrive at that remarkable conclusion, Mr. Mayor?"

"In a rather simple way. It merely required the use of that much-neglected commodity – common sense. You see, there is a branch of human knowledge known as symbolic logic, which can be used to prune away all sorts of clogging deadwood that clutters up human language."

"What about it?" said Fulham.

"I applied it. Among other things, I applied it to this document here. I didn't really need to for myself because I knew what it was all about, but I think I can explain it more easily to five physical scientists by symbols rather than by words."

Hardin removed a few sheets of paper from the pad under his arm and spread them out. "I didn't do this myself, by the way," he said. "Muller Holk of the Division of Logic has his name signed to the analyses, as you can see."

Pirenne leaned over the table to get a better view and Hardin continued:

"The message from Anacreon was a simple problem, naturally, for the men who wrote it were men of action rather than men of words. It boils down easily and straightforwardly to the unqualified statement, when in symbols is what you see, and which in words, roughly translated, is, 'You give us what we want in a week, or we take it by force.'"

There was silence as the five members of the Board ran down the line of symbols, and then Pirenne sat down and coughed uneasily.

Hardin said, "No loophole, is there, Dr. Pirenne?"

"Doesn't seem to be."

"All right." Hardin replaced the sheets. "Before you now you see a copy of the treaty between the Empire and Anacreon – a treaty, incidentally, which is signed on the Emperor's behalf by the same Lord Dorwin who was here last week – and with it a symbolic analysis."

The treaty ran through five pages of fine print and the analysis was scrawled out in just under half a page.

"As you see, gentlemen, something like ninety percent of the treaty boiled right out of the analysis as being meaningless, and what we end up with can be described in the following interesting manner:

"Obligations of Anacreon to the Empire: None!

"Powers of the Empire over Anacreon: None!"

Again the five followed the reasoning anxiously, checking carefully back to the treaty, and when they were finished, Pirenne said in a worried fashion, "That seems to be correct."

"You admit, then, that the treaty is nothing but a declaration of total independence on the part of Anacreon and a recognition of that status by the Empire?"

"It seems so."

"And do you suppose that Anacreon doesn't realize that, and is not anxious to emphasize the position of independence – so that it would naturally tend to resent any appearance of threats from the Empire? Particularly when it is evident that the Empire is powerless to fulfill any such threats, or it would never have allowed independence."

"But then," interposed Sutt, "how would Mayor Hardin account for Lord Dorwin's assurances of Empire support? They seemed –" He shrugged. "Well, they seemed satisfactory."

Hardin threw himself back in the chair. "You know, that's the most interesting part of the whole business. I'll admit I had thought his Lordship a most consummate donkey when I first met him – but it turned out that he was actually an accomplished diplomat and a most clever man. I took the liberty of recording all his statements."

There was a flurry, and Pirenne opened his mouth in horror.

"What of it?" demanded Hardin. "I realize it was a gross breach of hospitality and a thing no so-called gentleman would do. Also, that if his lordship had caught on, things might have been unpleasant; but he didn't, and I have the record, and that's that. I took that record, had it copied out and sent that to Holk for analysis, also."

Lundin Crast said, "And where is the analysis?"

"That," replied Hardin, "is the interesting thing. The analysis was the most difficult of the three by all odds. When Holk, after two days of steady work, succeeded in eliminating meaningless statements, vague gibberish, useless qualifications – in short, all the goo and dribble – he found he had nothing left. Everything canceled out."

"Lord Dorwin, gentlemen, in five days of discussion didn't say one damned thing, and said it so you never noticed. There are the assurances you had from your precious Empire."

Hardin might have placed an actively working stench bomb on the table and created no more confusion than existed after his last statement."

---

Many people - mostly economists, it seems - have cited psychohistory as the reason they entered their profession. For me it prepared the way for the International Marxist Group.

But today I'm more interested in what ‘symbolic logic’ did for Salvor Hardin.

Within the paradigm of formal logic, the natural language texts Hardin gave to the ‘Division of Logic’ would most likely have been mapped to Richard Montague's baroque fusion of higher-order predicate calculus, lambda calculus and multi-modal logics. Computationally intractable, as it turns out.



Translating English into Montague's formal logic


But a suitable LLM in summarisation mode could do the job in seconds.

Friday, November 24, 2017

Super-high-level programming languages

Not many posts recently as Alex is visiting. We were discussing programming languages, which divide between those focused on performance (C++, Go) and those focused on the problem domain (Java, Scala).

I floated Prolog past him, but with his engineering head on he wasn't that interested. The tutorial programs were 'hard to understand' and in any case 'could be coded much more efficiently in a procedural language such as Java'.

OK, I gave up on that but it did make me think: what would be a language at a much higher level of abstraction even than Prolog?

Richard Montague

There's a way of thinking about this as a logician, where you focus on different kinds of semantic models: those of higher-order logics, modal logics, type systems .. but I don't really want to go there. Richard Montague's 'throw the kitchen sink at it' logic for natural language is a kind of reductio ad absurdum for that kind of approach. You rapidly lose any computational capability.

Our intuitive idea of the inadequacy of current programming language expressivity derives from a comparison with natural language. What an advance it would be (we think) if we could engage with a computer system the way we today talk to the (human) analyst.

English as a super-high-level programming language?

For me the extra dimensions of natural language include the management of agency (hence speech acts) and context - the presumption of a detailed and extensive shared culture to make sense of implicit referents.

In the end it depends on what we think we're programming. If it's the behaviour of a non-intentional black box (every business system to-date) then a more-or-less souped-up predicate calculus specification language (which is adequately executable) will be optimal: a Prolog-variant.

If our target system is an intentional system, indeed a second-order intentional system - one which treats other systems such as ourselves as intentional systems - then the 'programming language' to engineer such systems will incorporate those additional capabilities we find in natural language.

Today's AI engineering community will hiss at this point: we don't program any more - our systems learn!

Don't worry, that pendulum will be swinging back soon enough. I expect legislation in due course that new AI systems will have to attend school.

Saturday, April 01, 2017

Google Translate: English to predicate logic (please!)



Did you see the  "Missing: google"?

---

A big problem with English (natural language really) is that it doesn't come equipped with an explicit set of inference rules. Consequently, when someone uses natural language to communicate with an AI system, it's not really possible for that system to immediately connect the utterance to its store of knowledge. If only natural languages were like formal languages, which have proper inference and well-defined semantics. The thought that secretly they are was the intuition of Richard Montague*. But he was misguided.

Any AI natural language understanding system tries to transform the raw material of human language into something it can use, something more inferentially tractable.  Usually that doesn't work too well, and even the latest statistical systems (which do well in surface-level speech-recognition and translation) show scant abilities to understand.

It's as well to remind ourselves just why natural languages are so unhelpful to AI designers. It's because they are a highly-optimised solution to a situated communications problem. Speech is a low-bandwidth, linear and slow channel for communicating time-critical thoughts. So speech is highly optimized to use every available constraint to speed up meaning transfer:

  • volume, pitch, timbre and tone of voice
  • shared and predictive knowledge of the conversational partner
  • emotional cues
  • physical gesturing and facial expressions
  • environmental situation and context 
  • ...


Researchers are quite aware of this, of course. The topic area is called Pragmatics and it's hived off as a separate sub-discipline .. because it seems to require way too much modelling of the conversing agents in their specific environment, culture and history. In short, it's too hard.

But by abstracting away these additional constraints which channel and constrain meaning, we make the semantic understanding problem way too hard. Which is why we can't solve it.

A Google Translate system which mapped between a natural language and a formal language (with well-defined inference rules and semantics) would nevertheless be a boon to the designers of conversational AI systems, including chatbots. But Google doesn't have a corpus of First-Order Predicate Calculus sentences translationally-linked to English, so its deep learning systems can't crunch the data and add FOPC to its list of languages. Projects such as Cyc have attempted to do this stuff by hand .. with surprisingly little impact.

Again the way forward is embodied robotics and human baby conversational emulation.

---

* In a weird reprise of Alan Turing's fate, Wikipedia reports that Richard Montague 'died violently in his own home; the crime is unsolved to this day. Anita Feferman and Solomon Feferman argue that he usually went to bars "cruising" and bringing people home with him. On the day that he was murdered, he brought home several people "for some kind of soirée", but they instead robbed his house and strangled him.'

He was 40.