Skip to content

Research Articles

Token Budgeting in Attention Models: Heterogeneous Partitions

Lina Hartfen (Machine Learning Laboratory, Valehart Institute of Computational Science), Uma Oakhurst (Machine Learning Laboratory, Cairnwell Research Institute)

Vol. 2 No. 1 (2018) · pp. 107–119 · Published 5 July 2018

Abstract

The comparison uses a collection of partitions with different input and resource profiles to evaluate two choices: reserving input capacity for low-frequency but relevant evidence and truncating from the end of every input. All outcomes are synthetic. Each configuration is evaluated on the same 300 cases. In the 75 stress cases, relevant clues must appear outside the first input segment; held-out partitions are selected before configuration so that tuning cannot target their particular failure cases. A case counts as a pass only if it meets this criterion: the held-out prediction must meet its accuracy criterion under the token limit. The comparison holds the training and selection splits fixed across alternatives; evaluation cases are not reused for tuning. Compute or memory assigned to an alternative counts toward its budget even if training does not finish. The comparator passes 231 of 300 cases and the alternative passes 239. For the 75 stress cases alone, the counts are 31 and 42, respectively. The aggregate count does not establish that the alternative is preferable at every operating point. The practical trade-off is that retaining low-frequency content can reduce space for local context. The result describes the chosen case mix. Before applying the finding, a follow-up benchmark would need to vary the share of difficult cases without relaxing the acceptance criteria.

Keywords: attention, long inputs, language models, heterogeneous partitions, synthetic evaluation

References

  1. Belinkov, Y., Durrani, N., Dalvi, F., Sajjad, H., & Glass, J. (2017). What do neural machine translation models learn about morphology? Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, 861–872.
  2. Botha, J. A., & Blunsom, P. (2014). Compositional morphology for word representations and language modelling. Proceedings of the 31st International Conference on Machine Learning, 1899–1907.
  3. Devlin, J., Zbib, R., Huang, Z., Lamar, T., Schwartz, R., & Makhoul, J. (2014). Fast and robust neural network joint models for statistical machine translation. Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, 1370–1380.
  4. Hu, B., Lu, Z., Li, H., & Chen, Q. (2014). Convolutional neural network architectures for matching natural language sentences. Advances in Neural Information Processing Systems, 27, 2042–2050.
  5. Kim, Y., Jernite, Y., Sontag, D., & Rush, A. M. (2016). Character-aware neural language models. Proceedings of the 30th AAAI Conference on Artificial Intelligence, 2741–2749.
  6. Kumar, A., et al. (2015). Ask me anything: Dynamic memory networks for natural language processing. arXiv:1506.07285.
  7. Lange, S., Riedmiller, M., & Voigtländer, A. (2012). Autonomous reinforcement learning on raw visual input data in a real world application. Proceedings of the 2012 International Joint Conference on Neural Networks, 1–8.
  8. Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities improve neural network acoustic models. ICML Workshop on Deep Learning for Audio, Speech and Language Processing.
  9. Merity, S., Keskar, N. S., & Socher, R. (2017). Regularizing and optimizing LSTM language models. arXiv:1708.02182.
  10. Raychev, V., Vechev, M., & Yahav, E. (2014). Code completion with statistical language models. Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, 419–428.
  11. Schwenk, H. (2007). Continuous space language models. Computer Speech & Language, 21(3), 492–518.
  12. Vaswani, A., Zhao, Y., Fossum, V., & Chiang, D. (2013). Decoding with large-scale neural language models improves translation. Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, 1387–1392.
  13. Yang, Z., Yang, D., Dyer, C., He, X., Smola, A., & Hovy, E. (2016). Hierarchical attention networks for document classification. Proceedings of NAACL-HLT 2016, 1480–1489.