Hitting a Moving Target: Test-Time Adaptation for AI Text Detection under Continual Distribution Shift

Kevin Ren, Manish Raghavan, Nikhil GargNeurIPS 2026

TL;DR

Standard AI text detectors act like frozen snapshots: once deployed, they are sitting ducks for new LLMs, adversarial "humanizers," and the natural evolution of human language. Instead of evaluating texts in isolation, this paper introduces a Test-Time Adaptation (TTA) approach that looks at batches of incoming, unlabeled submissions to spot the telltale statistical clustering of AI writing. By adapting on the fly at inference time, this framework catches over 93% of adversarial AI text that leaves top commercial detectors in the dust.

What Problem Does This Paper Address?

If you train a modern supervised AI detector on human text and ChatGPT outputs, it will easily hit >99% accuracy—as long as the test data looks just like the training data. In the wild, however, AI detection is a game of cat and mouse where the target never stops moving.

Deployed detectors face three continual post-deployment shifts:

  1. Adversarial humanization: Users and services actively tweak prompts to push AI text just across a published detector's fixed decision boundary.
  2. New LLMs: Models release faster than detectors can curate labeled data and retrain.
  3. Human drift: Human language evolves over time. Because verified human text post-2022 is scarce (anything online today might be AI), detectors rely on pre-2022 human baselines—causing modern human writing to look increasingly "out-of-distribution."

In game-theoretic terms, standard supervised detectors "move first" by publishing a static boundary, allowing evaders to optimize against them in real time. Furthermore, evaluating one document at a time ignores a massive clue: algorithmic monoculture. Even when disguised, outputs from a new LLM or humanizer share subtle, homogeneous patterns across a batch of submissions.

Figure 1: (left) Comparing AI text detection with supervised learning (top) and test-time adaptation with semi-supervised learning (bottom). With supervised detection: a detector is trained on labeled human and AI text, released, and can fail under distribution shift. With TTA: the detector re-estimates its boundary using submitted texts at inference time and therefore can adapt. (right) Empirical illustration—human, naive AI, and adversarial AI are all (approximately) mutually separable, but the latter may evade a fixed classifier. Details on figure generation are in § D.5.

Methods

To let the detector "move last," the authors apply Test-Time Adaptation (TTA)—updating the classifier's decision boundary using the unlabeled batch of texts arriving at inference time.

While supervised baselines simply fine-tune DistilBERT on labeled human and AI text, the authors' primary TTA approaches reframe detection as Positive-Unlabeled (PU) and Positive-Negative-Unlabeled (PNU) learning (building on an existing algorithm called $(\text{TED})^n$ on top of DistilBERT):

  • PU + TTA: Takes only one known class from training (e.g., verified pre-2022 human text, or known AI text when testing human drift) alongside an unlabeled mixture of test-time submissions. Because human, naive AI, and shifted AI remain separable in feature space, the algorithm identifies the known positive distribution within the unlabeled batch and treats the remaining cluster(s) as the opposing class.
  • PNU + TTA: Incorporates labeled negatives from the source training domain alongside the PU setup.
  • Streaming & Contrastive TTA: The authors also adapt streaming Test-Time Training (TTT)—which updates DistilBERT online via a self-supervised masked language modeling head without full retraining—and ConDA (contrastive domain adaptation) to operate directly at test time.

Datasets

No new static benchmark is introduced; instead, the authors construct dynamic evaluation pipelines using:

  • arXiv Abstracts (2010–2025): Human-written abstracts paired with AI-generated "synthetic mirrors" (rewrites preserving core information) across 11 LLMs. For adversarial tests, an autonomous coding agent (Claude Code in an autoresearch loop) iteratively optimizes rewriting prompts to evade the detector.
  • RAID Benchmark: An existing benchmark of machine-generated text across multiple models and adversarial attacks, used to validate generalizability.

