Towards Detecting AI-Generated Text within Human-AI Collaborative Hybrid Texts

Zijie Zeng, Shiqi Liu, Lele Sha, Zhuang Li, Kaixun Yang, Sannyuya Liu, Dragan Gasevic, Guanliang Chen · DOI

The Challenge of Hybrid Authorship

As AI writing assistants become integrated into standard workflows, the distinction between human and machine authorship is increasingly blurred. Most current AI text detectors operate on a binary assumption—that a document is either entirely human-written or entirely AI-generated. However, real-world usage often results in "hybrid" texts where humans and AI collaborate through multi-turn interactions, editing, and polishing.

Detecting these collaborative works is a significant challenge. Unlike simple synthetic datasets where an AI merely continues a human's prompt, realistic hybrid texts involve frequent authorship changes and human interventions that mask the machine's stylistic fingerprints. This paper addresses the problem of identifying AI-generated content at the sentence level within these complex, collaborative documents.

A Two-Step Detection Pipeline

The researchers propose a modular pipeline to tackle hybrid text detection, consisting of two primary stages: segmentation and classification.

  1. Segmentation: The goal is to identify boundaries within the text where authorship shifts. The study evaluated several approaches, including TriBERT (a specialized boundary detector), SegFormer (a topic segmentation model), and a Naive approach that treats every sentence as an independent segment.
  2. Classification: Once segments are identified, they are labeled as Human, AI, or Collaborative. The researchers tested several state-of-the-art models, with DeBERTa-v3 emerging as the most robust classifier.
The segmentation process identifies boundaries between human-written, AI-generated, and collaborative sentences.

The CoAuthor Dataset

To move beyond simplistic benchmarks, the study utilizes the CoAuthor dataset. This dataset contains 1,445 essays produced by 63 human writers interacting with a GPT-3-based assistant. It captures a wide range of collaborative behaviors, including instances where humans accept, reject, or edit AI suggestions. This provides a realistic "in-the-wild" environment where human editing often acts as a mask, smoothing out the statistical anomalies typically used by AI detectors.

Results: The Impact of Segment Length

A key finding of the research is that the optimal detection strategy is highly dependent on the "average segment length" ($l$)—the number of consecutive sentences written by the same author before a hand-off occurs.

  • Long Segments ($l > 6$): When authors trade off infrequently, segmentation-based models like SegFormer perform best, as they can leverage more context to find stable boundaries.
  • Short Segments ($l \le 3$): In cases of frequent collaboration, segmentation models often become "confused" by the noise. In these scenarios, the Naive approach—simply classifying every sentence individually—actually yields superior results.
Comprehensive performance metrics (Kappa scores) across different segment length groups (G1-G3) and overall (G0).

As shown in the experimental results, there is a significant performance gap between long and short segments. In Group G3 (long segments), the mean Kappa score for the SegFormer strategy was 0.2825, but this dropped to 0.2197 in Group G1 (short segments). Overall, the highest mean Kappa score recorded for the entire test set was a modest 0.3447 using DeBERTa-v3, highlighting that sentence-level detection remains an open and difficult challenge.

Conclusion and Future Directions

The study demonstrates that sentence-level detection in hybrid texts is far from a solved problem. The inherent difficulty of short-text classification, combined with the masking effect of human editing, limits the effectiveness of current models. Future work may involve developing "pre-detection" models to estimate authorship change frequency or focusing on the specific linguistic markers left behind when humans edit machine-generated prose.

Summary updated

BibTeX
@inproceedings{zeng2024towards,
  author = {Zijie Zeng and Shiqi Liu and Lele Sha and Zhuang Li and Kaixun Yang and Sannyuya Liu and Dragan Gasevic and Guanliang Chen},
  title = {{Towards Detecting AI-Generated Text within Human-AI Collaborative Hybrid Texts}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
}
Figure