Why AI-Generated Text Detection Fails: Evidence from Explainable AI Beyond Benchmark Accuracy
Organizations: Technological University Dublin · University College Dublin
Abstract
The widespread adoption of Large Language Models (LLMs) has made the detection of AI-Generated text a pressing and complex challenge. Although many detection systems report high benchmark accuracy, their reliability in real-world settings remains uncertain, and their interpretability is often unexplored. In this work, we investigate whether contemporary detectors genuinely identify machine authorship or merely exploit dataset-specific artefacts. We propose an interpretable detection framework that integrates linguistic feature engineering, machine learning, and explainable AI techniques. When evaluated on two prominent benchmark corpora, namely PAN CLEF 2025 and COLING 2025, our model trained on 30 linguistic features achieves leaderboard-competitive performance, attaining an F1 score of 0.9734. However, systematic cross-domain and cross-generator evaluation reveals substantial generalisation failure: classifiers that excel in-domain degrade significantly under distribution shift. Using SHAP- based explanations, we show that the most influential features differ markedly between datasets, indicating that detectors often rely on dataset-specific stylistic cues rather than stable signals of machine authorship. Further investigation with in-depth error analysis exposes a fundamental tension in linguistic-feature-based AI text detection: the features that are most discriminative on in-domain data are also the features most susceptible to domain shift, formatting variation, and text-length effects. We believe that this knowledge helps build AI detectors that are robust across different settings. To support replication and practical use, we release an open-source Python package that returns both predictions and instance-level explanations for individual texts.
Figures & tables
| Feature | Description | How It Is Calculated |
| Surface and Length Features | ||
| Character Count | Total characters in the document. | Count all characters, including spaces. |
| Word Count | Total word tokens. | Split on whitespace and count tokens. |
| Sentence Count | Number of Sentences. | Sentence tokenisation count. |
| Paragraph Count | Number of paragraphs. | Count non-empty segments split by newlines. |
| Punctuation Count | Total punctuation symbols. | Count standard punctuation characters. |
| Attribute | PAN CLEF Dataset | COLING Dataset | Ghostbuster Dataset |
| Task Name | Voight–Kampff Generative AI Detection 2025 (Subtask 1) | GenAI Content Detection Task 1 (English & Multilingual) | Research benchmark (NAACL 2024) |
| Domains Considered | Essays, news, fiction | Peer reviews, student essays, scientific papers, news, and 8+ additional domains | Student essays, creative writing, news |
| Training Data Size | 23,707 samples (9,101 human / 14,606 AI) | 610,767 English samples (228,922 human / 381,845 machine) | Not used for training purposes |
| Dev / Validation Size | 3,589 samples (1,277 human / 2,312 AI) | 261,758 English samples (98,328 human / 163,430 machine) | Same-prompt splits; 6,000 text(2000 human-written,2000 generated with GPT and 2000 generated with Claude); used only for evaluation |
| Generators | GPT-4o and participant models with obfuscation | GPT-4/4o, Mistral, Llama 3.1, Qwen-2, Claude, others | GPT-3.5-turbo (training); Claude (generalisation) |
| Evaluation Metrics | ROC–AUC, Brier, C@1, F1, F0.5u, mean score, FPR/FNR | Macro-F1 (official), Accuracy, Micro-F1 | F1 score, Accuracy |
| Feature | PAN CLEF | COLING | Ghostbuster | |||
| Human | AI | Human | AI | Human | AI | |
| Character Count | ||||||
| Word Count | ||||||
| Paragraph Count | ||||||
| Stopword Count | ||||||
| Unique Word Count | ||||||
| Algorithm | F1-score |
| mdok of KInIT [ 37 ] | 98.90 |
| Optimised Feature Set + SVC (Ours) | 97.34 |
| Optimised Feature Set + XGBoost (Ours) | 96.94 |
| Optimised Feature Set + Random Forest (Ours) | 95.82 |
| Optimised Feature Set + Logistic Regression (Ours) | 95.48 |
| Baseline TF-IDF SVM [ 5 ] | 90.40 |
| Model | Accuracy | Precision | Recall | F1 Score | FPR | FNR |
| XGBoost | 96.04 | 96.45 | 97.45 | 96.94 | 6.50 | 2.55 |
| Random Forest | 94.51 | 94.12 | 97.58 | 95.82 | 11.04 | 2.42 |
| Logistic Regression | 94.09 | 94.19 | 96.80 | 95.48 | 10.08 | 3.20 |
| SVM | 96.55 | 96.71 | 97.97 | 97.34 | 6.03 | 2.03 |
| Model | Accuracy | Precision | Recall | F1 Score | ROC-AUC |
| SVM | 0.9697 0.0045 | 0.9731 0.0051 | 0.9778 0.0036 | 0.9754 0.0036 | 0.9942 0.0015 |
| XGBoost | 0.9678 0.0033 | 0.9717 0.0028 | 0.9762 0.0034 | 0.9739 0.0027 | 0.9943 0.0009 |
| Random Forest | 0.9505 0.0044 | 0.9500 0.0037 | 0.9707 0.0044 | 0.9602 0.0035 | 0.9878 0.0019 |
| Logistic Regression | 0.9431 0.0043 | 0.9490 0.0048 | 0.9591 0.0050 | 0.9540 0.0034 | 0.9826 0.0015 |
| Comparison | F1 | t-test p-value | Significant? |
| SVM vs. XGBoost | +0.0015 | 0.0984 | No |
| SVM vs. Random Forest | +0.0152 | Yes | |
| SVM vs. Logistic Regression | +0.0214 | Yes | |
| XGBoost vs. Random Forest | +0.0137 | Yes | |
| XGBoost vs. Logistic Regression | +0.0199 | Yes | |
| Random Forest vs. Logistic Regression | +0.0062 | Yes |
| Train Set | Algorithm | PAN CLEF | COLING |
| PAN CLEF | SVC | 97.34 | 76.59 |
| XGBoost | 96.94 | 67.23 | |
| Random Forest | 95.82 | 74.86 | |
| Logistic Regression | 95.48 | 76.53 | |
| COLING | SVC | 78.05 | 76.79 |
| XGBoost | 78.56 | 78.53 |
| LLM | Best-PAN | Best-COL |
| GPT-5.2 | 23.25 | 3.42 |
| DeepSeek V3.2 | 0.76 | 3.51 |
| Gemini 3 Pro | 0.43 | 18.40 |
| Subset | Best-PAN | Best-COL | Ens-PAN | Ens-COL |
| WP | 60.15 | 59.36 | 92.87 | 77.77 |
| Reuters | 55.80 | 85.59 | 96.88 | 90.98 |
| Essay | 76.07 | 90.83 | 94.09 | 92.64 |
| Average | 64.0 | 78.59 | 94.61 | 87.13 |
| Type | Count | Words (Mean) | Words (Median) | Paragraph (Mean) | Paragraph (Median) | GZIP (Mean) | GZIP (Median) |
| FN | 139 | 177.48 | 183 | 13.24 | 3 | 0.724 | 0.557 |
| FP | 2753 | 221.48 | 171 | 4.13 | 1 | 0.574 | 0.548 |
| TN | 967 | 421.03 | 212 | 24.69 | 17 | 0.628 | 0.518 |
| TP | 6141 | 242.89 | 198 | 5.36 | 1 | 0.535 | 0.510 |
AI-Generated Text Detection
AI-generated text detection develops methods to distinguish human-written, machine-generated, and AI-edited text.
See all 167 papers