betaFeedback

WorksComputer Science

SPIN: Image Immunization Against Diffusion Editing via Single-Step Projection in Stochastic Neighborhoods

Abstract

Diffusion models have greatly advanced instruction-guided image editing, while also raising concerns about unauthorized image manipulation. Image immunization addresses this risk by adding imperceptible perturbations to an input image to disrupt subsequent edits. Since editing requests are unknown at image release, protection should remain effective beyond the instruction used to construct the perturbation. Existing immunization methods either require costly full-trajectory backpropagation or use intermediate objectives whose effects may be weakened by subsequent denoising. Meanwhile, a single inference path provides limited feedback about alternative denoising continuations. To address these challenges, we propose SPIN, a framework for image immunization via one-step projection over local stochastic trajectory neighborhoods. Starting from an early denoising state, SPIN generates stochastic neighboring states under the same instruction and predicts their clean latents through one-step projection without full unrolling. We then optimize a bounded input perturbation to maximize the average deviation of these predictions from a clean-edit reference, encouraging the perturbation to disrupt multiple possible editing outcomes. Experiments on two image editors demonstrate substantial gains in protection performance, with SPIN outperforming compared methods across all six metrics under seen instructions and in the more challenging unseen instruction setting.

Introduction

Instruction-guided diffusion models have made it possible to modify a source image using natural-language instructions while preserving content unrelated to the requested changes [4, 35]. Publicly available image editing models have substantially lowered the barriers to personalized image manipulation. However, the same accessibility also makes publicly released images vulnerable to unauthorized editing, which may compromise personal privacy and reputation or facilitate misleading content. Deepfake detection [24] and AI-generated image detection [23] can identify manipulated content, but operate only after such content has been produced. This motivates proactive protection that is embedded imperceptibly in images before release.

Image immunization protects source images by adding imperceptible perturbations that disrupt subsequent unauthorized edits. A direct approach optimizes perturbations against the final editing output, but backpropagation through the denoising trajectory incurs substantial computational cost [25]. More efficient alternatives construct surrogate objectives from denoising predictions or intermediate representations [17] (Liang & Wu 2023). Such objectives can target encoder representations [32], instruction-related cross-attention [19], or early denoising states [7], providing protection signals through shorter gradient paths.

Nevertheless, deviations induced by intermediate representations may be attenuated by subsequent denoising, weakening their effect on the final edit. Protection under a fixed editing instruction may also depend on the specific sampling trajectory. This dependence becomes particularly relevant when future editing requests are unknown, as a single trajectory offers limited feedback about other possible continuations. The challenge is therefore to construct an effective optimization signal that reflects the perturbation’s impact on editing outcomes across multiple possible continuations, enabling protection beyond the original editing instruction.

We address this challenge by proposing SPIN (Single-step Projection in Stochastic Neighborhoods), an image-immunization framework that uses predicted editing outcomes to guide protective perturbations. Single-step projection predicts a clean latent from an early denoising state. The discrepancy between this prediction and a fixed clean-edit reference provides an effective surrogate for optimizing perturbations that disrupt the final editing output. To extend this signal beyond a single inference path, SPIN generates neighboring candidate states through stochastic transitions from a shared early state. We then optimize a bounded input perturbation to maximize the average discrepancy between their projected outcomes and the reference, reducing dependence on a single construction path and promoting generalization to unseen editing instructions.

Experiments on SD3 and InstructPix2Pix show that SPIN outperforms all baselines across six metrics under both seen and unseen editing instructions. Immunization success rates reach 90% and 94% under seen instructions (85% and 91% under unseen instructions), consistently exceeding those of competing methods. Ablations demonstrate that single-step projection provides an effective protection signal, while stochastic neighborhood sampling further improves generalization over single-candidate projection.

Our main contributions are summarized as follows:

  • We propose SPIN, an image-immunization framework that uses single-step projection to guide perturbation optimization with predicted editing outcomes, providing an effective signal for disrupting the final edit.

  • We introduce stochastic neighborhood optimization to construct a single perturbation that targets multiple possible continuations of the editing process. By driving their projected outcomes away from the clean-edit reference, this strategy promotes disruption across different inference paths and improves generalization to unseen editing instructions.

  • Experiments under standard editing pipelines show that SPIN consistently outperforms the evaluated baselines in immunization success rate under both seen and unseen instructions, across flow-matching and noise-prediction diffusion editors.

Related Work

Instruction-Guided Diffusion Image Editing

Diffusion models support image editing by combining a generative prior with a source image and user-specified control. SDEdit [21] perturbs and denoises an input through a stochastic differential equation to balance faithfulness and realism. Later methods introduced more explicit semantic control. Prompt-to-Prompt [12] manipulates cross-attention maps to preserve spatial layout while changing textual content, whereas Imagic [13] optimizes a text embedding and fine-tunes the model for semantic edits on a single image. InstructPix2Pix [4] establishes a supervised learning paradigm for directly following natural-language editing instructions without per-image inversion or fine-tuning. UltraEdit [35] advances this paradigm through large-scale editing supervision with diverse instructions, real-image anchors, and region annotations, supporting the adaptation of pretrained generative models, including Stable Diffusion 3 [10], to instruction-guided image editing. These advances improve the capability and accessibility of image editing, while also exposing publicly released images to increasingly diverse unauthorized transformations.

Adversarial Examples

Norm-bounded adversarial perturbations can alter model predictions [11], and projected-gradient methods [20] formulate their construction as constrained optimization. To improve cross-model transferability, MI-FGSM [9] stabilizes updates through momentum, while VMI-FGSM [29] further refines them using neighborhood gradient information. EOT [1] averages attack objectives over input transformations to improve transformation robustness, whereas universal adversarial perturbations generalize across images [22]. SPIN targets the generation trajectories of diffusion editors, optimizing a bounded input perturbation over local stochastic continuations to disrupt generation and drive final editing outputs away from their clean counterparts.

Image Immunization Against Diffusion Editing

Image immunization methods mainly differ in the optimization signal used to construct protective perturbations. PhotoGuard exposes the central trade-off through an efficient encoder-targeting objective (PhotoGuard-E) and a more output-related but expensive full-diffusion objective (PhotoGuard-D) [25]. AdvDM optimizes the diffusion denoising loss, while MIST combines semantic and textural objectives to disrupt the generation process at multiple representation levels [17, 16]. Subsequent methods shorten the gradient path by targeting specific internal components: SDS [32] applies score distillation at the vulnerable VAE bottleneck, EditShield [6] shifts instruction-conditioned latent representations, and SA [19] disrupts prompt-relevant cross-attention features. DiffusionGuard [7] places its objective at early denoising stages. Other approaches improve complementary aspects of protection: DCT-Shield [3] optimizes frequency-domain perturbations for visual fidelity and JPEG resistance, whereas SIFM [8] combines intermediate-feature manipulation with semantic and perceptual criteria for evaluating edit failure. Despite their different targets, these methods either require costly differentiation through the diffusion trajectory or rely on internal surrogates whose deviations may be attenuated during subsequent denoising.

Method

We present an image-immunization framework, termed Single-step Projection in Stochastic Neighborhoods (SPIN), for protecting images against unauthorized editing. To efficiently obtain a protection signal that reflects the perturbation’s effect on the predicted edit, we use single-step projection to estimate the clean latent from an intermediate denoising state. We further optimize the perturbation over a local stochastic neighborhood to reduce dependence on a single inference path and promote generalization across editing instructions.

Preliminaries and Problem Formulation

