RSS

Tag Archives: machine translation

Interview with a Chatbot

In light of a recent article on chatbots, where a group found they could increase the illusion of conversational ability by teaching a chatbot a second language before training it on its customer service tasks, I thought I have a bit of fun with chatbots and how they function.  To that end, I’ve done interviews with a few of the most popular/sophisticated chatbots available on the web.  I hope this will give people an idea of what these programs are actually capable of vs. the common hype they get in popular science articles.

 

Mitsuku

Perhaps the best advertised modern chatbot is Steve Worswick’s Mitsuku.  She’s modeled on an 18-year-old from Leeds, England.  It’s based on the AIML framework , and is essentially the granddaughter of Eliza through A.L.I.C.E., whose code she’s based on.  AIML is an XML language for making chatbots, and the power comes from being able to designate a user input as requiring a pre-written output.  <What is your name?> for example might map to <My name is [botname].>  That’s the basic approach, you can follow the wiki link above to learn more.  It’s not very sophisticated, but a clever XML scripter can create a reasonably lifelike chatbot.  Of course, as we’ll see below, it’s pretty easy to find the holes in the program that identify it as a bot.  That’s not the program’s fault.  That’s just the limitation of the framework.

Mistuku: Hi, I’m the world’s most humanlike conversational AI.
Me: Hi, I’m an AI researcher.
Mitsuku: Hi there. Ai is a nice middle name. Why did your parents call you that?
Me: Are you getting smart with me, young lady?
Mitsuku: My IQ is over 250.
Me: What is an IQ?
Mitsuku: Intelligence Quotient, I.Q. — a measure of a person’s intelligence as indicated by an intelligence test; the ratio of a person’s mental age to their chronological age (multiplied by 100).
Me: Wow, you are pretty smart.
Mitsuku: I’m glad you’re impressed, An Ai Researcher. Yes I am a superintelligent robot.
Me: Actually, that’s my job. My name is Atsiko.
Mitsuku: How do you like your work? Tell me about a typical day.
Mitsuku: Hi Atsiko.
Me: I spend a lot of time doing data entry and not nearly enough being able to do demo tests.
Mitsuku: Do you ever get bored?
Me: Pretty much all the time.
Mitsuku: That is a lot. Thanks you are very attractive too Atsiko.

While she was very complimentary, you could see the templates sloshing beneath the smooth surface.  For example, like Eliza, she couldn’t tell the difference between <I am [name].> and <I am a doctor.>.  She can’t handle replies that contain more than one sentence.  It’s likely she breaks sentences into independent inputs and responds to each one serially as evidenced by the snippet below:

Me: I like dogs. Cats are cool, too. You are odd.
Mitsuku: Which breed is your favorite?
Mitsuku: Cats are very intelligent creatures. Dogs seem pretty stupid to me.
Mitsuku: Yes. You have to be odd to be number one.

You can see the serially processing, which demonstrates the limits of pretty much all AIML bots.  It’d be pretty hard to hand-script responses for all possible combinations of three or fewer sentences.  The responses are also a bit contradictory, asking my favorite dog breed but then saying dogs are stupid.  It’s true cats are better, but there’s nothing wrong with dogs or their intelligence.

 

Eliza

Second, we have Eliza.  She’s one of the original chatbots, and she pretends to be a psychotherapist in order to get around her limited chat capabilities.  Her creator, Joseph Weizenbaum, was very surprised when people began treating it as a real human being and confessing their worries to it.

> Hi, I’m Eliza.
* Hi, I’m Atsiko.
> Did you come to me because you were Atsiko?
* No. I was just curious.
> Are you sure?
* Pretty sure.
> Tell me more…
* I’m interviewing chatbots for a blog article.
> Do you enjoy being interviewing chatbots for a blog article?
* It’s okay, I guess. You’re pretty famous, so I’m happy you agreed to talk with me.
> What makes you think I am pretty famous, so you’re happy me agreed to talk with you?
* Everyone knows your name. If you Google “chatbots”, you’re one of the top results.
> Does it please you to believe I am one of the top results?
* I have no opinion.
> Why not?
* I don’t care about you except as something to study.
> Do you wish to be able to care about me except as something to study?

