Abstract
Document Visual Question Answering (DocVQA) models are increasingly deployed to process sensitive administrative and medical documents. However, the privacy risks associated with training these models on confidential data remain under-explored. This paper introduces DocMIA, the first document-level Membership Inference Attack (MIA) specifically designed for DocVQA. Unlike traditional MIAs that rely on static loss metrics or auxiliary datasets, DocMIA utilizes optimization trajectories—measuring how a model's parameters adapt during brief fine-tuning—to identify training set membership. Our results demonstrate that DocMIA achieves high precision in both white-box and black-box settings, highlighting a significant privacy vulnerability in multi-modal document processing.
Introduction
As organizations automate the processing of invoices, legal contracts, and medical records, DocVQA models have become essential tools. These models integrate visual and textual understanding to answer queries based on document images. However, the inclusion of sensitive documents in training sets creates a risk of data leakage. Membership Inference Attacks (MIAs), which determine if a specific data point was used to train a model, serve as a primary method for auditing these privacy risks.
Existing MIAs face significant hurdles when applied to DocVQA. First, the auto-regressive nature of these models makes traditional logit-based metrics difficult to interpret. Second, DocVQA training often involves "repeated exposure," where a single document is paired with multiple questions, leading to complex memorization patterns. Finally, the lack of large-scale, publicly available auxiliary datasets of confidential documents makes traditional "shadow training" approaches impractical. DocMIA addresses these challenges by focusing on the document level and leveraging internal model dynamics.
Methodology
Optimization-Based White-Box Attack
The core intuition behind DocMIA is that a model will exhibit less "resistance" when being fine-tuned on data it has already seen. In a white-box setting, where the attacker has access to model weights, DocMIA performs a brief fine-tuning step on a target document and a candidate question-answer pair.
The attacker measures the optimization trajectory using two primary metrics:
- Parameter Distance: The L2-norm of the change in model parameters after fine-tuning.
- Convergence Speed: The number of steps required for the model to produce the correct answer.
If the document was part of the training set, the required parameter updates are minimal. To scale this approach to large-scale models, the authors introduced efficient variants: fine-tuning only the final layer (FL), utilizing Low-Rank Adaptation (FLLoRA), or optimizing image pixels via Input Gradients (IG).
Distillation-Based Black-Box Attack
In many real-world scenarios, attackers only have API access (black-box). DocMIA overcomes this by using proxy distillation. The attacker queries the target black-box model with a set of documents to collect its predicted answers, effectively creating a synthetic dataset that captures the target model's behavior. A "proxy model" is then trained on this synthetic data. Because the proxy model learns to mimic the target, it also inherits the target's membership signals. The attacker then performs the white-box optimization attack on this proxy model to infer membership in the original target model.
Experimental Results
Performance Benchmarks
DocMIA was evaluated against standard DocVQA models (Donut, VT5, and Pix2Struct) using the DocVQA and PFL-DocVQA datasets. The optimization-based approach consistently outperformed traditional baselines like Loss-Threshold and Min-K% attacks.
- Accuracy: DocMIA achieved F1 scores as high as 82.5% on the Donut model and approximately 72% on VT5 and Pix2Struct.
- Precision at Low FPR: The attack is particularly dangerous because of its effectiveness at low False Positive Rates (FPR). Against Pix2Struct-Base, the attack maintained an 11% True Positive Rate even at a strict 3% FPR.
- Black-Box Transferability: The distillation method proved highly effective. Using a VT5 proxy to attack a Pix2Struct-Large model resulted in a 5% F1 score improvement over the strongest baseline attacks.
Sensitivity and Robustness
The research found that "repeated exposure" is a significant risk factor; documents paired with multiple questions during training are much easier to identify. However, DocMIA remains robust even if the attacker only has access to a single Q&A pair or must approximate the questions used during the original training phase.
Discussion and Defenses
The authors tested Differentially Private Stochastic Gradient Descent (DP-SGD) as a potential defense. While DP-SGD successfully reduced the attack's F1 score (from 73.8% to 55%), it came at a prohibitive cost to model utility. The Average Normalized Levenshtein Similarity (ANLS) score—a standard measure of DocVQA performance—dropped by more than 50%. This highlights a critical trade-off: current privacy-preserving techniques may render DocVQA models unusable for complex business applications.
Conclusion
DocMIA reveals that DocVQA models are highly susceptible to document-level membership inference. By shifting the focus from static loss values to optimization dynamics, DocMIA bypasses the limitations of traditional attacks and works effectively even in black-box environments. These findings underscore the urgent need for specialized privacy defenses in the field of multi-modal document AI that can protect sensitive information without sacrificing model utility.
Summary updated