Key Insights and Ideas

  • AI doesn't evade detectors by sounding human; it just sounds different: Looking at feature space projections (Figure 1, right), "humanized" AI text doesn't actually merge into the human distribution—it moves to a third, distinct cluster. Fixed linear boundaries miss it, whereas TTA easily spots the new cluster in a test batch.
  • The NYTimes "Sincerely Apologize" Effect: Individual shifted AI texts are hard to spot, but LLMs exhibit inference-time homogeneity (much like professors catching dozens of students using the exact phrase "sincerely apologize" in essays apologizing for using AI). TTA weaponizes this homogeneity.
  • Ignoring human drift causes false accusations: Because human writing naturally drifts over a decade, detectors trained on older human text mistake modern human phrasing for AI—and dramatically overestimate AI prevalence in scientific literature.

Key Results

  • Crushing Adversarial Humanizers: Against adversarial rewrites, the commercial detector Pangram 3.3.2 sees its AI recall plummet from 96.0% to 27.0%, while PU + TTA maintains 93.3% recall. Across a 3-round iterative "arms race," supervised DistilBERT drops to 49.2% AI recall while PU + TTA hits 99%.
Figure 2: (a) We simulate the back-and-forth between detectors and evaders. PU + TTA and PNU + TTA are robust, while supervised methods are not. (b) The self-supervised method in Sun et al. [2020] effectively adapts classifiers trained on naive AI writing to adversarial AI text at test-time.
  • Surviving Unseen LLMs: Supervised models fail wildly on unseen LLMs (e.g., training on Llama 3.3 yields just 55% recall on gpt-oss-120b; Pangram initially caught only 34% of newly released GPT 5.4 outputs). PU + TTA maintains 87%–94% recall across unseen LLMs without seeing a single labeled example from them.
Figure 3: Detection rate with LLM shift
  • Correcting Temporal Drift: In a simulation training on 2010 arXiv abstracts and testing up to 2020 (before widespread LLM use), a popular n-gram prevalence estimator falsely flags 15.1% of 2020 human sentences as AI (up from 2.3% in 2010). On actual 2025 arXiv data, 2020-trained supervised methods estimate more than 3x the AI usage compared to PU + TTA (~42–44% increase vs. +12.9%).

Limitations and Future Work

TTA is not a silver bullet. First, if future LLMs (and humans influenced by reading AI) cause human and AI text distributions to genuinely converge in feature space, no classifier can separate them—a mathematical ceiling the authors prove via Total Variation distance. Second, curing the "human drift" problem long-term is tricky: while treating known AI as the positive class in PU + TTA prevents false positives on modern human text, it degrades overall AI recall, suggesting detectors still need fresh, verified human writing (which is expensive and non-representative to pay for today). Finally, deploying TTA in production requires re-engineering single-query APIs to process buffered batches or continuous streams.

Summary updated

Abstract

Deployed AI text detection approaches are supervised, relying on training-time access to labeled datasets of both human-written and AI-generated text. This approach is vulnerable to three types of distribution shifts that occur continually post-deployment, and for which labeled data is often unavailable: adversarial humanization, new LLMs being released, and unidentifiable temporal drift in human writing after widespread LLM usage. Simultaneously, existing approaches do not leverage a key signal of LLM usage: inference-time homogeneity. We propose a test-time adaptation (TTA) approach that adapts to distribution shifts by leveraging homogeneity among unlabeled samples observed at inference time. Empirically, we find that state-of-the-art supervised detectors systematically fail when they encounter distribution shifts in AI-generated and human writing, both adversarial and natural, while TTA with semi-supervised learning is largely robust; e.g., the commercial model Pangram detects just 27.0% of our adversarial AIgenerated text, compared to 93.3% for our test-time approach. We establish that TTA is a promising framework for AI text detection in the wild.
BibTeX
@inproceedings{ren2026hitting,
  author = {Kevin Ren and Manish Raghavan and Nikhil Garg},
  title = {{Hitting a Moving Target: Test-Time Adaptation for AI Text Detection under Continual Distribution Shift}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=K2jfY9Iy5I},
}
Figure