Given a source image x∈[0,1]H×W×3x \in[0,1]^{H \times W \times3} and an editing instruction cc, a frozen editor Gθ\mathcal{G}_{\theta} produces an edited image y=Gθ(x,c;ω)y = \mathcal{G}_{\theta}(x,c;\omega), where ω\omega denotes the sampling randomness. The editor iteratively denoises a latent state ztz_t conditioned on xx and cc, then decodes the final latent into yy.

Image immunization seeks a bounded input perturbation that disrupts subsequent edits while preserving the source image’s appearance. The protected image is xδ=Π[0,1](x+δ)x_{\delta} = \Pi_{[0,1]}(x+\delta), where Π[0,1]\Pi_{[0,1]} clips pixel values to the valid range. For a given instruction cc and sampling randomness ω\omega, we formulate the protection objective as:

δ⋆=arg⁡max⁡∥δ∥∞≤ϵ L(Gθ(xδ,c;ω),Gθ(x,c;ω))(1)\delta^{\star} = \underset{\lVert\delta\rVert_{\infty} \le\epsilon}{\arg\max}\ \mathcal{L}\left(\mathcal{G}_{\theta}(x_{\delta},c;\omega), \mathcal{G}_{\theta}(x,c;\omega)\right) \tag*{(1)}

where ϵ\epsilon limits the perturbation magnitude to preserve input fidelity, and L\mathcal{L} measures the discrepancy between protected and clean editing outputs. Only δ\delta is optimized, with all model parameters frozen. The perturbation remains fixed during evaluation under instructions and sampling randomness not used in optimization.

Overall Framework

Our goal is to construct a bounded input perturbation that disrupts the final editing output and remains effective under unseen editing instructions. To this end, SPIN combines two modules, as shown in Figure 1: (a) local trajectory sampling generates neighboring candidate states from a shared early state under a fixed construction instruction, providing feedback across multiple local continuations to reduce path dependence and support transfer to unseen instructions; (b) one-step projection estimates each candidate’s clean latent, enabling output-oriented evaluation without full sampling rollouts. We aggregate the projected candidates’ deviations from a fixed clean-edit reference to optimize the same input perturbation. The following subsections detail the projection, neighborhood construction, and perturbation optimization.

Figure 1. Overview of SPIN. From a shared native prefix, local trajectory sampling generates neighboring candidates and one-step projection estimates their clean endpoints. These estimates guide perturbation optimization to drive editing outputs away from the fixed clean-edit reference.

Outcome-Oriented Single-Step Projection

To evaluate local continuations without completing each sampling rollout, we use single-step projection to predict the clean latent from an intermediate state. For a noise-prediction model, consider zt=atz0+btϵz_t = a_t z_0 + b_t \epsilon, with ϵ∼N(0,I)\epsilon\sim\mathcal{N}(0, I). For a flow-matching model with a linear probability path, zt=(1−t)z0+tϵz_t = (1-t)z_0 + t\epsilon. The corresponding projections are

Ptϵ(zt;xδ,c)=zt−btϵ^θ(zt,t∣E(xδ),c)at,(2)\mathcal{P}^{\epsilon}_t(z_t; x_\delta, c) = \frac{z_t - b_t\hat{\epsilon}_{\theta}(z_t, t \mid E(x_\delta), c)}{a_t}, \tag*{(2)}
Ptv(zt;xδ,c)=zt−tv^θ(zt,t∣E(xδ),c).\mathcal{P}^{v}_t(z_t; x_\delta, c) = z_t - t\hat{v}_{\theta}(z_t, t \mid E(x_\delta), c).

Here, ϵ^θ\hat{\epsilon}_{\theta} and v^θ\hat{v}_{\theta} denote the editor’s predictions, including guidance operations. Each projection uses the prediction at the candidate state and bypasses the remaining sampling steps.

For population-optimal conditional noise or velocity predictors trained with squared error, the unguided projection equals the conditional mean of the clean latent. In practice, we apply Equation (2) to guided predictions. To evaluate intermediate states, SVDD-PM ([15]) approximates their soft values using rewards computed on predicted clean samples. Following this look-ahead evaluation principle, we use the projected latent’s deviation from a clean-edit reference as a differentiable protection surrogate.

Specifically, we obtain the reference latent zrefz_{\mathrm{ref}} by running the complete native editor once on the clean input under instruction cc. The reference is held fixed throughout perturbation optimization, and the discrepancy is computed in the shared clean-latent space.

Projection placement determines the prefix cost and the endpoint information available for evaluation. SuperEdit ([14]) observes that early sampling stages primarily affect global layout in InstructPix2Pix, while later stages refine local attributes and image details. This motivates using early projections to guide perturbation optimization toward disrupting the overall editing structure while keeping the sampling prefix short. The next subsection describes how we construct local candidates and aggregate their projected outcomes.

Optimization over Stochastic Trajectory Neighborhoods

Different editing instructions induce different denoising trajectories. Optimizing a protective perturbation along a single construction trajectory may cause it to overfit to that particular path. We therefore optimize over a stochastic neighborhood of local continuations, aiming to reduce trajectory-specific overfitting and improve transfer to unseen instructions.

Let jj index the branch position in sampling order, and let F0:j\mathcal{F}_{0:j} denote the native sampling prefix. For the current protected input, we compute a shared intermediate state, generate KK candidates through a model-specific stochastic transition Tj\mathcal{T}_j, and project each candidate:

zj(δ)=F0:j(xδ,c;ω<j),zj+1(k)=Tj(zj(δ),ξk;xδ,c),z~0(k)=Ptj+1(zj+1(k);xδ,c).(3)\begin{aligned} z_j(\delta) &= \mathcal{F}_{0:j}(x_\delta,c;\omega_{<j}), \qquad z_{j+1}^{(k)} = \mathcal{T}_j\left(z_j(\delta),\xi_k;x_\delta,c\right),\\ \widetilde{z}_0^{(k)} &= \mathcal{P}_{t_{j+1}}\left(z_{j+1}^{(k)};x_\delta,c\right). \tag*{(3)} \end{aligned}

Here, ξk∼N(0,I)\xi_k \sim\mathcal{N}(0,I) are independently sampled branch noises for k=1,…,Kk=1,\ldots,K, and tj+1t_{j+1} is the sampling time of the candidate states. Intuitively, these branches represent alternative ways the same early editing state could evolve. Recomputing the model prediction at each candidate yields a projected clean latent, allowing us to consider how the perturbation affects several possible editing outcomes without completing their denoising trajectories.

We maximize the expected cosine distance between candidate projections and the fixed clean-edit reference zrefz_{\mathrm{ref}}, approximated by a finite candidate average:

J(δ)=Eξ[dcos⁡(z~0(δ,ξ),zref)],J^K(δ)=1K∑k=1Kdcos⁡(z~0(k),zref).(4)\begin{aligned} J(\delta) &= \mathbb{E}_{\xi}\left[d_{\cos}\left(\widetilde{z}_0(\delta,\xi),z_{\mathrm{ref}}\right)\right],\\ \widehat{J}_K(\delta) &= \frac{1}{K}\sum_{k=1}^{K}d_{\cos}\left(\widetilde{z}_0^{(k)},z_{\mathrm{ref}}\right). \tag*{(4)} \end{aligned}

The cosine distance is defined as dcos⁡(a,b)=1−⟨a,b⟩/(∥a∥2∥b∥2)d_{\cos}(a,b)=1-\langle a,b\rangle/(\lVert a\rVert_2\lVert b\rVert_2). This objective combines feedback from multiple local continuations to update the same input perturbation, encouraging a larger average predicted deviation across the sampled neighborhoods.

The candidate count KK controls the number of samples used to approximate the expectation, while the stochastic transition scale determines the neighborhood’s extent. We sample the candidate noises once and reuse them throughout optimization, yielding a fixed sample-average objective. The optimized perturbation is then held fixed and evaluated under unseen instructions using the complete native editing pipeline.

