Elamur Research
☰
home / papers / 2018 / AllenNLP: A Deep Semantic Natural Language Processing Platform

AllenNLP: A Deep Semantic Natural Language Processing Platform

Written for the Research library (claude-opus-5-5) from the paper text, in our own words: the license "arXiv — non-exclusive licence to distribute" does not allow redistributing the text itself. Original — arxiv.org/pdf/1803.07640

Summary

Code for neural NLP research is often hard to rerun, debug, and extend. Important hyperparameters get lost among low-level details, and baselines are frequently rebuilt from scratch. A team from the Allen Institute for AI introduces AllenNLP, an open-source PyTorch library that makes deep learning experiments in NLP easier to specify, reproduce, and share.

Its data layer represents each example as an Instance made of typed Fields. Batching by sequence length, padding, and shuffling happen automatically. Models are built from interchangeable NLP-specific components, such as token embedders, encoders, and span extractors. One model class therefore covers many variants, and a declarative configuration file selects among them without code changes.

The library includes reference reimplementations of strong models for SRL, machine comprehension, textual entailment, and constituency parsing, along with interactive web demos. Their scores match or exceed the original publications. The work matters as shared infrastructure: it lowers the entry barrier, encourages controlled comparisons, and gives the field dependable baselines.

Key points

  • Built on PyTorch and released under Apache 2.0. It installs via pip, Docker, or GitHub and maintains test coverage above 90%.
  • Core abstractions are TokenEmbedder, Seq2SeqEncoder, Seq2VecEncoder, and SpanExtractor. They are wired up through a HOCON (JSON with comments) configuration file and a registry, and missing required settings raise a ConfigurationError.
  • The SRL reimplementation of the He et al. (2017) deep BiLSTM reaches 78.9 F1 on English Ontonotes 5.0 in the CoNLL 2011/12 format. A BiDAF model is provided for SQuAD.
  • The decomposable attention model scores 86.4% accuracy on the SNLI 1.0 test set. That is about 2 points above typical public implementations, a gain attributed to ELMo embeddings.
  • With ELMo, the Stern et al. (2017) constituency parser rises from 92.6 to 94.11 F1 on the Penn Treebank, roughly a 20% relative error reduction.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Linguistics & languages

Cited by

552 papers of our library cite it (of the 140673 whose bibliographies we read); 38 of them have a page here, 514 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.1803.07640 · arXiv 1803.07640

@misc{gardner2018allennlp,
  title = {{AllenNLP: A Deep Semantic Natural Language Processing Platform}},
  author = {Gardner, Matt and Grus, Joel and Neumann, Mark and Tafjord, Oyvind and Dasigi, Pradeep and Liu, Nelson and Peters, Matthew and Schmitz, Michael and Zettlemoyer, Luke},
  year = {2018},
  doi = {10.48550/arxiv.1803.07640},
  eprint = {1803.07640},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1803.07640}
}

References

