Contrastive Transformer Framework for Explainable Detection of AI-Generated and Rephrased English Text
Keywords:
Automated text generation, English language, Human-written text, Language models, Text classification, Text detectionAbstract
Generative Artificial Intelligence (GAI) and LLMs have transformed English textgeneration, editing, summarization, and rephrasing, creating increasing concerns regarding academic integrity, authenticity, misinformation, and the credibility of digital communication. Distinguishing human-written, AI-generated, and AI-rephrased text remains challenging because AI rephrasing can preserve semantic meaning while substantially altering linguistic characteristics. Existing detection approaches often focus on either contextual semantic representations or handcrafted linguistic features and provide limited interpretability of classification decisions. To address these limitations, this study proposes a Contrastive Transformer Framework for explainable three class detection of human-written, AI-generated, and AI-rephrased English text. The framework employs DeBERTaV3 to capture contextual semantic representations and multi-level contrastive learning to enhance separation among closely related text classes. Textagon-based lexical, syntactic, readability, and stylistic features are extracted and encoded through a Hierarchical Attention Network (HAN), after which semantic and linguistic representations are fused for classification. Layer Integrated Gradients provides interpretable evidence supporting each prediction, while cross-domain evaluation examines generalization between educational and news text. The proposed framework was evaluated using 12,000 texts comprising balanced human-written, AI generated, and AI-rephrased samples from both domains. The complete framework achieved 94.6% accuracy, 94.4% precision, 94.2% recall, and 94.3% F1-score, outperforming the Neural Network, XGBoost, and PPL based Random Forest baselines. Cross-domain accuracy reached 90.8% for educational-to-news and 91.4% for news-to-educational evaluation. The novelty lies in integrating contrastive DeBERTaV3 representations, Textagon-HAN linguistic modeling, semantic-linguistic fusion, and Layer Integrated Gradients for explainable three-class and cross-domain detection. The findings demonstrate accurate, interpretable, and robust identification of AI-generated and AI-rephrased English text.
Downloads
Downloads
Published
Issue
Section
License
You are free to:
- Share — copy and redistribute the material in any medium or format for any purpose, even commercially.
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
- The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
- Attribution — You must give appropriate credit , provide a link to the license, and indicate if changes were made . You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation .
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.