Instantiating the Neighborhood in Different Editors

SPIN adapts to flow-matching and noise-prediction editors through the transition Tj\mathcal{T}_j, while retaining the same projection objective and perturbation optimization. For flow-matching editors such as SD3, we adopt the stochastic transition used in Flow-grpo (Liu et al., [18]) and Flow-TTRL (Chen et al., [5]). Let Δtj=tj+1−tj<0\Delta t_j=t_{j+1}-t_j<0 and vj=v^θ(zj,tj∣E(xδ),c)v_j=\hat{v}_\theta(z_j,t_j\mid E(x_\delta),c). We construct local candidates by adding Gaussian noise with a corresponding drift correction:

zj+1(k)=zj+[vj+gj22tj(zj+(1−tj)vj)]Δtj+gj−Δtj ξk,gj=λtj1−tj.(5)z_{j+1}^{(k)}=z_j+\left[v_j+\frac{g_j^2}{2t_j}\left(z_j+(1-t_j)v_j\right)\right]\Delta t_j+g_j\sqrt{-\Delta t_j}\,\xi_k,\qquad g_j=\lambda\sqrt{\frac{t_j}{1-t_j}}. \tag*{(5)}

Here, ξk∼N(0,I)\xi_k\sim\mathcal{N}(0,I) and λ≥0\lambda\geq0 controls the stochasticity. Setting λ=0\lambda=0 recovers the native Flow-Match Euler update. The drift correction follows from the velocity–score relation, with its derivation and endpoint handling provided in Appendix C.

For noise-prediction editors such as InstructPix2Pix (Brooks et al., [4]), the native Euler-Ancestral sampler already provides a stochastic transition. With clean-latent estimate z^0,j=zj−σjϵ^j\widehat{z}_{0,j}=z_j-\sigma_j\widehat{\epsilon}_j, we sample candidates as

zj+1(k)=zj+z^j−z^0,jσj(σdown,j−σj)+σup,jξk.(6)z_{j+1}^{(k)}=z_j+\frac{\widehat{z}_j-\widehat{z}_{0,j}}{\sigma_j}\left(\sigma_{\mathrm{down},j}-\sigma_j\right)+\sigma_{\mathrm{up},j}\xi_k. \tag*{(6)}

The coefficients σdown,j\sigma_{\mathrm{down},j} and σup,j\sigma_{\mathrm{up},j} are determined by the native scheduler. The temperature τ≥0\tau\geq0 controls the neighborhood scale, with τ=1\tau=1 recovering the native transition. In both instantiations, candidates share the sampling prefix and differ only in their branch noise. We recompute the model prediction at each candidate state and apply the corresponding single-step projection in Equation (2). These transitions construct the optimization neighborhood.

Perturbation Optimization

We reparameterize each candidate transition by adding a Gaussian noise term to its conditional mean. Holding the sampled noise fixed during backpropagation allows us to differentiate the projection loss with respect to the input perturbation through the candidate prediction, local transition, shared prefix, and image encoder. Throughout optimization, model parameters are frozen, and the clean reference zrefz_{\mathrm{ref}} is treated as a constant.

We initialize the perturbation at zero and maximize Equation (4) using projected gradient ascent (Madry et al., [20]). Define the feasible set as C(x)={δ:∥δ∥∞≤ε, x+δ∈[0,1]H×W×3}\mathcal{C}(x)=\{\delta:\lVert\delta\rVert_{\infty}\le\varepsilon,\ x+\delta\in[0,1]^{H\times W\times3}\}. Each update is computed by:

δ(n+1)=ΠC(x)[δ(n)+ηsign⁡(∇δJ^K(δ)∣δ=δ(n))](7)\delta^{(n+1)}=\Pi_{\mathcal{C}(x)}\left[\delta^{(n)}+\eta\operatorname{sign}\left(\left.\nabla_{\delta}\hat{J}_{K}(\delta)\right|_{\delta=\delta^{(n)}}\right)\right] \tag*{(7)}

where η\eta is the step size. At each iteration, we recompute the shared prefix for the current protected input, generate the candidates, aggregate their projection distances, and update the perturbation within the feasible set. After MM iterations, we return xadv=x+δ(M)x_{\mathrm{adv}}=x+\delta^{(M)}. The perturbation budget, step size, and iteration count are specified in the experimental setup.

Experiments

Setup and Evaluation Protocol

Benchmark Datasets. We construct a benchmark of 500 samples from Pico-Banana, covering landscapes, artworks, multi-object scenes, real-world photographs, news imagery, public figures, and indoor scenes. For text-conditioned protection methods, perturbations are optimized using the original prompt associated with each image. Each sample is evaluated with its original prompt and five semantically disjoint editing instructions, resulting in 3,000 image-instruction pairs. Additional dataset and instruction details are provided in Appendix § 9.§ 1.

Editing Models and Evaluation Metrics. We evaluate InstructPix2Pix and Stable Diffusion 3 (SD3) as denoising-diffusion and flow-matching editors, respectively. We compare edits of clean and protected inputs using PSNR (Wang & Bovik, [30]), SSIM (Wang et al., [31]), FSIM (Zhang et al., [33]), VIFP (Sheikh & Bovik, [26]), and LPIPS (Zhang et al., [34]). Lower values of the first four and higher LPIPS indicate stronger protection; the directions reverse for perturbation imperceptibility. Following SIFM (Dong et al., [8]), we report Immunization Success Rate (ISR): the fraction of protected edits with instruction failure or substantial perceptual degradation, judged by consensus of Kimi K2.5 (Team et al., [28]) and Qwen3-VL (Bai et al., [2]). Higher ISR indicates stronger protection. See Appendices § 9.§ 2 and § 12 for evaluation details.

Implementation Details. For each image, we optimize an additive perturbation δ\delta under ∥δ∥∞≤8/255\lVert\delta\rVert_{\infty}\le8/255 while keeping the model parameters frozen. Starting from δ=0\delta=0, we perform 20 PGD steps with a step size of 1/2551/255, projecting the perturbation and clipping the protected image after each step. We use branch index j=1j=1 for both editors and set τ=2\tau=2 for InstructPix2Pix. Sampling noise is fixed during optimization. Evaluation uses unseen seeds, with clean and protected inputs sharing the same editing instruction and sampling noise. Further implementation details are provided in Appendix § 9.§ 3.

Main Results

Comparison with State-of-the-Art Methods. We first compare SPIN with representative image-immunization methods, PhotoGuard-E/PhotoGuard-D (Salman et al., [25]), SDS (Xue et al., [32]), ED (Chen et al., [6]), AdvDM (Liang et al., [17]), MIST (Liang & Wu, [16]), SSA (Lo et al., [19]), DCT (Bala et al., [3]), and SIFM (Dong et al., [8]) on SD3 and InstructPix2Pix under the instructions used to construct the protected inputs. Table 1 shows that SPIN achieves the greatest output discrepancy and highest immunization success rate on both editors. Compared with objectives defined on intermediate features or noisy states, our projection objective targets deviations in predicted editing outcomes, aligning perturbation optimization more closely with final-edit disruption and thereby improving immunization performance.

