{ "paper_id": "2020", "header": { "generated_with": "S2ORC 1.0.0", "date_generated": "2023-01-19T07:12:50.820460Z" }, "title": "An Analysis of Capsule Networks for Part of Speech Tagging in High-and Low-resource Scenarios *", "authors": [ { "first": "Andrew", "middle": [], "last": "Zupon", "suffix": "", "affiliation": { "laboratory": "", "institution": "University of Arizona", "location": {} }, "email": "zupon@email.arizona.edu" }, { "first": "Faiz", "middle": [], "last": "Rafique", "suffix": "", "affiliation": { "laboratory": "", "institution": "University of Arizona", "location": {} }, "email": "faizr@email.arizona.edu" }, { "first": "Mihai", "middle": [], "last": "Surdeanu", "suffix": "", "affiliation": { "laboratory": "", "institution": "University of Arizona", "location": {} }, "email": "msurdeanu@email.arizona.edu" } ], "year": "", "venue": null, "identifiers": {}, "abstract": "Neural networks are a common tool in NLP, but it is not always clear which architecture to use for a given task. Different tasks, different languages, and different training conditions can all affect how a neural network will perform. Capsule Networks (CapsNets) are a relatively new architecture in NLP. Due to their novelty, CapsNets are being used more and more in NLP tasks. However, their usefulness is still mostly untested. In this paper, we compare three neural network architectures-LSTM, CNN, and CapsNet-on a part of speech tagging task. We compare these architectures in both high-and low-resource training conditions and find that no architecture consistently performs the best. Our analysis shows that our CapsNet performs nearly as well as a more complex LSTM under certain training conditions, but not others, and that our CapsNet almost always outperforms our CNN. We also find that our CapsNet implementation shows faster prediction times than the LSTM for Scottish Gaelic but not for Spanish, highlighting the effect that the choice of languages can have on the models.", "pdf_parse": { "paper_id": "2020", "_pdf_hash": "", "abstract": [ { "text": "Neural networks are a common tool in NLP, but it is not always clear which architecture to use for a given task. Different tasks, different languages, and different training conditions can all affect how a neural network will perform. Capsule Networks (CapsNets) are a relatively new architecture in NLP. Due to their novelty, CapsNets are being used more and more in NLP tasks. However, their usefulness is still mostly untested. In this paper, we compare three neural network architectures-LSTM, CNN, and CapsNet-on a part of speech tagging task. We compare these architectures in both high-and low-resource training conditions and find that no architecture consistently performs the best. Our analysis shows that our CapsNet performs nearly as well as a more complex LSTM under certain training conditions, but not others, and that our CapsNet almost always outperforms our CNN. We also find that our CapsNet implementation shows faster prediction times than the LSTM for Scottish Gaelic but not for Spanish, highlighting the effect that the choice of languages can have on the models.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Abstract", "sec_num": null } ], "body_text": [ { "text": "Neural networks have become a common tool in natural language processing (NLP) for many tasks, but are different architectures better suited for different tasks, languages, and/or resources? To try to answer this question, we examine the performance of two common neural network architectures, long short-term memory networks (LSTM) (Greff et al., 2017) and convolutional neural networks (CNN) (LeCun et al., 1989) , against the newer capsule networks (CapsNets), another neural network architecture based on CNNs (Hinton et al., 2011) .", "cite_spans": [ { "start": 333, "end": 353, "text": "(Greff et al., 2017)", "ref_id": "BIBREF2" }, { "start": 394, "end": 414, "text": "(LeCun et al., 1989)", "ref_id": "BIBREF6" }, { "start": 514, "end": 535, "text": "(Hinton et al., 2011)", "ref_id": "BIBREF3" } ], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "While LSTMs and CNNs are common in NLP, capsule networks are relatively new to the field. Due to their recency, it's not always clear if or when they are better than other widely used sequence models. This paper investigates the CapsNet architecture in comparison with LSTMs and CNNs. For our analysis, we apply these three architectures to a part of speech (POS) tagging task, on two languages, and using both low-and high-resource scenarios.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "Much of the focus of NLP research is on resource-rich languages like English. However, the performance of different models can depend on the linguistic properties of the language under study (Bender, 2009) and the amount of training data available. To compare the performance of these architectures under different training conditions, we look at Spanish-another resource-rich language-and Scottish Gaelic-a low-resource language using different amounts of training data. This comparison is a step in the right direction, but it does have the limitations of comparing neural network architectures implemented in different frameworks and only comparing two languages.", "cite_spans": [ { "start": 191, "end": 205, "text": "(Bender, 2009)", "ref_id": "BIBREF0" } ], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "The main contribution of this paper is comparing the LSTM, CNN, and CapsNet architectures across different training conditions. Our analysis finds that none of the architectures consistently performs best across training conditions. This illustrates how different languages and training conditions can inform which architecture is best suited for a given NLP task, and that there is no obviously correct answer.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Introduction", "sec_num": "1" }, { "text": "CapsNets are a relatively new type of neural network. Hinton et al. (2011) introduces the architecture, with modifications by Sabour et al. (2017) (dynamic routing) and Hinton et al. (2018) (EM routing) . A CapsNet is essentially a modified ver-sion of a CNN that trades max pooling for a more data-retentive process called routing by agreement. Instead of the prediction with the highest score getting chosen, the weighted sum of all predictions are considered for classification. Essentially, a Cap-sNet uses convolution to create first round predictions for objects-primary capsules-and then utilizes routing by agreement to predict the presence of higher level objects-secondary capsules.", "cite_spans": [ { "start": 54, "end": 74, "text": "Hinton et al. (2011)", "ref_id": "BIBREF3" }, { "start": 126, "end": 146, "text": "Sabour et al. (2017)", "ref_id": "BIBREF8" }, { "start": 169, "end": 189, "text": "Hinton et al. (2018)", "ref_id": "BIBREF4" }, { "start": 190, "end": 202, "text": "(EM routing)", "ref_id": null } ], "ref_spans": [], "eq_spans": [], "section": "Related Work", "sec_num": "2" }, { "text": "Many implementations of CapsNets are designed for image recognition (Hinton et al., 2011; Sabour et al., 2017; Hinton et al., 2018) . However, the CapsNet architecture is being applied more and more to NLP tasks, including Chinese word segmentation (Li et al., 2018) , and multi-label text classification and question answering (Zhao et al., 2019) . This paper continues this path by investigating how CapsNets compare to other neural network architectures for the task of part of speech tagging.", "cite_spans": [ { "start": 68, "end": 89, "text": "(Hinton et al., 2011;", "ref_id": "BIBREF3" }, { "start": 90, "end": 110, "text": "Sabour et al., 2017;", "ref_id": "BIBREF8" }, { "start": 111, "end": 131, "text": "Hinton et al., 2018)", "ref_id": "BIBREF4" }, { "start": 249, "end": 266, "text": "(Li et al., 2018)", "ref_id": "BIBREF7" }, { "start": 328, "end": 347, "text": "(Zhao et al., 2019)", "ref_id": "BIBREF9" } ], "ref_spans": [], "eq_spans": [], "section": "Related Work", "sec_num": "2" }, { "text": "Our comparison considers two languages: Spanish 1 and Scottish Gaelic 2 . Spanish is a resource-rich language, being the second most spoken language by number native speakers, fourth most spoken language by total number of speakers, and the third or fourth most widely used language on the internet 3 . Scottish Gaelic is a low-resource language, with 57,375 fluent speakers in Scotland per the 2011 census 4 . The Spanish data come from the UD Spanish AnCora treebank 5 . The Scottish Gaelic data come from the UD ARCOSG treebank 6 . Both corpora use 17 part of speech tag classes.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Data", "sec_num": "3" }, { "text": "To study how different low-resource conditions affect training, we artificially create training partitions of different sizes. From the original training data (train100), we create partitions consisting of 50% (train50), 10% (train10), and 1% (train1) of the training sentences. The amount of data for each partition is shown in Table 1 for Spanish and Table 2 for Scottish Gaelic. We use FastText word embeddings (Grave et al., 2018) for both Spanish (2,000,000 words) and Scottish Gaelic (14,318 words). The embedding dimension is 300. Table 2 : Number of sentences, tokens, and average sentence length for each partition of Scottish Gaelic. The n in the train partitions corresponds to the amount (percent) of the original data used for training.", "cite_spans": [ { "start": 414, "end": 434, "text": "(Grave et al., 2018)", "ref_id": "BIBREF1" } ], "ref_spans": [ { "start": 329, "end": 336, "text": "Table 1", "ref_id": "TABREF0" }, { "start": 353, "end": 360, "text": "Table 2", "ref_id": null }, { "start": 538, "end": 545, "text": "Table 2", "ref_id": null } ], "eq_spans": [], "section": "Data", "sec_num": "3" }, { "text": "In this section, we describe the implementation details of our CapsNet, CNN, and LSTM methods. Our CapsNet and CNN implementations build on top of Yeung et al.'s implementation 7 , which was kept as close as possible to the architectures described by Sabour et al. (2017) . Importantly, we tried to keep all three models as close to each other as possible in order to make our comparison as faithful as possible. However, certain differences persist for this project-for example, the CapsNet and CNN are implemented in Python using Tensorflow 8 and Keras 9 , whereas the LSTM is implemented in Scala using DyNet. 10 The hyperparameters for our CapsNet and CNN implementations were chosen to be as close as possible to the original implementation. The hyperparameters of the LSTM were chosen to be a reasonable approximation to the CapsNet and CNN models. It is important to note that our comparison does not attempt to compare the best of the best of each architecture.", "cite_spans": [ { "start": 251, "end": 271, "text": "Sabour et al. (2017)", "ref_id": "BIBREF8" } ], "ref_spans": [], "eq_spans": [], "section": "Approach", "sec_num": "4" }, { "text": "7 https://github.com/Chucooleg/CapsNet_ for_NER 8 https://www.tensorflow.org/ 9 https://keras.io/ 10 We used the implementation from the processors library (https://github.com/clulab/processors), which relies on DyNet (https://dynet.readthedocs. Table 3 : Spanish Precision, Recall, and F1 scores. The scores are an average of 5 different random seeds and their standard deviation, along with the average training/prediction times of each model.", "cite_spans": [], "ref_spans": [ { "start": 246, "end": 253, "text": "Table 3", "ref_id": null } ], "eq_spans": [], "section": "Approach", "sec_num": "4" }, { "text": "Our CapsNet model has two 1D convolutional layers, two routing by agreement capsule layers and one fully connected layer. Both convolutional layers have 256 channels, a kernel size of 3, and a stride of 1. The primary capsule layer has 160 capsules with 8 dimensions, a kernel size of 3 and stride of 1. There are 17 secondary capsules with dimensions of 16 and 3 dynamic routing passes.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "CapsNet Implementation", "sec_num": "4.1" }, { "text": "Our CNN model has three 1D convolutional layers, a max pooling layer, and two fully connected layers. The first two convolutional layers are identical to the first two layers of the CapsNet. The third convolutional layer has 128 channels, size of 3 and stride 1. The two feed-forward layers have a size fo 328 and 192. These settings were chosen to make the CNN implementation as comparable as possible to the CapsNet implementation.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "CNN Implementation", "sec_num": "4.2" }, { "text": "io).", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "CNN Implementation", "sec_num": "4.2" }, { "text": "The LSTM code we used is a reimplementation of the LSTM-CRF approach of Lample et al. (2016) . To make this implementation as similar as possible with the previous two approaches, we: (a) removed the CRF layer, 11 and (b) removed the characterlevel biLSTM encoder from the word embeddings. Thus, the actual LSTM architecture used consists of three layers: (i) an input layer with 300dimensional FastText word embeddings; (ii) one biLSTM intermediate layer, where each LSTM has a hidden state of dimension 128 neurons, and (iii) a linear output layer coupled with a softmax function to output the POS tags.", "cite_spans": [ { "start": 72, "end": 92, "text": "Lample et al. (2016)", "ref_id": "BIBREF5" } ], "ref_spans": [], "eq_spans": [], "section": "LSTM Implementation", "sec_num": "4.3" }, { "text": "In addition to our four training data conditions per language, we evaluate the use of learning the word embeddings during training for all models (\"learn\" vs. \"no learn\"), yielding 24 training conditions per language. We trained all models five times with a different random seed and averaged the results. Each condition trained for 10 epochs, with early stopping after 2 epochs if the loss did not improve. The results are given in Table 3 (Spanish) and Table 4 (Scottish Gaelic). We report Precision, Recall, F1, training time, and prediction time. These results show a few trends:", "cite_spans": [], "ref_spans": [ { "start": 433, "end": 440, "text": "Table 3", "ref_id": null }, { "start": 455, "end": 462, "text": "Table 4", "ref_id": "TABREF3" } ], "eq_spans": [], "section": "Results", "sec_num": "5" }, { "text": "1. The LSTM always outperforms the CapsNet and CNN for Spanish, but the CapsNet and CNN occasionally outperform the LSTM for Scottish Gaelic, whose training dataset is an order of magnitude smaller than the Spanish one.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Results", "sec_num": "5" }, { "text": "The difference in F1 on the no learn train condition between the Spanish 10% and Scottish Gaelic 100% partitions, which have a comparable number of sentences, is greater for the LSTM (down 9.93%) than the Capsnet (down 2.98%) or CNN (up 3.93%). This suggests that properties of the language, not just the amount of data, play a role in performance.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "2.", "sec_num": null }, { "text": "3. The LSTM benefits only slightly from using learned embeddings, while both the CapsNet and CNN get a much larger performance boost. We see this in the Spanish 1% condition, where the LSTM F1 improves by 0.01%, but the CapsNet and CNN models improve by 4.82% and 3.39%, respectively. 4. Another obvious difference is in the model training and prediction times. The training time for the CapsNet and CNN is much slower than the LSTM. However, for the Scottish Gaelic case CapsNets are much faster than the LSTM at prediction time. This is an encouraging result, considering that our CapsNet implementation is in Python, whereas the LSTM is implemented in a faster Scala framework.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "2.", "sec_num": null }, { "text": "Overall, the LSTM performs best in most conditions, but the CapsNet often comes close. The CapsNet also usually outperforms the CNN. These performance differences are potentially offset by faster prediction time, depending on the language. The balance between predictive accuracy, training time, and prediction time can be delicate, especially when looking at low-resource languages. These results suggest that depending on the use case, a Cap-sNet architecture may be preferable to an LSTM, despite the fact that when more resources are available, the LSTM tends to perform the best under the common hyperparameters investigated here.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "2.", "sec_num": null }, { "text": "We also compared different hyperparameters for the LSTM and CapsNet, which is shown in Table 5 . The values we chose for the LSTM hidden state size and the CapsNet capsule layer kernel size perform the best in nearly all conditions.", "cite_spans": [], "ref_spans": [ { "start": 87, "end": 94, "text": "Table 5", "ref_id": "TABREF4" } ], "eq_spans": [], "section": "2.", "sec_num": null }, { "text": "In this paper, we compare the performance of three neural network architectures-LSTM, CNN, and CapsNet-on part of speech tagging and find that LSTMs are not always better under the common hyperparameters investigated. We examine how the best performing model changes under different high-and low-resource training conditions using Spanish and Scottish Gaelic. We show that the relatively new CapsNet architecture performs nearly as well as the more complex LSTM under certain conditions and outperforms the CNN under most conditions we examined. These results suggest that there is no one obviously clear choice for a model architecture, and that the properties of a language and the amount of training data can affect which architecture performs best. Future work should address the limitations of this paper. Specifically, future effort should consider more training conditions, including other languages; the consistency of these results within groups of similar languages; and making the implementation of these architectures closer, to guarantee the performance differences are due to the architecture and not an artifact of how they were implemented.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "Conclusion", "sec_num": "6" }, { "text": "In initial experiments we observed that the CRF layer had a major contribution to other sequence models such as named entity recognition, but no impact on POS tagging.", "cite_spans": [], "ref_spans": [], "eq_spans": [], "section": "", "sec_num": null } ], "back_matter": [], "bib_entries": { "BIBREF0": { "ref_id": "b0", "title": "Linguistically na\u00efve != language independent: Why NLP needs linguistic typology", "authors": [ { "first": "Emily", "middle": [ "M" ], "last": "Bender", "suffix": "" } ], "year": 2009, "venue": "Proceedings of the EACL 2009 Workshop on the Interaction between Linguistics and Computational Linguistics: Virtuous, Vicious or Vacuous?", "volume": "", "issue": "", "pages": "26--32", "other_ids": {}, "num": null, "urls": [], "raw_text": "Emily M. Bender. 2009. Linguistically na\u00efve != lan- guage independent: Why NLP needs linguistic ty- pology. In Proceedings of the EACL 2009 Workshop on the Interaction between Linguistics and Compu- tational Linguistics: Virtuous, Vicious or Vacuous?, pages 26-32, Athens, Greece. Association for Com- putational Linguistics.", "links": null }, "BIBREF1": { "ref_id": "b1", "title": "Learning word vectors for 157 languages", "authors": [ { "first": "Edouard", "middle": [], "last": "Grave", "suffix": "" }, { "first": "Piotr", "middle": [], "last": "Bojanowski", "suffix": "" }, { "first": "Prakhar", "middle": [], "last": "Gupta", "suffix": "" }, { "first": "Armand", "middle": [], "last": "Joulin", "suffix": "" }, { "first": "Tomas", "middle": [], "last": "Mikolov", "suffix": "" } ], "year": 2018, "venue": "Proceedings of the International Conference on Language Resources and Evaluation", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Edouard Grave, Piotr Bojanowski, Prakhar Gupta, Ar- mand Joulin, and Tomas Mikolov. 2018. Learning word vectors for 157 languages. In Proceedings of the International Conference on Language Re- sources and Evaluation (LREC 2018).", "links": null }, "BIBREF2": { "ref_id": "b2", "title": "LSTM: A search space odyssey", "authors": [ { "first": "Klaus", "middle": [], "last": "Greff", "suffix": "" }, { "first": "K", "middle": [], "last": "Rupesh", "suffix": "" }, { "first": "Jan", "middle": [], "last": "Srivastava", "suffix": "" }, { "first": "", "middle": [], "last": "Koutn\u00edk", "suffix": "" }, { "first": "R", "middle": [], "last": "Bas", "suffix": "" }, { "first": "J\u00fcrgen", "middle": [], "last": "Steunebrink", "suffix": "" }, { "first": "", "middle": [], "last": "Schmidhuber", "suffix": "" } ], "year": 2017, "venue": "IEEE Transactions on Neural Networks and Learning Systems", "volume": "28", "issue": "10", "pages": "2222--2232", "other_ids": { "DOI": [ "10.1109/TNNLS.2016.2582924" ] }, "num": null, "urls": [], "raw_text": "Klaus Greff, Rupesh K. Srivastava, Jan Koutn\u00edk, Bas R. Steunebrink, and J\u00fcrgen Schmidhuber. 2017. LSTM: A search space odyssey. IEEE Transac- tions on Neural Networks and Learning Systems, 28(10):2222-2232.", "links": null }, "BIBREF3": { "ref_id": "b3", "title": "Transforming auto-encoders", "authors": [ { "first": "Geoffrey", "middle": [ "E" ], "last": "Hinton", "suffix": "" }, { "first": "Alex", "middle": [], "last": "Krizhevsky", "suffix": "" }, { "first": "Sida", "middle": [ "D" ], "last": "Wang", "suffix": "" } ], "year": 2011, "venue": "Artificial Neural Networks and Machine Learning", "volume": "", "issue": "", "pages": "44--51", "other_ids": { "DOI": [ "10.1007/978-3-642-21735-7_6" ] }, "num": null, "urls": [], "raw_text": "Geoffrey E. Hinton, Alex Krizhevsky, and Sida D. Wang. 2011. Transforming auto-encoders. In Artifi- cial Neural Networks and Machine Learning, pages 44-51. Springer.", "links": null }, "BIBREF4": { "ref_id": "b4", "title": "Matrix capsules with EM routing", "authors": [ { "first": "Geoffrey", "middle": [ "E" ], "last": "Hinton", "suffix": "" }, { "first": "Sara", "middle": [], "last": "Sabour", "suffix": "" }, { "first": "Nicholas", "middle": [], "last": "Frosst", "suffix": "" } ], "year": 2018, "venue": "International Conference on Learning Representations", "volume": "", "issue": "", "pages": "", "other_ids": {}, "num": null, "urls": [], "raw_text": "Geoffrey E. Hinton, Sara Sabour, and Nicholas Frosst. 2018. Matrix capsules with EM routing. In Interna- tional Conference on Learning Representations.", "links": null }, "BIBREF5": { "ref_id": "b5", "title": "Neural architectures for named entity recognition", "authors": [ { "first": "Guillaume", "middle": [], "last": "Lample", "suffix": "" }, { "first": "Miguel", "middle": [], "last": "Ballesteros", "suffix": "" }, { "first": "Sandeep", "middle": [], "last": "Subramanian", "suffix": "" }, { "first": "Kazuya", "middle": [], "last": "Kawakami", "suffix": "" }, { "first": "Chris", "middle": [], "last": "Dyer", "suffix": "" } ], "year": 2016, "venue": "", "volume": "", "issue": "", "pages": "", "other_ids": { "arXiv": [ "arXiv:1603.01360" ] }, "num": null, "urls": [], "raw_text": "Guillaume Lample, Miguel Ballesteros, Sandeep Sub- ramanian, Kazuya Kawakami, and Chris Dyer. 2016. Neural architectures for named entity recognition. arXiv preprint arXiv:1603.01360.", "links": null }, "BIBREF6": { "ref_id": "b6", "title": "Backpropagation applied to handwritten zip code recognition", "authors": [ { "first": "Y", "middle": [], "last": "Lecun", "suffix": "" }, { "first": "B", "middle": [], "last": "Boser", "suffix": "" }, { "first": "J", "middle": [ "S" ], "last": "Denker", "suffix": "" }, { "first": "D", "middle": [], "last": "Henderson", "suffix": "" }, { "first": "R", "middle": [ "E" ], "last": "Howard", "suffix": "" }, { "first": "W", "middle": [], "last": "Hubbard", "suffix": "" }, { "first": "L", "middle": [ "D" ], "last": "", "suffix": "" } ], "year": 1989, "venue": "Neural Computation", "volume": "1", "issue": "4", "pages": "541--551", "other_ids": { "DOI": [ "10.1162/neco.1989.1.4.541" ] }, "num": null, "urls": [], "raw_text": "Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. 1989. Back- propagation applied to handwritten zip code recog- nition. Neural Computation, 1(4):541-551.", "links": null }, "BIBREF7": { "ref_id": "b7", "title": "Capsules based chinese word segmentation for ancient chinese medical books", "authors": [ { "first": "Si", "middle": [], "last": "Li", "suffix": "" }, { "first": "Mingzheng", "middle": [], "last": "Li", "suffix": "" }, { "first": "Yajing", "middle": [], "last": "Xu", "suffix": "" }, { "first": "Zuyi", "middle": [], "last": "Bao", "suffix": "" }, { "first": "Lu", "middle": [], "last": "Fu", "suffix": "" }, { "first": "Yan", "middle": [], "last": "Zhu", "suffix": "" } ], "year": 2018, "venue": "IEEE Access", "volume": "6", "issue": "", "pages": "70874--70883", "other_ids": { "DOI": [ "10.1109/ACCESS.2018.2881280" ] }, "num": null, "urls": [], "raw_text": "Si Li, Mingzheng Li, Yajing Xu, Zuyi Bao, Lu Fu, and Yan Zhu. 2018. Capsules based chinese word seg- mentation for ancient chinese medical books. IEEE Access, 6:70874-70883.", "links": null }, "BIBREF8": { "ref_id": "b8", "title": "Dynamic routing between capsules", "authors": [ { "first": "Sara", "middle": [], "last": "Sabour", "suffix": "" }, { "first": "Nicholas", "middle": [], "last": "Frosst", "suffix": "" }, { "first": "Geoffrey", "middle": [ "E" ], "last": "Hinton", "suffix": "" } ], "year": 2017, "venue": "Advances in Neural Information Processing Systems", "volume": "30", "issue": "", "pages": "3856--3866", "other_ids": {}, "num": null, "urls": [], "raw_text": "Sara Sabour, Nicholas Frosst, and Geoffrey E. Hinton. 2017. Dynamic routing between capsules. In Is- abelle Guyon, Ulrike. Von Luxburg, Samy Bengio, Hanna Wallach, Rob Fergus, S.V.N. Vishwanathan, and Roman Garnett, editors, Advances in Neural In- formation Processing Systems 30, pages 3856-3866. Curran Associates, Inc.", "links": null }, "BIBREF9": { "ref_id": "b9", "title": "Towards scalable and reliable capsule networks for challenging nlp applications", "authors": [ { "first": "Wei", "middle": [], "last": "Zhao", "suffix": "" }, { "first": "Haiyun", "middle": [], "last": "Peng", "suffix": "" }, { "first": "Steffen", "middle": [], "last": "Eger", "suffix": "" }, { "first": "Erik", "middle": [], "last": "Cambria", "suffix": "" }, { "first": "Min", "middle": [], "last": "Yang", "suffix": "" } ], "year": 2019, "venue": "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics", "volume": "", "issue": "", "pages": "", "other_ids": { "DOI": [ "10.18653/v1/p19-1150" ] }, "num": null, "urls": [], "raw_text": "Wei Zhao, Haiyun Peng, Steffen Eger, Erik Cambria, and Min Yang. 2019. Towards scalable and reliable capsule networks for challenging nlp applications. Proceedings of the 57th Annual Meeting of the As- sociation for Computational Linguistics.", "links": null } }, "ref_entries": { "TABREF0": { "html": null, "type_str": "table", "content": "
train10014,305446,14431.2
train507,152255,21335.7
train101,43043,48030.4
train11435,91241.3
dev1,65452,51131.7
test1,72152,80130.7
Partition Sentences Tokens Avg. Sent. Length
train1001,01522,96322.6
train5050710,87021.4
train101011,54315.3
train110676.7
dev6429,94915.5
test5369,94618.6
", "num": null, "text": "Number of sentences, tokens, and average sentence length for each partition of Spanish. The n in the train partitions corresponds to the amount (percent) of the original data used for training." }, "TABREF1": { "html": null, "type_str": "table", "content": "
ModelPRF1Train tPredict t
03)3,222 s165 s
50% of train, caps, no learn92.78 (0.45) 93.58 (0.20) 93.18 (0.31)5,386 s223
50% of train, cnn, no learn92.36 (0.59) 93.54 (0.12) 92.95 (0.29)3,392 s206 s
50% of train, lstm, no learn98.31 (0.03) 98.31 (0.03) 98.31 (0.03)1,566 s175 s
10% of train, caps, no learn88.37 (0.73) 89.48 (0.67) 88.92 (0.56)3,186 s208 s
10% of train, cnn, no learn88.23 (0.60) 89.17 (0.45) 88.70 (0.33)3,373 s191 s
10% of train, lstm, no learn96.89 (0.14) 96.89 (0.14) 96.89 (0.14)613 s170 s
1% of train, caps, no learn76.63 (1.11) 80.62 (0.74) 78.56 (0.30)3,370 s205 s
1% of train, cnn, no learn73.96 (2.66) 74.78 (0.68) 74.34 (1.44)2,898 s187 s
1% of train, lstm, no learn91.79 (0.24) 91.79 (0.24) 91.79 (0.24)375 s162 s
100% of train, caps, learn96.30 (0.35) 95.61 (0.19) 96.00 (0.08) 14,223 s219 s
100% of train, cnn, learn96.01 (0.34) 95.43 (0.15) 95.72 (0.16) 12,794 s211 s
100% of train, lstm, learn98.43 (0.04) 98.43 (0.04) 98.43 (0.04)4,280 s172 s
50% of train, caps, learn95.59 (0.27) 94.68 (0.16) 95.13 (0.09) 11,571 s225 s
50% of train, cnn, learn95.36 (0.10) 94.61 (0.08) 94.98 (0.06) 11,318 s206 s
50% of train, lstm, learn98.17 (0.06) 98.17 (0.06) 98.17 (0.06)1,333 s171 s
10% of train, caps, learn92.45 (0.26) 90.18 (0.32) 91.30 (0.08)3,767 s209 s
10% of train, cnn, learn91.41 (0.42) 89.49 (0.25) 90.44 (0.20)3,832 s191 s
10% of train, lstm, learn96.84 (0.07) 96.84 (0.07) 96.84 (0.07)1,157 s172 s
1% of train, caps, learn84.12 (0.66) 82.65 (0.46) 83.38 (0.24)3,452 s205 s
1% of train, cnn, learn79.71 (0.91) 75.87 (1.01) 77.73 (0.35)2,979 s188 s
1% of train, lstm, learn91.80 (0.21) 91.80 (0.21) 91.80 (0.21)440 s178 s
", "num": null, "text": "100% of train, caps, no learn 93.85 (0.35) 94.47 (0.24) 94.16 (0.23) 9,032 s 218 s 100% of train, cnn, no learn 93.76 (0.40) 94.20 (0.11) 93.98 (0.22) 4,802 s 200 s 100% of train, lstm, no learn 98.54 (0.03) 98.54 (0.03) 98.54 (0." }, "TABREF2": { "html": null, "type_str": "table", "content": "
ModelPRF1Train t Predict t
30)256 s38 s
50% of train, caps, no learn75.90 (1.02) 73.98 (0.47) 74.92 (0.54)809 s18 s
50% of train, cnn, no learn71.97 (1.62) 69.33 (0.80) 70.61 (0.47)616 s15 s
50% of train, lstm, no learn75.36 (0.27) 75.36 (0.27) 75.36 (0.27)119 s37 s
10% of train, caps, no learn49.24 (2.78) 37.36 (1.43) 42.44 (1.35)641 s19 s
10% of train, cnn, no learn54.64 (2.16) 50.04 (1.69) 52.18 (0.64)555 s15 s
10% of train, lstm, no learn53.31 (8.11) 53.31 (8.11) 53.31 (8.11)86 s40 s
1% of train, caps, no learn7.94 (1.40)7.82 (1.28)7.86 (1.26)486 s18 s
1% of train, cnn, no learn16.87 (3.86)8.42 (3.52)10.58 (3.09)546 s16 s
1% of train, lstm, no learn21.37 (3.17) 21.37 (3.17) 21.37 (3.17)44 s35 s
100% of train, caps, learn90.81 (0.35) 87.91 (0.25) 89.34 (0.25) 1,907 s19 s
100% of train, cnn, learn88.82 (0.80) 85.57 (0.50) 87.17 (0.32) 1,742 s16 s
100% of train, lstm, learn89.84 (0.15) 89.84 (0.15) 89.84 (0.15)317 s39 s
50% of train, caps, learn85.38 (0.62) 81.63 (0.22) 83.46 (0.32) 1,285 s18 s
50% of train, cnn, learn82.26 (0.63) 77.95 (0.48) 80.05 (0.54) 1,075 s16 s
50% of train, lstm, learn83.66 (0.57) 83.66 (0.57) 83.66 (0.57)155 s39 s
10% of train, caps, learn55.16 (1.55) 46.21 (2.04) 50.26 (1.45)717 s19 s
10% of train, cnn, learn57.84 (3.16) 55.13 (1.53) 56.37 (1.26)629 s15 s
10% of train, lstm, learn65.49 (0.67) 65.49 (0.67) 65.49 (0.67)101 s40 s
1% of train, caps, learn8.31 (1.99)8.55 (2.25)8.42 (2.10)509 s19 s
1% of train, cnn, learn18.23 (3.47) 11.63 (5.57) 13.63 (5.31)544 s16 s
1% of train, lstm, learn21.37 (3.17) 21.37 (3.17) 21.37 (3.17)52 s36 s
", "num": null, "text": "100% of train, caps, no learn 82.34 (0.82) 80.58 (0.22) 81.45 (0.32) 1,020 s 19 s 100% of train, cnn, no learn 79.40 (1.12) 77.19 (0.96) 78.27 (0.53) 651 s 16 s 100% of train, lstm, no learn 81.86 (0.30) 81.86 (0.30) 81.86 (0." }, "TABREF3": { "html": null, "type_str": "table", "content": "
LSTM Hidden State SizeSpanish-100 Spanish-1 Scottish Gaelic-100 Scottish Gaelic-1
6498.4091.7689.4618.55
12898.4391.8089.8421.37
25698.4291.4489.2515.02
Capsule Layer Kernel Size Spanish-100 Spanish-1 Scottish Gaelic-100 Scottish Gaelic-1
396.0083.3889.348.42
596.0082.6989.219.92
795.9982.5988.626.06
", "num": null, "text": "Scottish Gaelic Precision, Recall, and F1 scores. The scores are an average of 5 different random seeds and their standard deviation, along with the average training/prediction times of each model." }, "TABREF4": { "html": null, "type_str": "table", "content": "", "num": null, "text": "F1 scores for different hyperparameter choices for LSTM hidden state size and CapsNet capsule layer kernel size on the Spanish and Scottish Gaelic 100% and 1% learned embeddings training conditions. The hyperparameter values in italics (hidden state size 128 and kernel size 3) are the values chosen for our bigger comparison." } } } }