Minimizing Mismatch Risk: A Prototype-Based Routing Framework for Zero-shot LLM-generated Text Detection

Ke Sun, Guangsheng Bao, Han Cui, Yue Zhang

Zero-shot AI text detectors are highly appealing because they do not require training on specific "AI vs. Human" datasets. Instead, they rely on a surrogate language model to calculate statistical signatures—such as how "surprised" the model is by a sequence of words (e.g., DetectGPT). However, these methods typically employ a fixed surrogate (like LLaMA-3) for every input.

This introduces a critical vulnerability: the Mismatch Risk. If the surrogate model’s probability distribution significantly diverges from the actual source model that generated the text, detection performance collapses. In real-world "black-box" scenarios where the authoring AI is unknown, picking the wrong surrogate can degrade a near-perfect detector to the accuracy of a coin flip. To address this, researchers introduce DetectRouter, a framework that dynamically routes unknown text to the most compatible surrogate detector from a diverse pool of experts.

Methodology: The DetectRouter Framework

DetectRouter transforms text detection from a static evaluation into a dynamic routing problem. Rather than relying on a single surrogate, the framework maintains a pool of candidate models and identifies the best match for each specific input. This is achieved through a two-stage, prototype-based approach:

  1. Discriminative Prototype Construction: Using "white-box" models (where the source is known), an encoder is trained to map text into a metric space. Text from the same model family clusters around learnable "prototypes." Contrastive learning ensures these clusters remain well-separated.
  2. Black-Box Generalization: To handle unknown or proprietary models (like GPT-4), the system employs "distributional alignment." Input text is run through the entire pool of surrogate detectors to generate a vector of scores. The router is then trained to ensure that the geometric distance to a prototype in the embedding space mirrors the actual detection affinity, measured via KL divergence.

At inference time, the system encodes the text, locates the nearest prototype, and routes the text to that specific surrogate for the final "AI or Human" classification.

Key Insights

The foundation of this approach is backed by a mathematical proof: the performance gap in detection is upper-bounded by the square root of the KL divergence between the source and surrogate distributions. This theoretical bound confirms why routing is an optimal strategy.

Furthermore, the researchers observed Architectural Affinity, where models from the same lineage (e.g., GPT-Neo and GPT-J) share high mutual affinity, making structural similarity a better predictor of detection success than mere model size. Interestingly, the router also learns a Routing Asymmetry: human text consistently maps to a specific, stable region of the metric space, while machine text is distributed across the pool based on its source. This asymmetry is crucial for maintaining a low False Positive Rate.

Importantly, DetectRouter acts as a "universal enhancement layer" rather than a standalone metric, meaning it can wrap around existing methods like Likelihood, Entropy, or Fast-DetectGPT to improve their robustness.

Experimental Results & Datasets

DetectRouter was rigorously evaluated across several benchmarks, including MIRAGE, EvoBench (testing evolving models), MAGE (in-the-wild pairs), RAID, and M4. The results demonstrate state-of-the-art performance:

  • Overall Accuracy: DetectRouter achieved an average 90.85% AUROC on EvoBench and 77.92% on MAGE, outperforming the best fixed-surrogate baselines by nearly 10 percentage points.
  • Proprietary Model Gains: On black-box models where mismatch risk is highest, improvements were dramatic. Detection accuracy for Claude jumped from 81.57% to 94.22%, and for GPT-4o, it rose from 74.89% to 94.29%.
  • Efficiency: Despite the added routing step, using a RoBERTa-base encoder adds only about 4.87ms of latency per sample, making the framework highly practical for high-throughput applications.

Limitations and Future Directions

While highly effective, DetectRouter's performance is inherently bounded by the diversity of its surrogate pool. If a new AI model emerges with a distribution entirely alien to the existing pool, the router may struggle to find a suitable match. Additionally, training the Stage 2 alignment requires pre-computing detection scores for a large dataset across many surrogates, presenting a significant one-time computational cost. Finally, while initial tests showed promising multilingual improvements (e.g., boosting Chinese detection from 0.526 to 0.941), the current framework is optimized for English, suggesting a need for language-specific surrogate pools in future iterations.

Summary updated

BibTeX
@inproceedings{sun2026minimizing,
  author = {Ke Sun and Guangsheng Bao and Han Cui and Yue Zhang},
  title = {{Minimizing Mismatch Risk: A Prototype-Based Routing Framework for Zero-shot LLM-generated Text Detection}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=Hh1hf4kauu},
}
Figure