skip to main content
10.1145/3664476.3670465acmotherconferencesArticle/Chapter ViewAbstractPublication PagesaresConference Proceedingsconference-collections
research-article
Open access

Detection of AI-Generated Emails - A Case Study

Published: 30 July 2024 Publication History

Abstract

This work-in-progress paper investigates the problem of assessing and detecting if a text was written by a human or if it was generated by a language model. In our case study, we focused on email messages. For the purpose of experiments, we used a combination of publicly available email datasets with our in-house data, containing in total over 10k emails. Then, we generated their “copies” using large language models (LLMs) with specific prompts. We experimented with various classifiers and feature spaces. We achieved encouraging results, with the F1-scores of almost 0.99 for email messages in English and over 0.92 for the ones in Polish, using Random Forest as a classifier. We found that the detection model relied strongly on typographic and orthographic (spelling) imperfections of the analyzed emails and on statistics of sentence lengths. We also observed the inferior results obtained for Polish, highlighting a need for research in the direction of languages underrepresented in training models.

References

[1]
Sameer Badaskar, Sachin Agarwal, and Shilpa Arora. 2008. Identifying Real or Fake Articles: Towards better Language Modeling. http://www.cs.cmu.edu/
[2]
Regina Barzilay and Mirella Lapata. 2008. Modeling Local Coherence: An Entity-Based Approach.
[3]
Yonatan Bisk, Ari Holtzman, Jesse Thomason, Jacob Andreas, Yoshua Bengio, Joyce Chai, Mirella Lapata, Angeliki Lazaridou, Jonathan May, Aleksandr Nisnevich, Nicolas Pinto, and Joseph Turian. 2020. Experience Grounds Language. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Bonnie Webber, Trevor Cohn, Yulan He, and Yang Liu (Eds.). Association for Computational Linguistics, Online, 8718–8735. https://doi.org/10.18653/v1/2020.emnlp-main.703
[4]
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language Models are Few-Shot Learners. In Advances in Neural Information Processing Systems, H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (Eds.). Vol. 33. Curran Associates, Inc., Online, 1877–1901. https://proceedings.neurips.cc/paper_files/paper/2020/file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf
[5]
M. Caldwell, J. T. A. Andrews, T. Tanay, and L. D. Griffin. 2020. AI-enabled future crime. Crime Science 9 (12 2020), 14. Issue 1. https://doi.org/10.1186/s40163-020-00123-8
[6]
Neville Calleja, AbdelHalim AbdAllah, Neetu Abad, Naglaa Ahmed, Dolores Albarracin, Elena Altieri, Julienne N Anoko, Ruben Arcos, Arina Anis Azlan, Judit Bayer, Anja Bechmann, Supriya Bezbaruah, Sylvie C Briand, Ian Brooks, Lucie M Bucci, Stefano Burzo, Christine Czerniak, Manlio De Domenico, Adam G Dunn, Ullrich K H Ecker, Laura Espinosa, Camille Francois, Kacper Gradon, Anatoliy Gruzd, Beste Sultan Gülgün, Rustam Haydarov, Cherstyn Hurley, Santi Indra Astuti, Atsuyoshi Ishizumi, Neil Johnson, Dylan Johnson Restrepo, Masato Kajimoto, Aybüke Koyuncu, Shibani Kulkarni, Jaya Lamichhane, Rosamund Lewis, Avichal Mahajan, Ahmed Mandil, Erin McAweeney, Melanie Messer, Wesley Moy, Patricia Ndumbi Ngamala, Tim Nguyen, Mark Nunn, Saad B Omer, Claudia Pagliari, Palak Patel, Lynette Phuong, Dimitri Prybylski, Arash Rashidian, Emily Rempel, Sara Rubinelli, PierLuigi Sacco, Anton Schneider, Kai Shu, Melanie Smith, Harry Sufehmi, Viroj Tangcharoensathien, Robert Terry, Naveen Thacker, Tom Trewinnard, Shannon Turner, Heidi Tworek, Saad Uakkas, Emily Vraga, Claire Wardle, Herman Wasserman, Elisabeth Wilhelm, Andrea Würz, Brian Yau, Lei Zhou, and Tina D Purnat. 2021. A Public Health Research Agenda for Managing Infodemics: Methods and Results of the First WHO Infodemiology Conference. JMIR Infodemiology 1, 1 (15 Sep 2021), e30979. https://doi.org/10.2196/30979
[7]
Chaka Chaka. 2023. Detecting AI content in responses generated by ChatGPT, YouChat, and Chatsonic: The case of five AI content detection tools. Journal of Applied Learning & Teaching 6 (7 2023). Issue 2. https://doi.org/10.37074/jalt.2023.6.2.12
[8]
Megha Chakraborty, S. M Towhidul Islam Tonmoy, S M Mehedi Zaman, Krish Sharma, Niyar R Barman, Chandan Gupta, Shreya Gautam, Tanay Kumar, Vinija Jain, Aman Chadha, Amit P. Sheth, and Amitava Das. 2023. Counter Turing Test CT: AI-Generated Text Detection is Not as Easy as You May Think – Introducing AI Detectability Index. arXiv preprint arXiv:2310.05030 2310.05030 (10 2023).
[9]
Ilker Cingillioglu. 2023. Detecting AI-generated essays: the ChatGPT challenge. International Journal of Information and Learning Technology 40 (5 2023), 259–268. Issue 3. https://doi.org/10.1108/IJILT-03-2023-0043
[10]
Sławomir Dadas. 2023. Polish GPT2-xl model. https://huggingface.co/sdadas/polish-gpt2-xl Accessed on May 10, 2024.
[11]
Apache Public Datasets. 2023. The Spam Assassin Email Classification Dataset. https://www.kaggle.com/datasets/ganiyuolalekan/spam-assassin-email-classification-dataset/data Accessed on Jan 14, 2024.
[12]
Europol. 2023. ChatGPT: the impact of large language models on law enforcement. Publications Office of the European Union, Luxembourg. https://doi.org/10.2813/255453
[13]
Hugging Face. 2023. Perplexity of fixed-length models. https://huggingface.co/docs/transformers/perplexity Accessed on Apr 30, 2024.
[14]
Lijun Feng, Martin Jansche, Matt Huenerfauth, and Noémie Elhadad. 2010. A Comparison of Features for Automatic Readability Assessment., 276-284 pages. http://www.weeklyreader.com
[15]
Leon Fröhling and Arkaitz Zubiaga. 2021. Feature-based detection of automated language models: tackling GPT-2, GPT-3 and Grover. PeerJ Computer Science 7 (4 2021), e443. https://doi.org/10.7717/peerj-cs.443
[16]
Sebastian Gehrmann, Hendrik Strobelt, and Alexander M. Rush. 2019. GLTR: Statistical Detection and Visualization of Generated Text. ArXiv 1906.04043 (6 2019).
[17]
GPTZero. 2023. GPTZero technology. https://gptzero.me/technology Accessed on May 1, 2024.
[18]
Alex Cui GPTZero. 2024. GPTZero Review – Is it a good AI Detection Tool?https://gptzero.me/news/gptzero-surpasses-competitors-in-accuracies Accessed on May 1, 2024.
[19]
Kacper T. Gradoń, Janusz A. Hołyst, Wesley R. Moy, Julian Sienkiewicz, and Krzysztof Suchecki. 2021. Countering misinformation: A multidisciplinary approach. Big Data & Society 8, 1 (2021), 20539517211013848. https://doi.org/10.1177/20539517211013848 arXiv:https://doi.org/10.1177/20539517211013848
[20]
Fouzi Harrag, Maria Debbah, Kareem Darwish, and Ahmed Abdelali. 2021. BERT Transformer model for Detecting Arabic GPT2 Auto-Generated Tweets. ArXiv 2101.09345 (1 2021). http://arxiv.org/abs/2101.09345
[21]
Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. 2019. The Curious Case of Neural Text Degeneration. arXiv preprint arXiv:1904.09751 1904.09751 (4 2019).
[22]
Daphne Ippolito, Daniel Duckworth, Chris Callison-Burch, and Douglas Eck. 2019. Automatic Detection of Generated Text is Easiest when Humans are Fooled. arXiv preprint arXiv:1911.00650 1911.00650 (11 2019).
[23]
Samantha Jackson, Barend Beekhuizen, Zhao Zhao, and Rhonda McEwen. 2024. GPT-4-Trinis: assessing GPT-4’s communicative competence in the English-speaking majority world. AI & SOCIETY 10.1007/s00146-024-01945-9 (2024), 1435–5655. https://doi.org/10.1007/s00146-024-01945-9
[24]
Fred Jelinek, Robert L Mercer, Lalit R Bahl, and James K Baker. 1977. Perplexity—a measure of the difficulty of speech recognition tasks. The Journal of the Acoustical Society of America 62, S1 (1977), S63–S63.
[25]
Jan Hendrik Kirchner, Scott Aaronson Lama Ahmad, and Jan Leike. 2023. New AI classifier for indicating AI-written texts. https://openai.com/blog/new-ai-classifier-for-indicating-ai-written-text Accessed on Jan 14, 2024.
[26]
Alistair Knott, Dino Pedreschi, Raja Chatila, Tapabrata Chakraborti, Susan Leavy, Ricardo Baeza-Yates, David Eyers, Andrew Trotman, Paul D. Teal, Przemyslaw Biecek, Stuart Russell, and Yoshua Bengio. 2023. Generative AI models should include detection mechanisms as a condition for public release. Ethics and Information Technology 25, 4 (12 2023), 55. Issue 4. https://doi.org/10.1007/s10676-023-09728-4
[27]
Kalpesh Krishna, Yixiao Song, Marzena Karpinska, John Wieting, and Mohit Iyyer. 2023. Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defense. ArXiv 36 (3 2023). http://arxiv.org/abs/2303.13408
[28]
Eric Mitchell, Yoonho Lee, Alexander Khazatsky, Christopher D Manning, and Chelsea Finn. 2023. Detectgpt: Zero-shot machine-generated text detection using probability curvature. In International Conference on Machine Learning. PMLR, PMLR, Online, 24950–24962.
[29]
Ruchit Modi. 2023. Email classification dataset. https://github.com/rmodi6/Email-Classification/tree/master Accessed on Jan 14, 2024.
[30]
Conor Monaghan. 2024. GPTZero Review – Is it a good AI Detection Tool?https://gowinston.ai/gpt-zero-review/ Accessed on May 1, 2024.
[31]
Jack Morris. 2024. LanguageTool Python library. https://pypi.org/project/language-tool-python/ Accessed on May 10, 2024.
[32]
Wesley R. Moy and Kacper Gradoń. 2023. Artificial Intelligence in Hybrid and Information Warfare: A Double-Edged Sword. In Artificial Intelligence and International Conflict in Cyberspace. Taylor & Francis, GB, USA, 14–22.
[33]
Soumya Mukherjee. 2023. Exploring Burstiness: Evaluating Language Dynamics in LLM-Generated Texts. https://ramblersm.medium.com/exploring-burstiness-evaluating-language-dynamics-in-llm-generated-texts-8439204c75c1 Accessed on Apr 30, 2024.
[34]
Praveen Nellihela. 2022. What is K-fold Cross Validation?https://towardsdatascience.com/what-is-k-fold-cross-validation-5a7bb241d82f Accessed on Jan 23, 2023.
[35]
Inez Okulska, Daria Stetsenko, Anna Kołos, Agnieszka Karlińska, Kinga Głąbińska, and Adam Nowakowski. 2023. StyloMetrix: An Open-Source Multilingual Tool for Representing Stylometric Vectors. arXiv preprint arXiv:2309.12810 2309.12810 (9 2023).
[36]
Aleksandra Pawlicka, Marek Pawlicki, Rafał Kozik, and Michał Choraś. 2024. The Rise of AI-Powered Writing: How ChatGPT is Revolutionizing Scientific Communication for Better or for Worse. In Applied Intelligence, De-Shuang Huang, Prashan Premaratne, and Changan Yuan (Eds.). Springer Nature Singapore, Singapore, 317–327.
[37]
F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. 2011. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 12 (2011), 2825–2830.
[38]
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language Models are Unsupervised Multitask Learners. https://github.com/codelucas/newspaper
[39]
Juan Diego Rodriguez, Todd Hay, David Gros, Zain Shamsi, and Ravi Srinivasan. 2022. Cross-domain detection of GPT-2-generated technical text, In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Stroudsburg, PA, USA). Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies 2022.naacl-main.88, 1213–1233. https://doi.org/10.18653/v1/2022.naacl-main.88
[40]
Vinu Sankar Sadasivan, Aounon Kumar, Sriram Balasubramanian, Wenxiao Wang, and Soheil Feizi. 2023. Can AI-Generated Text be Reliably Detected?ArXiv 2303.11156 (3 2023). http://arxiv.org/abs/2303.11156
[41]
Abigail See, Aneesh Pappu, Rohun Saxena, Akhila Yerukola, and Christopher D. Manning. 2019. Do Massively Pretrained Language Models Make Better Storytellers?ArXiv 1909.10705 (9 2019).
[42]
Yuhui Shi, Qiang Sheng, Juan Cao, Hao Mi, Beizhe Hu, and Danding Wang. 2024. Ten Words Only Still Help: Improving Black-Box AI-Generated Text Detection via Proxy-Guided Efficient Re-Sampling. ArXiv 2402.09199 (2 2024). http://arxiv.org/abs/2402.09199
[43]
R Somasundaram. 2023. How does GPTZero Work? AI Detector for ChatGPT / Gemini / Copilot / Meta AI. https://www.ilovephd.com/what-is-gptzero Accessed on Jan 14, 2024.
[44]
_w1998. 2023. Spam email Dataset. https://www.kaggle.com/datasets/jackksoncsie/spam-email-dataset/data Accessed on Jan 14, 2024.
[45]
HJ i McCulloch C Williams. 2023. Truth Decay and National Security: Intersections, Insights, and Questions for Future Research. https://www.rand.org/pubs/perspectives/PEA112-2.html
[46]
Rowan Zellers, Ari Holtzman, Elizabeth Clark, Lianhui Qin, Ali Farhadi, and Yejin Choi. 2020. TuringAdvice: A Generative and Dynamic Evaluation of Language Use. ArXiv 2004.03607 (4 2020).

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
ARES '24: Proceedings of the 19th International Conference on Availability, Reliability and Security
July 2024
2032 pages
ISBN:9798400717185
DOI:10.1145/3664476
This work is licensed under a Creative Commons Attribution International 4.0 License.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 30 July 2024

Check for updates

Author Tags

  1. binary classification
  2. fake detection
  3. large language model
  4. natural language processing
  5. perplexity

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

Conference

ARES 2024

Acceptance Rates

Overall Acceptance Rate 228 of 451 submissions, 51%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 917
    Total Downloads
  • Downloads (Last 12 months)917
  • Downloads (Last 6 weeks)249
Reflects downloads up to 25 Feb 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media