Human vs. AI Text Classification: A Comprehensive Study Using Machine Learning and Deep Learning Approaches

Read full text
Authors: Huzaifa Nasir
Cited by: 0

Abstract

This research presents a comprehensive comparative study on binary text classification to distinguish between human-written and AI-generated text. Leveraging the HC3 (Human-ChatGPT Comparison Corpus) dataset comprising 52,452 text samples across multiple domains (finance, medicine, open QA, Reddit ELI5, Wikipedia), we develop and evaluate six diverse classification approaches including traditional machine learning methods (Logistic Regression, Random Forest, SVM, XGBoost) and deep learning architectures (Bidirectional LSTM with Attention, BERT). Our methodology employs a hybrid feature engineering strategy combining TF-IDF vectorization (5,000 features) with 15 handcrafted linguistic features, resulting in a 5,015-dimensional feature space. We implement and compare four ensemble methods: Hard Voting, Soft Voting, Weighted Average, and Stacking. The weighted ensemble approach achieves an exceptional F1-score of 99.59%, outperforming all individual models with near-perfect discrimination (ROC-AUC: 0.9998) and minimal error rate (0.41%). Key findings demonstrate that traditional machine learning models with carefully engineered features can match or exceed deep learning performance on this task, with XGBoost achieving 99.04% F1-score as the best individual classifier. The study provides detailed analysis of feature importance, model diversity, training dynamics, computational complexity, and practical deployment considerations. This work contributes to the growing field of AI-generated text detection, offering practical insights for applications in academic integrity verification, content moderation, and misinformation prevention. All experimental results, trained models, and implementation code are publicly available on Hugging Face and GitHub for reproducibility.

Fields of Study & Subjects

Misinformation and Its Impacts Academic integrity and plagiarism Artificial Intelligence in Healthcare and Education

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
2 January 2026
Language
EN