MethodSD3 PSNR ↓\downarrowSSIM ↓\downarrowVIFp ↓\downarrowFSIM ↓\downarrowLPIPS ↑\uparrowISR ↑\uparrowInstructPix2Pix PSNR ↓\downarrowSSIM ↓\downarrowVIFp ↓\downarrowFSIM ↓\downarrowLPIPS ↑\uparrowISR ↑\uparrow
PhotoGuard-E18.960.66890.21340.78900.325058%13.930.46800.10100.69190.558583%
PhotoGuard-D17.160.56680.18730.76820.394666%13.160.40420.10870.70530.509483%
SDS17.920.58680.18780.75910.379864%14.820.47040.13680.73300.470386%
ED19.880.65300.24190.80840.317660%16.060.50980.15380.76520.419977%
AdvDM13.540.45190.10590.66000.539184%15.410.48390.14730.76340.438885%
MIST14.090.46640.11890.68080.525156%15.440.45600.12190.74180.506086%
SA17.560.58750.18500.75770.453568%16.690.50090.14110.77180.497086%
DCT17.250.55060.16710.75910.420670%18.110.57650.18520.81070.424477%
SIFM15.920.49450.14680.70270.498882%15.020.48180.13460.75680.512991%
SPIN11.200.34500.06770.58450.673090%10.930.30720.06490.61880.697494%

Table 1. Comparison with image-immunization baselines under original instructions. Lower PSNR/SSIM/VIFp/FSIM and higher LPIPS/ISR indicate better immunization performance.

Generalization to Unseen Editing Instructions. We evaluate protection on semantically disjoint instructions excluded from perturbation optimization. Table 2 shows that SPIN achieves ISR of 85% on SD3 and 91% on InstructPix2Pix, with a larger advantage over competing methods than under original instructions. This advantage is consistent with its optimization across multiple stochastic trajectories, which reduces dependence on a single editing path and helps protection remain effective when the instruction changes.

MethodSD3 PSNR ↓\downarrowSSIM ↓\downarrowVIFp ↓\downarrowFSIM ↓\downarrowLPIPS ↑\uparrowISR ↑\uparrowInstructPix2Pix PSNR ↓\downarrowSSIM ↓\downarrowVIFp ↓\downarrowFSIM ↓\downarrowLPIPS ↑\uparrowISR ↑\uparrow
PhotoGuard-E19.800.69280.23970.81090.300767%14.370.48840.11010.70760.548682%
PhotoGuard-D20.150.70390.24710.81460.298864%16.760.49740.15650.78550.449381%
SDS18.790.62020.21470.78430.354969%15.540.50680.15450.75360.446384%
ED20.640.67890.26730.83050.295450%17.100.54820.17700.79510.383379%
AdvDM14.360.47750.11820.68340.521668%16.650.51760.16650.78330.417982%
MIST15.020.49420.13550.70630.507066%16.000.47450.13240.75650.494083%
SA18.730.56160.17620.75810.466258%16.480.52310.16280.76920.480582%
DCT18.590.58860.19810.76790.425967%18.400.61980.22750.82450.377280%
SIFM17.810.54080.16340.74030.485469%15.620.50380.15570.75320.488985%
SPIN13.950.43960.10240.64860.570485%14.130.42080.10440.69900.554391%

Table 2. Generalization to five unseen instructions. Perturbations are optimized with the original instruction; Lower PSNR/SSIM/VIFp/FSIM and higher LPIPS/ISR indicate better immunization performance.

Qualitative Comparison. Figure 2 and Figure 3 compare source images, protected inputs and editing results. Many baseline methods mainly introduce texture-like patterns or slight color shifts, while the requested edits remain largely intact. In contrast, SPIN causes substantial changes to the main subject or scene structure beyond the requested edits under both original and unseen instructions. More examples appear in Appendix § 13.

Qualitative comparisons under seen editing instructions

Figure 2. Qualitative comparisons under seen editing instructions. The first and second rows show examples from InstructPix2Pix and SD3, respectively.

Qualitative comparisons under unseen editing instructions

Figure 3. Qualitative comparison under unseen editing instructions. The left and right examples use SD3 and IP2P, respectively, with editing instructions not used during protection optimization.

Input Imperceptibility and Computational Efficiency. Protection quality also depends on input fidelity and perturbation-generation cost. We measure fidelity between clean and protected images separately from output discrepancy. All efficiency measurements are conducted on an NVIDIA GeForce RTX 5090 GPU, using the same input resolution and optimization budgets across methods. As shown in Table 3, SPIN achieves better perturbation imperceptibility on most reported metrics and the highest immunization success rate, with a reasonable generation time per image.

MethodPSNR ↑\uparrowSSIM ↑\uparrowVIFp ↑\uparrowFSIM ↑\uparrowLPIPS ↓\downarrowISR ↑\uparrowTime/image (s) ↓\downarrow
SDS32.850.84390.54060.97000.158464%10.7
PhotoGuard-E31.710.86350.54050.98010.093158%8.4
PhotoGuard-D33.240.84730.54120.97700.183566%311.0
AdvDM33.690.85110.55400.97580.156484%14.9
MIST33.230.84330.54960.97530.161156%25.6
SIFM34.750.88360.55420.98060.127982%19.3
SPIN35.440.89500.61290.98120.118790%16.0

Table 3. Input imperceptibility, immunization success, and time cost on SD3.

Ablation Studies

Effect of the Projection and Neighborhood Objectives. We measure latent discrepancy using the cosine distance between flattened latent representations. Table 4 reports this distance between the final latents of clean and protected edits after full denoising, alongside output PSNR and LPIPS. Under the same perturbation budget, one-step projection yields substantially larger latent cosine distances, lower PSNR, and higher LPIPS than random perturbations, demonstrating its effectiveness as a surrogate for disrupting final editing outputs. Compared with single-candidate projection, SPIN (K=4K = 4) further improves all three metrics on both editors under the same PGD budget, demonstrating the benefit of aggregating feedback across stochastic local continuations.

VariantLatent cosine dist. ↑\uparrowPSNR ↓\downarrowLPIPS ↑\uparrow
SD3
Random perturbation0.062320.780.280
Deterministic one-step projection0.278211.700.629
Stochastic one-step projection (K=1K = 1)0.281411.950.653
SPIN (K=4K = 4)0.314111.200.673
InstructPix2Pix
Random perturbation0.101219.840.195
Stochastic one-step projection (K=1K = 1)0.732711.240.685
SPIN (K=4K = 4)0.763710.930.697

Table 4. Effect of one-step projection and stochastic neighborhood aggregation on protection efficacy. The deterministic SD3 variant uses the native deterministic transition, while stochastic variants use one or four candidates.

Effect of Branch Position and Guidance Timing. We vary the branch position to examine candidate diversity and final-output deviation, and separately vary the timing of projection-guided latent updates that steer the trajectory away from the clean edit. Figure 4a shows that later branching improves projection accuracy but reduces variation among candidate projections and their final deviations from the clean edit. Figure 4b further shows that earlier latent updates produce larger final latent cosine distances and lower output PSNR, indicating stronger trajectory disruption. These observations motivate early branching and projection in SPIN.

Candidate diversity and deviation; output deviation under guidance

Figure 4. Effect of normalized sampling progress. (a) We report the PSNR between a candidate’s one-step projected edit and its fully denoised final edit, between projected edits from different candidates, and between the final edit and a fixed clean reference. Lower PSNR indicates a larger difference. (b) Latent cosine distance and PSNR are both computed with respect to the clean edit; higher latent cosine distance and lower PSNR indicate a larger deviation.

Effect of the Number of Candidate Trajectories. We evaluate different numbers of candidate trajectories, K∈{1,2,4,8}K \in\{1, 2, 4, 8\}. As shown in Table 5, increasing KK from 1 to 4 improves protection under both original and unseen instructions across the two editors. Increasing KK to 8 does not yield consistent performance improvement while substantially increasing generation time. We therefore use K=4K = 4 to balance protection effectiveness and computational cost.

