Automatic generation of short texts based on the use of neural networks LSTM and SeqGAN | Vestnik Tomskogo gosudarstvennogo universiteta. Upravlenie, vychislitelnaja tehnika i informatika – Tomsk State University Journal of Control and Computer Science. 2021. № 57. DOI: 10.17223/19988605/57/13

Automatic generation of short texts based on the use of neural networks LSTM and SeqGAN

The aim of this work is to estimate the quality of automatic short texts generation based on a network with long short-term memory (Long Short-Term Memory, LSTM). To train the LSTM neural network, supervised learning based on the maximum likeli- hood estimation (MLE) method is used. Further LSTM training is used as part of an adversarial network that generates a sequence (Sequence Generative Adversarial Net, SeqGAN). It should be noted that the Monte Carlo method is not used in this work, batch training with a larger data packet is applied instead. The paper proposes a modification of the output vector by raising its values to a power greater than 1 to increase the probability of choosing the generated word with the greatest weight in the output vector of the neural network. This operation makes it possible to increase the quality of the generated text, but reduces its variety. The length of the generated texts is 10 and 20 words. The following data samples are used for training and testing neural networks: a collection of Russian poems from the Stihi.ru website and captions to images in English from the COCO Image Captions sample. Word-by-word text generation is applied. The quality of text generation is assessed using the BLEU metric. The analysis and comparison with similar solutions based on the COCO Image Captions data sample are carried out. Training and testing of MLE and SeqGAN-based approaches was carried out. Based on the presented results, we can conclude that training based on the SeqGAN neural network, in comparison with the MLE-based approach, improves the quality of text generation according to the BLEU metric. The texts generated on the basis of the SeqGAN neural network are comparable in quality to the examples from the training set using the BLEU metric. The approach based on raising the values of the probability vector to a power makes it possible to increase the quality of text generation according to the BLEU metric, but leads to a reduction in texts variety. It should be noted that the quality of text generation, based on SeqGAN and modifying the output vector by raising its values to a power greater than 1, significantly exceeds the quality of real texts according to the BLEU metric. A significant increase in the quality of text generation according to the BLEU metric is associated with a reduction the variety of texts, as a result of which the neural network uses popular words and phrases more often. The texts from the training set are more diverse than the texts generated by the neural network, which could lead to a lower score of training set examples according to the BLEU metric.

Download file
Counter downloads: 68

Keywords

SeqGAN, text generation, adversarial reinforcement learning

Authors

NameOrganizationE-mail
Krivosheev Nikolay A.Tomsk Polytechnic Universitynikola0212@mail.ru
Ivanova Yulia A.Tomsk Polytechnic Universityjbolotova@tpu.ru
Spitsyn Vladimir G.Tomsk Polytechnic Universityspvg@tpu.ru
Всего: 3

References

