Applying Machine Learning to the Task of Generating Search Queries

Main Article Content

Abstract

In this paper we research two modifications of recurrent neural networks – Long Short-Term Memory networks and networks with Gated Recurrent Unit with the addition of an attention mechanism to both networks, as well as the Transformer model in the task of generating queries to search engines. GPT-2 by OpenAI was used as the Transformer, which was trained on user queries. Latent-semantic analysis was carried out to identify semantic similarities between the corpus of user queries and queries generated by neural networks. The corpus was convert-ed into a bag of words format, the TFIDF model was applied to it, and a singular value decomposition was performed. Semantic similarity was calculated based on the cosine measure. Also, for a more complete evaluation of the applicability of the models to the task, an expert analysis was carried out to assess the coherence of words in artificially created queries.

Article Details

References

1. Van Deemter K., Krahmer E., Theune M. Real vs. template-based natural language generation: a false opposition? URL: https://wwwhome.ewi.utwente.nl/~theune/PUBS/templates-squib.pdf
2. Xie Z. Neural Text Generation: A Practical Guide.
URL: https://arxiv.org/pdf/1711.09534.pdf
3. A Comprehensive Guide to Natural Language Generation, 2019. URL: https://medium.com/sciforce/a-comprehensive-guide-to-natural-language-generation-dd63a4b6e548
4. Arrington M. AOL proudly releases massive amounts of user search data, 2006. URL: https://techcrunch.com/2006/08/06/aol-proudly-releases-massive-amounts-of-user-search-data/
5. Reiter E. NLG vs Templates: Levels of Sophistication in Generating Text, 2016. URL: https://ehudreiter.com/2016/12/18/nlg-vs-templates
6. Gagniuc P. Markov Chains: From Theory to Implementation and Experimentation, 2017. USA, NJ: John Wiley & Sons.
7. Press O., Bar A., Bogin B., Berant J., Wolf L. Language Generation with Recurrent Generative Adversarial Networks without Pre-training. URL: https://arxiv.org/pdf/1706.01399.pdf
8. Williams R.J., Hinton G.E., Rumelhart D.E. Learning representations by back-propagating errors. URL: http://www.cs.utoronto.ca/~hinton/absps/naturebp.pdf
9. Hochreiter S., Bengio Y., Frasconi P., Schmidhuber J. Gradient Flow in Recurrent Nets: the Difficulty of Learning Long-Term Dependencies.
URL: https://www.bioinf.jku.at/publications/older/ch7.pdf
10. Hochreiter S., Schmidhuber J. Long-Short Term Memory. URL: http://web.archive.org/web/20150526132154/http:// deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf
11. Heck J., Salem F. Simplified Minimal Gated Unit Variations for Recurrent Neural Networks. URL: https://arxiv.org/abs /1701.03452
12. Bahdanau D., Cho K.m Bengio Y. Neural Machine Translation by Jointly Learning to Align and Translate. URL: https://arxiv.org/pdf/1409.0473.pdf
13. Felbo B., Mislove A., Søgaard A., Rahwan I., Lehmann S. Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm. URL: https://arxiv.org/pdf/1708.00524.pdf
14. Bisong E. Google Colaboratory. In: Building Machine Learning and Deep Learning Models on Google Cloud Platform, 2019. Apress, Berkeley, CA.
15. Chollet F. Keras, 2015. URL: https://keras.io
16. Kingma D., Ba J. Adam: A Method for Stochastic Optimization. URL: https://arxiv.org/abs/1412.6980
17. Learning Rate Scheduler. URL: https://keras.io/api/callbacks/learning_rate_ scheduler/
18. Schuster M., Paliwal K. Bidirectional recurrent neural networks. URL: https://www.researchgate.net/publication/ 3316656_Bidirectional_recurrent_neural_networks
19. Vaswani A., Shazeer N., Parmar N., Uszkoreit J., Jones L., Gomez A., Kaizer L., Polosukhin I. Attention Is All You Need. URL: https://arxiv.org/pdf/1706.03762.pdf
20. Radford A., Wu J., Child R., Luan D., Amodei D., Sutskever I. Language Models Are Unsupervised Multitask Learners. URL: https://d4mucfpksywv.cloudfront.net/better-language-models/language-models.pdf
21. Devlin J., Chang M., Lee K., Toutanova K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. URL: https://arxiv.org/pdf/1810.04805.pdf
22. Brown T., Mann B., Ryder N., Subbiah M., Kaplan J. Language Models Are Few-Shot Learners. URL: https://arxiv.org/abs/2005.14165
23. Gage P. A New Algorithm for Data Compression. URL: https://www.derczynski.com/papers/archive/BPE_Gage.pdf
24. Deerwester S., Harshman R. Indexing by Latent Semantic Analysis. URL: https://www.cs.bham.ac.uk/ ~pxt/IDA/lsa_ind.pdf
25. Nakov P. Getting Better Results with Latent Semantic Indexing. URL: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.59.6406&rep=rep1&type=pdf
26. Rehurek R., Sojka P. Software Framework for Topic Modelling with Large Corpora // Proceedings of the LREC 2010 Workshop on New Challenges for NLP Frameworks. University of Malta. 2010.