Skip to main content

Developing a Twitter bot that can join a discussion using state-of-the-art architectures

Abstract

Today, microblogging platforms like Twitter have become popular by spreading news and opinions that gather attention. Engaging interactions, such as likes, shares, and replies, between users are the key determinants of these platforms’ news feed prioritization algorithms. These interactions attract people to ongoing debates and help inform and shape their opinions. Since being influential and attracting followers in these debates are considered as important, understanding the automation of these processes becomes critical in order to contribute positively. In this work, we aim to train a chatbot system that classifies tweets according to their positions, and it can also generate tweets related to a conversation. In this study, we test our system on a recently popular topic, namely the gun control debate in the U.S. Chatbots, are trained to tweet independently for their side and also reply meaningfully to a tweet from the opposite side. State-of-the-art architectures are tested to obtain a more accurate classification. We applied GloVe embedding model for representing tweets. Instead of using handcrafted features, long short-term memory (LSTM) neural network is applied to these embeddings to get more informative and equal-sized feature vectors. This model is trained to encode a tweet as a sequence of embeddings. Encoding is used for both message classification and generation tasks. LSTM sequence-to-sequence model is used to generate topical tweets and replies to tweets. We develop a new salience metric for measuring the relatedness of a generated message to a target tweet. Additionally, human evaluations are performed to measure the quality of the chatbot generated tweets according to their topic relevance and bias, and the quality of its replies to target tweets.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

