An International Platform for perspectives that transcend the traditional Divides between the Humanities and stem    

Can AI Comfort You?

Picture this: at the end of a long day, you sit with a friend and talk. Your friend notices that you seem anxious and asks you how you are feeling, and you describe your frustration with an upcoming project deadline. Your friend consoles you and reassures you of your ability to finish the project. The two of you work on it together for a few hours until it’s polished. Then you get ready for bed, and your friend’s LED display goes dark as it powers down for the night.

While having a robot for a friend seems like a cliched science fiction story, new advancements in language recognition programs might soon make this a reality. These programs are enabling machines to not only understand the complexities and nuances of language to an unprecedented degree but also to use a person’s language habits and word choice to analyze and respond to their emotional state. By representing concepts, such as emotions, in relation to other more visible things , such as colors, AI programs can comprehend the connection between emotions and colors. What’s more, this representation allows programs to analyze ideas in the same way our own brains can, a feat which has allowed scientists to engineer empathy in robots.

So how can AI analyze language to connect abstract concepts such as emotions with words that are not related to emotion?  Let’s take a simpler example of how it could connect a culinary dish with its country of origin.

AI can create nearly an infinite number of graphs where each word connects to every other word. By adding together the connections, each word can be expressed as the sum of its relationships with countless other words. Word2Vec, one of the most commonly used text processing programs, uses this method to draw comparisons between different ideas.

A Word2Vec analysis of the word “sushi” would look at the idea of sushi as “a cultural food of Japan,” which the program would then break down into graphs for “cultural food” and “Japan.” Thus, the Word2Vec graph for “sushi” is equivalent to its graph for “cultural food” combined with its graph for “Japan.” In an experiment, computer scientists asked a Word2Vec program to subtract its graph of “Japan” from its graph of “cultural food” and add its graph of “Germany” to the result. The program promptly responded by yielding its graph for “Bratwurst,” a type of German sausage [1].

Even more interestingly, Word2Vec can be used to fill in missing words in sentences. For example, take the age-old pangram “The quick brown fox jumps over the lazy dog” and remove the word “fox,” leaving “The quick brown ___ jumps over the lazy dog.” A trained Word2Vec program is able to scan this sentence, browse thousands of other sentences and words, and find the word that best completes the sentence, which in this case is “fox.” It does this by creating a graph for the missing word in the sentence and comparing it with similar graphs of known words. When it finds a match, the program inserts the word into the gap.

Natural Language Processing, or NLP, which is the process by which a machine converts read or spoken text into ideas that the machine can process, has benefited heavily from Word2Vec’s ability to interpret complex concepts and linguistic analogies.. For example, virtual assistant programs such as Siri and Alexa both make heavy use of NLP techniques to convert their users’ spoken input into instructions with the help of Word2Vec.

Furthermore, Word2Vec’s ability to determine the meaning of a word based on its contextual information has been used by other researchers to create text completion programs such as autocorrect. These sentence completion techniques also help NLP programs to build entire documents from just a few sentences by treating a text as an unfinished sentence with a missing word at the end. By continuously recalculating what word would best fit at the end of the text, the program can extrapolate what the document would logically say next.

So what does the future hold? Many experts believe that as artificial intelligence grows to be more user-oriented, programs like Word2Vec will become ever more important in tailoring each user’s experience to their preferences. For example, Siri could learn and adapt to your speech patterns over time, or Gmail could write entire emails for you based on your previous messages.

By analyzing the relationship between word choice and mood, robots may one day recognize how you feel and respond accordingly. Soon, you and your robot may be able to have a true heart-to-motherboard conversation about a crummy day or a happy occasion, all thanks to the power of NLP.

[1] Tomáš Mikolov, “Distributed Representations for NLP,” 2016, www.slideshare.net/mlprague/tom-mikolov-distributed-representations-for-nlp.

Writing for Science

Nature Rocks

Nature Rocks