27 references, 14 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Martı́n Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. 2016. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. CoRR abs/1603.04467. find our card
  2. James Bergstra, Olivier Breuleux, Frédéric Bastien, Pascal Lamblin, Razvan Pascanu, Guillaume Desjardins, Joseph Turian, David Warde-Farley, and Yoshua Bengio. 2010. Theano: A cpu and gpu math compiler in python. In Proc. 9th Python in Science Conf, pages 1–7. find
  3. Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics. find
  4. Tianqi Chen, Mu Li, Yutian Li, Min Lin, Naiyan Wang, Minjie Wang, Tianjun Xiao, Bing Xu, Chiyuan Zhang, and Zheng Zhang. 2015. Mxnet: A flexible and efficient machine learning library for heterogeneous distributed systems. CoRR abs/1512.01274. find our card
  5. Jianpeng Cheng, Li Dong, and Mirella Lapata. 2016. Long short-term memory-networks for machine reading. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP). find our card
  6. Kyunghyun Cho, Bart van Merrienboer, Çaglar Gülçehre, Dzmitry Bahdanau, Fethi Bougares, Graham Neubig, Chris Dyer, Yoav Goldberg, Austin Holger Schwenk, and Yoshua Bengio. 2014. Matthews, Waleed Ammar, Antonios Anastasopou-Learning phrase representations using RNN encoder-decoder for statistical… find our card
  7. François Chollet et al. 2015. Keras. Martha Palmer, Daniel Gildea, and Paul Kingsbury. https://keras.io.2005. The proposition bank: An annotated corpus of semantic roles. Computational linguistics, Christopher T Clark and Matthew Gardner. 2017. Sim-31(1):71–106. ple and effective multi-paragraph re… ↗ our card
  8. Luheng He, Kenton Lee, Mike Lewis, and Luke Zettlemoyer. 2017. Deep semantic role labeling: What works and whats next. In Proceedings of the Association for Computational Linguistics (ACL). find our card
  9. Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural computation, 9(8):1735–1780. find
  10. Jeremy Howard and Sebastian Ruder. 2018. Fine-tuned language models for text classification. CoRR, abs/1801.06146. find
  11. Guillaume Klein, Yoon Kim, Yuntian Deng, Jean Senellart, and Alexander M. Rush. 2017. Opennmt: Open-source toolkit for neural machine translation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL, pages 67–72. find our card
  12. Jayant Krishnamurthy, Pradeep Dasigi, and Matthew Gardner. 2017. Neural semantic parsing with type constraints for semi-structured tables. In EMNLP. find
  13. Kenton Lee, Luheng He, Mike Lewis, and Luke Zettlemoyer. 2017a. End-to-end neural coreference resolution. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP). find our card
  14. Kenton Lee, Omer Levy, and Luke Zettlemoyer. 2017b. Recurrent additive networks. CoRR abs/1705.07393. — [arXiv:1705.07393](https://arxiv.org/abs/1705.07393) find
  15. Christopher D Manning, Mihai Surdeanu, John Bauer, Jenny Rose Finkel, Steven Bethard, and David Mc-Closky. 2014. The stanford corenlp natural language processing toolkit. In Proceedings of the Association for Computational Linguistics (ACL) (System Demonstrations). find our card
  16. Alexander H. Miller, Will Feng, Dhruv Batra, Antoine Bordes, Adam Fisch, Jiasen Lu, Devi Parikh, and Jason Weston. 2017. Parlai: A dialog research software platform. In Proceedings of the Conference on Empirical Methods in Natural Language Processing, EMNLP, pages 79–84. find our card
  17. Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. 2017. Automatic differentiation in pytorch. In NIPS-W. find
  18. F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:282… find
  19. Matthew E Peters, Waleed Ammar, Chandra Bhagavatula, and Russell Power. 2017. Semi-supervised sequence tagging with bidirectional language models. In Proceedings of the Association for Computational Linguistics (ACL). find our card
  20. Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matthew Gardner, Christopher T Clark, Kenton Lee, and Luke S. Zettlemoyer. 2018. Deep contextualized word representations. CoRR, abs/1802.05365. find
  21. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. Squad: 100,000+ questions for machine comprehension of text. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP). find our card
  22. Minjoon Seo, Aniruddha Kembhavi, Ali Farhadi, and Hannaneh Hajishirzi. 2017. Bidirectional attention flow for machine comprehension. find our card
  23. Mitchell Stern, Jacob Andreas, and Dan Klein. 2017. A minimal span-based neural constituency parser. In ACL. find our card
  24. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In NIPS. find
  25. Ian H. Witten and Eibe Frank. 1999. Data mining: Practical machine learning tools and techniques with java implementations. find
  26. Dong Yu, Adam Eversole, Mike Seltzer, Kaisheng Yao, Zhiheng Huang, Brian Guenter, Oleksii Kuchaiev, Yu Zhang, Frank Seide, Huaming Wang, et al. 2014. An introduction to computational networks and the computational network toolkit. Microsoft Technical Report MSR-TR-2014–112. find
  27. Jie Zhou and Wei Xu. 2015. End-to-end learning of semantic role labeling using recurrent neural networks. In Proceedings of the Association for Computational Linguistics (ACL). find