Glimpse: Enabling White-Box Methods to Use Proprietary Models for Zero-Shot LLM-Generated Text Detection

Guangsheng Bao, Yanbin Zhao, Juncai He, Yue Zhang

TL;DR

Glimpse is a novel probability distribution estimation approach that enables high-performance "white-box" detection methods to work with proprietary Large Language Models (LLMs) like GPT-4. By reconstructing full probability distributions from limited API observations, it allows the world's most powerful models to serve as highly effective shields against their own generated content. This achieves state-of-the-art accuracy with significantly lower costs than existing black-box alternatives.

The Challenge of Detecting LLM-Generated Text

As LLMs become increasingly sophisticated, distinguishing their output from human-written text is a critical challenge for maintaining the integrity of journalism, education, and digital information. Current zero-shot detection techniques generally fall into two camps:

  1. White-box methods: These require full access to a model's internal probability distributions (how likely it thinks every possible next word is). They are highly accurate but typically restricted to weaker, open-source models.
  2. Black-box methods: These only require the text output of a model. While they work with proprietary models like GPT-4, they are often less efficient, less robust, and require multiple expensive API calls.

The gap lies in the fact that proprietary model APIs only provide "partial observations"—usually just the probabilities for the top few most likely tokens (top-$K$ logprobs). This makes it seemingly impossible to apply powerful white-box metrics, like conditional probability curvature, to the models we most need to detect.

Enter Glimpse: Bridging the Divide

To traverse the divide between black-box access and white-box requirements, researchers propose Glimpse. Glimpse acts as a bridge, taking the partial data provided by an API and estimating the full distribution across the entire vocabulary.

The Glimpse pipeline: taking partial API observations and estimating a full distribution to enable white-box scoring like Fast-DetectGPT.

The researchers explored three specific algorithms for this estimation:

  • Geometric Distribution: Assumes a simple exponential decay for token probabilities beyond the top-$K$.
  • Zipfian Distribution: Leverages Zipf’s law—the empirical observation that word frequencies in natural language follow a specific power-law distribution.
  • MLP Model: A simple Multi-Layer Perceptron trained on open-source model data to learn the correlation between top-$K$ probabilities and the rest of the distribution.

Once the full distribution is estimated, it can be seamlessly plugged into existing white-box algorithms such as Entropy, Rank, Log-Rank, and Fast-DetectGPT.

Key Insights and Performance

The methods were rigorously evaluated across diverse benchmarks, including XSum (news), Writing (stories), PubMed (medical QA), and multi-lingual datasets (M4, Mix3/Mix6).

"The Best Shield is the Sword" The most powerful LLMs are often the best at detecting their own outputs. When Glimpse enables GPT-4 to "look at itself," detection accuracy skyrockets. Fast-DetectGPT combined with Glimpse and GPT-3.5 achieved an average AUROC of 0.95 across five leading source models. This represents a 51% improvement over previous open-source baselines.

Approximation is Sufficient Surprisingly, the exact distribution isn't necessary for high-accuracy detection. Even the simple Geometric estimation provides enough signal for white-box metrics to distinguish human vs. machine text effectively.

Analysis showing that while MLP provides the lowest KL divergence, all Glimpse methods maintain high performance, proving the effectiveness of the estimation approach.

Efficiency and Cost Unlike black-box methods like DNA-GPT, which require generating multiple new text completions (costing ~10x more), Glimpse only requires the probabilities of the existing text. This makes it roughly 4.1 times faster and significantly cheaper. Furthermore, Glimpse isn't tied to one specific detector; it acts as a universal "plugin" that upgrades various zero-shot detection methods.

Limitations and Future Work

While Glimpse is a powerful tool, it does have limitations:

  • API Dependency: It requires models to provide a "Completion API" with logprobs. Not all proprietary providers offer this (some only offer Chat APIs without detailed probability data).
  • Embedding-based Methods: Glimpse only estimates probability distributions; it cannot reconstruct internal model embeddings, meaning it doesn't support white-box methods that rely on hidden layer states.
  • Fairness: There is a known risk that LLM detectors can display bias against non-native writers, whose writing may statistically resemble LLM output. These tools should be used cautiously and with human supervision.

Future research directions include integrating Glimpse with more sophisticated white-box methods and exploring its potential for other tasks, such as detecting LLM hallucinations.

Summary updated

BibTeX
@inproceedings{bao2025glimpse,
  author = {Guangsheng Bao and Yanbin Zhao and Juncai He and Yue Zhang},
  title = {{Glimpse: Enabling White-Box Methods to Use Proprietary Models for Zero-Shot LLM-Generated Text Detection}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=an3fugFA23},
}
Figure