Tuesday, June 30, 2015

Do we have real processing of natural language?

These notes are, in a way, a response to John Ball's article "Blame Chomsky for non-speaking A.I." (http://www.computerworld.com/article/2929085/emerging-technology/blame-chomsky-for-non-speaking-ai.html). Like John Ball, I feel frustrated about the way current AI resources are spent, still not leading to AI systems' ability to use natural language more or less like humans. But my background and history are different, so I have a different perspective; and of course, it is not about placing the blame.

For me, the groundbreaking achievement of Chomsky's phrase-structure grammars was the fact that description of natural language could be done in mathematically tractable terms, instead of seeing the language as something vague and unruly. This defined my transition into the field from mathematical logic. So I became interested in computer processing of NL texts, though I didn't follow the path of what seemed to be the mainstream research. Context-free grammars are very close to what the language has but not ideal, so a modification is in order. But not through context-sensitive grammars or another mathematically related class. The increased interest in Chomsky's hierarchy is for me an example of research inertia. And besides, I worked mostly with Russian language, for which dependency grammars seem to be more appropriate than phrase-structure. The principal obstacle being detection of the syntax structure of the text, I ended up with the approach known as the "filter method": describe the syntax as a set of logical restrictions on the syntax tree, and look for the one for a given sentence that satisfies those restrictions.

As is known, this easily leads to a combinatorial explosion, and I tried to work around this problem (even built a primitive SAT-solver). But being constrained in computer resources, I had to abandon this approach and look for an alternative (after all, I couldn't believe a human brain that can easily parse a sentence can use a huge computational resource). But later I could see the end of the journey I had abandoned. An elaborate grammar (HPSG), based on a big text corpus, and also a huge SAT-solver, producing lots of alternative parsings (most of them making no sense -- semantics was not used). All very nice, but what next?

Next, the <b>meaning</b> is still the goal, even if we don't know exactly what it is. We had some successful systems showing understanding of the meaning in a restricted domain, like T.Winograd's SHRDLU. I don't think they were very appealing for linguists whose ambition is usually to give as comprehensive as possible a description of the whole language, not of a specific narrow domain. But to have a deep semantical theory for the whole language would mean to have a theory for everything the language can express, i.e., for everything we know. So I think we should build meaning models for restricted domains, eventually extending and/or coalescing them, probably with a methodology for conquering new domains. Unfortunately, I don't see this happen.

The next chapter comes with the interest of big businesses in "text analytics" or "handling unstructured data". The big bosses don't care about the subtleties of grammars believing that their money and computer resources will trump all. Text processing once again becomes mostly keyword-based and using every shortcut (like "bags of words") to avoid deep linguistic analysis. And they proudly call this NLP! This also resulted in new disciplines like "named entity recognition" which do carry some semantics, but little else.

Now forget NLP, there is NLU (natural language understanding)! Personal assistants in handheld devices use the power of speech recognition... to call their pre-existing apps. You say a command, the system figures out which app to call and with which arguments. But I don't see any point in using natural language to talk to an old-fashioned app. The language expects much more. I imagined an airline reservation system to which the customer says at some point: "I would accept this flight unless you have an earlier one". And the system replies "We do have an earlier flight but it lands at a different airport". Once I gave this example to a developer of a personal assistant and was told that this would be a too complicated "use case". If the system were able to process meaningfully parts of the sentences rather than seek a predefined use case it would know how to handle such situations.

So we are not yet there, and probably not moving that way.

I agree with John Ball that we nee a more refined description of syntactic links. Indeed, when I worked with the HPSG parser mentioned above, I was adding some semantic-based filtering of the parser outputs and also tried to obtain more details about the syntactic roles, but this was not part of the project. If I could apply semantic filtering before the call to the SAT-solver it would take away much of the SAT-solver complexity and time. This also suggests that the linguistic analysis doesn't need to follow the "levels" (first morphology, then syntax, then semantics, ...) but better can use information from different levels concurrently.

I had little time to study the patom model, and only had a superficial glimpse of the RRG. My own tools and observations from previous research can be found on www.academia.edu.

Gregory Tseytin (more about me is on LinkedIn)