Optimizing parameter selection in bidirectional encoder portrayal for transformers algorithm using particle swarm optimization for artificial intelligence generate essay detection
Abstract
This research proposes a novel method for detecting artificial intelligence (AI)-generated essays by integrating the bidirectional encoder representations from transformers (BERT) model with particle swarm optimization (PSO). Unlike traditional approaches that rely on manual hyperparameter tuning, this study introduces a systematic optimization technique using PSO to improve BERT’s performance in identifying AI-generated content. The key problem addressed is the lack of effective, real-time detection systems that preserve academic integrity amidst rapid AI advancements. This optimization enhances the model’s detection accuracy and operational efficiency. The research dataset consisted of 46,246 essays, which, after data cleaning, were refined to 44,868. The model was then tested on 9,250 essays. Initial evaluations showed BERT's accuracy ranging from 83% to 94%. After being optimized with PSO, the model achieved an accuracy of 98%, an F1-score of 98.31%, precision of 97.75%, and recall of 98.87%. The model was deployed using a FastAPI-based web interface, enabling real-time detection and providing users with an efficient way to quickly verify text authenticity. This research contributes a scalable, automated solution for AI-generated text detection and offers promising implications for its application in various academic and digital content verification contexts.
Keywords
Artificial intelligence generates essay detection; Bidirectional encoder portrayal for transformers algorithm; Particle swarm optimization algorithm; Natural language processing; Optimization parameter
Full Text:
PDFDOI: http://doi.org/10.11591/ijece.v15i6.pp5543-5554
Copyright (c) 2025 Tegar Arifin Prasetyo, Rudy Chandra, Wesly Mailander Siagian, Horas Marolop Amsal Siregar, Samuel Jefri Saputra Siahaan

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
International Journal of Electrical and Computer Engineering (IJECE)
p-ISSN 2088-8708, e-ISSN 2722-2578
This journal is published by the Institute of Advanced Engineering and Science (IAES).