Unsupervised sentiment neuron
# Unsupervised Sentiment Neuron: Learning Sentiment by Predicting the Next Character OpenAI researchers trained a multiplicative LSTM with 4,096 units to predict the next character in 82 million Amazon reviews, without any sentiment labels. The resulting representation contains a single unit that tracks sentiment with high precision. A linear model built on these features reaches state-of-the-art accuracy on the Stanford Sentiment Treebank while using 30 to 100 times fewer labeled examples than prior supervised systems. The authors argue that large next-step prediction models can learn useful, interpretable representations as a side effect of this simple objective. ## Training Setup - A multiplicative LSTM with 4,096 units was trained on 82 million Amazon reviews to predict the next character. - Training took one month on four NVIDIA Pascal GPUs and processed about 12,500 characters per second. - The 4,096-unit state vector serves as a feature representation of the input text. - A sentiment classifier was built by learning a linear combination of these units from labeled data. ## Discovery of the Sentiment Neuron - While fitting an L1-regularized linear model, the researchers noticed it relied on very few units. - Further analysis revealed a single unit, dubbed the "sentiment neuron," that is highly predictive of sentiment. - Because this neuron can be directly overwritten, the model offers a simple control over the sentiment of generated text. - Visualizing the neuron character by character shows large shifts on strongly polar words such as "best" and "horrendous," and also after sentence endings, where the neuron summarizes the sentiment of the completed clause. ## Results - On the Stanford Sentiment Treebank, the approach reaches 91.8% accuracy, up from the previous best of 90.2%. - The L1-regularized model matches a multichannel CNN with only 11 labeled examples, and matches CT-LSTM ensembles with 232 examples. Each comparison baseline was trained on 6,920 examples. ## Implications for Unsupervised Learning - Labeled data is expensive to collect at scale, so tasks without strong economic incentives often lack good models. - Learning good general representations without labels has long been a goal, and this work suggests next-step prediction on large data is a promising route. - The authors believe the effect is a general property of large networks trained to predict their next input, not specific to this architecture. ## Limitations and Future Directions - Performance drops on long documents, which the authors attribute to the character-level model struggling to retain information over hundreds to thousands of timesteps. Hierarchical models that adapt their timescales are suggested as a remedy. - The representation weakens as input text diverges from the review domain, so broader training corpora need to be tested. - The authors propose extending the idea to video, training models to predict future frames in order to learn representations for object, scene, and action classification.