OpenAI Unsupervised Sentiment Neuron
OpenAI has developed an unsupervised system capable of learning a high-quality representation of sentiment despite being trained solely to predict the next character in text from Amazon reviews. This approach allows a linear model to achieve state-of-the-art sentiment analysis accuracy on the Stanford Sentiment Treebank, reaching 91.8% accuracy compared to the previous best of 90.2%.
High-Efficiency Sentiment Analysis
An unsupervised representation of sentiment can match or exceed the performance of fully supervised systems while using 30-100x fewer labeled examples. Specifically, an L1-regularized model pretrained on Amazon reviews matched the performance of a multichannel CNN using only 11 labeled examples and matched state-of-the-art CT-LSTM Ensembles with only 232 labeled examples, compared to the 6,920 examples used by fully supervised approaches.
Technical Methodology
The system utilizes a multiplicative LSTM (mLSTM) with 4,096 units trained on a corpus of 82 million Amazon reviews. The training process took one month across four NVIDIA Pascal GPUs, processing 12,500 characters per second.
To convert the mLSTM into a sentiment classifier, OpenAI researchers took a linear combination of the 4,096 units—which serve as a feature vector representing the input string—and learned the weights of that combination using available supervised data.
Discovery of the Sentiment Neuron
During the training of the linear model with L1 regularization, OpenAI discovered a single "sentiment neuron" that is highly predictive of the sentiment value. This single unit contains almost all of the sentiment signal within the model's representation.
This discovery enables direct control over the sentiment of generated text. By overwriting the value of this specific sentiment neuron, the model's output can be manipulated to be more positive or negative.
Character-Level Sentiment Tracking
The sentiment neuron adjusts its value on a character-by-character basis. Strong indicative words such as "best" or "horrendous" cause significant shifts in the neuron's value.
Interestingly, the system also performs large updates after the completion of sentences and phrases. For example, in the phrase "And about 99.8 percent of that got lost in the film," a negative update occurs after the word "lost," followed by a larger update at the end of the sentence, despite the phrase "in the film" containing no sentiment content on its own.
Implications for Unsupervised Learning
This research suggests that training large unsupervised next-step-prediction models on massive datasets can be an effective method for general representation learning. OpenAI posits that this phenomenon is not specific to their model but is a general property of large neural networks trained to predict the next dimension or step in their inputs.
Limitations and Future Directions
OpenAI identified several areas for further improvement and exploration:
- Document Length: Performance was weaker on datasets containing long documents, likely because the character-level model struggles to maintain information over thousands of timesteps. Hierarchical models may be a solution to this limitation.
- Domain Divergence: The model's performance decreases as input text diverges from the review data it was trained on. Broadening the training corpus may improve representation across broader domains.
- Cross-Modal Application: The results suggest that training large networks to predict the next frame in video collections could potentially lead to unsupervised representations for object, scene, and action classifiers.
Sources
- OriginalUnsupervised sentiment neuron