Yu L., Zhang W., Wang J., Yu Y. SeqGAN: Sequence Generative Adversarial Nets with Policy Gradient // AAAI'17: Proc. of the Thirty-First AAAI Conference on Artificial Intelligence. 2017. P. 2852-2858.
Guo J., Lu S., Cai H., Zhang W., Yu Y., Wang J. Long Text Generation via Adversarial Training with Leaked Information // The Thirty-Two AAAI Conference on Artificial Intelligence, 2018. V. 32, N. 1. P. 5141-5148.
Lin K., Li D., He X., Zhang Z., Sun M.-T. Adversarial Ranking for Language Generation // Advances in Neural Information Processing Systems. 2018. P. 3155-3165.
Hochreiter S., Schmidhuber J. Long short-term memory // Neural Computation. 1997. V. 9, is. 8. P. 1735-1780.
Знакомство с архитектурой LSTM-сетей. URL: http://datareview.info/article/znakomstvo-s-arhitekturoy-lstm-setey/ (accessed: 20.10.2020).
Cramer J.S. Econometric Applications of Maximum Likelihood Methods. Cambridge University Press, 1986. 206 p.
StihiData. URL: https://github.com/DenisVorotyntsev/StihiData/tree/194107ff98249fd11e8da5c3ee2d (accessed: 20.10.2020).
Chen X., Fang H., Lin T.-Y., Vedantam R., Gupta S., Dollar P., Zitnick, C.L. Microsoft COCO Captions: Data Collection and Evaluation Server. 2015. URL: https://arxiv.org/pdf/1504.00325.pdf (accessed: 20.10.2020).
Papineni K., Roukos S., Ward T., Zhu W.-J. BLEU: a Method for Automatic Evaluation of Machine Translation // Proc. of the 40th Annual Meeting of the Association for Computational Linguistics. 2002. P. 311-318.
Coughlin D. Correlating Automated and Human Assessments of Machine Translation Quality // Proc. of MT Summit IX. 2003. P. 63-70.
Chen B., Cherry C. A Systematic Comparison of Smoothing Techniques for Sentence-Level BLEU // Proc. of the Ninth Workshop on Statistical Machine Translation. 2014. P. 362-367.
Wu Y., Wang, J. Text Generation Service Model Based on Truth-Guided SeqGAN // IEEE Access. 2020. V. 8. P. 11880-11886.
Shi Z., Chen X., Qiu X., Huang X. Toward Diverse Text Generation with Inverse Reinforcement Learning. 2018. URL: https://arxiv.org/pdf/1804.11258.pdf (accessed: 20.10.2020).
Li J., Monroe W., Shi T., Jean S., Ritter A., Jurafsky D. Adversarial Learning for Neural Dialogue Generation // EMNLP. 2017. P. 2147-2159.
Выборка данных Image COCO. URL: https://github.com/CR-Gjx/LeakGAN/tree/master/Image%20COCO/save (accessed: 20.10.2020).
Программная реализация SeqGAN. URL: https://github.com/NikolayKrivosheev/Generation-of-short-texts-SeqGAN (accessed: 20.10.2020).
SeqGAN. URL: https://github.com/suragnair/seqGAN (accessed: 20.10.2020).
What the heck is Word Embedding. URL: https://towardsdatascience.com/what-the-heck-is-word-embedding-b30f67ffl1c81 (accessed: 20.10.2020).
Xu H. Text Classification with Topic-based Word Embedding and Convolutional Neural Networks // Proc. of the 7th ACM International Conference on Bioinformatics, Computational Biology, and Health Informatics. 2016. P. 88-97.
Torch.multinomial. URL: https://pytorch.org/docs/master/generated/torch.multinomial.html (accessed: 20.10.2020).
Ruder S. An overview of gradient descent optimization algorithms. 2017. URL: https://arxiv.org/pdf/1609.04747.pdf (accessed: 20.10.2020).
Николенко С., Кадурин А., Архангельская Е. Глубокое обучение Погружение в мир нейронных сетей. Спб. : Питер. 2018. 477 с.
Goodfellow I. Generative Adversarial Nets // Advances in Neural Information Processing Systems. 2014. V. 27. P. 2672-2680.
Sutton R.S. Policy Gradient Methods for Reinforcement Learning with Function Approximation // Advances in Neural Information Processing Systems. 1999. V. 12. P. 1057-1063.
Kulkarni T.D. Hierarchical Deep Reinforcement Learning: Integrating Temporal Abstraction and Intrinsic Motivation // Advances in Neural Information Processing Systems. V. 29. 2016. P. 3675-3683.
Metropolis N., Ulam S. The Monte Carlo Method // Journal of the American Statistical Association. 1949. V. 44, is. 247. P. 335-341.
 Automatic generation of short texts based on the use of neural networks LSTM and SeqGAN | Vestnik Tomskogo gosudarstvennogo universiteta. Upravlenie, vychislitelnaja tehnika i informatika – Tomsk State University Journal of Control and Computer Science. 2021. № 57. DOI: 10.17223/19988605/57/13

Automatic generation of short texts based on the use of neural networks LSTM and SeqGAN | Vestnik Tomskogo gosudarstvennogo universiteta. Upravlenie, vychislitelnaja tehnika i informatika – Tomsk State University Journal of Control and Computer Science. 2021. № 57. DOI: 10.17223/19988605/57/13

Download full-text version
Counter downloads: 181