The rise of large language models (LLMs) has created an urgent need to distinguish between human-written and LLM-generated text to ensure authenticity and societal trust. Existing detectors typically provide a binary classification for an entire passage; however, this is insufficient for human--LLM co-authored text, where the objective is to localize specific segments authored by humans or LLMs. To bridge this gap, we propose algorithms to segment text into human- and LLM-authored pieces. Our key observation is that such a segmentation task is conceptually similar to classical change point detection in time-series analysis. Leveraging this analogy, we adapt change point detection to LLM-generated text detection, develop a weighted algorithm and a generalized algorithm to accommodate heterogeneous detection score variability, and establish the minimax optimality of our procedure. Empirically, we demonstrate the strong performance of our approach against a wide range of existing baselines.
翻译:大型语言模型(LLMs)的兴起引发了迫切需求,即区分人类撰写的文本与LLM生成的文本,以保障真实性与社会信任。现有检测器通常为整段文本提供二元分类,但这不足以处理人类与LLM合著的文本——其目标是精准定位由人类或LLM撰写的具体片段。为弥补这一不足,我们提出将文本分割为人类撰写与LLM生成片段的算法。关键发现是:此类分割任务在概念上类似于时间序列分析中的经典变点检测。基于这一类比,我们将变点检测方法适配于LLM生成文本检测,开发了加权算法与通用算法以应对异构检测评分变异,并确立了所提过程的极小化最优性。实验表明,与现有多种基线方法相比,我们的方法展现出优异性能。