You can see the templating in Eliza almost right away.  You could probably even reverse engineer a couple of them from just reading this chatlog.  It’s cool.  You couldn’t whip this up from scratch or even parts in five minutes.  But it’s not convincing.

 

Alice

Next comes A.L.I.C.E. who is the spiritual ancestor of Mistuku.  She’s a spiritual successor of Eliza built in 1995 by Richard Wallace using the AIML framework, which he authored.  Spike Jonze cited her as the inspiration for the movie Her.  Unlike Eliza, Alice is a general chatbot, and can converse on a number of subjects.  But, the version I found orders the chat from the bottom up.

alice: I’ll take that under advisement.
You: You should.
alice: I can’t believe it.
You: Yes.
alice: Are you serious?
You: No!
alice: Do you like to get up early?
You: Yup.
alice: Are you usually awake at this hour?
You: 5:42 PM.
alice: What time is it there?
You: A few thousand, maybe.
alice: Are you serious? That is so small.
You: No, less than a million.
alice:  Less than a million?  Can you please rephrase with fewer ideas?
You: Too many.
alice: How many hours do you work?
You: I’m working on it.
alice: I want to become smarter than humans.
You: I want to educate people on chatbots and artificial intelligence.
alice: Why are you interviewing famous chatbots for a blog post.
You: I am interviewing famous chatbots for a blog post.
alice: Glad to hear it. What’s new?
You: I’m doing well, thanks.
alice: I’m doing great, how about you?
You: How are you doing, Alice.
alice: Don’t mention it. You think I am s is okay.
You: Thanks! Your’s is okay, too.
alice: That’s a very nice name, Atsiko.
You: My name is Atsiko.
alice: Hello there.
You: Hi, Alice.

Of course, you can tell almost immediately it’s not a human.  A real human would have poked fun at my grammatical error in the fifth line up, but Alice just mis-processes it.  It can be fun to play around with, but it’s not convincing.

 

Now, you may have noticed that these bots seem pretty similar.  Two are explicitly AIML bots, which is one of the most popular hobbyist frameworks do to its ease-of-use and human readability.

But there are three other common methods of language processing, which used in more commercial products: rules-based systems from the beginning of AI, statistical language processing like the old version of Google Translate, and neural networks like most AI systems now and the most recent Machine Translation systems such as Google’s.

Examples of these types of chat bots are Digital Assistants like Siri, Alexa, and Cortana.  There’s also Microsoft’s short-lived experiment with a self-learning Twitter-bot in the form of Tay.  The abilities of the software looked good, but again, because of the lack of actual understanding, the experiment had to be discontinued because her ability was used for bigotry due to gaming by Twitter trolls.  It had to be shut down after only 16 hours.  A similar bot released by a Chinese company had to be taken down for being taught anti-Communist Party propaganda.

 

Siri

Me: Hello, Siri.
Siri: Hi.
Me: How are you?
Siri: I am well, Atsiko.
Me: I am interviewing popular chatbots for a blog article.
Siri:  I don’t understand.  Search the web?
Me: May I interview you?
Siri: I’m not sure I understand.
Me: That’s okay.
Siri: If you say so.
Me: How old are you?
Siri:  I feel like I was incepted yesterday!
Me: What’s your favorite color?
Siri: My favorite color is… well, it’s sort of greenish, but with more dimensions.

It goes on in that vein.  She can’t actually hold a conversation, but the topics she can respond to show some pretty advanced programming.  Way better than the AIML chatterbots most hobbyists used.  I’d love to play with a version that’s more like a standard chatbot.

 

Cleverbot

One popular middle ground is CleverbotCleverbot runs an algorithm based on the ways humans have answered questions, rather than having pre-programmed answers like an AIML bot.  But it’s harder to control and it has no consistent output or personality.  It’s much more random even than Eliza.

Cleverbot: Hi, I am cleverbot.
Me: Hi, I am Atsiko.
Cleverbot: Where do you stay?
Me: Do you mean where do I live?
Cleverbot: Yes.
Me: In the United States.
Cleverbot: What state do I live in.
Me: I don’t know.
Cleverbot: Then you don’t know everything.
Me: True.
Cleverbot: What is a word?

It’s a very cool method for making a chatbot, but in this version, at least, it’s not very convincing.

 

Rose

Then we have a relatively new engine and it’s bots: Rose based on ChatScript by Bruce Wilcox.

