LM$^2$otifs : An Explainable Framework for Machine-Generated Texts Detection
Xu Zheng, Zhuomin Chen, Esteban Schafir, Sipeng Chen, Hojat Allah Salehi, Haifeng Chen, Farhad Shirani, Wei Cheng, Dongsheng Luo
TL;DR
LM$^2$otifs presents an explainable framework for detecting machine-generated texts by modeling text as a co-occurrence graph of tokens and documents and applying a GNN-based detector trained on this graph. A key novelty is the post-hoc extraction of interpretable motifs via GNNExplainer, enabling explanations at word, phrase, and sentence levels grounded in probabilistic graphical model reasoning. The theoretical analysis shows that PGB detectors generalize ESB detectors and can strictly improve detection accuracy under certain distributions and context-length constraints. Comprehensive experiments across HC3, M4, RAID, and other domains demonstrate competitive performance and meaningful explainable motifs, validated with MoRF/LeRF evaluations. The approach offers a practical, interpretable alternative to black-box detectors, with implications for robust authorship authentication and forensic linguistics.
Abstract
The impressive ability of large language models to generate natural text across various tasks has led to critical challenges in authorship authentication. Although numerous detection methods have been developed to differentiate between machine-generated texts (MGT) and human-generated texts (HGT), the explainability of these methods remains a significant gap. Traditional explainability techniques often fall short in capturing the complex word relationships that distinguish HGT from MGT. To address this limitation, we present LM$^2$otifs, a novel explainable framework for MGT detection. Inspired by probabilistic graphical models, we provide a theoretical rationale for the effectiveness. LM$^2$otifs utilizes eXplainable Graph Neural Networks to achieve both accurate detection and interpretability. The LM$^2$otifs pipeline operates in three key stages: first, it transforms text into graphs based on word co-occurrence to represent lexical dependencies; second, graph neural networks are used for prediction; and third, a post-hoc explainability method extracts interpretable motifs, offering multi-level explanations from individual words to sentence structures. Extensive experiments on multiple benchmark datasets demonstrate the comparable performance of LM$^2$otifs. The empirical evaluation of the extracted explainable motifs confirms their effectiveness in differentiating HGT and MGT. Furthermore, qualitative analysis reveals distinct and visible linguistic fingerprints characteristic of MGT.
