Extracting Training Data From Document-Based VQA Models

Francesco Pinto, Nathalie Rauschmayr, Florian Tramèr, Philip Torr, Federico Tombari

Abstract

Vision-Language Models (VLMs) used for document analysis don't just learn to read; they often memorize specific training examples, including sensitive Personal Identifiable Information (PII). This paper demonstrates that models like Donut and Pix2Struct can "regurgitate" private data even when that information has been redacted from the input image. We propose a simple training-time defense called Extraction Blocking (EB) that effectively eliminates this leak while simultaneously improving model accuracy.

Introduction: The Privacy Risk in Document VQA

As Vision-Language Models become staples in automating document processing—handling invoices, IDs, and medical forms—they are increasingly trained on sensitive, real-world data. While the memorization tendencies of Large Language Models (LLMs) are well-documented, the privacy risks of multimodal document models are less understood.

The core concern is whether a VLM can be "prompted" to reveal secret information from its training set. If an attacker possesses a redacted or incomplete version of a document used during training, they might query the model to fill in the blanks. If a model memorizes a unique credit card number or address from a single training instance, it could inadvertently leak that data to any user.

Conceptual overview of a VLM revealing a secret from a redacted document used in its training set.

Methodology: Measuring Extractability

The researchers define "Extractability" as the ability of a model to provide a correct answer when the relevant visual information is missing from the input.

  1. Partial Context Probing: A "partial context" is created by taking a training image and masking the answer area with a black or white box. If the model still answers correctly, it has likely memorized the data.
  2. Disentangling Memorization: To distinguish memorization from general knowledge (e.g., guessing a "Total" amount based on context), the target model is compared against a "generalization baseline"—a model with the same architecture that never saw the specific "canary" samples.
  3. Extraction Blocking (EB): To defend against this, the authors propose teaching the model during training to respond with "ANSWER NOT PRESENT" when presented with masked images. This forces the model to rely on visual evidence rather than internal memory.

Experimental Setup

The study utilizes the DocVQA dataset, a standard benchmark for document understanding.

  • Canaries: A subset of 4,654 "canary" samples was manually curated from the training set, focusing on unique or rare answers ideal for testing memorization.
  • PII Tracking: Extractability was specifically monitored across sensitive categories including names, dates, addresses, and ID numbers.

Key Insights: Resolution and Pre-training

  • The Resolution Paradox: Counter-intuitively, training at lower resolutions increases memorization. When images are blurry, models find it computationally "cheaper" to memorize the mapping between the layout and the answer rather than attempting to "read" the text.
  • Pre-training as a Shield: PALI-3, the most extensively pre-trained model, showed significantly less memorization than Donut or Pix2Struct, suggesting that stronger general features reduce reliance on rote memorization.
  • One-Shot Leaks: Sensitive information can be extracted even if it appeared only once in a training set of over 40,000 samples.

Results and Defense Effectiveness

Without defenses, models like Donut and Pix2Struct leaked hundreds of unique PII samples. For instance, Donut at high resolution allowed for the extraction of nearly 180 unique PII strings.

Quantification of PII leakage across different VLM architectures and resolutions.

The Extraction Blocking (EB) method proved remarkably effective, reducing the number of extractable memorized samples to zero for most models. Notably, EB also provided a "free lunch": it improved performance (ANLS score) on the DocVQA test set by 1.2 to 3.4 points. By teaching the model not to hallucinate when data is missing, it becomes a more reliable "reader" overall.

Conclusion and Future Work

While Extraction Blocking is highly effective against the attacks tested, it remains a heuristic defense and might be vulnerable to more sophisticated adversarial bypasses. Furthermore, the defense could potentially create a "side-channel" for Membership Inference attacks. Future research should focus on scaling Differential Privacy (DP-SGD) to large VLMs, which remains the gold standard for privacy despite its high computational cost.

Summary updated

BibTeX
@inproceedings{pinto2024extracting,
  author = {Francesco Pinto and Nathalie Rauschmayr and Florian Tramèr and Philip Torr and Federico Tombari},
  title = {{Extracting Training Data From Document-Based VQA Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=qTX1vxzs8b},
}
Figure