Short-PHD: Detecting Short LLM-generated Text with Topological Data Analysis After Off-topic Content Insertion
Dongjun Wei, Minjia Mao, Xiao Fang, Michael Chau
TL;DR
Short-PHD tackles the challenge of detecting short LLM-generated texts by stabilizing persistence-based scores through Off-topic Content Insertion (OCI). By modeling PHD scores as normal and leveraging multiple OCI insertions to reduce estimation variance, Short-PHD achieves higher AUC than prior PHD and other zero-shot detectors on short texts, while remaining robust to common detection attacks. The approach maintains a discriminative gap between human-written and machine-generated text, enabling effective threshold-based detection in zero-shot settings. Across public and generated datasets, the results demonstrate practical viability for rapid, model-agnostic detection of short content.
Abstract
The malicious usage of large language models (LLMs) has motivated the detection of LLM-generated texts. Previous work in topological data analysis shows that the persistent homology dimension (PHD) of text embeddings can serve as a more robust and promising score than other zero-shot methods. However, effectively detecting short LLM-generated texts remains a challenge. This paper presents Short-PHD, a zero-shot LLM-generated text detection method tailored for short texts. Short-PHD stabilizes the estimation of the previous PHD method for short texts by inserting off-topic content before the given input text and identifies LLM-generated text based on an established detection threshold. Experimental results on both public and generated datasets demonstrate that Short-PHD outperforms existing zero-shot methods in short LLM-generated text detection. Implementation codes are available online.