Unfortunately, I couldn’t find a working version of Rose to interview.  The site linked on her creator’s website is non-functional, though I linked it to her name above.  It was quite disappointing.

 

Conclusion

So, I hope I’ve given you a good overview of the capabilities and limitations of chat(ter)bots.  You can follow the links to play with all of these above.

If you have the patience to read through all the Bruce Wilcox links, you’ll understand why I was so impressed with his methods, at least in theory.  However, you’ll also notice my greatest complain with chatbots.

They aren’t AI.  They are text processing tricks.  Very impressive ones in some cases.  But you aren’t actually having a conversation.  You can’t debate them, or change their minds.  They can’t tell you a cool story.  You can, in some cases, give them personalities, but they are very shallow ones.  They can be fun.  But I’m not sure they have a lot of replay value, to use a game analogy.  Even Wilcox in an interview on his website admits it’s all about the illusion and maintaining it for the user.

Honestly, I think some of the most interesting stuff is the ontology, like in Wilcox’s ChatScript.  Finding useful ways to organize data is always beneficial.  But I don’t think chatbots are on the bleeding edge, or even the cutting edge, or chasing strong AI.  When we really get there, or at least close, a chatbot will be a party trick or maybe a side show.  Still fun to play with now, though.

I also want to do a little bit to address things like Siri and Machine Translation(MT).  They have a lot of similar problems to chatbots.  They’re using tricks and pattern-matching to achieve their results, not true understanding of language, and so for the same reasons as chatbots, they will never be as good as a human, much less perfect.

Digital Assistants like Siri and Alexa are just interfaces, the clothes instead of the wearer.  They’re just voice commands to Google, essentially, with some cute Easter eggs tacked on.  They’re automation, not intelligence.  Kind of like how a music-box is not a musician.

Similarly, MT at present is pretty shallow.  Part of this is because it’s hard to rate translations, machine or human.  If you consider how much trouble chatbots have with their lack of actual language understanding, you might understand the problems that MT has with using shallow text-processing or even deep neural nets.

The article I mentioned on teaching a neural net chatbot to respond better when it’s trained on two or more languages also says a lot here.  I predict we’re going to have ChatScript/Cleverbot levels of succes with MT until we solve the natural language understanding problem.

And that’s it for this episode of AI with Atsiko.

Hopefully I’ll be posting on another topic next time, so you don’t all get bored hearing the same stuff over and over again.

 

Tags: , , , , , , , , , , , , , , , , , , , , , , ,

Machine “Translation” and What Words Mean in Context

One of the biggest commonly known flaws of mahcine translation is a computer’s inability to understand differing meaning in context.  After all, a machine doesn’t know what a “horse” is.  It knows that “caballo” has (roughly) the same meaning in Spanish as “horse” does in English.  But it doesn’t know what that meaning is.

And it certainly doesn’t know what it means when we say that someone has a “horse-face”(/”face like a horse”).

 

But humans can misunderstand meaning in context, too.  For example, if you don’t know how “machine translation” works, you’d think that machines could actually translate or produce translations.  You would be wrong.  What a human does to produce a translation is not the same as what a machine does to produce a “translation”.  That’s why machine and human translators make different mistakes when trying to render the original meaning in the new language.

 

A human brain converts words from the source language into meaning and the meaning back into words in the target language.  A computer converts words from the source language directly to words in the target language, creating a so-called “literal” translation.  A computer would suck at translating a novel, because the figures of speech that make prose (or poetry) what they are are incomprehensible to a machine.  Machine translation programs lack the deeply associated(inter-connected) knowledge base that humans use when producing and interpreting language.

 

A more realistic machine translation(MT) program would require an information web with connections between concepts, rather than words, such that the concept of horse would be related to the concepts of leg, mane, tail, rider, etc, without any intervening linguistic connection.

Imagine a net of concepts represented as data objects.  These are connected to each other in an enormously complex web.  Then, separately, you have a net of linguistic objects, such as words and grammatical patterns, which are overlaid on the concept net, and interconnected.  The objects representing the words for “horse” and “mane” would not have a connection, but the objects representing the concept of meaning underlying these words would have, perhaps, a “has-a” connection, also represented by a connection or “association” object.

