Google is trying to make email smarter by adding a Smart Reply suggestion feature to your inbox. Based on machine intelligence technology, your device will attempt to suggest relevant responses to your daily emails.
Smart Replies gives users up to three quick options to send back in reply to emails based on a machine learning analysis of the message's content. People can use the short replies as either a way to quickly respond, or a way to start a longer message. Rolling out out on Inbox for Android and iOS later this week, the Smart Reply suggestion feature is built on a pair of recurrent neural networks, one used to encode the incoming email and one to predict possible responses.
The encoding network consumes the words of the incoming email one at a time, and produces a vector (a list of numbers). This vector captures the gist of what is being said without getting hung up on diction -- for example, the vector for "Are you free tomorrow?" should be similar to the vector for "Does tomorrow work for you?" The second network starts from this thought vector and synthesizes a grammatically correct reply one word at a time, like it’s typing it out. According to Greg Corrado, Senior Research Scientist, the detailed operation of each network is entirely learned, just by training the model to predict likely responses.
One challenge of working with emails is that the inputs and outputs of the model can be hundreds of words long. This is where the particular choice of recurrent neural network type really matters. Google's engineers used a variant of a "long short-term-memory" network (or LSTM for short), which is particularly good at preserving long-term dependencies, and can home in on the part of the incoming email that is most useful in predicting a response, without being distracted by less relevant sentences before and after.
In developing Smart Reply, Google adhered to the user privacy standards -- in other words, no humans reading your email. This means researchers have to get machine learning to work on a data set that they themselves cannot read.
The first prototype of the system had a few unexpected quirks. For instance, when Google asked the neural network for the three most likely responses, it’d cough up triplets like "How about tomorrow?" "Wanna get together tomorrow?" "I suggest we meet tomorrow." That’s not really much of a choice for users. The solution was a machine learning system for mapping natural language responses to semantic intents. This was instrumental in several phases of the project, and was critical to solving the "response diversity problem": by knowing how semantically similar two responses are, Google can suggest responses that are different not only in wording, but in their underlying meaning.