Do Vision-Language Models Leak What They Learn? Adaptive Token-Weighted Model Inversion Attacks

Ngoc-Bao Nguyen, Sy-Tuyen Ho, Koh Jun Hao, Ngai-Man Cheung

TL;DR

This paper presents the first systematic study of Model Inversion (MI) attacks on Vision-Language Models (VLMs), revealing that these multimodal networks can leak private visual training data through text prompts. By introducing Sequence-based Model Inversion with Adaptive Token Weighting (SMI-AW), the authors demonstrate how attackers can exploit cross-attention maps to reconstruct highly recognizable private training images from both fine-tuned and publicly available VLMs.

What Problem Does This Paper Address?

Model Inversion (MI) attacks aim to reconstruct a model's private training data by exploiting its outputs. While heavily explored in unimodal deep neural networks (such as image classifiers), its applicability to multimodal Vision-Language Models (VLMs) like LLaVA or Qwen-VL remained an open question.

VLMs present unique challenges for privacy security: they generate text sequences token-by-token, their architectures are modular (often keeping the vision encoder frozen while updating the language model), and different output tokens rely on visual inputs to varying degrees. This paper addresses this critical research gap by formalizing MI attacks tailored to the token-generative nature of VLMs, warning of severe privacy risks in sensitive domains like healthcare and finance.

Methods

The authors propose a suite of inversion strategies that optimize a latent vector $w$ of a generative model (like StyleGAN2) to produce an image that maximizes the likelihood of a target text sequence under the target VLM.

The authors introduce four distinct attack formulations:

  1. Token-based MI (TMI): Updates the image sequentially after each generated token.
  2. Convergent Token-based MI (TMI-C): Performs multiple optimization steps per token to ensure convergence before moving to the next token.
  3. Sequence-based MI (SMI): Computes a single gradient update by averaging the loss across all tokens in the sequence.
  4. Sequence-based MI with Adaptive Token Weighting (SMI-AW): The core novelty of this work. Recognizing that some tokens are highly dependent on the image (visually grounded) while others are driven by linguistic syntax, SMI-AW uses the magnitude of the cross-attention map as a proxy for visual grounding. It dynamically reweights each token's loss gradient at each inversion step, focusing the optimization on visually informative tokens.

An overview of these strategies can be seen below:

Figure 1. We conduct the first systematic study of MI attacks on VLMs. (A) Designed for the token-generative characteristics of VLMs, we introduce a set of token-level and sequence-level MI strategies to investigate VLMs’ privacy vulnerability (Sec. 3). Particularly, conventional MI typically targets unimodal DNNs, where the adversary seeks to reconstruct a training image x = G(w) that maximizes the likelihood of a target class label y under the target model MDNN by repeating N inversion steps. In contrast, VLMs MV LM generate a sequence of tokens, and the target output y = (y1, . . . , ym) is also a sequence of m tokens. To address the unique nature of VLMs, we introduce several MI strategies: Token-based Model Inversion (TMI), Convergent Token-based Model Inversion (TMI-C), and Sequence- based Model Inversion (SMI). (B) Building on the insight that output tokens differ in their degree of visual grounding, and hence their gradients vary in informativeness for reconstructing images during inversion, we propose Sequence-based Model Inversion with Adaptive Token Weighting (SMI-AW), a novel MI for VLMs (Sec. 4). SMI-AW adaptively adjusts each token’s gradient contribution according to its visual grounding, allowing the optimization to concentrate on visually grounded tokens and more effectively recover private training images. See Figure 2 for discussion of attention map analysis.

Datasets

  • Private Datasets (Target VLMs): The authors constructed Visual Question Answering (VQA) style datasets based on standard classification benchmarks: VQA-FaceScrub (106,836 images, 530 identities), VQA-CelebA (top 1,000 identities paired with randomly generated names), and VQA-StanfordDogs (120 dog breeds). Prompts were structured as "Who is the person in the image?" or "What breed is this dog?".
  • Public Datasets (Generative Prior): FFHQ was used to pre-train the StyleGAN2 generator for face reconstruction, and AFHQ-Dogs was used for dog image generation.

Key Insights and Ideas

  • Tokens are Not Created Equal: In a generated sentence, some tokens (like names or specific attributes) heavily rely on the visual features of the input image, while others are filler words driven by language priors.
  • Attention Maps as Proxies for Gradient Informativeness: The strength of cross-attention between a text token and the image directly correlates with how informative that token's gradient will be for reconstructing the image. This pattern dynamically shifts across optimization steps as the reconstructed image evolves.
Visual attention map analysis showing how token-level gradients vary substantially in visual informativeness across tokens and over inversion steps.
  • Sequence-level Optimization is Crucial: Token-based methods fail because gradients from individual tokens exhibit high variance and local linguistic noise, leading to poor convergence. Sequence-based methods aggregate losses to provide a globally coherent optimization signal.
  • Public Models are Vulnerable Out-of-the-Box: Even without fine-tuning a target model on a custom private dataset, publicly released pre-trained VLMs retain enough specific training data memory to allow successful celebrity image reconstruction.

Key Results

  • SMI-AW Superiority: Across all metrics, SMI-AW combined with logit-maximization loss ($L_{LOM}$) consistently outperformed token-based methods. It achieved an attack accuracy of 61.01% on FaceScrub (evaluated by a multimodal LLM framework) and minimized feature distance metrics.
  • High Generalizability: On CelebA and StanfordDogs, SMI-AW achieved high attack accuracies of 67.05% and 78.13%, respectively.
  • Human Validation: Human evaluation confirmed the severity of the leak, with 53.42% to 61.21% of reconstructed images successfully recognized as the target identity.
  • Text Alignment: Sequence-based methods achieved text match rates exceeding 95%, showing highly stable alignment compared to token-based methods.
The match rate between the output text of the reconstructed image and the target output text across different methods.
  • Zero-Shot Public Leakage: The authors successfully reconstructed recognizable images of celebrities (e.g., Harry Potter/Daniel Radcliffe, Beyonce, Jackie Chan, Selena Gomez) directly from the publicly available, pre-trained LLaVA-v1.6-7B model.
Reconstructed images of celebrities obtained directly from the pre-trained LLaVA-v1.6-7B model using SMI-AW.

Limitations and Future Work

Not discussed in the main text of the paper (the authors note that additional analysis, limitations, and broader impact are deferred to the supplementary material).

Summary updated

BibTeX
@inproceedings{nguyen2026do,
  author = {Ngoc-Bao Nguyen and Sy-Tuyen Ho and Koh Jun Hao and Ngai-Man Cheung},
  title = {{Do Vision-Language Models Leak What They Learn? Adaptive Token-Weighted Model Inversion Attacks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=PyQlMUNeoB},
}
Figure