arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.02008cs.CL
收藏

$k$NNProxy:高效无训练代理对齐方法用于黑盒零样本LLM生成文本检测

$k$NNProxy: Efficient Training-Free Proxy Alignment for Black-Box Zero-Shot LLM-Generated Text Detection

School of Information and Software Engineering, University of Electronic Science and Technology of China(电子科技大学信息与软件工程学院)

Kahim Wong, Kemou Li, Haiwei Wu, Jiantao Zhou

AI总结:

本文提出$ k $NNProxy方法,利用$ k $NN语言模型检索机制作为领域适配器,实现无训练的代理对齐,提升黑盒零样本LLM生成文本检测的鲁棒性与效率。

摘要:

LLM生成文本(LGT)检测对于可靠取证分析和防止LLM滥用至关重要。现有LGT检测器可分为基于学习的方法和零样本方法。与基于学习的检测器相比,零样本方法因其无需训练任务特定分类器而更具潜力。然而,零样本方法的可靠性依赖于假设现成的代理LLM与未知源LLM的良好对齐,这一假设在现实黑盒场景中很少成立。为解决这一差距,现有代理对齐方法通常依赖于代理的监督微调或与商业API的反复交互,从而增加部署成本、使检测器暴露于静默API更改,并限制领域转移下的鲁棒性。受这些限制的启发,我们提出$ k $-nearest neighbor proxy($ k $NNProxy),一种无训练且查询高效的代理对齐框架,将$ k $NN语言模型($ k $NN-LM)检索机制重新利用为固定代理LLM的领域适配器。具体而言,从目标反思的LGT语料库中构建一个轻量级数据存储,可通过固定预算查询或现有数据集实现。在推理过程中,最近邻证据诱导出一个token级预测分布,通过插值代理输出,从而在无需代理微调或每token API输出的情况下获得对齐预测。为提高领域转移下的鲁棒性,我们将$ k $NNProxy扩展为代理混合(MoP),将每个输入路由到领域特定的数据存储以实现领域一致的检索。大量实验表明,我们的方法具有强大的检测性能。

英文摘要:

LLM-generated text (LGT) detection is essential for reliable forensic analysis and for mitigating LLM misuse. Existing LGT detectors can generally be categorized into two broad classes: learning-based approaches and zero-shot methods. Compared with learning-based detectors, zero-shot methods are particularly promising because they eliminate the need to train task-specific classifiers. However, the reliability of zero-shot methods fundamentally relies on the assumption that an off-the-shelf proxy LLM is well aligned with the often unknown source LLM, a premise that rarely holds in real-world black-box scenarios. To address this discrepancy, existing proxy alignment methods typically rely on supervised fine-tuning of the proxy or repeated interactions with commercial APIs, thereby increasing deployment costs, exposing detectors to silent API changes, and limiting robustness under domain shift. Motivated by these limitations, we propose the $k$-nearest neighbor proxy ($k$NNProxy), a training-free and query-efficient proxy alignment framework that repurposes the $k$NN language model ($k$NN-LM) retrieval mechanism as a domain adapter for a fixed proxy LLM. Specifically, a lightweight datastore is constructed once from a target-reflective LGT corpus, either via fixed-budget querying or from existing datasets. During inference, nearest-neighbor evidence induces a token-level predictive distribution that is interpolated with the proxy output, yielding an aligned prediction without proxy fine-tuning or per-token API outputs. To improve robustness under domain shift, we extend $k$NNProxy into a mixture of proxies (MoP) that routes each input to a domain-specific datastore for domain-consistent retrieval. Extensive experiments demonstrate strong detection performance of our method.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