Token-Efficient Change Detection in LLM APIs

Timothee Chauvin, Clément Lalanne, Erwan Le Merrer, Jean-Michel Loubes, Francois Taiani, Gilles Tredan

TL;DR

LLM providers frequently update the models behind their public APIs without notifying users, which can silently alter performance or degrade downstream applications. This paper introduces B3IT (Black-Box Border Input Tracking), a highly cost-effective method that detects these subtle model changes using only output tokens. By identifying and monitoring "Border Inputs"—prompts where multiple tokens are nearly tied for the top prediction—B3IT matches the accuracy of advanced grey-box methods at 1/30th the cost of existing black-box alternatives.

What Problem Does This Paper Address?

When you query an LLM API (like GPT-4 or Claude), you have no guarantee that the model under the hood remains identical from day to day. Providers routinely deploy updates, tweak system prompts, or apply quantization to reduce infrastructure costs. These silent changes can cause unexpected regressions in specialized applications like software engineering or automated workflows.

Detecting these changes remotely is a major challenge. Existing solutions fall into two problematic categories:

  1. White-box/Grey-box methods: These require access to model weights or log-probabilities, which most commercial API providers hide.
  2. Black-box methods: These look only at text outputs but require thousands of queries to statistically map distribution shifts, making continuous monitoring prohibitively expensive.

The authors address this tension by designing a strict black-box change detection method that is both highly sensitive and cheap enough for continuous, large-scale deployment.

Methods

The core innovation of the paper is the exploitation of a low-temperature phase transition phenomenon using Border Inputs (BIs).

The Theory: Border Inputs

Using a statistical framework called Local Asymptotic Normality (LAN), the authors analyzed how an LLM's output distribution responds to tiny parameter changes at near-zero temperatures ($T \to 0$). They discovered a sharp dichotomy:

  • If a prompt has a single, clear dominant token, its sensitivity to model changes drops to zero because the softmax function aggressively collapses the output into a deterministic choice.
  • If a prompt results in a near-tie between two or more tokens (a Border Input), its sensitivity diverges to infinity. A microscopic change to the model's weights will instantly tip the balance, causing the output token to flip.

The B3IT Algorithm

B3IT operates in two stages:

  1. Initialization Stage: The user sends random single-token prompts to the API at $T=0$, sampling each prompt $m=3$ times. If a prompt returns more than one unique token across these draws, it is flagged as a Border Input. B3IT then samples these BIs a few dozen times to establish a baseline "support set" (the list of valid top tokens).
  2. Detection Stage: To check if the model has changed, B3IT queries the same Border Inputs a handful of times. If it observes a token outside the baseline support set, or if a previously common token vanishes, it flags a support mismatch and alerts the user that the model has changed.

Datasets

The authors evaluated B3IT using two distinct setups:

  • In Vitro (Controlled Benchmark): They utilized the TinyChange benchmark, applying controlled modifications (fine-tuning, LoRA, magnitude pruning, and Gaussian parameter noise) across 9 open-weight instruction-tuned LLMs ranging from 0.5B to 9B parameters (including Qwen2.5, Gemma-2, Mistral-7B, and Llama-3.1).
  • In Vivo (Real-World Deployment): They curated a live dataset of 131 commercial endpoints covering 78 distinct models across 34 different API providers (via OpenRouter) to test the prevalence of Border Inputs and monitor live changes over 23 days.

Key Insights and Ideas

  • Ties Exist Due to Hardware and Precision Limits: In pure mathematics, the chance of two logits being exactly equal is zero. However, in real-world LLMs, limited floating-point precision (rounding errors) and inference-time non-determinism (like varying batch sizes on the server) create abundant exact ties, making Border Inputs surprisingly easy to find.
  • The Low-Temperature Cheat Code: Lowering the temperature usually makes models more deterministic and harder to probe. Counterintuitively, for Border Inputs, lowering the temperature acts as an amplifier, turning subtle internal weight shifts into dramatic, visible token flips.
  • BIs are Model Fingerprints: A Cochran-Mantel-Haenszel statistical analysis proved that Border Inputs correlate strongly across different providers hosting the same model, but are entirely uncorrelated between different models. This confirms they act as unique structural signatures of specific model weights.

Key Results

  • High Accuracy: On the TinyChange benchmark, B3IT achieved an average ROC AUC of 0.9, performing on par with the best grey-box methods that require log-probabilities.
  • Massive Cost Reduction: B3IT achieved this accuracy at an operating cost of just $2.20 per endpoint per year for hourly monitoring. The next best black-box alternative (MET at $T=0$) required $67.00 per year to reach a lower AUC of 0.88—making B3IT roughly 30× more token-efficient.
  • Real-World Detections: During a 23-day live monitoring experiment, B3IT successfully detected 8 silent model swaps on commercial APIs. This included a documented instance where Together AI silently redirected a Mistral-7B endpoint to a Ministral-3-14B model.
Method       | Access Required | Cost/Year (Hourly) | ROC AUC
-------------|-----------------|--------------------|--------
LT           | Grey-box        | ~$1.00             | ~0.91
B3IT (Ours)  | Black-box       | $2.20              | 0.90
MET (T=0)    | Black-box       | $67.00             | 0.88

Limitations and Future Work

  • Hidden Reasoning Traces: B3IT relies on observing the very first token generated by the model. For certain reasoning models (like those on Amazon Bedrock) that hide the internal chain-of-thought/reasoning tokens from the API response, B3IT's strategy discovery fails.
  • Single-Token Focus: The current mathematical framework and implementation only look at the first output token. The authors note that extending B3IT to analyze multi-token sequences could unlock even higher sensitivity and allow tracking of longer generation behaviors.

Summary updated

BibTeX
@inproceedings{chauvin2026token,
  author = {Timothee Chauvin and Clément Lalanne and Erwan Le Merrer and Jean-Michel Loubes and Francois Taiani and Gilles Tredan},
  title = {{Token-Efficient Change Detection in LLM APIs}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=7cMlZZYZT0},
}
Figure