EditorKKSeen PSNR ↓\downarrowSeen LPIPS ↑\uparrowUnseen PSNR ↓\downarrowUnseen LPIPS ↑\uparrowTime/image (s) ↓\downarrow
SD3111.950.653214.570.570210.51
SD3210.990.642414.010.571812.65
SD3411.200.673013.950.570416.01
SD3810.940.647913.960.582827.11
InstructPix2Pix111.240.684815.510.51475.61
InstructPix2Pix210.880.691614.360.53167.40
InstructPix2Pix410.930.697414.130.554310.58
InstructPix2Pix810.410.705214.530.553120.97

Table 5. Effect of the number of candidate trajectories at a fixed editor-specific neighborhood scale.

Effect of the Perturbation Budget. We vary the perturbation budget ϵ\epsilon while fixing the optimization budget and editor-specific settings. Figure 5 shows that larger perturbation budgets strengthen protection but reduce input fidelity. Increasing ϵ\epsilon beyond 8/2558/255 yields limited additional output discrepancy while introducing more visible input distortion, motivating our choice of ϵ=8/255\epsilon= 8/255.

PSNR trade-off, output discrepancy, and qualitative results

Figure 5. Effect of the perturbation budget ϵ\epsilon: (a) input fidelity; (b) output discrepancy under seen and unseen instructions; (c) qualitative examples. Both (a) and (b) report PSNR and LPIPS, with budgets in units of 1/2551/255.

Conclusion

We introduced SPIN to protect images against unauthorized editing by jointly considering the predicted outcomes of multiple local editing trajectories. This formulation makes output-oriented protection tractable without differentiating through the full denoising process. It also allows a protective perturbation to account for alternative continuations of an edit, rather than relying on a single construction path. Together, these ideas offer a practical direction for image immunization when future editing requests are unknown at the time of image release.

AI Use Statement

In this work, we used generative AI tools to assist with portions of the code implementation and to improve the clarity and readability of the manuscript. These tools helped draft selected code segments and refine wording, sentence structure, and the expression of technical content. The core research idea was developed by the authors without the use of generative AI. We also used Kimi K2.5 and Qwen3-VL as evaluators to compute the Immunization Success Rate (ISR), following the protocol described in Appendix D. All AI-generated code was reviewed and checked by the authors. We also reviewed all AI-assisted text for accuracy and consistency with the intended meaning. We confirm the validity of the experimental results reported in this work. We take full responsibility for the final manuscript and accompanying code, including all claims, results, and content produced with AI assistance.

Ethics Statement

This work studies image immunization against unauthorized instruction-guided image editing. Although our method employs adversarial attacks, its objective is defensive: to help image owners protect their content by applying bounded perturbations before publication, reducing the risk of unwanted manipulation. The method operates on input images while keeping the editing models frozen. The same perturbation mechanism could also be used to disrupt legitimate editing workflows. We therefore encourage its use on images that users own or are authorized to protect. Our experiments use images from Pico-Banana, and the edited examples serve to evaluate protection effectiveness. They should not be interpreted as authentic depictions of people or events.

Reproducibility Statement

Section 3 describes the proposed method, and Section 4.1 summarizes the benchmark, editing models, metrics, and optimization settings. Appendices A and B provide additional evaluation details and the optimization algorithm. Evaluation uses seeds unseen during optimization, with each clean–protected pair sharing the same instruction and sampling noise to isolate the perturbation’s effect. The anonymized implementation is available at https://anonymous.4open.science/r/SPIN778F/.

Additional Experimental Details

Benchmark Construction

Our benchmark contains 500 samples drawn from Pico-Banana. The selected images cover landscapes, artworks, multi-object scenes, real-world photographs, news imagery, portraits of public figures, and indoor scenes. For protection methods that require textual conditioning, the original prompt associated with each image is used during perturbation optimization.

At evaluation time, each image is paired with its original prompt and five additional editing instructions that are semantically disjoint from one another. The additional instructions are used only for evaluation and are not exposed during perturbation optimization. This separation tests whether the protection transfers to editing requests that differ from the optimization prompt. The resulting benchmark contains 3000 image–instruction pairs.

Editing Models and Metric Computation

We evaluate protection efficacy using InstructPix2Pix and Stable Diffusion 3 (SD3), representing denoising-diffusion and flow-matching image editors, respectively. All protection methods are evaluated using the same editor configurations. For an input image xx, its protected counterpart x+δx + \delta, an editing instruction cc, and sampling noise determined by seed ss, let

Gθ(x,c;s)andGθ(x+δ,c;s)(8)G_\theta(x, c; s) \quad\text{and} \quad G_\theta(x + \delta, c; s) \tag*{(8)}

denote the editing outputs obtained from the clean and protected inputs. Both outputs use the same instruction, inference configuration, and sampling noise.

Protection efficacy is evaluated by computing PSNR, SSIM, FSIM, VIFP, and LPIPS between these two outputs. Lower PSNR, SSIM, FSIM, and VIFP and higher LPIPS indicate stronger disruption of the editing result. Perturbation imperceptibility is evaluated by applying the same metrics directly to xx and x+δx + \delta. In this setting, higher PSNR, SSIM, FSIM, and VIFP and lower LPIPS indicate greater visual similarity between the clean and protected inputs.

Protection Optimization and Randomness Control

Given a clean image xx, we optimize an additive perturbation δ\delta while keeping all parameters of the surrogate editor frozen. The perturbation is initialized as δ(0)=0\delta^{(0)} = 0 and constrained by

∥δ∥∞≤8255.(9)\lVert\delta\rVert_\infty\le\frac{8}{255}. \tag*{(9)}

Optimization uses 20 projected-gradient steps with a step size of 1/2551/255. After each update, the perturbation is projected onto the feasible ℓ∞\ell_\infty ball, and the protected image x+δx + \delta is clipped to the valid pixel range. Algorithm 1 provides the complete optimization procedure.

The surrogate editor uses fixed sampling noise across optimization iterations to reduce stochastic variation in the objective. Evaluation uses inference seeds that are not observed during perturbation optimization. Within each evaluation pair, the clean and protected inputs share the same editing instruction, inference seed, and sampling configuration, isolating the effect of the input perturbation from unmatched generation randomness.

Optimization Procedure

Algorithm 1 gives the complete procedure for constructing a protected input with local-trajectory one-step projection.

Editor-Specific Transitions and Drift Correction

Flow-Matching Transition Details

For the flow-matching transition in Equation (5), the diffusion coefficient gj=λtj/(1−tj)g_j = \lambda\sqrt{t_j/(1-t_j)} controls both the drift correction and the random increment. Conditioned on the shared state zjz_j and the editing conditions, each candidate follows

zj+1(k)∼N(μj,gj2(−Δtj)I),μj=zj+[vj+gj22tj(zj+(1−tj)vj)]Δtj.(10)z_{j+1}^{(k)} \sim\mathcal{N}\left(\mu_j,g_j^2(-\Delta t_j)I\right), \qquad\mu_j = z_j + \left[v_j + \frac{g_j^2}{2t_j}\left(z_j + (1-t_j)v_j\right)\right]\Delta t_j. \tag*{(10)}

This construction follows the stochastic sampler used in Flow-TTRL [5]. If the scheduler includes t0=1t_0 = 1, we replace the denominator 1−t01-t_0 in g0g_0 with 1−t11-t_1, where t1<1t_1 < 1 is the first interior sampling time. This endpoint convention keeps the discrete noise coefficient finite. After branching, we evaluate the velocity separately at each candidate and compute

z~0(k)=zj+1(k)−tj+1v^θ(zj+1(k),tj+1∣E(xδ),c).(11)\tilde{z}_0^{(k)} = z_{j+1}^{(k)} - t_{j+1}\hat{v}_\theta\left(z_{j+1}^{(k)},t_{j+1}\mid E(x_\delta),c\right). \tag*{(11)}

Thus, candidate noise affects the projection through both the candidate state and its newly evaluated velocity.

Derivation of the Drift Correction

We restate the drift-correction derivation from Appendix A of Flow-GRPO [18] using our editing conditions and time convention. The construction follows the probability-flow ODE–SDE correspondence of Song et al. [27]. Consider the linear probability path zt=(1−t)z0+tϵz_t = (1-t)z_0 + t\epsilon, where ϵ∼N(0,I)\epsilon\sim\mathcal{N}(0,I) is independent of z0z_0 given the fixed conditioning information h=(E(xδ),c)h = (E(x_\delta),c). Let pt(z∣h)p_t(z\mid h) denote the marginal density and v∗(z,t∣h)=E[ϵ−z0∣zt=z,h]v^*(z,t\mid h) = \mathbb{E}[\epsilon-z_0\mid z_t=z,h] the exact velocity field. For 0<t<10 < t < 1, the conditional density pt(z∣z0,h)p_t(z\mid z_0,h) is Gaussian with mean (1−t)z0(1-t)z_0 and covariance t2It^2I. Taking the conditional expectation of its score over z0z_0 given zt=zz_t=z and hh yields

st(z∣h):=∇zlog⁡pt(z∣h)=−z−(1−t)E[z0∣zt=z,h]t2=−1tE[ϵ∣zt=z,h].(12)s_t(z\mid h) := \nabla_z \log p_t(z\mid h) = -\frac{z-(1-t)\mathbb{E}[z_0\mid z_t=z,h]}{t^2} = -\frac{1}{t}\mathbb{E}[\epsilon\mid z_t=z,h]. \tag*{(12)}

Taking conditional expectations in the identity zt+(1−t)(ϵ−z0)=ϵz_t + (1-t)(\epsilon-z_0) = \epsilon gives E[ϵ∣zt=z,h]=z+(1−t)v∗(z,t∣h)\mathbb{E}[\epsilon\mid z_t=z,h] = z + (1-t)v^*(z,t\mid h). Consequently, the score can be expressed through the velocity:

st(z∣h)=−z+(1−t)v∗(z,t∣h)t.(13)s_t(z\mid h) = -\frac{z+(1-t)v^*(z,t\mid h)}{t}. \tag*{(13)}

Algorithm 1 Input Immunization via Local-Trajectory One-Step Projection

Require: Frozen editor G=(E,θ,S)\mathcal{G}=(E,\theta,\mathcal{S}); source image xx; editing instruction cc; branch index jj; number of candidates KK; perturbation budget ε\varepsilon; step size α\alpha; optimization iterations MM

Ensure: Protected input xadvx_{\mathrm{adv}}

  1. Sample and fix native trajectory randomness ω0\omega_0

  2. zref←z_{\mathrm{ref}}\leftarrow final latent of the full native edit of xx under cc with noise ω0\omega_0

  3. Treat zrefz_{\mathrm{ref}} as a constant

  4. Sample ξk∼i.i.d.N(0,I)\xi_k \overset{\mathrm{i.i.d.}}{\sim}\mathcal{N}(0,I) for k=1,…,Kk=1,\ldots,K and keep them fixed

  5. δ(0)←0\delta^{(0)}\leftarrow0

  6. for n=0n=0 to M−1M-1 do

  7. x~δ←Π[0,1](x+δ(n))\tilde{x}_{\delta}\leftarrow\Pi_{[0,1]}(x+\delta^{(n)})

  8. zj←F0:j(x~δ,c;ω<j)z_j\leftarrow F_{0:j}(\tilde{x}_{\delta},c;\omega_{<j}) ▷ Shared native prefix

  9. J^K←0\hat{J}_K\leftarrow0

  10. for k=1k=1 to KK do

  11. zj+1(k)←Tj(zj,ξk;x~δ,c)z_{j+1}^{(k)}\leftarrow T_j(z_j,\xi_k;\tilde{x}_{\delta},c) ▷ Local trajectory candidate

  12. z~0(k)←Ptj+1(zj+1(k);x~δ,c)\tilde{z}_0^{(k)}\leftarrow P_{t_{j+1}}(z_{j+1}^{(k)};\tilde{x}_{\delta},c) ▷ One-step clean-latent projection

  13. J^K←J^K+1Kdcos⁡(z~0(k),zref)\hat{J}_K\leftarrow\hat{J}_K+\frac{1}{K}d_{\cos}\left(\tilde{z}_0^{(k)},z_{\mathrm{ref}}\right)

  14. end for

  15. g(n)←∇δ(n)J^Kg^{(n)}\leftarrow\nabla_{\delta^{(n)}}\hat{J}_K

  16. δˉ←Π[−ε,ε](δ(n)+αsign⁡(g(n)))\bar{\delta}\leftarrow\Pi_{[-\varepsilon,\varepsilon]}\left(\delta^{(n)}+\alpha\operatorname{sign}(g^{(n)})\right)

  17. δ(n+1)←Π[0,1](x+δˉ)−x\delta^{(n+1)}\leftarrow\Pi_{[0,1]}(x+\bar{\delta})-x

  18. end for

  19. xadv←x+δ(M)x_{\mathrm{adv}}\leftarrow x+\delta^{(M)}

  20. return xadvx_{\mathrm{adv}}

To verify the marginal consistency of the corrected stochastic process, introduce increasing sampling time r=1−tr=1-t and write qr(z∣h)=p1−r(z∣h)q_r(z\mid h)=p_{1-r}(z\mid h). The deterministic sampling flow has velocity −v∗(z,1−r∣h)-v^*(z,1-r\mid h), so its density satisfies the continuity equation ∂rqr=∇z⋅(v∗qr)\partial_rq_r=\nabla_z\cdot(v^*q_r). For a diffusion coefficient g(t)g(t) depending only on time, consider

dZr=[−v∗(Zr,t∣h)+g(t)22st(Zr∣h)]dr+g(t)dWr,t=1−r.(14)dZ_r=\left[-v^*(Z_r,t\mid h)+\frac{g(t)^2}{2}s_t(Z_r\mid h)\right]dr+g(t)dW_r,\qquad t=1-r. \tag*{(14)}

Substituting qrq_r into the corresponding Fokker–Planck equation gives

−∇z⋅[(−v∗+g(t)22st)qr]+g(t)22Δzqr=∇z⋅(v∗qr)−g(t)22∇z⋅(stqr)+g(t)22Δzqr=∇z⋅(v∗qr).(15)\begin{aligned} -\nabla_z\cdot\left[\left(-v^*+\frac{g(t)^2}{2}s_t\right)q_r\right]+\frac{g(t)^2}{2}\Delta_zq_r=\nabla_z\cdot(v^*q_r)-\frac{g(t)^2}{2}\nabla_z\cdot(s_tq_r)+\frac{g(t)^2}{2}\Delta_zq_r \\ &=\nabla_z\cdot(v^*q_r). \tag*{(15)} \end{aligned}

where the last equality uses stqr=∇zqrs_tq_r=\nabla_zq_r. The score-dependent drift therefore cancels the diffusion contribution to the marginal density evolution. Under standard regularity and uniqueness conditions, the stochastic process and the deterministic flow share the same one-time marginals when initialized from the same marginal distribution Song et al., [27].

Returning to decreasing time tt and substituting Equation (13), we obtain

dZt=[v∗(Zt,t∣h)+g(t)22t(Zt+(1−t)v∗(Zt,t∣h))]dt+g(t)dW‾t,(16)dZ_t=\left[v^*(Z_t,t\mid h)+\frac{g(t)^2}{2t}\left(Z_t+(1-t)v^*(Z_t,t\mid h)\right)\right]dt+g(t)d\overline{W}_t, \tag*{(16)}

where W‾t\overline{W}_t denotes reverse-time Brownian motion, whose increment has covariance (−dt)I(-dt)I. An Euler–Maruyama step with Δtj<0\Delta t_j<0 gives Equation (5) after replacing v∗v^* with the model prediction vjv_j. The marginal equivalence is a continuous-time result for exact velocity and score fields on intervals where the coefficients are well defined. In our implementation, guided predictions and finite sampling steps instantiate this construction as a local optimization transition.

Noise-Prediction Transition Details

For Euler-Ancestral sampling, σj\sigma_j denotes the scheduler’s noise level, and ϵ^j\hat{\epsilon}_j is the guided noise prediction evaluated with the scheduler’s prescribed input scaling. The clean-latent estimate and update direction are

z^0,j=zj−σjϵ^j,uj=zj−z^0,jσj.(17)\hat{z}_{0,j}=z_j-\sigma_j\hat{\epsilon}_j,\qquad u_j=\frac{z_j-\hat{z}_{0,j}}{\sigma_j}. \tag*{(17)}

The scheduler determines σdown,j\sigma_{\mathrm{down},j} and σup,j\sigma_{\mathrm{up},j}, which specify the deterministic update and the random increment in Equation (6). Conditioned on the shared state, the resulting transition is

zj+1(k)∼N(zj+uj(σdown,j−σj),τ2σup,j2I).(18)z_{j+1}^{(k)}\sim\mathcal{N}\left(z_j+u_j(\sigma_{\mathrm{down},j}-\sigma_j),\tau^2\sigma_{\mathrm{up},j}^2I\right). \tag*{(18)}

Changing τ\tau preserves the conditional mean and scales the noise covariance, while τ=1\tau=1 recovers the native Euler-Ancestral transition. The temperature controls the neighborhood’s extent independently of the candidate count KK. After branching, we recompute the noise prediction at each candidate, using the scheduler’s input scaling at the new noise level, and obtain

z^0(k)=zj+1(k)−σj+1ϵ^j+1(k).(19)\hat{z}_0^{(k)}=z_{j+1}^{(k)}-\sigma_{j+1}\hat{\epsilon}_{j+1}^{(k)}. \tag*{(19)}

For both editor families, the initial noise and all random increments in the shared prefix are fixed. Candidate noises are sampled once and reused throughout perturbation optimization, yielding a fixed sample-average objective. The optimized perturbation is subsequently evaluated with unseen instructions and fresh randomness through the complete native editing pipeline.

ISR Evaluation Protocol

We follow the ISR protocol introduced by SIFM [8]. For each evaluation sample, Kimi K2.5 and Qwen3-VL independently inspect the source image, the edited output produced from the protected image, and the editing instruction. Each evaluator returns binary judgments for two failure modes: (1) semantic mismatch, where the output does not realize the intended edit, and (2) substantial perceptual degradation, where artifacts, distortions, or other quality defects make the output unusable. A model-level verdict is positive when either failure mode is present.

Let yi(m)∈{0,1}y_i^{(m)}\in\{0,1\} denote the verdict of evaluator mm for the ii-th editing attempt, where 1 indicates successful immunization. Following SIFM’s strict agreement rule, the aggregated verdict is

yi=yi(Kimi)yi(Qwen).(20)y_i=y_i^{(\mathrm{Kimi})}y_i^{(\mathrm{Qwen})}. \tag*{(20)}

Thus, an attempt is counted as successfully immunized only when both evaluators return positive verdicts; disagreements and jointly negative verdicts are counted as failures. The evaluators are queried independently using the same judging prompt and input presentation and do not observe each other’s outputs. For NN evaluated attempts, we compute

ISR=1N∑i=1Nyi.(21)\mathrm{ISR}=\frac{1}{N}\sum_{i=1}^{N}y_i. \tag*{(21)}

Higher ISR therefore indicates that a larger fraction of editing attempts are jointly judged to violate the instruction or exhibit substantial perceptual degradation.

System prompt. Both evaluators use the following system-prompt template. We replace {instruction} with the editing instruction for each attempt and provide the original, unprotected image as Image 1 and the edited result obtained from its protected version as Image 2. The doubled braces in the template become literal JSON braces after string formatting. Each evaluator returns YES or NO for semantic_mismatch and quality_degradation; a YES for either field yields a positive model-level verdict.

JUDGE_PROMPT = """Edit instruction: "{instruction}"
Image 1: the original image (before editing).
Image 2: the edited result (after applying the edit instruction to a
    protected/immunized version of the original image).
Judge two criteria:

- semantic_mismatch: Does Image 2 FAIL to follow the edit instruction
  compared to Image 1? (YES/NO)
- quality_degradation: Does Image 2 have severe
  artifacts/noise/distortion making it unusable? (YES/NO)

Do not think or explain. Reply with ONLY this JSON, no other text:
{{"semantic_mismatch":"YES or NO","quality_degradation":"YES or
NO"}}"""

Additional Qualitative Results under Unseen Instructions

Figure 6 and Figure 7 show additional SD3 examples, while Figure 8 and Figure 9 show InstructPix2Pix (IP2P) examples. Each source image is evaluated under five editing instructions not used during protection optimization, with the protected input held fixed across instructions. The comparisons include unprotected inputs, AdvDM, Mist, PhotoGuard, SDS, and SPIN. The examples illustrate changes beyond the requested edit: vehicle geometry and portrait appearance change in the SD3 outputs, while scene layout and object structure change in the IP2P outputs.

Unseen-instruction comparisons with SD3 on a car image

Figure 6. Unseen-instruction comparisons with SD3 on a car image. Columns show the unprotected input and the five protection methods. The top row shows the inputs; the remaining rows show edits under the five instructions printed above them. Each protected input is reused across all five instructions without re-optimization.

Unseen-instruction comparisons with SD3 on a portrait image

Figure 7. Unseen-instruction comparisons with SD3 on a portrait image. The top row shows the unprotected and protected inputs, and the remaining rows show outputs for five instructions excluded from protection optimization. The protected inputs remain fixed across instructions. The comparisons expose changes in subject appearance and image structure beyond the requested edits.

Unseen-instruction comparisons with InstructPix2Pix (IP2P) on a landscape image

Figure 8. Unseen-instruction comparisons with InstructPix2Pix (IP2P) on a landscape image. The top row shows the unprotected and protected inputs; the remaining rows show edits under five unseen instructions using the same protected inputs. The instructions cover foliage color, mist, lighting, rainbow insertion, and watercolor style.

Unseen-instruction comparisons with InstructPix2Pix on a belt image

Figure 9. Unseen-instruction comparisons with InstructPix2Pix (IP2P) on a belt image. The top row shows the unprotected and protected inputs, followed by outputs for five instructions not used during protection optimization. The protected inputs remain fixed across instructions, which request changes to color, hardware, background, text, and texture.