References

  • Adiwardana D, Luong M-T, So DR, Hall J, Fiedel N, Thoppilan R, Yang Z, Kulshreshtha A, Nemade G, Lu Y (2020) Towards a human-like open-domain chatbot. arXiv preprint arXiv:2001.09977

  • Antipov G, Baccouche M, Dugelay J (2017) Face aging with conditional generative adversarial networks. In: 2017 IEEE international conference on image processing, ICIP 2017

  • Bahdanau D, Cho K, Bengio Y (2015) Neural machine translation by jointly learning to align and translate. In: 3rd international conference on learning representations, ICLR 2015, conference track proceedings

  • Blei DM, Ng AY, Jordan MI (2003) Latent dirichlet allocation. J Mach Learn Res 3:993–1022

    MATH  Google Scholar 

  • Bojanowski P, Grave E, Joulin A, Mikolov T (2017) Enriching word vectors with subword information. Trans Assoc Comput Linguist 5:135–146

    Article  Google Scholar 

  • Bradeško L, Mladenić D (2012) A survey of Chatbot systems through a Loebner prize competition. In: Proceedings of Slovenian language technologies society eighth conference of language technologies, pp 34–37

  • Brandtzæg PB, Følstad A (2018) Chatbots: changing user needs and motivations. Interactions 25(5):38–43

    Article  Google Scholar 

  • Brixey J, Hoegen R, Lan W, Rusow J, Singla K, Yin X, Artstein R, Leuski A (2017) Shihbot: a facebook chatbot for sexual health information on HIV/AIDS. In: Jokinen K, Stede M, DeVault D, Louis A (eds) Proceedings of the 18th annual SIGdial meeting on discourse and dialogue, Saarbrücken, Germany, August 15–17, 2017, Association for Computational Linguistics, pp 370–373

  • Chavoshi N, Hamooni H, Mueen A (2016) Identifying correlated bots in twitter. In: Social informatics—8th international conference, proceedings, Part II, volume of 10047 of lecture notes in computer science, pp 14–21

  • Chen H, Liu X, Yin D, Tang J (2017) A survey on dialogue systems: recent advances and new frontiers. SIGKDD Explor 19(2):25–35

    Article  Google Scholar 

  • Chen C, Mu S, Xiao W, Ye Z, Wu L, Ju Q (2019) Improving image captioning with conditional generative adversarial nets. In: The thirty-third AAAI conference on artificial intelligence, AAAI 2019, the thirty-first innovative applications of artificial intelligence conference, IAAI 2019, the ninth AAAI symposium on educational advances in artificial intelligence, EAAI 2019, AAAI Press, pp 8142–8150

  • Chollampatt S, Ng HT (2018) A multilayer convolutional encoder-decoder neural network for grammatical error correction. In: Thirty-second AAAI conference on artificial intelligence

  • Cho K, van Merrienboer B, Bahdanau D, Bengio Y (2014) On the properties of neural machine translation: Encoder-decoder approaches. In: Proceedings of SSST@EMNLP 2014, eighth workshop on syntax, semantics and structure in statistical translation, Association for computational linguistics, pp 103–111

  • Cui R, Agrawal G, Ramnath R (2020) Tweets can tell: activity recognition using hybrid gated recurrent neural networks. Soc Netw Anal Min 10(1):1–15

    Article  Google Scholar 

  • Cui L, Huang S, Wei F, Tan C, Duan C, Zhou M (2017) Superagent: a customer service chatbot for e-commerce websites. In: Proceedings of the 55th annual meeting of the association for computational linguistics, ACL 2017, Association for Computational Linguistics, pp 97–102

  • Demirel B, Cinbis RG, Ikizler-Cinbis N (2019) Image captioning with unseen objects. In: 30th British machine vision conference

  • Denkowski MJ, Lavie A (2011) Meteor 1.3: automatic metric for reliable optimization and evaluation of machine translation systems. In: Proceedings of the sixth workshop on statistical machine translation, WMT@EMNLP 2011, Association for computational linguistics, pp 85–91

  • Dumais ST, Furnas GW, Landauer TK, Deerwester S, Harshman R (1988) Using latent semantic analysis to improve access to textual information. In: Proceedings of the SIGCHI conference on Human factors in computing systems, pp 281–285

  • Ebrahimi M (2016) Automatic identification of online predators in chat logs by anomaly detection and deep learning. Ph.D. thesis, Concordia University,

  • Ertugrul AM, Karagoz P (2018) Movie genre classification from plot summaries using bidirectional LSTM. In: 12th IEEE international conference on semantic computing, ICSC 2018, IEEE Computer Society, pp 248–251

  • Ertugrul AM, Velioglu B, Karagoz P (2017) Word embedding based event detection on social media. In: Hybrid artificial intelligent systems—12th international proceedings and conference, HAIS 2017, volume 10334 of lecture notes in computer science, Springer, New York, pp 3–14

  • Garimella K, Morales G, Gionis A, Mathioudakis M (2018) Political discourse on social media: Echo chambers, gatekeepers, and the price of bipartisanship. In: Proceedings of the 2018 World Wide Web Conference, pp 913–922

  • Goodfellow I (2016) Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160,

  • Goswami A, Kumar A (2016) A survey of event detection techniques in online social networks. Soc. Netw. Anal. Min. 6(1):107:1–107:25

    Article  Google Scholar 

  • Hashimoto TB, Zhang H, Liang P (2019) Unifying human and statistical evaluation for natural language generation. In: Proceedings of the 2019 conference of the North American chapter of the association for computational linguistics: human language technologies, NAACL-HLT 2019, Volume 1, Association for Computational Linguistics, pp 1689–1701

  • Higashinaka R, Imamura K, Meguro T, Miyazaki C, Kobayashi N, Sugiyama H, Hirano T, Makino T, Matsuo Y (2014) Towards an open-domain conversational system fully based on natural language processing. In: Proceedings of COLING 2014, the 25th international conference on computational linguistics: technical papers, pp 928–939

  • Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural Comput 9(8):1735–1780

    Article  Google Scholar 

  • Holotescu C (2016) Moocbuddy: a chatbot for personalized learning with MOOCS. In: Iftene A, Vanderdonckt J (eds) 13th International conference on human computer interaction, RoCHI 2016, Iasi, Romania, September 8-9, 2016, Matrix Rom, pp 91–94

  • Howard PN, Kollanyi B, Woolley SC (2016) Bots and automation over twitter during the second U.S. presidential debate. In: Data Memo 2016.2

  • Huang M, Zhu X, Gao J (2020) Challenges in building intelligent open-domain dialog systems. ACM Trans Inf Syst (TOIS) 38(3):1–32

    Google Scholar 

  • Huber B, McDuff DJ, Brockett C, Galley M, Dolan B (2018) Emotional dialogue generation using image-grounded language models. In: Proceedings of the 2018 CHI conference on human factors in computing systems, CHI 2018, ACM, p 277

  • Hussain S, Sianaki OA, Ababneh N (2019) A survey on conversational agents/chatbots classification and design techniques. In: Web, artificial intelligence and network applications—proceedings of the workshops of the 33rd international conference on advanced information networking and applications, AINA workshops 2019, vol 927 of advances in intelligent systems and computing, Springer, New York, pp 946–956

  • Karim F, Majumdar S, Darabi H, Chen S (2018) LSTM fully convolutional networks for time series classification. IEEE Access 6:1662–1669

    Article  Google Scholar 

  • Karras T, Laine S, Aila T (2019) A style-based generator architecture for generative adversarial networks. In: IEEE conference on computer vision and pattern recognition, CVPR 2019, Computer vision foundation/IEEE, pp 4401–4410

  • Kim J, Oh S, Kwon O-W, Kim H (2019) Multi-turn chatbot based on query-context attentions and dual wasserstein generative adversarial networks. Appl Sci 9(18):3908

    Article  Google Scholar 

  • Lei W, Jin X, Kan M, Ren Z, He X, Yin D (2018) Sequicity: simplifying task-oriented dialogue systems with single sequence-to-sequence architectures. In: Proceedings of the 56th annual meeting of the association for computational linguistics, ACL 2018, Volume 1, Association for computational linguistics, pp 1437–1447

  • Li J, Galley M, Brockett C, Spithourakis GP, Gao J, Dolan WB (2016) A persona-based neural conversation model. In: Proceedings of the 54th annual meeting of the association for computational linguistics, ACL 2016, Volume 1, The Association for Computer Linguistics

  • Li J, Monroe W, Ritter A, Jurafsky D, Galley M, Gao J (2016) Deep reinforcement learning for dialogue generation. In: Proceedings of the 2016 conference on empirical methods in natural language processing, EMNLP 2016, The Association for Computational Linguistics, pp 1192–1202

  • Li J, Monroe W, Shi T, Jean S, Ritter A, Jurafsky D (2017) Adversarial learning for neural dialogue generation. In: Palmer M, Hwa R, Riedel S (eds) Proceedings of the 2017 conference on empirical methods in natural language processing, EMNLP 2017, Copenhagen, Denmark, September 9–11, 2017, Association for Computational Linguistics, pp 2157–2169

  • Liu ILB, Cheung CMK, Lee MKO (2010) Understanding twitter usage: What drive people continue to tweet. In: Pacific Asia conference on information systems, PACIS 2010, AISeL, p 92

  • Luong M, Brevdo E, Zhao R (2017) Neural machine translation (seq2seq) tutorial. https://github.com/tensorflow/nmt

  • Luong T, Pham H, Manning CD (2015) Effective approaches to attention-based neural machine translation. In: Proceedings of the 2015 conference on empirical methods in natural language processing, EMNLP 2015, The association for computational linguistics, pp 1412–1421

  • Luo L, Xu J, Lin J, Zeng Q, Sun X (2018) An auto-encoder matching model for learning utterance-level semantic dependency in dialogue generation. In: Proceedings of the 2018 conference on empirical methods in natural language processing, Association for Computational Linguistics, pp 702–707

  • Mahapatra A, Srivastava N, Srivastava J (2012) Contextual anomaly detection in text data. Algorithms 5(4):469–489

    Article  Google Scholar 

  • Mikolov T, Grave E, Bojanowski P, Puhrsch C, Joulin A (2018) Advances in pre-training distributed word representations. In: Proceedings of the international conference on language resources and evaluation (LREC 2018)

  • Mikolov T, Sutskever I, Chen K, Corrado GS, Dean J (2013) Distributed representations of words and phrases and their compositionality. In: Advances in neural information processing systems 26: 27th annual conference on neural information processing systems 2013. pp 3111–3119

  • Mondal A, Dey M, Das D, Nagpal S, Garda K (2018) Chatbot: an automated conversation system for the educational domain. In: 2018 international joint symposium on artificial intelligence and natural language processing (iSAI-NLP), IEEE, pp 1–5

  • Mostaço GM, De Souza ÍRC, Campos LB, Cugnasca C E (2018) Agronomobot: a smart answering chatbot applied to agricultural sensor networks. In: 14th international conference on precision agriculture, vol 24, pp 1–13

  • Neff G, Nagy P (2016) Automation, algorithms, and politics| talking to bots: symbiotic agency and the case of tay. Int J Commun 10:17

    Google Scholar 

  • Papineni K, Roukos S, Ward T, Zhu W (2002) Bleu: a method for automatic evaluation of machine translation. In: Proceedings of the 40th annual meeting of the association for computational linguistics, ACL, pp 311–318

  • Parthornratt T, Kitsawat D, Putthapipat P, Koronjaruwat P (2018) A smart home automation via Facebook chatbot and raspberry pi. In: 2018 2nd International conference on engineering innovation (ICEI), IEEE, pp 52–56

  • Peng Y, Jiang H (2016) Leverage financial news to predict stock price movements using word embeddings and deep neural networks. In: NAACL HLT 2016, The 2016 conference of the North American chapter of the association for computational linguistics: human language technologies, The association for computational linguistics, pp 374–379

  • Pennington J, Socher R, Manning CD (2014) Glove: global vectors for word representation. In: Proceedings of the 2014 conference on empirical methods in natural language processing, EMNLP 2014, a meeting of SIGDAT, a special interest group of the ACL, ACL, pp 1532–1543

  • Qiu M, Li F, Wang S, Gao X, Chen Y, Zhao W, Chen H, Huang J Chu W (2017) Alime chat: a sequence to sequence and rerank based chatbot engine. In: Proceedings of the 55th annual meeting of the association for computational linguistics, ACL 2017, Volume 2, Association for Computational Linguistics, pp 498–503

  • Quarteroni S, Manandhar S (2007) A chatbot-based interactive question answering system. In: Proceedings of the 11th workshop on the semantics and pragmatics of dialogue, Decalog, pp 83–90

  • Radford A, Wu J, Child R, Luan D, Amodei D, Sutskever I (2019) Language models are unsupervised multitask learners. OpenAI Blog 1(8):9

    Google Scholar 

  • Radford A, Metz L, Chintala S (2016) Unsupervised representation learning with deep convolutional generative adversarial networks. In: 4th international conference on learning representations, ICLR 2016, conference track proceedings

  • Rakshit G, Bowden KK, Reed L, Misra A, Walker MA (2017) Debbie, the debate bot of the future. In: Advanced social interaction with agents—8th international workshop on spoken dialog systems, IWSDS 2017, volume 510 of lecture notes in electrical engineering, Springer, New York, pp 45–52

  • Ramesh K, Ravishankaran S, Joshi A, Chandrasekaran K (2017) A survey of design techniques for conversational agents. In: International conference on information, communication and computing technology, Springer, New York, pp 336–350

  • Roca S, Sancho J, García J, Iglesias ÁA (2020) Microservice chatbot architecture for chronic patient support. J Biomed Inf 102:103305

    Article  Google Scholar 

  • Rosenstiel T, Sonderman J, Loker K, Ivancin M, Kjarval N (2015) Twitter and the news: How people use the social network to learn about the world. American Press Institute, Reston

    Google Scholar 

  • Ruder S (2016) An overview of gradient descent optimization algorithms. CoRR, vol. abs/1609.04747

  • Sarikaya R (2017) The technology behind personal digital assistants: an overview of the system architecture and key components. IEEE Signal Process Mag 34(1):67–81

    Article  Google Scholar 

  • Shang L, Lu Z, Li H (2015) Neural responding machine for short-text conversation. In: Proceedings of the 53rd annual meeting of the association for computational linguistics and the 7th international joint conference on natural language processing of the Asian Federation of natural language processing, ACL 2015, Volume 1, The association for computer linguistics, pp 1577–1586

  • Shum H-Y, He X-d, Li D (2018) From eliza to xiaoice: challenges and opportunities with social chatbots. Front Inf Technol Electron Eng 19(1):10–26

    Article  Google Scholar 

  • Sordoni A, Galley M, Auli M, Brockett C, Ji Y, Mitchell M, Nie J, Gao J, Dolan B (2015) A neural network approach to context-sensitive generation of conversational responses. In: NAACL HLT 2015, The 2015 conference of the North American chapter of the association for computational linguistics: human language technologies, The association for computational linguistics, pp 196–205

  • Su M-H, Wu C-H, Huang K-Y, Hong Q-B, Wang H-M (2017) A chatbot using LSTM-based multi-layer embedding for elderly care. In: 2017 international conference on orange technologies (ICOT), IEEE, pp 70–74

  • Sutskever I, Vinyals O, Le QV (2014) Sequence to sequence learning with neural networks. In: Advances in neural information processing systems 27: annual conference on neural information processing systems, pp 3104–3112

  • Tammewar A, Pamecha M, Jain C, Nagvenkar A, Modi K (2018) Production ready chatbots: generate if not retrieve. In: The workshops of the the thirty-second AAAI conference on artificial intelligence, vol. WS-18 of AAAI workshops, AAAI Press, pp 739–745

  • Tao C, Wu W, Xu C, Hu W, Zhao D, Yan R (2019) Multi-representation fusion network for multi-turn response selection in retrieval-based chatbots. In: Proceedings of the twelfth ACM international conference on web search and data mining, WSDM 2019, ACM, pp 267–275

  • Varol O, Ferrara E, Davis CA, Menczer F, Flammini A (2017) Online human-bot interactions: detection, estimation, and characterization. In: Proceedings of the eleventh international conference on web and social media, AAAI Press, pp 280–289

  • Wang S, Jiang J (2017) Machine comprehension using match-LSTM and answer pointer. In: 5th International conference on learning representations, ICLR 2017, conference track proceedings

  • Wang D, Nyberg E (2015) A long short-term memory model for answer sentence selection in question answering. In: Proceedings of the 53rd annual meeting of the association for computational linguistics and the 7th international joint conference on natural language processing (Volume 2: Short Papers), pp 707–712

  • Wang J, Yu L, Zhang W, Gong Y, Xu Y, Wang B, Zhang P, Zhang D (2017) IRGAN: a minimax game for unifying generative and discriminative information retrieval models. In: Kando N, Sakai T, Joho H, Li H, de Vries AP, White RW (eds) Proceedings of the 40th international ACM SIGIR conference on research and development in information retrieval, Shinjuku, Tokyo, Japan, August 7–11, 2017, ACM, pp 515–524

  • Weizenbaum J (1966) ELIZA—a computer program for the study of natural language communication between man and machine. Communications of the ACM 9(1):36–45

    Article  Google Scholar 

  • Wen T, Gasic M, Mrksic N, Su P, Vandyke D, Young S J (2015) Semantically conditioned LSTM-based natural language generation for spoken dialogue systems. In: Proceedings of the 2015 conference on empirical methods in natural language processing, EMNLP 2015, The Association for Computational Linguistics, pp 1711–1721

  • Wen T, Miao Y, Blunsom P, Young SJ (2017) Latent intention dialogue models. In: Proceedings of the 34th international conference on machine learning, ICML 2017, volume 70 of proceedings of machine learning research, PMLR, pp 3732–3741

  • Wu Y, Li Z, Wu W, Zhou M (2018) Response selection with topic clues for retrieval-based chatbots. Neurocomputing 316:251–261

    Article  Google Scholar 

  • Wu Y, Wu W, Xing C, Zhou M, Li Z (2017) Sequential matching network: a new architecture for multi-turn response selection in retrieval-based chatbots. In: Proceedings of the 55th annual meeting of the association for computational linguistics, ACL 2017, Volume 1, Association for computational linguistics, pp 496–505

  • Xu A, Liu Z, Guo Y, Sinha V, Akkiraju R (2017) A new chatbot for customer service on social media. In: Proceedings of the 2017 CHI conference on human factors in computing systems, ACM, pp 3506–3510

  • Yan R (2018) chitty-chitty-chat bot: Deep learning for conversational AI. In: Proceedings of the twenty-seventh international joint conference on artificial intelligence, IJCAI 2018, ijcai.org, pp 5520–5526

  • Yang Z, Chen W, Wang F, Xu B (2018) Improving neural machine translation with conditional sequence generative adversarial nets. In: Proceedings of the 2018 conference of the North American chapter of the association for computational linguistics: human language technologies, NAACL-HLT 2018, Volume 1, Association for Computational Linguistics, pp 1346–1355

  • Yin Z, Chang K, Zhang R (2017) Deepprobe: Information directed sequence understanding and chatbot design via recurrent neural networks. In: Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining, ACM, pp 2131–2139

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to İsmail Hakkı Toroslu.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Çetinkaya, Y.M., Toroslu, İ.H. & Davulcu, H. Developing a Twitter bot that can join a discussion using state-of-the-art architectures. Soc. Netw. Anal. Min. 10, 51 (2020). https://doi.org/10.1007/s13278-020-00665-4

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s13278-020-00665-4

Keywords