Range Membership Inference Attacks

Jiashu Tao, Reza Shokri

TL;DR

Traditional membership inference attacks (MIAs) only detect if an exact data point was used to train a model, severely underestimating privacy risks when models memorize partial features or patterns. This paper introduces Range Membership Inference Attacks (RaMIAs), a novel framework that audits privacy by checking if any data within a specified semantic neighborhood was included in the training set. By framing privacy auditing as a composite hypothesis test solved via a robust "trimmed averages" approach, RaMIA provides a more realistic and comprehensive assessment of information leakage across tabular, image, and text data.

What Problem Does This Paper Address?

Machine learning models are notorious for memorizing training data, which opens the door to privacy exploits. To quantify this risk, researchers typically use Membership Inference Attacks (MIAs) to guess whether a specific data point was part of the model's training set.

However, traditional MIAs have a major blind spot: they operate on an all-or-nothing, exact-match basis. If an auditor queries a model with an image that is slightly altered—such as being horizontally flipped or having a different background—a standard MIA will likely report it as a non-member, dropping the attack's accuracy significantly.

Illustration of privacy notions for MIAs vs RaMIAs

In reality, information leakage isn't binary. Models often memorize core features or patterns rather than the entire exact record. An image of the same person from a different angle still leaks their private data. By failing to account for these similar points in the vicinity of the training data, traditional MIAs create a false sense of security and underestimate the true privacy risk.

Examples of similar data with drastically different MIA scores

Methods

To bridge this gap, the authors propose Range Membership Inference Attacks (RaMIAs). Instead of point queries, RaMIA uses range queries defined by a center point, a distance measure capturing the semantics of privacy, and a radius.

The technical core of RaMIA involves shifting from a simple hypothesis test to a composite hypothesis test:

  • $H_0$ (Null): None of the points in the given range are from the training set.
  • $H_1$ (Alternative): There is at least one point in the given range from the training set.

Standard statistical tools for composite testing, like the Generalized Likelihood Ratio Test (GLRT) or Bayes Factors, fall short here. GLRT assumes you can perfectly find the maximum membership score in a massive subspace, while Bayes Factors are highly sensitive to noisy, falsely inflated MIA scores on out-of-distribution (OOD) data.

To solve this, the authors introduce a robust Trimmed Averages aggregation strategy. The framework samples points within the defined range and applies a data-dependent trimming process before averaging the scores:

  • In-Distribution (ID) Data: The algorithm trims the lower quantiles (discarding non-members and random noise) and averages the top samples.
  • Synthetic/OOD Data: Synthetic generators often produce OOD samples that trigger false positives. The algorithm trims the top quantiles to eliminate these errors and averages the remaining samples.

RaMIA acts as a flexible framework wrapper: it can use any existing point-query MIA algorithm (like LiRA or RMIA) as its underlying membership tester backbone.

Datasets

The authors evaluated RaMIA across four diverse datasets, customizing the range functions to match each data type's privacy semantics:

  1. Purchase-100 (Tabular): Ranges were constructed by randomly masking columns to simulate incomplete data records.
  2. CelebA (Images): Ranges were defined semantically by identity (i.e., checking if any photo of a specific celebrity was used in training).
  3. CIFAR-10 (Images): Ranges were defined using geometric transformations (flipping, rotation, cropping, etc.).
  4. AG News (Text): Ranges were defined using word-level Hamming distance, substituting words using a pretrained BERT model to simulate redacted or altered text.

Key Insights and Ideas

  • Privacy is not a Dirac Delta Function: Standard MIA treats privacy as an infinitely sharp point in data space. RaMIA re-imagines privacy as a continuous neighborhood, aligning better with our intuitive understanding of data exposure.
  • Bypassing Naive Defenses: Some test-time privacy defenses filter out exact training inputs to break traditional MIAs. Because RaMIA queries the neighborhood rather than the exact point, it easily bypasses these simple obfuscation techniques.
  • The Data Augmentation Paradox: Image classifiers are routinely trained with data augmentations (like cropping or color jittering), meaning the model may have never seen the "original" image in its pure form. RaMIA naturally handles this by defining ranges via geometric transformations, capturing the exact variations the model encountered during training.

Key Results

Even in the most challenging experimental setup—where each "IN" range contained only a single training point that was intentionally not placed at the query center—RaMIA consistently outperformed traditional MIAs.

  • AUC Improvements: Switching from MIA to RaMIA yielded notable improvements in Area Under the ROC Curve (AUC) across the board: +5.4% on CelebA, +2.62% on Purchase-100, +2.13% on CIFAR-10, and +1.20% on AG News.
  • Density Sensitivity: The authors confirmed via a sanity check that RaMIA's performance scales monotonically with the density of actual training points residing inside the queried range.
Attack performance vs training point density

Limitations and Future Work

As a first-of-its-kind framework for range-based membership inference, the authors note that their current implementation is a baseline rather than an optimal solution.

Key limitations and areas for future exploration include:

  • Sampling Efficiency: Sampling high-dimensional spaces effectively is difficult. For text data, if the language model (like BERT) fails to generate highly diverse sentence completions, the attack's distinguishing power drops.
  • Hyperparameter Overhead: The optimal trimming thresholds ($q_s, q_e$) vary depending on the target model architecture and dataset, requiring a grid search over temporary reference models which increases computational costs.
  • Range Function Design: Future work will focus on designing more sophisticated, automated range functions that can better map complex semantic boundaries of privacy.

Summary updated

BibTeX
@inproceedings{tao2025range,
  author = {Jiashu Tao and Reza Shokri},
  title = {{Range Membership Inference Attacks}},
  booktitle = {SaTML},
  year = {2025},
  doi = {10.1109/satml64287.2025.00026},
}
Figure