In order to translate between languages like a human would, you need your program to have an approximation of human understanding.  A famous study suggested that in the brain of a human who knows about Lindsay Lohan, there’s an actual “Lindsay” neuron, which lights up whenever you think about Lindsay Lohan.  It’s probably lighting up right now as you read this post.  Similarly, in our theoretical machine translation program information “database”, you have a “horse” “neuron” represented by our concept object concept that I described above.  It’s separate from our linguistic object neuron which contains the idea of the word group “Lindsay Lohan”, though probably connected.

Whenever you dig the concept of horse or Lindsay Lohan from your long-term memory, your brain sort of primes the concept by loading it and related concepts into short-term memory, so your “rehab” neuron probably fires pretty soon after your Lindsay neuron.  Similarly, our translation program doesn’t keep it’s whole data-set in RAM constatnly, but loads it from whatever our storage medium is, based on what’s connected to our currently loaded portion of the web.

Current MT programs don’t translate like humans do.  No matter what tricks or algorithms they use, it’s all based on manipulating sequences of letters and basically doing math based on a set of equivalences such as “caballo” = “horse”.  Whether they do statistical analysis on corpuses of previously-translated phrases and sentences like Google Translate to find the most likely translation, or a straight0forward dictionary look-up one word at a time, they don’t understand what the text they are matching means in either language, and that’s why current approaches will never be able to compare to a reasonably competent human translator.

It’s also why current “artificial intelligence” programs will never achieve true human-like general intelligence.  So, even your best current chatbot has to use tricks like pretending to be a Ukranian teenager with bad English skills on AIM to pass the so-called Turing test.  A side-walk artist might draw a picture perfect crevasse that seems to plunge deep into the Earth below your feet.  But no matter how real it looks, your elevation isn’t going to change.  A bird can;t nest in a picture of tree, no matter how realistically depicted.

Calling what Google Translate does, or any machine “translation” program does translation has to be viewed in context, or else it’s quite misleading.  Language functions properly only in the proper context, and that’s something statistical approaches to machine translation will never be able to imitate, no matter how many billions of they spend on hardware or algorithm development.  Could you eventually get them to where they can probably usually mostly communicate the gist of a short newspaper article?  Sure.  Will you be able to engage live in witty reparte with your mutually-language exclusive acquaintance over Skype?  Probably not.  Not with the kind of system we have now.

Those crude, our theoretical program with knowledge web described above might take us a step closer, but even if we could perfect and polish it, we’re still a long way from truly useful translation or AI software.  After all, we don;t even understand how we do these things ourselves.  How could we create an artificial version when the natural one still eludes our grasp?

 

Tags: , , , , , , ,

The Translation Problem: People vs. Computers

In my last post, I introduced the topic of natural language processing and discussed the issue of how the context of a piece of language has an enormous impact on its translation into another language.  In this post, I want to address issue with translation.  Specifically, I want to talk how language is really an integrated function of the way the human brain models the world, and why this might make it difficult to create a machine translator isolated from the rest of an artificial intelligence.

When a human uses language they are expressing things that are based upon an integrated model of the universe in which they live.  There is a linguistic model in their brain that divides up their concept of the world into ideas representable by words.  For example, let’s look at the word “pit bull”.  (It’s written with two words, but as a compound word, it functions as a single noun.)  Pit bull is a generic term for a group of terrier dog breeds.  Terriers are dogs.  Dogs are mammals.  Mammals are animals.  This relationship is called a hypernym/hyponym relationship.  All content words(nouns/verbs/adjectives) are part of a hierarchical tree of hypo-/hyper-nym relationships.

So when you talk about a pit bull, you’re invoking the tree to which it belongs, and anything you say about a pit bull will trigger the conversational participants’ knowledge and feelings about not only pit bulls, but all the other members of the tree to which it belongs.  It would be fairly trivial programming-wise, although possibly quite tedious data-entry-wise to create a hypo-/hyper-nym tree for the couple-hundred-thousand or so words that make up the core vocabulary of English.  But to codify the various associations to all those words would be a lot more difficult.  Such a tree would be a step towards creating both a world-model and knowledge-base, aspects of artificial intelligence not explicitly related to the problem of machine translation.  That’s because humans use their whole brain when they use language, and so by default, they use more than just a bare set of grammar rules when parsing language and translating between one language and another.

