帮助 AI 文本检测器适应不断变化的环境

如果一位老师怀疑学生的学期论文可能是由大语言模型(LLM)撰写的,可以借助人工智能生成文本检测工具来帮助证实自己的怀疑。但在完全信任这类检测器之前,老师或许需要三思。
来自 MIT 和康奈尔大学的研究人员表明,这类检测工具本身就是 AI 模型,它们会被伪装成人类撰写的 AI 生成文本所欺骗。此外,由于写作习惯随时间自然变化,或新 LLM 不断涌现,检测器也可能无法识别 AI 文本。
在一篇新论文中,研究人员展示了一种特殊的训练技术如何让 AI 检测器更加准确、更能抵御欺骗,即便人类和 AI 的写作方式在不断变化。
他们采用了一种名为测试时自适应(test-time adaptation)的方法,使已部署的检测模型能够通过即时调整其内部机制,从新的无标注数据中学习。这样一来,模型无需从头重新训练,就能适应未见过的输入。
在实验中,一款商用检测器只能识别出约 27% 经过伪装的 AI 生成文本,而新方法的准确率达到了 93%。
这一方法可以帮助教育工作者、编辑、出版商和招聘经理标记出人们试图冒充为人类撰写的 LLM 生成文本。网络安全专家也可以用它来防范电子邮件钓鱼诈骗,或识别搜索引擎优化欺诈。
“从科学出版到短篇小说比赛,在许多利害攸关的场景中,人们确实很在意作者的身份。我们已经证明,测试时自适应(test-time adaptation)能让你的 AI 检测器稳健得多,即便 AI 用户持续采取对抗行为也是如此,”该研究的合著者、MIT 斯隆管理学院 Drew Houston(2005)职业发展教授 Manish Raghavan 说。他同时在 MIT 苏世民计算学院电子工程与计算机科学系(EECS)有联合聘任,也是信息与决策系统实验室(LIDS)的首席研究员。
与他共同完成这篇论文的还有第一作者、康奈尔科技校区研究生 Kevin Ren,以及资深作者、康奈尔科技校区助理教授 Nikhil Garg。该研究将在神经信息处理系统大会上展示。
骗过检测器
能够生成类人文本的 LLM 大量涌现,催生了众多商业 AI 检测工具,帮助人们判断一段文字是否由人类撰写。
但当这些检测工具所评估的文本与其受训识别的文本存在显著差异时,它们就可能失效。这被称为分布偏移。
检测器开发者通常通过从互联网上收集他们确知由 AI 或人类生成的文本来训练模型,让模型学会区分二者。
然而,检测器一经发布,人们可能会改变自己的写作方式,或改变使用 AI 生成文本的方式。
举例来说,2030 年的人可能会用 2010 年写作的人不常用的新类比来写不同的话题。用 2010 年数据训练出来的检测器可能不熟悉这种新的写作风格,从而错误地把人类写的文本标记为 AI 生成。
检测模型的发布还会在其开发者与想要绕过它的用户之间引发一场猫鼠游戏。这些人可以把 AI 生成的文本输入自动化的“去 AI 化”(humanizer)软件工具,让它经过修改后对检测器显得像是人类写的。
“公司发布模型之后,会冒出一堆‘去 AI 化’工具试图打败它,于是公司又试着把这类去 AI 化后的文本纳入训练,好让检测器能识别出来,如此循环。就像洗一遍再来一遍(rinse-and-repeat)。这个循环可以永远持续下去。”Ren 说。
研究人员探究了测试时自适应(TTA)能否让 AI 检测器对这类分布偏移保持稳健。
自适应如何发挥作用
在 TTA 中,研究人员不是把模型冻结、使其在部署期间无法改变,而是允许模型在发布之后自行适应传入的数据。对于 AI 文本检测器而言,这些数据就是用户上传的新文本片段。
这些数据没有标注,因此检测器的开发者并不知道哪些数据由人类写成、哪些由 AI 模型写成。但这些新数据代表了当下的人类写作与 AI 写作——正是开发者希望模型能够预测的内容。
有了足够多的样本,检测器就能学会识别模式,从而判断哪些数据是 AI 生成、哪些是人类生成。
研究人员通过构建包含一定数量 AI 生成文本和人类生成文本的数据集来研究 TTA,但他们不会把这些标签提供给模型。他们还用 LLM 生成了一些模仿 AI 写作风格的样本,专门用于规避检测器。
随后,他们执行了 TTA 训练过程,并在真实标注数据上测试了该模型。
在模拟人类语言随时间自然演变的实验中,使用 TTA 的检测器准确率达到 85%,而传统方法仅达到 73%。
而在针对旨在规避检测工具的文本时,现有方法只能识别约 27%,而 TTA 使模型能够捕捉到超过 93% 的伪装文本。
“TTA 有望真正帮助已部署的 AI 检测模型,使其能够主动应对对抗性 AI 用户这种不断迭代的‘博弈’行为,”Ren 说。
他补充说,适应人类写作行为的变化是一个更困难的 TTA 问题,因为这种变化更缓慢,且发生方式更为微妙。
研究人员提醒,随着未来 LLM 生成的语言越来越自然,且可用于训练的可验证人类文本越来越难获取,TTA 未必总能成为有效的解决方案。
“目前还不完全清楚这是否会是一个可解决的问题,”Raghavan 说。“在一个无法区分人类生成内容与 AI 内容的世界里,你该如何看待科学、写作和艺术,存在一些重大的开放性问题。”
未来,研究人员希望探索 TTA 可能发挥作用的其他类似战略领域,并构建更好的基准测试工具,帮助工程师以动态的方式改进这些 AI 检测模型。
该项目使用了 Pangram 提供的 API 额度,以调用其 AI 文本检测器。
译文由英文原文机器翻译,术语按行业惯例统一,可在文末展开原文核对。
查看英文原文(Helping AI text detectors keep up with changing conditions)
A teacher who believes a student’s term paper may have been written by a large language model (LLM) can use a tool for detecting artificial intelligence-generated text to help confirm their suspicions. But the teacher may want to think twice before putting all their trust in the detector.
Researchers from MIT and Cornell University showed that such detection tools, which are AI models themselves, can be fooled by AI-generated text disguised to appear as if it were written by a human. Detectors can also fail to identify AI text due to natural shifts in writing habits over time or the emergence of new LLMs.
In a new paper, the researchers demonstrated how a special training technique makes an AI detector more accurate and resilient to deception, even as human and AI writing constantly changes.
They employed a method called test-time adaptation, which allows a deployed detection model to learn from new, unlabeled data by adjusting its inner workings on the fly. In this way, the model adapts to unseen inputs without being retrained from scratch.
In experiments, a commercial detector could only identify about 27 percent of AI-generated text that had been disguised, while the new approach achieved 93 percent accuracy.
This method could help educators, editors, publishers, and hiring managers flag LLM-generated writing that people try to pass off as human-written. It could also be used by cybersecurity experts to prevent email phishing scams or identify search engine optimization fraud.
“There are many high-stakes contexts where people really care about the identity of the author, from scientific publishing to short story competitions. We’ve shown that test-time adaptation allows your AI detector to be much more robust, even with continual adversarial behavior by AI users,” says study co-author Manish Raghavan, the Drew Houston (2005) Career Development Professor at the MIT Sloan School of Management, who also holds an MIT Schwarzman College of Computing shared position in the Department of Electrical Engineering and Computer Science (EECS), and is a principal investigator in the Laboratory for Information and Decision Systems (LIDS).
He is joined on the paper by lead author Kevin Ren, graduate student at Cornell Tech, and senior author Nikhil Garg, an assistant professor at Cornell Tech. The research will be presented at the Conference on Neural Information Processing Systems.
Duping the detectors
The proliferation of LLMs that generate human-like text has led to a plethora of commercial AI-detection tools to help people identify whether a piece of writing was authored by a human.
But these detection tools can fail when the text they evaluate significantly differs from the text they were taught to identify. This is known as a distribution shift.
Detector developers typically train their models by gathering text from the internet that they know to be either AI- or human-generated. They train the model to tell the difference.
However, once the detector is released, people might change the way they write or the way they use AI to generate text.
For instance, a human in 2030 may write about different topics using new analogies that weren’t common for someone writing in 2010. A detector trained with 2010 data might be unfamiliar with this new writing style and incorrectly mark human-written text as AI-generated.
The release of a detection model also creates a cat-and-mouse game between its developers and users who want to bypass it. These individuals can run AI-generated text through an automated “humanizer” software tool that modifies it to appear human-written to the detector.
“After the company releases a model, a bunch of ‘humanizers’ pop up to try to beat it, so the company tries to incorporate this humanized text into their training so the detector can identify it, and so on. It’s like rinse-and-repeat. The cycle can go on forever,” says Ren.
The researchers explored whether test-time adaptation (TTA) can make an AI detector resilient to these distribution shifts.
Adaptation in action
In TTA, instead of freezing the model so it can’t change during deployment, researchers allow that model to adapt itself to incoming data after it has been released. For an AI text detector, these data are new pieces of text uploaded by users.
These data are unlabeled, so the detector developers don’t know which data were written by humans versus AI models. But these new data represent contemporary human and AI writing — exactly what the developers want the model to be able to predict.
With enough examples, the detector learns to identify patterns to determine which data are AI-generated and which are human-generated.
The researchers studied TTA by creating datasets to contain a certain amount of AI-generated and human-generated text, but they don’t provide those labels to the model. They also used LLMs to generate some examples that resemble text written by AI to specifically evade a detector.
Then they performed the TTA training process and tested the model on ground-truth data.
In experiments designed to mimic the natural shift in human language over time, a detector that used TTA was 85 percent accurate, while traditional methods only achieved 73 percent accuracy.
And when it came to writing designed to thwart detection tools, existing methods could only identify about 27 percent, while TTA enabled the model to catch more than 93 percent of disguised text.
“TTA has the potential to really help deployed AI-detection models in terms of being able to proactively address this iterative ‘gaming’ behavior by adversarial AI users,” Ren says.
Adapting to shifts in human writing behavior is a more difficult TTA problem, since the shifts are slower and occur in more subtle ways, he adds.
The researchers caution that TTA may not always be an effective solution as future LLMs produce more natural-sounding language and it becomes harder to find verifiable human text to use for training.
“It isn’t entirely clear if this will be a solvable problem,” Raghavan says. “There are some big, open questions about how you should think about science, writing, and art in a world where it is infeasible to tell the difference between human-generated content and AI content.”
In the future, the researchers want to explore similar strategic domains where TTA could be useful and build better benchmarking tools to help engineers improve these AI detection models in a dynamic fashion.
This project used API credits provided by Pangram to use their AI text detectors.
正文保留英文原文,标题与摘要由机器翻译。
原文发布于 MIT News AI(Helping AI text detectors keep up with changing conditions),标题、摘要与正文由机器翻译,术语按行业惯例统一,未经人工逐句校订。