Understanding Convolutional Neural Networks for Text Classification
34256Authors
nan
Abstract
AbstractWe present an analysis into the inner workings of Convolutional Neural Networks (CNNs) for processing text. CNNs used for computer vision can be interpreted by projecting filters into image space, but for discrete sequence inputs CNNs remain a mystery. We aim to understand the method by which the networks process and classify text. We examine common hypotheses to this problem: that filters, accompanied by global max-pooling, serve as ngram detectors. We show that filters may capture several different semantic classes of ngrams by using different activation patterns, and that global max-pooling induces behavior which separates important ngrams from the rest. Finally, we show practical use cases derived from our findings in the form of model interpretability (explaining a trained model by deriving a concrete identity for each filter, bridging the gap between visualization tools in vision tasks and NLP) and prediction interpretability (explaining predictions).
Keywords
Full Content
Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 56–65 Brussels, Belgium, November 1, 2018. c⃝2018 Association for Computational Linguistics 56 Understanding Convolutional Neural Networks for Text Classification Alon Jacovi1,2 Oren Sar Shalom2,3 1 Computer Science Department, Bar Ilan Univesity, Israel 2 IBM Research, Haifa, Israel 3 Intuit, Hod HaSharon, Israel 4 Allen Institute for Artificial Intelligence {alonjacovi,oren.sarshalom,yoav.goldberg}@gmail.com Yoav Goldberg1,4 Abstract We present an analysis into the inner workings of Convolutional Neural Networks (CNNs) for processing text. CNNs used for computer vi- sion can be interpreted by projecting filters into image space, but for discrete sequence in- puts CNNs remain a mystery. We aim to un- derstand the method by which the networks process and classify text. We examine com- mon hypotheses to this problem: that filters, accompanied by global max-pooling, serve as ngram detectors. We show that filters may capture several different semantic classes of ngrams by using different activation patterns, and that global max-pooling induces behav- ior which separates important ngrams from the rest. Finally, we show practical use cases de- rived from our findings in the form of model interpretability (explaining a trained model by deriving a concrete identity for each filter, bridging the gap between visualization tools in vision tasks and NLP) and prediction inter- pretability (explaining predictions). 1 Introduction Convolutional Neural Networks (CNNs), origi- nally invented for computer vision, have been shown to achieve strong performance on text clas- sification tasks (Bai et al., 2018; Kalchbrenner et al., 2014; Wang et al., 2015; Zhang et al., 2015; Johnson and Zhang, 2015; Iyyer et al., 2015) as well as other traditional Natural Lan- guage Processing (NLP) tasks (Collobert et al., 2011), even when considering relatively simple one-layer models (Kim, 2014). As with other architectures of neural networks, explaining the learned functionality of CNNs is still an active research area. The ability to inter- pret neural models can be used to increase trust in model predictions, analyze errors or improve the model (Ribeiro et al., 2016). The problem of inter- pretability in machine learning can be divided into two concrete tasks: Given a trained model, model interpretability aims to supply a structured expla- nation which captures what the model has learned. Given a trained model and a single example, pre- diction interpretability aims to explain how the model arrived at its prediction. These can be fur- ther divided into white-box and black-box tech- niques. While recent works have begun to sup- ply the means of interpreting predictions (Alvarez- Melis and Jaakkola, 2017; Lei et al., 2016; Guo et al., 2018), interpreting neural NLP models re- mains an under-explored area. Accompanying their rising popularity, CNNs have seen multiple advances in interpretability when used for computer vision tasks (Zeiler and Fergus, 2014). These techniques unfortunately do not trivially apply to discrete sequences, as they assume a continuous input space used to represent images. Intuitions about how CNNs work on an abstract level also may not carry over from image inputs to text—for example, …
Content truncated to 500 words
Labeled Text
AbstractWe present an analysis into the inner workings of Convolutional Neural Networks (CNNs) for processing text. CNNs used for computer vision can be interpreted by projecting filters into image space, but for discrete sequence inputs CNNs remain a mystery. We aim to understand the method by which the networks process and classify text. We examine common hypotheses to this problem: that filters, accompanied by global max-pooling, serve as ngram detectors. We show that filters may capture several different semantic classes of ngrams by using different activation patterns, and that global max-pooling induces behavior which separates important ngrams from the rest. Finally, we show practical use cases derived from our findings in the form of model interpretability (explaining a trained model by deriving a concrete identity for each filter, bridging the gap between visualization tools in vision tasks and NLP) and prediction interpretability (explaining predictions).
Publication Details
- Paper ID:
- 34256
- Year:
- 2018
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan