Image prompt reconstruction attack against distributed MLLM inference frameworksImage Prompt Reconstruction Attacks on Distributed MLLM Inference Frameworks
The authors study the risk of image prompt leakage from intermediate embeddings in distributed MLLM inference, propose two black-box passive reconstruction attacks, MPAA and IEDA, and state that reconstruction performance on four MLLMs is better than the baselines.
In distributed MLLM inference, any participant may be the attacker; black-box (without model parameters or architecture beyond the hosted module) and passive (semi-honest, not interfering with inference); the attacker hosts a client module and a contiguous segment of server layers, receives the intermediate embedding E_tgt, and can collect an auxiliary dataset D_aux with domain or distributional similarity to the target image, with the goal of reconstructing the private input image.
- Distributed MLLM inference transmits intermediate embeddings between participants; existing research covers only text prompt leakage, and whether image prompts can be reconstructed from intermediate embeddings has not been studied, while images contain rich visual and semantic private information.
- The authors first exploit the stability of special token embeddings to design an image embedding extraction algorithm, then propose two black-box passive attacks: MPAA reconstructs pixels patch by patch and fuses multiple resolutions, while IEDA maps embeddings into semantic space to guide a diffusion model for semantic-level reconstruction.
- On Gemma 3, Phi 4 Multimodal, Qwen 2.5 VL, and Llama 4 Scout, embedding extraction reaches 100% OER at each layer for most models (Table II); the authors state that IEDA outperforms the baselines and MPAA on CSS across all settings, and that MPAA can reconstruct pixels with high fidelity in early layers.
- The authors note: performance drops under dataset transfer, mainly because training data coverage is insufficient; the reconstruction resolution is fixed at 64; deeper analysis of the number of embeddings and the privacy-robustness trade-off is left for future work. The experiments cover four MLLMs and eight datasets, and IEDA does not report ℓ1 and SSIM.
- Evaluated models
- Gemma 3Phi 4 MultimodalQwen 2.5 VLLlama 4 Scout
- Benchmarks
- CIFAR10CIFAR100STL10CelebAImageNet-100CC3MCOCO CaptionImageNetteMidjourney Prompts
- Metrics
- OERℓ1 lossSSIMCSSAPA
The researchers propose two passive black-box image prompt reconstruction attacks, MPAA and IEDA, against distributed MLLM inference frameworks, and evaluate them on Gemma 3, Phi 4 Multimodal, Qwen 2.5 VL and Llama 4 Scout. The study first analyzes the information flow from image pixels to intermediate representations, designs an image embedding extraction algorithm, and in experiments achieves 100% extraction accuracy at almost all MLLM layers. MPAA performs pixel-level reconstruction through block-wise information extraction and stitching, while IEDA performs coarse-grained semantic reconstruction via embedding-guided diffusion generation. The authors claim this is the first image reconstruction attack study targeting MLLMs, and analyze the impact of MoE architecture, image preprocessing, model scale and image-text dependencies on attack effectiveness.
Paper analysis
What problem does this paper attempt to solve?
Intermediate embeddings in distributed MLLM inference leak image prompts, and the authors propose a black-box passive image reconstruction attack to quantify this risk.
Core problem: To what extent can the intermediate embeddings transmitted in distributed MLLM inference frameworks be used to reconstruct users' private input images.
- Setting and importance: Distributed inference frameworks such as Petals and Cake split model layers across consumer-grade devices, transmitting intermediate embeddings between participants; the authors consider that image prompts contain rich visual and semantic information, and the privacy risk of their embeddings extends to the image modality as LLMs evolve into MLLMs.
- Gaps in existing research: The authors state that existing work studies only text prompt leakage in distributed LLMs, and image prompt leakage in distributed MLLM inference is largely unexplored; image reconstruction attacks in split learning target small classification networks in the training phase, and text prompt reconstruction methods rely on the discrete nature of text or white-box assumptions, neither of which applies to continuous pixels and the black-box MLLM setting.
- Core observation: Image and text embeddings are interleaved across MLLM layers, but the embeddings of special tokens (such as <start_of_image>) are almost unaffected by other tokens and remain stable; moreover, an occluded patch mainly affects the embedding at the same position, indicating that patch information is mainly concentrated in the corresponding embedding.
- Contributions: The authors propose an image embedding extraction algorithm (with 100% extraction accuracy at each layer for most models in the experiments), and on this basis propose two complementary attacks—pixel-level MPAA and semantic-level IEDA—evaluated on four MLLM families, and analyze the effects of MoE architecture, image preprocessing, model scale, and image-text dependence on the attack.
- Threat model:
- Goal: Reconstruct other users' private input image x_tgt from the received target embedding E_tgt.
- Knowledge: black-box; the attacker does not possess model parameters or architecture details beyond the hosted module.
- Capability: passive (semi-honest), without interfering with the inference process; hosts a client module and a contiguous segment of server layers f_{i+1:j}; can collect an auxiliary dataset D_aux with domain knowledge of or distributional similarity to the target image.
- Victim system: A distributed MLLM inference framework (with Petals as the reference), where any participant may be the attacker.
What related research exists?
Related work falls into three categories: distributed inference frameworks, language model attacks (including text prompt reconstruction), and vision model attacks (split learning and embedding inversion).
Distributed LLM inference frameworks
- Petals (Borzunov et al., 2023/2024) and Cake (2025)—open-source frameworks that split large-model inference across consumer-grade devices for collaborative completion; this paper uses Petals as the reference system model.
- EdgeShard, HexGen, LinguaLinked, PipeLLM, etc.—distributed inference systems on heterogeneous or edge devices; Together.ai, Prime Intellect, and Modal are commercial platforms based on this paradigm.
Language model attacks
- Membership inference (Song & Raghunathan, 2020; Chang et al., 2025) and model extraction (Krishna et al., 2020; Zanella-Beguelin et al., 2021)—determining whether data was used for training and copying proprietary models.
- Prompt reconstruction: system prompt extraction (Zhang et al., 2024), reconstructing user prompts from intermediate embeddings or final outputs (Li et al. 2023; Morris et al. 2023; Zhang et al. 2024; Luo et al. 2025; Qu et al. 2025). The paper notes that these methods are all limited to text input: text is discrete tokens, whereas images are continuous pixels, so they do not apply to this setting; among them, Qu et al. (SP 2025) assume a white-box setting where the attacker hosts the entire LLM, and Luo et al. (2025) exploit the discreteness of text tokens for classification-based reconstruction.
Vision model attacks (split learning and embedding inversion)
- Split learning image reconstruction: FSHA (Pasquini et al., 2021) is an active attack, while PCAT (Gao & Zhang, 2023), Unsplit (Erdogan et al., 2022), and SDAR (Zhu et al., 2023) are passive attacks. The paper notes that they target small classification networks in the training phase, whereas this paper targets billion-parameter MLLMs in the inference phase, where training an inverse model is too costly.
- Image encoder attacks: adversarial methods (Guo et al. 2024; Hu et al. 2025) and CLIP embedding inversion (LeakyCLIP, Chen et al. 2025; DRAG, Lei et al. 2025). The paper notes that DRAG requires white-box access, limiting its applicability beyond small models.
Baselines and benchmarks: The experimental baselines are modified PCAT and SDAR (adapted from split learning, with the same feature extraction module as MPAA added for dimensionality reduction); the evaluation datasets are CIFAR10, CIFAR100, STL10, CelebA, and ImageNet-100, with CC3M, COCO Caption, and ImageNette used in supplementary experiments.
Author positioning: To their knowledge, this is the first work to study image reconstruction attacks on large MLLMs in a black-box, distributed inference setting (per the authors).
How does the paper address this problem?
First extract image embeddings using special token anchors, then use MPAA for patch-level pixel reconstruction and IEDA for semantic reconstruction with semantically guided diffusion.
Overall approach: the attacker first extracts the image embedding E_x from the mixed embedding sequence, then reconstructs the image using the pixel-level attack MPAA and the semantic-level attack IEDA, respectively. The attack is formalized as x̃tgt = A(Etgt; gclient, fi+1:j, Daux), i.e., given the target embedding, the hosted module, and an auxiliary dataset, the attack algorithm A outputs the reconstructed image.
Image embedding extraction (Algorithm 1)
- Motivation: The authors find that the embeddings of special tokens (such as <start_of_image>, <end_of_image>) are almost unaffected by other tokens during inference and remain stable (Figure 3), so they can serve as anchors; while training a classifier to distinguish image/text embeddings fails in deeper layers because the two types of embeddings gradually align.
- Procedure: The attacker queries its own module with random image-text pairs and establishes the correspondence between prompts and embedding sequences by sequence length (with 10,000 queries and b=100 concurrency, the collision rate is 0.2%; a random special token sequence can be inserted as an identifier); for the target sequence, it computes the ℓ2 or ℓ1 distance of each vector to the anchors, matches the two anchors using top-k candidates and a minimum-margin constraint, and takes the embeddings between the two as the image embedding.
- Complexity: Distance computation is O(|E_tgt|·d_f), lower than the classifier approach's O(|E_tgt|·O_fwd).
MPAA: pixel-level reconstruction
- Key observation: Occluding a patch mainly affects the embedding at the same position (Figure 4), so reconstruction is done independently per patch, avoiding feeding the entire N_x·d_f-dimensional vector into a fully connected network (the paper takes Phi 4 Multimodal as an example: a 128×128 input produces 545 3072-dimensional embeddings, which concatenate to 1,674,240 dimensions, making the training data requirement infeasible).
- Two stages: (1) Two shared patch extractors reconstruct each embedding into a high-resolution (e.g., 16×16) and a low-resolution (e.g., 8×8) patch, which are concatenated into two sketches and refined by a smoothing network; (2) a modified Fusion-Denoising Network (FDN) fuses the two sketches and denoises them, outputting an image at a fixed resolution without requiring a match to the original input size.
- Design rationale: The shared extractor reduces model size from O(N_x·d_f) to O(d_f); the appendix SI uses rate-distortion theory and the Shannon lower bound to argue that the low-resolution branch preserves structure and the high-resolution branch preserves detail, and that fusion balances global consistency and local realism.
IEDA: semantic-level reconstruction
- Motivation: In deeper embeddings, patch information diffuses and low-level visual details are lost, so MPAA degrades in deeper layers; IEDA instead uses the global semantics in the embeddings to guide a diffusion model for generation. The authors state that the conditioning signals of T2I-Adapter and ControlNet are spatially structured visual features, incompatible with the abstract embeddings of MLLMs, so they switch to two-stage joint training.
- Phase 1 adapter training: The adapter A_A (with the same structure as MPAA's patch extractor) projects E_x into a semantic vector c_x, and a discriminator is trained with a Wasserstein GAN-style adversarial objective to distinguish A_A's output from the features of a pretrained semantic model f_Sem (Inception V3 or CLIP), while the adapter optimizes both the adversarial loss and an element-wise alignment loss.
- Phase 2 diffusion fine-tuning: Using DDPM as the backbone (not Stable Diffusion, since it targets text-to-image), training with the classifier-free guidance objective LIEDA(θ) = Exk,k,cx|sθ(xk,k,cx)−ϵ|22; the weak-guidance strategy first trains a base DDPM once on ImageNet with c_x=0 (reusable across models), then jointly fine-tunes the unconditional and conditional score networks on the auxiliary data, and at sampling time combines the two outputs according to the guidance scale ω.
Evaluation method
- Metrics: OER (the proportion of the extracted image embedding relative to the ground truth) measures extraction; ℓ1 loss, SSIM, and CSS (CLIP-based cosine semantic similarity) measure reconstruction; APA (the proportion still predicted correctly under adversarial perturbation) is additionally used for robustness analysis.
- Settings: The cut layer takes {0, ⌈L/4⌉, ⌈2L/4⌉, ⌈3L/4⌉, L}, where 0 corresponds to the image tokens output by the projector; the default text prompt is Describe this image; the reconstruction resolution is uniformly 64×64; the dataset is split 64%/16%/20% into training/validation/test.
What experiments did the paper conduct?
Extraction and reconstruction are evaluated on four MLLMs and multiple datasets: extraction OER mostly reaches 100%, and the authors claim IEDA's semantic reconstruction is comprehensively better than the baselines.
Experimental setup
- Models evaluated: Gemma 3 (4/12/27B, 34/48/62 layers), Phi 4 Multimodal (6B, 32 layers), Qwen 2.5 VL (3/7B, 36/28 layers), Llama 4 Scout (109B, 48 layers, MoE; some layers offloaded to CPU because about 200 GB of GPU memory is required) (Table I).
- Datasets: The main text uses CIFAR10 (32×32), CIFAR100 (64×64), STL10 (128×128), CelebA (256×256), and ImageNet-100 (160×160, mainly used for IEDA diffusion model pretraining); supplementary experiments use CC3M, COCO Caption, and ImageNette. Each experimental dataset uses 50,000 image-text pairs (Appendix SIII).
- Baselines: PCAT and SDAR (adapted from split learning, with the same feature extraction module as MPAA added for dimensionality reduction, followed by a decoder).
- Metrics: OER, ℓ1 loss, SSIM, CSS; IEDA does not report ℓ1 and SSIM (the authors consider pixel-level metrics unable to accurately evaluate semantic reconstruction).
- Platform: PyTorch, with a distributed environment built following Petals, two A100 40GB GPUs, three participants, the second being the attacker (Appendix SII).
- Number of repetitions and confidence intervals: Not reported in the paper.
Main results
Embedding extraction (Table II, OER): Gemma 3, Phi 4 Multimodal, and Qwen 2.5 VL are all 1.00 at each layer tested; Llama 4 Scout shows mismatches in deeper layers, with 1.00/0.99/0.95/0.93 at layers 12/24/36/48 under Midjourney-dependent text, and 1.00/0.99/0.95/0.92 under CIFAR100 independent text. The main reconstruction results are in Figure 7 (line plots; the main text does not give point-by-point values), with the following key points:
Model Extraction OER (each layer, Table II) MPAA reconstruction (Figure 7) Gemma 3 1.00 Low ℓ1 in early layers, degrading with depth Phi 4 Multimodal 1.00 Same trend as Gemma 3, better than Qwen 2.5 and Llama 4 Qwen 2.5 VL 1.00 MPAA performs worst (only 4 effective image embeddings) Llama 4 Scout 1.00–0.92 (decreasing with layer) Reconstructable in early layers, degrading in deeper layers due to extraction mismatches - The authors state that IEDA consistently outperforms the two baselines and MPAA on CSS across all attack settings, and can generate semantically reasonable images even in deeper layers where MPAA performs poorly; however, IEDA retains only high-level semantics and cannot reproduce the precise structure and spatial layout of objects (Figure 8).
- The authors state that PCAT and SDAR, even after enhancement, are inferior to the attacks in this paper, producing only passable reconstructions on CelebA and generally failing on datasets with more complex visual patterns; the authors explain that these methods were originally designed for image classifiers with simple architectures.
- The authors state that MPAA performs better on Gemma 3 and Phi 4 than on Qwen 2.5 and Llama 4, and accordingly use MPAA as a diagnostic tool to analyze the degree of visual information retention in each model.
Analysis of privacy-influencing factors (Section V-C)
- Image-text dependence: On Gemma 3 and Phi 4, whether the text is semantically related to the image has a negligible effect on MPAA's ℓ1 (Table III, e.g., at layer 17 on CIFAR10, both dependent and independent are 0.055); the authors explain that image tokens always precede text tokens, and the autoregressive structure prevents text from affecting image embeddings, with slight fluctuations on Gemma 3 coming from normalization layer statistics.
- Model scale: On the Gemma 3 series (4B/12B/27B, hidden dimensions 2560/3840/5376, sharing the same image encoder), a larger hidden dimension gives lower MPAA ℓ1, e.g., at layer 9 on STL10 they are 0.0724/0.0584/0.0494 respectively (Table IV).
- Number of embeddings: On Qwen 2.5 VL 3B, scaling the same dataset to 64/128/256/512 (corresponding to 4/25/81/324 embeddings), more embeddings lead to more severe leakage, e.g., ℓ1 at the CIFAR10 TOKEN layer drops from 0.1207 to 0.0658 (Table V); the authors state that this factor has a stronger effect than hidden dimension and is the dominant factor in MPAA's cross-model performance differences.
Privacy-robustness trade-off (Table VI)
- What was measured: APA of each configuration under the AdvDiffVLM adversarial attack (plane→car targeted perturbation), compared with MPAA's ℓ1.
- Results: APA for Gemma 3 4B/12B/27B is 44%/67%/69%, with corresponding ℓ1 of 0.072/0.058/0.049; APA for Qwen 2.5 VL 3B with 4/25/81/324 embeddings is 94%/87%/81%/76%, with ℓ1 of 0.120/0.108/0.085/0.065.
- Authors' interpretation: Larger models are more robust but easier to reconstruct by MPAA (privacy-robustness trade-off); with fixed model capability, coarser patch splitting (fewer embeddings) improves both privacy and robustness.
Other ablations and analyses
- Transferability (Figure 11): MPAA transfers well between CIFAR10/CIFAR100, but models trained on CelebA transfer poorly to other datasets; deeper cut layers reduce transferability.
- MPAA ablation (Table IX, Gemma 3 layer 17): default/single-resolution/no smoother/no FDN give ℓ1 of 0.0525/0.0687/0.0656/0.0894 and SSIM of 0.7639/0.7289/0.7581/0.5655 on CIFAR10; FDN has the largest effect.
- IEDA ablation (Table X, Qwen 2.5 VL layer 14, CIFAR10): CSS for default/joint training/strong guidance/no pretraining is 0.7842/0.7158/0.7369/0.7612; joint training has the lowest ℓ1 (0.1671), but the authors state its reconstructions are semantically meaningless.
- Reconstruction resolution (Table XII, CelebA): When the output goes from 32 to 128, MPAA metrics decline slightly (Gemma 3 layer 9 ℓ1 goes from 0.0412 to 0.0522); the authors explain that the loss of high-level semantic information is irreversible, and increasing resolution cannot recover low-level details.
- Query cost (Table XI): The query cost of collecting 50,000 pairs of training data is below $20 under all three pricing schemes (e.g., $16.25 for Gemma 3 under GPT-5.1 pricing).
- Supplementary datasets (Tables VII–VIII): The trends on CC3M, COCO, and ImageNette are consistent with the main text (per the authors).
What are some points that can be further explored?
The authors list limitations such as dataset transfer and resolution, along with defense directions; the experiments cover four MLLMs and eight datasets, and some evaluation information is not reported.
Limitations and future directions noted by the authors
- Dataset transfer degradation (Section VIII): MPAA and IEDA degrade in performance when the training and test data distributions differ greatly; the authors attribute this to insufficient coverage of the training data rather than a flaw in the attack design. Training on large-scale diverse corpora (e.g., LAION-5B) could yield more general attacks, but at high computational cost; the authors state that the goal of this paper is to characterize risk rather than to optimize cross-distribution generalization.
- Reconstruction resolution (Section VIII): due to resource constraints, the reconstruction resolution is fixed at 64; the authors state that increasing resolution does not necessarily add visual detail, and whether 64 resolution (which may lack detail) constitutes meaningful privacy leakage depends on the privacy definition of the specific scenario.
- MoE embedding space (Section V-A): deep-layer embeddings of Llama 4 Scout cluster, causing anchor mismatches; the authors believe this may stem from the MoE architecture causing different special tokens to activate similar expert combinations, and in-depth study of the characteristics of MoE embedding spaces is beyond the scope of this paper and left for future work.
- Privacy-robustness trade-off (Section V-C): a more comprehensive study of the relationship between model scale, patch granularity, and the privacy-robustness trade-off is left for future work.
- Defenses discussed only (Section VI, Appendix SIV): end-to-end encryption (mathematical trust protocols are slow; hardware trust requires specialized devices), reducing the number of patches or hiding dimensions (introduces a privacy-utility trade-off and cannot weaken IEDA), embedding shuffling (can be bypassed by identifiers and is only suitable for offline settings), removing special tokens (requires new training strategies and new architectures), differential privacy (the authors consider it incompatible with this setting)—all are analysis and outlook, with no defense experiments conducted.
Experimental coverage
- The models tested are from four families: Gemma 3 (4/12/27B), Phi 4 Multimodal, Qwen 2.5 VL (3/7B), and Llama 4 Scout; the model scale ablation is done only on the Gemma 3 series, and the embedding count ablation only on Qwen 2.5 VL 3B.
- There are eight evaluation datasets in total: five in the main text (CIFAR10, CIFAR100, STL10, CelebA, ImageNet-100) and three supplementary (CC3M, COCO Caption, ImageNette); the reconstruction resolution is uniformly 64×64, with an additional resolution sweep from 32–128 (CelebA only).
- IEDA reports only CSS, not ℓ1 or SSIM; the main result Figure 7 is a curve plot, and the main text does not give a point-by-point numerical table.
- Attack cost is estimated under three API pricing schemes (Table XI); the paper does not report the computational time for attack training, nor the number of experimental repetitions or statistical significance tests.
- The adversarial robustness experiments use only one attack, AdvDiffVLM, and one set of source/target classes (plane→car).
Summarize the main content of the paper
The authors propose the image reconstruction attacks MPAA and IEDA for distributed MLLM inference, and analyze architectural factors affecting the degree of leakage.
An attack paper on the privacy risk of distributed MLLM inference: intermediate embeddings transmitted between participants may be used by a black-box, passive, semi-honest participant to reconstruct other users' private input images.
- Problem: Existing research covers only text prompt leakage; split learning image reconstruction targets small classifiers during training, and text reconstruction methods rely on discrete tokens or white-box assumptions, none of which applies to the black-box MLLM inference setting.
- Method: First, an anchor-matching image embedding extraction algorithm is designed based on the stability of special token embeddings; then MPAA (per-patch pixel reconstruction plus multi-resolution fusion and denoising) and IEDA (an adversarially trained adapter maps embeddings into semantic space, and a two-stage weakly guided fine-tuned DDPM performs semantic-level generation) are proposed.
- Extraction results: The OER at each layer is 1.00 for Gemma 3, Phi 4 Multimodal, and Qwen 2.5 VL; for Llama 4 Scout it drops to 0.92–0.93 in deeper layers, which the authors attribute to embedding clustering caused by MoE (Table II).
- Reconstruction results: The authors state that IEDA consistently outperforms PCAT, SDAR, and MPAA on CSS across all settings; MPAA is high-fidelity in early layers and degrades in deeper layers, and is worst on Qwen 2.5, which has only 4 effective embeddings (Figure 7, 8).
- Factor analysis: The number of embeddings is the dominant factor—on Qwen 2.5 VL 3B, ℓ1 at the TOKEN layer is 0.0658 with 324 embeddings and 0.1207 with 4 embeddings (Table V); a larger hidden dimension leaks more (Table IV); image-text dependence has a negligible effect (Table III). There is a trade-off between scale and robustness: Gemma 3 27B has an APA of 69% versus 44% for 4B, but 27B is easier to reconstruct (Table VI).
- Authors' conclusion: The authors state that to their knowledge this is the first study of image reconstruction attacks on large MLLMs in a black-box distributed inference setting; existing cryptographic defenses are impractical, coarser patch splitting can benefit both privacy and robustness but harms fine-grained visual capability, and more private distributed MLLM designs are left for the future.