One of the hottest areas in computer science these days is “deep learning,” or the idea that computers can teach themselves, so that they acquire something like the nimble processing power of the human mind.
Deep learning is a tantalizing idea (and one step towards artificial intelligence), but for non-experts, it’s hard to identify the difference between rote computing and a machine that’s taken off on its own. Computer scientists at Stanford have recently created a program called NaSent, however, that is both remarkable in its own right, and a satisfyingly clear demonstration of what deep learning looks like in practice.
NaSent, which is short for Neural Analysis of Sentiment, is a program that determines whether movie reviews are positive or negative. There are already programs that do this, largely by counting positive and negative words in a review, but NaSent is more sophisticated: It can extract meaning from whole phrases and sentences, which puts it ever so slightly closer to the realm of a real live reader.
NaSent was created by computer scientists Richard Socher, Christopher Manning, and Andrew Ng, and linguist Christopher Potts, and presented last month at a conference in Seattle. The researchers began by feeding the program 214,000 phrases and sentences from movie reviews that had been coded manually on a scale from like to dislike. NaSent then draws on that foundation to determine the meaning of unfamiliar sentences.
A news release put out last month by the Stanford Engineering Department included a sample analysis that highlights NaSent’s ability to detect nuance. The program is able to tell the difference between two sentences that contain the exact same words in nearly the same order, but have completely opposite meanings:
- “Unlike the surreal Leon, this movie is weird but likeable.”
- “Unlike the surreal but likeable Leon, this movie is weird.”
Analysis of the sentence, “Unlike the surreal Leon, this movie is weird but likeable.”
Analysis of the sentence, “Unlike the surreal but likeable Leon, this movie is weird."
These tree diagrams are limited compared to how human beings analyze language. They do, though, provide a glimpse of what a more sophisticated program might look like one day, when maybe a computer will be able to tell that a person who raises his eyebrows, reclines his head, lowers his voice, and says, “That was a great movie,” means no such thing.
In the meantime, the NaSent team is crowd-sourcing to improve the program. They’ve put together an online demo, where users can enter text, see the program’s analysis, and correct any errors it makes. Just now, for example, I taught NaSent that the word “camp” is negative in the context of a movie review.
The author is solely responsible for the content.
Leon Neyfakh is the staff writer for Ideas. Amanda Katz is the deputy Ideas editor. Stephen Heuser is the Ideas editor.
Guest blogger Simon Waxman is Managing Editor of Boston Review and has written for WBUR, Alternet, McSweeney's, Jacobin, and others.
Guest blogger Elizabeth Manus is a writer living in New York City. She has been a book review editor at the Boston Phoenix, and a columnist for The New York Observer and Metro.
Guest blogger Sarah Laskow is a freelance writer and editor in New York City. She edits Smithsonian's SmartNews blog and has contributed to Salon, Good, The American Prospect, Bloomberg News, and other publications.
Guest blogger Joshua Glenn is a Boston-based writer, publisher, and freelance semiotician. He was the original Brainiac blogger, and is currently editor of the blog HiLobrow, publisher of a series of Radium Age science fiction novels, and co-author/co-editor of several books, including the story collection "Significant Objects" and the kids' field guide to life "Unbored."
Guest blogger Ruth Graham is a freelance journalist in New Hampshire, and a frequent Ideas contributor. She is a former features editor for the New York Sun, and has written for publications including Slate and the Wall Street Journal.
Joshua Rothman is a graduate student and Teaching Fellow in the Harvard English department, and an Instructor in Public Policy at the Harvard Kennedy School of Government. He teaches novels and political writing.