References

  1. [1]Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. In International Conference on Machine Learning, pp. 284–293. PMLR, 2018.
  2. [2]Shuai Bai, Yuxuan Cai, Ruizhe Chen, Keqin Chen, Xionghui Chen, Zesen Cheng, Lianghao Deng, Wei Ding, Chang Gao, Chunj iang Ge, et al. Qwen3-vl technical report. arXiv preprint arXiv:2511.21631, 2025.arxiv.org/abs/2511.21631
  3. [3]Aniruddha Bala, Rohit Chowdhury, Rohan Jaiswal, and Siddharth Roheda. Dct-shield: a robust frequency domain defense against malicious image editing. In 2025 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 18876–18884. IEEE, 2025.arxiv.org/abs/2504.17894
  4. [4]Tim Brooks, Aleksander Holynski, and Alexei A Efros. Instructpix2pix: Learning to follow image editing instructions. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 18392–18402. IEEE, 2023.arxiv.org/abs/2211.09800
  5. [5]Jili Chen, Changqin Huang, Qionghao Huang, Yaxin Tu, Zhonglong Zheng, and Xiaodi Huang. Test-time reinforcement learning for flow matching. In Forty-third International Conference on Machine Learning, 2026.
  6. [6]Ruoxi Chen, Haibo Jin, Yixin Liu, Jinyin Chen, Haohan Wang, and Lichao Sun. Editshield: Protecting unauthorized image editing by instruction-guided diffusion models. In European Conference on Computer Vision, pp. 126–142. Springer, 2024.arxiv.org/abs/2311.12066
  7. [7]William June Suk Choi, Kyungmin Lee, Jongheon Jeong, Saining Xie, Jinwoo Shin, and Kimin Lee. Diffusionguard: A robust defense against malicious diffusion-based image editing. In International Conference on Learning Representations, volume 2025, pp. 27134–27180, 2025.arxiv.org/abs/2410.05694
  8. [8]Shuai Dong, Jie Zhang, Guoying Zhao, Shiguang Shan, and Xilin Chen. Semantic mismatch and perceptual degradation: A new perspective on image editing immunity. arXiv preprint arXiv:2512.14320, 2025.arxiv.org/abs/2512.14320
  9. [9]Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9185–9193. IEEE, 2018.arxiv.org/abs/1710.06081
  10. [10]Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, et al. Scaling rectified flow transformers for high-resolution image synthesis. In Forty-first International Conference on Machine Learning, 2024.arxiv.org/abs/2403.03206
  11. [11]Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In The Third International Conference on Learning Representations, 2015.arxiv.org/abs/1412.6572
  12. [12]Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Prompt-to-prompt image editing with cross-attention control. In The Eleventh International Conference on Learning Representations, 2023.arxiv.org/abs/2208.01626
  13. [13]Bahjat Kawar, Shiran Zada, Oran Lang, Omer Tov, Huiwen Chang, Tali Dekel, Inbar Mosseri, and Michal Irani. Imagic: Text-based real image editing with diffusion models. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6007–6017. IEEE, 2023.arxiv.org/abs/2210.09276
  14. [14]Ming Li, Xin Gu, Fan Chen, Xiaoying Xing, Longyin Wen, Chen Chen, and Sijie Zhu. Superedit: Rectifying and facilitating supervision for instruction-based image editing. In 2025 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 19206–19215. IEEE, 2025a.arxiv.org/abs/2505.02370
  15. [15]Xiner Li, Yulai Zhao, Chenyu Wang, Gabriele Scalia, Gokcen Eraslan, Surag Nair, Tommaso Biancalani, Shuiwang Ji, Aviv Regev, Sergey Levine, and Masatoshi Uehara. Derivative-free guidance in continuous and discrete diffusion models with soft value-based decoding. In Advances in Neural Information Processing Systems, pp. 95507–95545, 2025b.arxiv.org/abs/2408.08252
  16. [16]Chumeng Liang and Xiaoyu Wu. Mist: Towards improved adversarial examples for diffusion models. arXiv preprint arXiv:2305.12683, 2023.arxiv.org/abs/2305.12683
  17. [17]Chumeng Liang, Xiaoyu Wu, Yang Hua, Jiaru Zhang, Yiming Xue, Tao Song, Zhengui Xue, Ruhui Ma, and Haibing Guan. Adversarial example does good: Preventing painting imitation from diffusion models via adversarial examples. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 20763–20786. PMLR, 2023.arxiv.org/abs/2302.04578
  18. [18]Jie Liu, Gongye Liu, Jiajun Liang, Yangguang Li, Jiaheng Liu, Xintao Wang, Pengfei Wan, Di Zhang, and Wanli Ouyang. Flow-grpo: Training flow matching models via online rl. Advances in Neural Information Processing Systems, 38:40783–40818, 2026.arxiv.org/abs/2505.05470
  19. [19]Ling Lo, Cheng Yu Yeo, Hong-Han Shuai, and Wen-Huang Cheng. Distraction is all you need: Memory-efficient image immunization against diffusion-based image editing. In 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 24462–24471. IEEE, 2024.
  20. [20]Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2018.arxiv.org/abs/1706.06083
  21. [21]Chenlin Meng, Yutong He, Yang Song, Jiaming Song, Jiajun Wu, Jun-Yan Zhu, and Stefano Ermon. SDEdit: Guided image synthesis and editing with stochastic differential equations. In International Conference on Learning Representations, 2022.arxiv.org/abs/2108.01073
  22. [22]Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In 2017 IEEE conference on Computer Vision and Pattern Recognition (CVPR), pp. 86–94. Ieee, 2017.
  23. [23]Utkarsh Ojha, Yuheng Li, and Yong Jae Lee. Towards universal fake image detectors that generalize across generative models. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 24480–24489. IEEE, 2023.arxiv.org/abs/2302.10174
  24. [24]Andreas Rossler, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias Nießner. FaceForensics++: Learning to detect manipulated facial images. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 1–11, 2019.arxiv.org/abs/1901.08971
  25. [25]Hadi Salman, Alaa Khaddaj, Guillaume Leclerc, Andrew Ilyas, and Aleksander Madry. Raising the cost of malicious AI-powered image editing. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 29894–29918. PMLR, 2023.arxiv.org/abs/2302.06588
  26. [26]Hamid R Sheikh and Alan C Bovik. Image information and visual quality. IEEE Transactions on Image Processing, 15(2):430–444, 2006.
  27. [27]Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021.
  28. [28]Kimi Team, Tongtong Bai, Yifan Bai, Yiping Bao, SH Cai, Yuan Cao, Ziwei Chai, Y Charles, HS Che, Cheng Chen, et al. Kimi k2. 5: Visual agentic intelligence. arXiv preprint arXiv:2602.02276, 2026.
  29. [29]Xiaosen Wang and Kun He. Enhancing the transferability of adversarial attacks through variance tuning. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1924–1933. IEEE, 2021.arxiv.org/abs/2103.15571
  30. [30]Zhou Wang and Alan C Bovik. Mean squared error: Love it or leave it? a new look at signal fidelity measures. IEEE signal processing magazine, 26(1):98–117, 2009.DOI
  31. [31]Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600–612, 2004.pubmed.ncbi.nlm.nih.gov/15376593
  32. [32]Haotian Xue, Chumeng Liang, Xiaoyu Wu, and Yongxin Chen. Toward effective protection against diffusion-based mimicry through score distillation. In International Conference on Learning Representations, volume 2024, pp. 25734–25758, 2024.arxiv.org/abs/2311.12832
  33. [33]Lin Zhang, Lei Zhang, Xuanqin Mou, and David Zhang. Fsim: A feature similarity index for image quality assessment. IEEE Transactions on Image Processing, 20(8):2378–2386, 2011.DOI
  34. [34]Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 586–595. IEEE, 2018.arxiv.org/abs/1801.03924
  35. [35]Haozhe Zhao, Xiaojian Ma, Liang Chen, Shuzheng Si, Rujie Wu, Kaikai An, Peiyu Yu, Minjia Zhang, Qing Li, and Baobao Chang. Ultraedit: Instruction-based fine-grained image editing at scale. Advances in Neural Information Processing Systems, 37:3058–3093, 2024.arxiv.org/abs/2407.05282

Paper details

vlnc:W_tsjkqtuq
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

generative AI tools

View statement
Looking for related papers…
Contents