Introduction
As Large Language Models (LLMs) become ubiquitous, the distinction between human and machine authorship is increasingly blurred. While many AI detection tools focus on classifying entire documents as either human or machine-generated, real-world usage often involves "hybrid" texts. For instance, a student might write an introduction and use an LLM to complete the essay. This paper addresses the challenge of word-level boundary detection: identifying the exact point where a text transitions from human-written to machine-generated.
The Challenge of Hybrid Text Detection
Existing AI detectors are often "all-or-nothing" systems that fail when faced with partially generated texts. These tools struggle to pinpoint the specific "hand-off" point, often producing results no better than random guessing. This task, part of the SemEval-2024 Task 8 competition, requires a more granular approach than simple document-level classification.
Methodology: DeBERTa-CRF Architecture
The author explored several transformer-based architectures, ultimately proposing a combination of DeBERTa-v3-base and a Conditional Random Field (CRF) layer.
The CRF layer is crucial for boundary detection because it considers the relationships between neighboring labels rather than classifying each token independently. The model identifies the split by looking for changes in consecutive token predictions (e.g., moving from a sequence of '0's to a sequence of '1's), which helps filter out noisy individual token predictions.
Experimental Setup
The study utilized the M4GT-bench Dataset, which contains English texts from academic paper reviews (PeerRead) and student essays (OUTFOX). While the training data used ChatGPT as the generator, the test set introduced "unseen" generators—LLaMA2 and GPT-4—to evaluate the model's ability to generalize to AI models it wasn't trained on.
Results and Analysis
The DeBERTa-CRF model emerged as a highly effective solution, significantly outperforming popular proprietary tools like ZeroGPT.
Key Findings:
- Sentence-Level Accuracy: The model achieved 99.69% accuracy on the test set, vastly outperforming ZeroGPT’s ~80%.
- Word-Level Precision: On the development set, it achieved a Mean Average Error (MAE) of 2.192, meaning its predicted boundary was, on average, only about two words away from the ground truth.
- Robustness to Length: Unlike ZeroGPT, which was found to be unreliable on shorter inputs, the DeBERTa-CRF model maintained high accuracy regardless of sentence length.
- Generalization: The model remained effective on unseen generators (LLaMA2/GPT-4), though word-level error increased slightly compared to the seen generator.
- POS Tag Influence: Errors in boundary detection were found to be correlated with specific Part-of-Speech (POS) tag combinations. Transitions underrepresented in the training data (e.g., specific Verb-to-Noun hand-offs) led to higher error rates.
Conclusion and Future Work
The combination of DeBERTa and a CRF layer provides a robust framework for pinpointing transitions in hybrid human-AI texts. Future work will focus on expanding the model to handle multiple transition points (interleaved text), adapting it for multilingual contexts using mDeBERTa, and implementing chunking strategies to process documents that exceed the standard 512-token limit of transformer models.
Summary updated