Abstract
As Large Language Models (LLMs) achieve near-human fluency, traditional AI detectors based on surface-level linguistic features are becoming increasingly ineffective. This paper introduces a novel approach to AI text detection by analyzing "discourse motifs"—recurring structural patterns in the logical organization of a document. By representing text as recursive hypergraphs based on Rhetorical Structure Theory (RST), the researchers identify unique structural signatures that distinguish human writing from machine-generated content. This structural approach proves more robust against paraphrasing attacks and generalizes better across diverse domains.
Introduction: The Vanishing Surface
The rapid advancement of LLMs has narrowed the gap between human and machine-authored text. Most existing detection methods rely on statistical anomalies in word choice or n-gram frequencies. However, these surface-level features are easily manipulated through simple paraphrasing.
The core hypothesis of this work is that humans and machines approach the writing process differently. While LLMs are optimized for "next token prediction," humans typically follow a hierarchical writing process, organizing ideas into a logical structure of claims, evidence, and transitions.
Methodology: From Text to Discourse Motifs
To capture these structural differences, the researchers developed a pipeline that transforms raw text into a mathematical representation of its logical flow.
- Rhetorical Structure Theory (RST) Parsing: Documents are decomposed into Elementary Discourse Units (EDUs) linked by relations such as Elaboration, Contrast, or Condition.
- Recursive Hypergraph Representation: Because discourse relations can be nested (e.g., a contrast between two multi-sentence arguments), the authors use recursive hypergraphs to model the hierarchical nature of the RST trees.
- Motif Analysis and MF-IDF: The graphs are broken down into "motifs"—small, recurring sub-structures. To identify the most distinctive patterns, the team introduced Motif Frequency-Inverse Document Frequency (MF-IDF), a metric that highlights structural signatures unique to specific authors or text types.
Experimental Setup and Datasets
The study evaluated the motif-based approach using three primary datasets:
- HC3-English: Paired human and ChatGPT responses in specialized domains like finance and medicine.
- DEEPFAKETEXTDETECT: A large-scale collection featuring 27 different LLMs across 10 domains.
- TENPAGESTORIES: A new dataset introduced by the authors to test long-form detection (up to 8,000 tokens), featuring GPT-4 generated narratives under various constraints.
Key Insights: Structural Signatures
The analysis revealed several fundamental differences in how humans and machines structure their writing:
- Variability: Human writing shows significantly higher structural variability across different domains, whereas LLMs tend to use more rigid, predictable patterns.
- Relation Biases: Machine-generated texts rely heavily on "Background" relations. Human texts favor "Joint" relations, resulting in more complex, evenly branching discourse trees.
- Robustness: Because discourse motifs represent the underlying logic rather than specific words, they remain stable even when text is paraphrased to bypass traditional detectors.
Results
Integrating discourse motifs into classification models (Random Forest, Graph Attention Network, and Longformer) consistently improved performance:
- Accuracy Gains: On the HC3 dataset, adding motifs to a Graph Attention Network (GAT) increased the F1 score from 0.67 to 0.73.
- Out-of-Distribution (OOD) Resilience: In OOD tests involving paraphrased samples, the Longformer model enhanced with motifs achieved an F1 of 0.62, outperforming the base model's 0.60.
- Long-form Detection: The motif features significantly improved the detection of machine-inserted content within long narratives in the TENPAGESTORIES dataset.
Conclusion and Future Work
By looking past the "surface" of text and into its structural "threads," this research provides a more robust framework for AI detection. While the method currently depends on the accuracy of external RST parsers, future work aims to leverage LLMs themselves to build more resilient parsers and explore even larger, more complex discourse motifs.
Summary updated