A teacher who suspects a student's essay was written by an AI chatbot might turn to a detection tool for confirmation. But according to new research from MIT and Cornell University, those detectors — themselves AI models — can be fooled by text that has been subtly altered to appear human, and they can also fail as writing styles naturally shift over time or when new language models emerge.

In a paper presented at the Conference on Neural Information Processing Systems, the researchers demonstrated a training method called test-time adaptation (TTA) that allows a deployed detection model to learn from new, unlabeled data by adjusting its internal parameters on the fly, without needing to be retrained from scratch. The approach, MIT News reported, significantly improved the detector's ability to spot AI-generated text that had been disguised.

In experiments, a commercial detector could identify only about 27 percent of AI-generated text that had been run through a "humanizer" tool designed to evade detection. The TTA-enhanced model, by contrast, caught more than 93 percent of that disguised text. When the researchers simulated natural shifts in human language over time — a slower, subtler challenge — the TTA model achieved 85 percent accuracy, compared with 73 percent for traditional methods.

The study was led by Kevin Ren, a graduate student at Cornell Tech, along with senior author Nikhil Garg, an assistant professor at Cornell Tech, and Manish Raghavan, the Drew Houston Career Development Professor at the MIT Sloan School of Management and a principal investigator in the Laboratory for Information and Decision Systems.

Why detectors struggle

The proliferation of large language models (LLMs) that produce human-like text has spawned a market for AI-detection tools. These tools are typically trained on large datasets of text known to be either human- or AI-generated. But once a detector is deployed, it faces what researchers call a distribution shift: the text it encounters may differ significantly from what it was trained on.

For example, a detector trained on writing from 2010 might flag a 2030 essay as AI-generated simply because the author uses newer analogies or discusses topics that were uncommon two decades earlier. More deliberately, users who want to pass off AI-generated text as their own can run it through automated humanizer software that modifies the output to evade detection.

"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," Ren told MIT News.

How test-time adaptation works

TTA addresses this by allowing the model to keep learning after deployment. Instead of freezing the model's parameters, researchers let it adapt to incoming data — in this case, new pieces of text uploaded by users. Those data are unlabeled, meaning the developers don't know which are human-written and which are AI-generated. But because they represent contemporary writing, they are exactly what the model needs to learn from.

With enough examples, the detector can identify patterns that distinguish AI-generated text from human text, even when the AI text has been deliberately disguised. The researchers tested this by creating datasets containing a mix of human and AI text, without providing labels to the model, and then measuring its performance against ground-truth data.

"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 said.

Applications and limitations

The method could be useful for educators, editors, publishers, and hiring managers who need to flag LLM-generated writing that someone is trying to pass off as their own. It could also help cybersecurity experts detect email phishing scams or identify search engine optimization fraud, according to MIT News.

But the researchers caution that TTA may not remain effective indefinitely. As future LLMs produce increasingly natural-sounding language, and as it becomes harder to find verifiable human-written text for training, the problem may become unsolvable.

"It isn't entirely clear if this will be a solvable problem," Raghavan said. "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."

The researchers plan to explore other strategic domains where TTA could be useful and to build better benchmarking tools for improving AI detection models in a dynamic fashion. The project used API credits provided by Pangram to access their AI text detectors.