DMAP: A Distribution Map for Text

Tom Kempton, Julia Rozanova, Parameswaran Kamalaruban, Maeve Madigan, Karolina Wresilo, Yoann Launay, David Sutton, Stuart Burrell

Introduction

Large Language Models (LLMs) are powerful tools for statistical text analysis. The derived sequences of next-token probability distributions they produce offer a wealth of information about a given text. However, extracting this signal typically relies on standard metrics like perplexity or log-likelihood, which are fundamentally "context-blind." For instance, a probability of 0.1 for a specific word means something entirely different if there are only two logical choices versus a hundred.

To truly understand a text's statistical properties, we need contextualization: interpreting a token's likelihood relative to the entire shape of the conditional distribution at that moment. Existing tools for this are often either too coarse or computationally expensive. In this work, researchers present DMAP (Distribution Map), a mathematically grounded, model-agnostic, and computationally efficient method that maps text to a set of samples in the unit interval, jointly encoding rank and probability information.

The DMAP Methodology

The core of DMAP is a mapping technique inspired by the Probability Integral Transform (PIT). It transforms text into a standardized "map" on the unit interval $[0, 1]$ based on an evaluator LLM’s next-token probabilities.

Overview of the DMAP pipeline mapping text to a uniform distribution interval.

The process follows these key steps:

  1. Interval Mapping: For every token $w_i$ in a text, the evaluator LLM provides a probability distribution. DMAP calculates an interval $[a_i, b_i]$ where $a_i$ is the cumulative probability of all tokens the model deems more likely than $w_i$, and $b_i$ is $a_i$ plus the probability of $w_i$ itself.
  2. Sampling: A point $x_i$ is sampled uniformly from this interval.
  3. The Uniformity Property: The authors mathematically prove that if a text was generated by "pure sampling" from the evaluator model itself, the resulting DMAP points will be independent and identically distributed (i.i.d.) uniform on $[0, 1]$.
  4. Entropy-Weighting: To enhance robustness, the authors introduce "Entropy-Weighted DMAP." This deterministic version gives more weight to "informative" steps where the model is uncertain (high entropy) and de-emphasizes steps where the next token is highly predictable.

Key Insights and Statistical Signatures

By encoding both token rank and probability into a single visualization, DMAP reveals hidden statistical signatures that standard metrics miss. The researchers evaluated DMAP across diverse datasets (including XSum, SQuAD, RAID, and Ghostbusters) and uncovered several critical insights.

DMAP histograms revealing distinct statistical signatures for different text generation methods.
  • The "Probability Curvature" Myth: The paper challenges the popular thesis underlying tools like DetectGPT, which assumes machine text always sits on "negative curvature" peaks. DMAP demonstrates this isn't true for base models using pure sampling; in such cases, current detectors actually perform worse than a random coin toss.
  • Head Bias vs. Tail Bias: DMAP visualizations clearly distinguish between model types. Instruction-tuned models (like ChatGPT) exhibit "Head Bias," over-selecting tokens the model finds highly likely. Conversely, base models often exhibit "Tail Bias," producing tokens that an evaluator model finds surprising.
  • Human "Tail Collapse": Human writing shows a distinct "tail collapse" in DMAP plots. Humans almost never choose words from the bottom 5% of an LLM's probability distribution, whereas base models frequently do.
  • Synthetic Data Fingerprints: DMAP can detect if a model has been "contaminated" by fine-tuning on synthetic data. Models trained on Llama-generated responses inherit a specific "head-biased" signature clearly visible in DMAP histograms, even when invisible to standard metrics.

Key Results and Applications

DMAP's ability to visualize and statistically test text alignment with a language model's expectations enables several practical applications:

  • Validation of Generation Parameters: Using a $\chi^2$ uniformity test, DMAP can quantitatively verify claimed generation parameters. Strikingly, the authors used DMAP to discover that many top papers in the field accidentally left top-k=50 enabled by default when they claimed to use pure sampling.
  • Exposing Detection Vulnerabilities: State-of-the-art detectors (like Fast-DetectGPT and Binoculars) fail significantly on base models using pure sampling, dropping to AUROC scores as low as 0.200. DMAP helps explain exactly why these blind spots exist.
  • High Efficiency: DMAP requires only a single forward pass through a small evaluator model (such as OPT-125m). This makes it highly efficient and runnable on consumer-grade hardware in minutes.

Limitations and Future Directions

While powerful, DMAP has limitations. The "shape" of the DMAP plot is sensitive to the specific evaluator model used, though OPT-125m serves as a strong general-purpose baseline. Additionally, reliable statistical $p$-values require a sufficient sample size (recommended at least 400 tokens), meaning very short text snippets may produce noisy histograms.

Looking forward, DMAP provides a foundation for advanced text analysis. Potential future applications include data curation (pruning training data that lacks human statistical signatures), developing more robust machine-text detectors, and conducting forensic analysis to identify the specific model that generated a piece of text.

Summary updated

BibTeX
@inproceedings{kempton2026dmap,
  author = {Tom Kempton and Julia Rozanova and Parameswaran Kamalaruban and Maeve Madigan and Karolina Wresilo and Yoann Launay and David Sutton and Stuart Burrell},
  title = {{DMAP: A Distribution Map for Text}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=SPElkPRurl},
}
Figure