Detecting machine-generated text is especially difficult under distribution shift, such as transfer across domains, source models, and editing attacks. We propose a fake-text detector based on steering vectors extracted from the hidden representations of a frozen language model. At each layer, we construct a direction that separates human-written from machine-generated text, and represent each input by its layer-wise alignment with these directions. A lightweight classifier trained on these projection features yields the final detection score. Our method achieves strong performance both in-distribution and under distribution shift, including across domains, source models, and machine-editing transformations such as polishing and rewriting. Interpretation analyses show that the learned directions align with recognizable stylistic cues while capturing substantial additional signal beyond surface features. These results position fake-text detection as a representation-space probing problem and show that steering vectors provide a simple and effective solution.
翻译:在分布偏移(如跨领域、源模型及编辑攻击的迁移)条件下,检测机器生成文本尤为困难。我们提出了一种基于冻结语言模型隐层表征中提取的引导向量的虚假文本检测方法。在每一层中,我们构建一个区分人类撰写文本与机器生成文本的方向,并通过输入文本与该方向在各层的对齐程度进行表征。基于这些投影特征训练的轻量级分类器可输出最终检测得分。我们的方法在分布内及分布偏移条件下均表现优异,涵盖跨领域、跨源模型以及润色、改写等机器编辑变换场景。解释性分析表明,学习到的方向与可识别的文体特征相吻合,同时在其表面特征之外捕获了显著额外信号。这些结果将虚假文本检测定位为表征空间探测问题,并表明引导向量提供了一种简单有效的解决方案。