Learning to Generate Reviews and Discovering Sentiment
Paper · 2017 · Alec Radford, Rafal Jozefowicz and Ilya Sutskever
Summary
The authors ask whether unsupervised sentence representations do poorly on tasks only because of domain mismatch and limited model capacity. To test this, they trained a byte-level language model on a corpus close to the target task: a single-layer multiplicative LSTM (mLSTM) with 4096 units, run for one epoch over the de-duplicated Amazon product review dataset of McAuley et al. The model only predicts the next UTF-8 byte. Its final cell state is then used as a feature vector for a logistic regression classifier, following the Kiros et al. protocol. The representation sets a new state of the art on the binary Stanford Sentiment Treebank and on the MR and CR sentiment sets. It also needs very few labels to match strong fully supervised baselines. The striking finding is that one hidden unit by itself tracks sentiment. Clamping that unit to a positive or negative value steers generated reviews toward that polarity. The work shows that a plain language modelling objective can produce interpretable, controllable features. It also shows how strongly those features depend on the training distribution.
Key points
- Training corpus: Amazon reviews (May 1996 to July 2014), over 82 million reviews and over 38 billion bytes, split into 1000 shards with one shard each held out for validation and test.
- Training setup:
- Mini-batches of 128 subsequences of length 256, for 1 million updates.
- Adam starting at 5e-4 with linear decay, plus weight normalization.
- 4 Pascal Titan X GPUs for about one month.
- Final result: 1.12 bits per byte.
- Table 1 accuracies for the byte mLSTM:
- MR 86.9 and CR 91.4, both clear state-of-the-art gains.
- SUBJ 94.6 and MPQA 88.5, where the model shows no edge.
- L1 rather than L2 regularization worked better for the logistic regression when labels were very scarce.
- Weak transfer outside the training domain:
- Only competitive on document-level Yelp reviews and on MRPC paraphrase.
- Poor on SICK relatedness, which is built from image and video captions.
Interesting ideas
- I1. To keep architecture search affordable on a huge corpus, the authors ranked small candidate models by their generative quality after a single pass, then scaled up only the winner; this cheap proxy saves compute when the full run takes weeks.
- I2. A sparse L1 linear probe over a learned state can reveal that a single dimension carries a whole concept, which turns a black box into something a person can inspect and name.
- I3. Clamping one internal unit during generation and watching how the output's polarity shifts is a causal test of what that unit means, not just a correlation.
- I4. Reporting accuracy as a curve over the number of labeled examples, averaged over 100 runs with 10th and 90th percentile bands, shows data efficiency and variance more honestly than a single score.
- I5. The results show that a representation transfers well only to text resembling its training corpus (reviews helped review sentiment but failed on captions), so corpus choice should follow the target genre.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (learn): Before long parser or teacher-distillation runs, compare candidate configurations on one short pass over the silver data and promote only the best one.
- I2 (frames): A sentiment cue found this way could serve as one explainable, separately inspectable signal for irony or implicature detection, never as the main analysis.
- I3 (back): Fix a single attribute in the meaning graph (for example, an evaluative stance) before regenerating text, and check that only that property changes in the output.
- I4 (learn): Evaluate repair rules or tagger retraining with label-count curves and percentile bands, so that gains from a small amount of gold data are visible and trustworthy.
- I5 (answer): When building silver data or knowledge for fable and school-test QA, draw from narrative and educational text rather than generic web or review text.
Fields, topics and concepts
Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 19,503 worksArtificial Intelligence · 18,805 worksArts and Humanities · 17,959 worksLanguage and Linguistics · 17,789 works
Topics 1Research subjects and languages the work is about.Sentiment & emotion · 1,037 works
Cite
Cite as Alec Radford, Rafal Jozefowicz and Ilya Sutskever. 2017. Learning to Generate Reviews and Discovering Sentiment. arXiv:1704.01444.
@misc{radford2017learning,
title = {{Learning to Generate Reviews and Discovering Sentiment}},
author = {Alec Radford, Rafal Jozefowicz and Ilya Sutskever},
year = {2017},
doi = {10.48550/arxiv.1704.01444},
eprint = {1704.01444},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1704.01444}
}References
- Ba, Jimmy Lei, Kiros, Jamie Ryan, and Hinton, Geoffrey E. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. OpenAlex ↗ · Scholar ↗
- Bengio, Yoshua, Courville, Aaron, and Vincent, Pascal. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 350 (8):0 1798–1828, 2013. our card
- Blei, David M, Ng, Andrew Y, and Jordan, Michael I. Latent dirichlet allocation. Journal of machine Learning research, 30 (Jan):0 993–1022, 2003. OpenAlex ↗ · Scholar ↗
- Chen, Danqi and Manning, Christopher D. A fast and accurate dependency parser using neural networks. In EMNLP, pp. 740–750, 2014. our card
- Coates, Adam, Lee, Honglak, and Ng, Andrew Y. An analysis of single-layer networks in unsupervised feature learning. Ann Arbor, 10010 (48109):0 2, 2010. OpenAlex ↗ · Scholar ↗
- Collobert, Ronan, Weston, Jason, Bottou, Léon, Karlen, Michael, Kavukcuoglu, Koray, and Kuksa, Pavel. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 120 (Aug):0 2493–2537, 2011. our card
- Dai, Andrew M and Le, Quoc V. Semi-supervised sequence learning. In Advances in Neural Information Processing Systems, pp. 3079–3087, 2015. our card
- Dieng, Adji B, Wang, Chong, Gao, Jianfeng, and Paisley, John. Topicrnn: A recurrent neural network with long-range semantic dependency. arXiv preprint arXiv:1611.01702, 2016. OpenAlex ↗ · Scholar ↗
- Dolan, Bill, Quirk, Chris, and Brockett, Chris. Unsupervised construction of large paraphrase corpora: Exploiting massively parallel news sources. In Proceedings of the 20th international conference on Computational Linguistics, pp. 350. Association for Computational Linguistics, 2004. our card
- Dong, Li, Huang, Shaohan, Wei, Furu, Lapata, Mirella, Zhou, Ming, and Ke, Xu. Learning to generate product reviews from attributes. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, pp. 623–632. Association for Computational Linguistics, 2017. OpenAlex ↗ · Scholar ↗
- Goodfellow, Ian, Bengio, Yoshua, and Courville, Aaron. Deep learning. 2016. OpenAlex ↗ · Scholar ↗
- Hill, Felix, Cho, Kyunghyun, and Korhonen, Anna. Learning distributed representations of sentences from unlabelled data. arXiv preprint arXiv:1602.03483, 2016. our card
- Hinton, Geoffrey, Deng, Li, Yu, Dong, Dahl, George E, Mohamed, Abdel-rahman, Jaitly, Navdeep, Senior, Andrew, Vanhoucke, Vincent, Nguyen, Patrick, Sainath, Tara N, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 290 (6):0 82–97, 2012. OpenAlex ↗ · Scholar ↗
- Hinton, Geoffrey E and Salakhutdinov, Ruslan R. Reducing the dimensionality of data with neural networks. science, 3130 (5786):0 504–507, 2006. OpenAlex ↗ · Scholar ↗
- Hu, Minqing and Liu, Bing. Mining and summarizing customer reviews. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 168–177. ACM, 2004. OpenAlex ↗ · Scholar ↗
- Hu, Zhiting, Yang, Zichao, Liang, Xiaodan, Salakhutdinov, Ruslan, and Xing, Eric P. Controllable text generation. arXiv preprint arXiv:1703.00955, 2017. OpenAlex ↗ · Scholar ↗
- Huang, Fu Jie, Boureau, Y-Lan, LeCun, Yann, et al. Unsupervised learning of invariant feature hierarchies with applications to object recognition. In Computer Vision and Pattern Recognition, 2007. CVPR'07. IEEE Conference on, pp. 1–8. IEEE, 2007. OpenAlex ↗ · Scholar ↗
- Hutter, Marcus. The human knowledge compression contest. 2006. URL http://prize. hutter1. net, 2006. OpenAlex ↗ · Scholar ↗
- Jozefowicz, Rafal, Vinyals, Oriol, Schuster, Mike, Shazeer, Noam, and Wu, Yonghui. Exploring the limits of language modeling. arXiv preprint arXiv:1602.02410, 2016. our card
- Karpathy, Andrej, Johnson, Justin, and Fei-Fei, Li. Visualizing and understanding recurrent networks. arXiv preprint arXiv:1506.02078, 2015. our card
- Kim, Yoon. Convolutional neural networks for sentence classification. arXiv preprint arXiv:1408.5882, 2014. our card
- Kingma, Diederik and Ba, Jimmy. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. our card
- Kiros, Ryan, Zhu, Yukun, Salakhutdinov, Ruslan R, Zemel, Richard, Urtasun, Raquel, Torralba, Antonio, and Fidler, Sanja. Skip-thought vectors. In Advances in neural information processing systems, pp. 3294–3302, 2015. OpenAlex ↗ · Scholar ↗
- Krause, Ben, Lu, Liang, Murray, Iain, and Renals, Steve. Multiplicative lstm for sequence modelling. arXiv preprint arXiv:1609.07959, 2016. OpenAlex ↗ · Scholar ↗
- Krizhevsky, Alex, Sutskever, Ilya, and Hinton, Geoffrey E. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. our card
- Kumar, Ankit, Irsoy, Ozan, Su, Jonathan, Bradbury, James, English, Robert, Pierce, Brian, Ondruska, Peter, Gulrajani, Ishaan, and Socher, Richard. Ask me anything: Dynamic memory networks for natural language processing. CoRR, abs/1506.07285, 2015. our card
- Le, Quoc V. Building high-level features using large scale unsupervised learning. In Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, pp. 8595–8598. IEEE, 2013. OpenAlex ↗ · Scholar ↗
- Li, Jiwei, Monroe, Will, and Jurafsky, Dan. Understanding neural networks through representation erasure. arXiv preprint arXiv:1612.08220, 2016. our card
- Looks, Moshe, Herreshoff, Marcello, Hutchins, DeLesley, and Norvig, Peter. Deep learning with dynamic computation graphs. arXiv preprint arXiv:1702.02181, 2017. OpenAlex ↗ · Scholar ↗
- Maas, Andrew L, Daly, Raymond E, Pham, Peter T, Huang, Dan, Ng, Andrew Y, and Potts, Christopher. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies-Volume 1, pp. 142–150. Association for Computational Linguistics, 2011. our card
- Madnani, Nitin, Tetreault, Joel, and Chodorow, Martin. Re-examining machine translation metrics for paraphrase identification. In Proceedings of the 2012 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 182–190. Association for Computational Linguistics, 2012. our card
- Marcus, Mitchell P, Marcinkiewicz, Mary Ann, and Santorini, Beatrice. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 190 (2):0 313–330, 1993. our card
- Marelli, Marco, Bentivogli, Luisa, Baroni, Marco, Bernardi, Raffaella, Menini, Stefano, and Zamparelli, Roberto. Semeval-2014 task 1: Evaluation of compositional distributional semantic models on full sentences through semantic relatedness and textual entailment. SemEval-2014, 2014. our card
- McAuley, Julian, Pandey, Rahul, and Leskovec, Jure. Inferring networks of substitutable and complementary products. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 785–794. ACM, 2015. OpenAlex ↗ · Scholar ↗
- Mesnil, Grégoire, Mikolov, Tomas, Ranzato, Marc'Aurelio, and Bengio, Yoshua. Ensemble of generative and discriminative techniques for sentiment analysis of movie reviews. arXiv preprint arXiv:1412.5335, 2014. OpenAlex ↗ · Scholar ↗
- Mikolov, Tomas, Yih, Wen-tau, and Zweig, Geoffrey. Linguistic regularities in continuous space word representations. 2013. our card
- Miyato, Takeru, Dai, Andrew M, and Goodfellow, Ian. Adversarial training methods for semi-supervised text classification. arXiv preprint arXiv:1605.07725, 2016. our card
- Munkhdalai, Tsendsuren and Yu, Hong. Neural semantic encoders. arXiv preprint arXiv:1607.04315, 2016. OpenAlex ↗ · Scholar ↗
- Ng, Andrew Y. Feature selection, l 1 vs. l 2 regularization, and rotational invariance. In Proceedings of the twenty-first international conference on Machine learning, pp. 78. ACM, 2004. OpenAlex ↗ · Scholar ↗
- Olshausen, Bruno A and Field, David J. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision research, 370 (23):0 3311–3325, 1997. OpenAlex ↗ · Scholar ↗
- Oquab, Maxime, Bottou, Leon, Laptev, Ivan, and Sivic, Josef. Learning and transferring mid-level image representations using convolutional neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1717–1724, 2014. OpenAlex ↗ · Scholar ↗
- Pang, Bo and Lee, Lillian. A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts. In Proceedings of the 42nd annual meeting on Association for Computational Linguistics, pp. 271. Association for Computational Linguistics, 2004. our card
- Pang, Bo and Lee, Lillian. Seeing stars: Exploiting class relationships for sentiment categorization with respect to rating scales. In Proceedings of the 43rd annual meeting on association for computational linguistics, pp. 115–124. Association for Computational Linguistics, 2005. our card
- Pennington, Jeffrey, Socher, Richard, and Manning, Christopher D. Glove: Global vectors for word representation. In EMNLP, volume 14, pp. 1532–1543, 2014. our card
- Salimans, Tim and Kingma, Diederik P. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in Neural Information Processing Systems, pp. 901–901, 2016. our card
- Socher, Richard, Perelygin, Alex, Wu, Jean Y, Chuang, Jason, Manning, Christopher D, Ng, Andrew Y, Potts, Christopher, et al. Recursive deep models for semantic compositionality over a sentiment treebank. Citeseer, 2013. our card
- Tai, Kai Sheng, Socher, Richard, and Manning, Christopher D. Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075, 2015. our card
- Vincent, Pascal, Larochelle, Hugo, Bengio, Yoshua, and Manzagol, Pierre-Antoine. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pp. 1096–1103. ACM, 2008. OpenAlex ↗ · Scholar ↗
- Wang, Sida and Manning, Christopher D. Baselines and bigrams: Simple, good sentiment and topic classification. In Proceedings of the 50th Annual Meeting of the Association for Computational Linguistics: Short Papers-Volume 2, pp. 90–94. Association for Computational Linguistics, 2012. our card
- Wiebe, Janyce, Wilson, Theresa, and Cardie, Claire. Annotating expressions of opinions and emotions in language. Language resources and evaluation, 390 (2):0 165–210, 2005. OpenAlex ↗ · Scholar ↗
- Wieting, John, Bansal, Mohit, Gimpel, Kevin, and Livescu, Karen. Towards universal paraphrastic sentence embeddings. arXiv preprint arXiv:1511.08198, 2015. our card
- Wu, Yonghui, Schuster, Mike, Chen, Zhifeng, Le, Quoc V, Norouzi, Mohammad, Macherey, Wolfgang, Krikun, Maxim, Cao, Yuan, Gao, Qin, Macherey, Klaus, et al. Google's neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016. OpenAlex ↗ · Scholar ↗
- Yergeau, Francois. Utf-8, a transformation format of iso 10646. 2003. OpenAlex ↗ · Scholar ↗
- Zeiler, Matthew D and Fergus, Rob. Visualizing and understanding convolutional networks. In European conference on computer vision, pp. 818–833. Springer, 2014. our card
- Zhang, Xiang, Zhao, Junbo, and LeCun, Yann. Character-level convolutional networks for text classification. In Advances in neural information processing systems, pp. 649–657, 2015. our card
- Zhao, Han, Lu, Zhengdong, and Poupart, Pascal. Self-adaptive hierarchical sentence model. arXiv preprint arXiv:1504.05070, 2015. OpenAlex ↗ · Scholar ↗
- Zhou, Bolei, Khosla, Aditya, Lapedriza, Agata, Oliva, Aude, and Torralba, Antonio. Object detectors emerge in deep scene cnns. arXiv preprint arXiv:1412.6856, 2014. OpenAlex ↗ · Scholar ↗
This page in Markdown https://md.research.elamur.ai/free/en/papers/radford-2017-learning-generate-reviews-discovering-sentiment/