Classifying human vs. AI text with machine learning and explainable transformer models
Adven Masih, Bushra Afzal, Shamyla Firdoos, Jabar Mahmood, Aitizaz Ali, Mohamed Abdulnabi, Daniel Musafiri Balungu
University of Management and Technology · Zhejiang University of Science and Technology
Key points
From the paper's conclusion- In conclusion, RoBERTa emerges as a reliable, interpretable, and computationally efficient model for detecting AI-generated content.
Abstract
The rapid proliferation of AI-generated text from models such as ChatGPT-3.5 and ChatGPT-4 has raised critical challenges in verifying content authenticity and ensuring ethical use of language technologies. This study presents a comprehensive framework for distinguishing between human-written and GPT-generated text using a combination of machine learning, sequential deep learning, and transformer-based models. A balanced dataset of 20,000 samples was compiled, incorporating diverse linguistic and topical sources. Traditional algorithms and sequential architectures (LSTM, GRU, BiLSTM, BiGRU) were compared against advanced transformer models, including BERT, DistilBERT, ALBERT, and RoBERTa. Experimental findings revealed that RoBERTa achieved the highest performance (Accuracy = 96.1%), outperforming all baselines. Post-hoc temperature scaling (T = 1.476) improved calibration, while threshold tuning (t = 0.957) enhanced precision for high-stakes applications. McNemar's test with Holm correction confirmed the statistical significance (p < 0.05) of RoBERTa's superiority. Efficiency analysis showed optimal trade-offs between accuracy and latency, and 20% pruning demonstrated sustainability potential. Furthermore, LIME and SHAP explainability analyses highlighted linguistic distinctions between AI-generated and human-authored text, and fine-grained error evaluation confirmed model robustness across text lengths. In conclusion, RoBERTa emerges as a reliable, interpretable, and computationally efficient model for detecting AI-generated content.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Hybrid deep learning for three-way classification of human-written, AI-generated, and AI-rephrased textScientific Reports · 2026
- SiBot: A hybrid framework for fine-grained semantic attribution of AI-generated text and its production deployment.PloS one · 2026
- Performance evaluation and interpretability of a Qwen LangGraph agent for AI written and AI rewritten text detectionDiscover Computing · 2026
- A stylometric machine learning framework for authorship attribution of ChatGPT and student generated texts.Frontiers in artificial intelligence · 2026
- Building Auditable AI Text Detectors with Sparse AutoencodersarXiv · 2026
- Ontological Instability and Statistical Amplification: The Paradox of "Humanizing" LLM-Generated TextarXiv · 2026