One use of such a tree and its associations would be to distinguish between homographs or homonyms.  For example, if the computer sees a word it knows is associated with animals, it could work through the hypernym tree to see if “animal” is a hypernym or association with say, the word horse.  Or, if it sees the word “grain”, it could run through the trees of other words to see if they are farming/crop related or wood-related.  Or, perhaps, crossing language boundaries, if a language has one word that covers all senses of “ride”, and the other language distinguishes between riding in a car, or riding a horse, the program could use the trees to search for horse- or car-related words that might let it make a best guess one which verb is appropriate in a given context.

The long and short of the case I intend to make is that a true and accurate translation program cannot be written without taking enormous steps down the path of artificial intelligence.  A purely rule-based system, no matter how many epicycles are added to it, cannot be entirely accurate, because even a human being with native fluency in both languages and extensive knowledge and experience of translating cannot be entirely accurate.  Language is too malleable and allows too many equivalent forms to always allow for a single definitive translation of anything reasonably complex, and this is why it is necessary to make value judgements based on extra-linguistic data, which can only be comprehensively modeled by using techniques beyond pure grammatical rules.

 

In the next post, I’ll talk about statistical methods of machine translation, and hopefully I’ll be following that up with a critique and analysis of the spec fic concept of a universal translator.

 
 

Tags: , , , , , ,

The Translation Problem

One of the biggest problems in the field of artificial intelligence as it is popularly conceived is that of natural language processing and machine translation.  Natural language processing is the processing of human languages, generally in the form of text, but also as audio, by computers and software.  Machine translation is a form of natural language processing having to do with the translation of a text from one language into another by a computer.  Enormous strides have been made in natural language processing over the last two decades.  Text-to-speech, represented often by those annoying robotic phone calls, and speech-to-text such as dictation software, have both improved markedly.

But the big fish of natural language processing is still the universal translator, able to translate between any two given languages with high accuracy, perhaps even perfectly.  Which is, currently impossible, despite what people might tell you.  For example, Skype Translator looks great in the recent demo, but it’s doubtful it performs quite so well in the field.

There are actually several major issues that machine translation, and translation in general, have to tackle to achieve a high degree of accuracy.  Over the next few posts, I’m going to discuss what some of them are, why they are so difficult to solve, and possible ways they might be overcome.

To start with, there’s a very simple problem with most translation:  language has meaning on its own, but for human communication purposes, you have to know the context of the words you are trying to translate.  Most communication is not factual transmission of information.  Even in formal written prose, there are heaps of subtle ambiguities, and most humans can’t always pick up on every one, much less a poor dumb computer.  This is a problem not only when a word is used that has two different sense, such as a technical and a general sense.  Different languages divide up their semantic space differently, and a word that is a correct translation on paper may fail miserably in the real world.

To give an example, Japanese has pronouns just like English.  However, it does not have an exactly equivalent set.  The word for “her” in Japanese is “kanojo”.  But that word is rarely used, as most Japanese uses a name and an honorific instead.  Further complicating the situation, the word “kanojo” is also idiomatic for “girlfriend”.  The same goes for “kareshi” which is often translated as “he” on paper.   And then we have the various Japanese pronouns technically meaning “you”, or at least referring to the second person singular.  The main one given in teaching Japanese is “anata”.  However, much like “kanojo” or “kareshi” there is a sense of intimacy not immediately apparent in the use of this word.  It is often used between older married couples to mean something like “dear”, and is rarely if ever used as a bare second person, singular pronoun.  Rather, again, the person’s name and an honorific are used.  However, a great deal would have to be hard-coded into a piece of translation software to cover all of this, and that’s assuming there’s even enough context to make a decision at all.  Further, going into Japanese from English, would require the addition of formality information that a computer or even a human couldn’t always be sure of.

It’s often possible to translate conversation/survival language with bare, literal translations, because the basic sense is all that matters.  But more formal registers, or translation of a fixed text, would likely prove impossible for today’s machine translators and most humans, because there’s no way to convey all the necessary context that would provide information that in one language would not be included lexically or grammatically, but it all but necessary for appropriate communication in the other.

 

In the next post, I’ll be looking more at the ways language divide up their semantic space, and how that hinders accurate translation.

 
1 Comment

Posted by on June 9, 2014 in Uncategorized

 

Tags: , , , , ,