Skip to main content
Log in

An reinforcement learning-based speech censorship chatbot system

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

The rapid development of artificial intelligence (AI) technology has enabled large-scale AI applications to land in the market and practice. However, plenty of security issues have been exposed to society while AI technology has brought many conveniences to humankind, especially for the chatbot with online learning. This paper proposes a speech censorship chatbot system with reinforcement learning, which is mainly composed of two parts: the aggressive speech censorship model and the speech purification model. The aggressive speech censorship can combine the context of user input sentences to detect aggressive speech and respond to the rapid evolution of aggressive speech. According to the situation of the chatbot that is polluted by large numbers of aggressive speech, the speech purification model has the capacity to "forget" the learned malicious data through reinforcement learning rather than rolling back to the early versions. In addition, by integrating few-shot learning, the speed of speech purification is accelerated while reducing the influence on the quality of replies. The experimental results show that our proposed method reduces the probability of generating aggressive speeches and that the integration of the few-shot learning improves the training speed rapidly while effectively slowing down the decline in BLEU values.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

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

Similar content being viewed by others

References

  1. Kok JN, Boers EJ, Kosters WA, Van der Putten P, Poel M (2009) Artificial intelligence: definition, trends, techniques, and cases. Artif Intell 1:270–299

    Google Scholar 

  2. Poole DL, Mackworth AK (2010) Artificial intelligence: foundations of computational agents. Cambridge University Press, Cambridge

    Book  Google Scholar 

  3. Li D, Han D, Weng T-H, Zheng Z, Li H, Liu H, Castiglione A, Li K-C (2021) Blockchain for federated learning toward secure distributed machine learning systems: a systemic survey. Soft Comput 2:1–18

    Google Scholar 

  4. Li M, Han D, Li D, Liu H, Chang C-C (2021) Mfvt:an anomaly traffic detection method merging feature fusion network and vision transformer architecture

  5. Li D, Han D, Zhang X, Zhang L (2019) Panoramic image mosaic technology based on sift algorithm in power monitoring. In: 2019 6th International Conference on Systems and Informatics (ICSAI), pp 1329–1333

  6. Adamopoulou E, Moussiades L (2020) An overview of chatbot technology. In: IFIP International Conference on Artificial Intelligence Applications and Innovations, pp 373–383. Springer

  7. Khan R, Das A (2018) Introduction to chatbots. In: Build Better Chatbots, pp 1–11. Springer

  8. Li D, Han D, Zheng Z, Weng T-H, Li H, Liu H, Castiglione A, Li K-C (2021) Moocschain: a blockchain-based secure storage and sharing scheme for moocs learning. Comput Stand Interfaces 29:1096

    Google Scholar 

  9. Hill J, Ford WR, Farreras IG (2015) Real conversations with artificial intelligence: a comparison between human-human online conversations and human-chatbot conversations. Comput Hum Behav 49:245–250

    Article  Google Scholar 

  10. Park N, Jang K, Cho S, Choi J (2021) Use of offensive language in human-artificial intelligence chatbot interaction: the effects of ethical ideology, social competence, and perceived humanlikeness. Comput Hum Behav 121:106795

    Article  Google Scholar 

  11. Li M, Han D, Yin X, Liu H, Li D (2021) Design and implementation of an anomaly network traffic detection model integrating temporal and spatial features. Secur Commun Netw 2021:7045823–1704582315

    Google Scholar 

  12. Dadvar M, Trieschnigg D, Ordelman R, de Jong F (2013) Improving cyberbullying detection with user context. In: European Conference on Information Retrieval, pp 693–696. Springer

  13. Xiang G, Fan B, Wang L, Hong J, Rose C (2012) Detecting offensive tweets via topical feature discovery over a large scale twitter corpus. In: Proceedings of the 21st ACM International Conference on Information and Knowledge Management, pp 1980–1984

  14. Li J, Miller AH, Chopra S, Ranzato M, Weston J (2016) Dialogue learning with human-in-the-loop. arXiv preprint arXiv:1611.09823

  15. Abel D, Salvatier J, Stuhlmüller A, Evans O (2017) Agent-agnostic human-in-the-loop reinforcement learning. arXiv preprint arXiv:1701.04079

  16. Asghar N, Poupart P, Jiang X, Li H (2016) Deep active learning for dialogue generation. arXiv preprint arXiv:1612.03929

  17. Du J, Gui L, He Y, Xu R (2017) A convolutional attentional neural network for sentiment classification. In: 2017 International Conference on Security, Pattern Analysis, and Cybernetics (SPAC), pp 445–450. IEEE

  18. Yang Z, Yang D, Dyer C, He X, Smola A, Hovy E (2016) Hierarchical attention networks for document classification. In: Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp 1480–1489

  19. Li Y, Zhang L, Ma Y, Singh DJ (2015) Tuning optical properties of transparent conducting barium stannate by dimensional reduction. APL Mater 3(1):011102

    Article  Google Scholar 

  20. Liu P, Qiu X, Huang X (2016) Recurrent neural network for text classification with multi-task learning. arXiv preprint arXiv:1605.05101

  21. Ravi K, Ravi V (2015) A survey on opinion mining and sentiment analysis: tasks, approaches and applications. Knowl-Based Syst 89:14–46

    Article  Google Scholar 

  22. Zhang L, Wang S, Liu B (2018) Deep learning for sentiment analysis: a survey. Wiley Interdiscip Rev Data Min Knowled Discov 8(4):1253

    Google Scholar 

  23. Allouch M, Azaria A, Azoulay-Schwartz R (2019) Detecting sentences that may be harmful to children with special needs. In: 2019 IEEE 31st International Conference on Tools with Artificial Intelligence (ICTAI), pp 1209–1213

  24. Razavi AH, Inkpen D, Uritsky S, Matwin S (2010) Offensive language detection using multi-level classification. In: Canadian Conference on AI

  25. Spertus E (1997) Smokey: Automatic recognition of hostile messages. In: AAAI, pp 1058–1065

  26. Yin D, Xue Z, Hong L, Davison BD, Kontostathis A, Edwards L (2009) Detection of harassment on web 2.0. In: Proceedings of the Content Analysis in the WEB, vol 2, pp 1–7

  27. Dinakar K, Reichart R, Lieberman H (2011) Modeling the detection of textual cyberbullying. In: Fifth International AAAI Conference on Weblogs and Social Media, vol. WS-11-02, p 11

  28. Chkroun M, Azaria A (2018) Safebot: A safe collaborative chatbot. In: Workshops at the Thirty-Second AAAI Conference on Artificial Intelligence, pp 695–698

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

    Google Scholar 

  30. Peters ME, Neumann M, Iyyer M, Gardner M, Clark C, Lee K, Zettlemoyer L (2018) Deep contextualized word representations. arXiv preprint arXiv:1802.05365

  31. Sherstinsky A (2020) Fundamentals of recurrent neural network (rnn) and long short-term memory (lstm) network. Physica D 404:132306

    Article  MathSciNet  Google Scholar 

  32. Wan S, Lan Y, Guo J, Xu J, Pang L, Cheng X (2016) A deep architecture for semantic matching with multiple positional sentence representations. In: Proceedings of the AAAI Conference on Artificial Intelligence, vol 30

  33. Sadiq S, Mehmood A, Ullah S, Ahmad M, Choi GS, On B-W (2021) Aggression detection through deep neural model on twitter. Future Gener Comput Syst 114:120–129

    Article  Google Scholar 

  34. Devlin J, Chang M-W, Lee K, Toutanova K (2019) Bert: pre-training of deep bidirectional transformers for language understanding. In: NAACL

Download references

Funding

This research is supported by the National Natural Science Foundation of China under Grant 61873160, Grant 61672338, and the Natural Science Foundation of Shanghai under Grant 21ZR1426500.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Shaokang Cai or Dun Li.

Ethics declarations

Conflict of interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

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

Cai, S., Han, D., Li, D. et al. An reinforcement learning-based speech censorship chatbot system. J Supercomput 78, 8751–8773 (2022). https://doi.org/10.1007/s11227-021-04251-z

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-021-04251-z

Keywords

Navigation