Human vs. AI Text Classification: A Comprehensive Study Using Machine Learning and Deep Learning Approaches
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.
Authors
- Huzaifa Nasir
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-01-02
- DOI
- https://doi.org/10.5281/zenodo.18133068
- Primary Topic
- Misinformation and Its Impacts
- Type
- article
- Field-Weighted Citation Impact
- 0.00