Beyond Indistinguishability: Measuring Extraction Risk in LLM APIs

Ruixuan Liu, David Evans, Li Xiong
4/20/2026
cs.CRcs.CLcs.LG

Official code: Emory-AIMS/Inextractability (5 stars, MIT, last commit 2026-04-22).

Abstract

Indistinguishability properties such as differential privacy bounds or low empirically measured membership inference are widely treated as proxies to show a model is sufficiently protected against broader memorization risks. However, we show that indistinguishability properties are neither sufficient nor necessary for preventing data extraction in LLM APIs. We formalize a privacy-game separation between extraction and indistinguishability-based privacy, showing that indistinguishability and inextractability are incomparable: upper-bounding distinguishability does not upper-bound extractability. To address this gap, we introduce $(l, b)$-inextractability as a definition that requires at least $2^b$ expected queries for any black-box adversary to induce the LLM API to emit a protected $l$-gram substring. We instantiate this via a worst-case extraction game and derive a rank-based extraction risk upper bound for targeted exact extraction, as well as extensions to cover untargeted and approximate extraction. The resulting estimator captures the extraction risk over multiple attack trials and prefix adaptations. We show that it can provide a tight and efficient estimation for standard greedy extraction and an upper bound on the probabilistic extraction risk given any decoding configuration. We empirically evaluate extractability across different models, clarifying its connection to distinguishability, demonstrating its advantage over existing extraction risk estimators, and providing actionable mitigation guidelines across model training, API access, and decoding configurations in LLM API deployment. Our code is publicly available at: https://github.com/Emory-AIMS/Inextractability.

View on arXivView PDF

Code Implementations(1)

MIT
50PythonApr 17, 20266 months agoMIT

Similar Papers

Cite this paper

@article{liu2026beyond,
  title  = {Beyond Indistinguishability: Measuring Extraction Risk in LLM APIs},
  author = {Ruixuan Liu and David Evans and Li Xiong},
  year   = {2026},
  eprint = {2604.18697},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.18697v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.18697.svg)](https://codeofpaper.com/paper/2604.18697)

Discussion