---
title: Texture-Guided Perturbation Framework
url: https://www.emergentmind.com/topics/texture-guided-perturbation-framework
type: topic
---

# Texture-Guided Perturbation Framework

Texture-guided perturbation framework most directly denotes a proactive Deepfake detection approach based on facial texture features, in which perturbations are invisibly inserted within texture regions that have low perceptual saliency, with localized perturbations applied to key texture regions while minimizing unwanted noise in non-textured areas [2508.17315]. In a broader research sense, related work suggests a methodological family in which texture cues, texture-specialized latent directions, texture-scale constraints, or texture-relevant attention heads are used to steer perturbations for image editing, adversarial attack and defense, geometric recovery, and audio texture generation [2409.09610]. This suggests that “texture-guided perturbation” is less a single algorithm than a recurrent design pattern: localize or parameterize the perturbation through texture-sensitive structure, then preserve non-target content through masking, blending, or low-dimensional control.

## 1. Formal basis of the facial texture-feature framework

In the Deepfake-defense formulation, the input is an RGB face image \(I_{\rm ori}\in\mathbb{R}^{H\times W\times 3}\). The image is first converted to a single-channel luminance image \(I_{\rm gray}\) using ITU-R BT.709 weights, then bilateral filtering is applied with \(\Omega=31\), \(\sigma_d=75\), and \(\sigma_r=15\). Classical circular Local Binary Patterns are then computed with \(P=8\) and \(R=1\), producing the initial texture feature map \(T(x,y)={\rm LBP}_{8,1}(x,y)\), which highlights high-frequency textured regions [2508.17315].

The framework then combines this texture map with a local attention signal from a pretrained ResNet50 classifier. A Grad-CAM map \(M_{\rm ori}\in[0,1]^{H\times W}\) is extracted from the clean RGB image, and the fused guidance signal is defined by element-wise multiplication,
\[
F(x,y)=T(x,y)\times M_{\rm ori}(x,y).
\]
This fused map is passed through a perturbation enhancement module built from 3 stacked Conv \(\rightarrow\) BN \(\rightarrow\) ReLU blocks followed by multi-layer deformable convolutions, yielding the perturbation tensor \(\delta\in\mathbb{R}^{H\times W\times 3}\). The defended image is
\[
I_{\rm adv}=I_{\rm ori}+\delta,
\]
with clamping to the valid pixel range \([0,1]\) [2508.17315].

The optimization objective couples imperceptibility and downstream disruption. The total loss is
\[
\mathcal{L}_{\rm total}=\lambda_1\mathcal{L}_{\rm MAE}+\lambda_2\mathcal{L}_{\rm MSE}+\lambda_3\mathcal{L}_{\rm cam},
\]
with \(\lambda_1=1.0\), \(\lambda_2=0.04\), and \(\lambda_3=0.10\). Here, \(\mathcal{L}_{\rm MAE}=\|I_{\rm adv}-I_{\rm ori}\|_1\) constrains pixel-wise changes, \(\mathcal{L}_{\rm MSE}=-\|I'_{\rm adv}-I'_{\rm ori}\|_2^2\) encourages maximal divergence between Deepfake outputs, and \(\mathcal{L}_{\rm cam}\) is defined from ViT-based Grad-CAM maps on the clean and protected Deepfake outputs, using a binary difference mask thresholded at \(T_0=0.3\) [2508.17315].

## 2. Region selectivity, perceptual logic, and empirical performance

The framework is explicitly region-selective rather than globally additive. By construction, \(\delta(x,y)\) is zero wherever \(T(x,y)=0\) or \(M_{\rm ori}(x,y)\approx 0\). The bilateral-filtered LBP is used to sharply delineate textures such as hair strands, wrinkles, and pores, while the ResNet50 Grad-CAM restricts perturbation to facial regions critical to the network’s decision. The resulting dual mask,
\[
\mathrm{Mask}(x,y)=T(x,y)\times M_{\rm ori}(x,y),
\]
is intended to guarantee low perceptual noticeability in flat regions while maximizing disruption in high-frequency, semantically important areas [2508.17315].

Evaluation was reported on CelebA-HQ and LFW. CelebA-HQ comprises 30 000 high-resolution \(1024\times 1024\) celebrity faces with 6 217 identities, and LFW contains 13 233 images of 5 749 subjects in unconstrained settings; both were resized to \(256\times 256\). The attack models were StarGAN, AttGAN, AGGAN, HiSD, and StarGAN-V2. Visual quality was measured by PSNR, SSIM, and LPIPS, while defense effectiveness used the mean \(L_2\) distance between \(I'_{\rm ori}\) and \(I'_{\rm adv}\), together with Defense Success Rate, defined as the fraction of cases where \(\|I'_{\rm adv}-I'_{\rm ori}\|_2\ge 0.05\) [2508.17315].

On CelebA-HQ, the reported visual-quality results for the protected images were PSNR \(=39.94\) dB, SSIM \(=0.9617\), and LPIPS \(=0.0251\). Defense success against the five Deepfake models was reported as follows: StarGAN \(L_2\)-dist \(=0.340\), DSR \(=100\%\); AttGAN \(0.046\), \(51.2\%\); AGGAN \(0.161\), \(100\%\); HiSD \(0.079\), \(64.8\%\); StarGAN-V2 \(0.097\), \(93.1\%\); average \(0.145\), \(81.8\%\). On LFW, the reported visual-quality values were PSNR \(=39.91\), SSIM \(=0.9545\), and LPIPS \(=0.0195\), with DSR \(\simeq 80\%\) on unseen data. The ablation study compared ResNet50-only guidance, ViT-only guidance, and the full dual-model system, yielding average DSR values of approximately \(73.7\%\), \(80.0\%\), and \(81.8\%\), respectively, with the full model also giving the best visual fidelity [2508.17315].

A common misconception is that perturbation efficacy necessarily improves with broader spatial coverage. The reported construction argues for the opposite: perturbations are deliberately hidden in texture regions because human eyes are more sensitive to perturbations in smooth regions, and the defense objective is to minimize unwanted noise in non-textured areas [2508.17315].

## 3. Texture disentanglement as perturbation in diffusion-based image editing

A related but distinct formulation appears in TextureDiffusion, a tuning-free image editing method for various texture transfer. Its starting point is the claim that existing text-guided image editing methods generally require target prompts that include both the input image content and the desired texture, which restricts texture representation and makes complex textures such as cloud or fire difficult to transfer. TextureDiffusion replaces the full target sentence with a standalone token \(\langle\texttt{texture}\rangle\), making the texture disentangled from the input image content [2409.09610].

The pipeline consists of four steps: invert the input image \(x_0\) into a latent \(Z^*_T\) via the VAE encoder and DDIM inversion; during sampling, use only the prompt \(P_t=\langle\texttt{texture}\rangle\) to condition the denoiser \(\epsilon_\theta\); inject structural cues from the original inversion run into the editing run; and apply edit localization to preserve the background. The key perturbative operations are query-feature injection in self-attention and feature injection in residual blocks. For early layers and timesteps \(t\le T_{\rm split}\), the editing query is overridden by the source query,
\[
Q_t^l\longleftarrow Q_s^l,
\]
and the self-attention output becomes
\[
R^l=\mathrm{Softmax}\Bigl(\tfrac{Q_s^l(K_t^l)^\top}{\sqrt{d}}\Bigr)V_t^l.
\]
Residual-block features are also replaced at selected layers through
\[
h_t^l\longleftarrow h_s^l.
\]
The reported schedule performs attention-query injection in the first 40 sampling steps at U-Net layers 12–15, and residual injection in all 50 steps at layer 7 [2409.09610].

Background maintenance is handled by edit localization. Cross-attention maps at \(16\times 16\) resolution are aggregated over heads and layers, then thresholded on the object token to obtain a binary mask \(M\). Self-attention outputs are blended by
\[
\bar R^l=R_s^l\odot M + R_t^l\odot(1-M),
\]
and intermediate latents are blended by
\[
Z_t\longleftarrow Z_t\odot M + Z_t^*\odot (1-M).
\]
The implementation uses Stable Diffusion v1.4, DDIM with 50 steps, classifier-free guidance 7.5, 12 attention heads per multi-head block, feature dimension 768, and mask threshold 0.3 after aggregating cross-attention maps [2409.09610].

On PIE-Bench material change, the reported quantitative results were structure distance \(10.39\), background PSNR \(31.22\) dB, background LPIPS \(31.99\times 10^{-3}\), background MSE \(14.92\times 10^{-4}\), background SSIM \(0.9008\), and CLIP similarity on edited region \(16.88\), with all numbers reported as outperforming SDEdit, P2P, PnP, MasaCtrl, FPE and InfEdit. The ablation sequence was also explicit: no disentanglement led to poor representation of cloud and fire; query injection alone gave partial shape recovery but blurry edges; residual injection produced crisp structural preservation; and edit localization left the background untouched. Reported limitations were residual background artifacts from the VAE encoder/decoder cycle, one-texture-at-a-time masking, and failure modes for extremely thin or highly transparent objects [2409.09610].

This shows that, in diffusion editing, the perturbation is not necessarily additive image noise. It can instead take the form of controlled intervention in prompt conditioning, self-attention queries, residual features, and intermediate latents.

## 4. Texture scale and head-level perturbation in adversarial and generative models

Texture guidance has also been formalized through scale constraints in universal adversarial perturbations. Texture Scale–Constrained UAP introduces a small patch \(v\in\mathbb{R}^{(H/\alpha)\times (W/\alpha)\times 3}\) and tiles it to form the full perturbation \(\delta=T(v;\alpha)\), so that the optimization becomes
\[
\max_v \; \mathbb{E}_{x\sim X}\bigl[\ell(x+T(v;\alpha))\bigr]
\quad \text{s.t.}\quad \|T(v;\alpha)\|_p\le \epsilon.
\]
The stated motivation is that CNNs classify objects according to semantic information stored in local textures, and that forcing the perturbation to be a tiled repetition of a smaller patch encourages category-specific local textures and improves fooling ratio and transferability [2406.06089].

The reported ImageNet results showed strong dependence on \(\alpha\). For ResNet50, fooling ratio rose from \(80.30\%\) at \(\alpha=1\) to \(92.73\%\) at \(\alpha=8\); for DenseNet121, from \(66.05\%\) to \(85.18\%\); for MobileNet-v2, from \(94.08\%\) to \(99.19\%\). Average improvement over \(\alpha=1\) was reported as approximately \(+11.8\) percentage points, with optimal \(\alpha\) typically around \(4\)–\(8\). When \(\alpha\) became too large, fooling ratio declined, and this was attributed to insufficient capacity of an overly small patch. The paper also reported gains in cross-model transferability, targeted fooling, cross-dataset transfer, data efficiency, and data-free UAP settings [2406.06089].

A further variant appears in head-level attention perturbation for diffusion transformers. HeadHunter iteratively selects attention heads according to a user-specified objective \(\mathcal{O}\), evaluating candidate subsets over prompt-seed pairs \(\mathcal{Q}\), while SoftPAG linearly interpolates each selected attention map toward the identity matrix,
\[
A^{(\mathrm{SoftPAG})}_{l,h}(u)=(1-u)A_{l,h}+uI.
\]
The corresponding guided prediction is
\[
\hat\epsilon_{\rm guided}=(1+w)\hat\epsilon_{\rm original}-w\hat\epsilon_{\rm perturbed}.
\]
The reported empirical finding was that specific heads govern distinct visual concepts such as structure, style, and texture quality, and that linearly interpolating attention toward the identity provides a continuous knob for perturbation strength and artifact suppression [2506.10978].

Validation included FID, PickScore, HPS, ImageReward, and AES, alongside single-head perturbation galleries, composition experiments, and ablations over \((w,u)\). The reported pattern was that intermediate \(u<1.0\) often gave the best FID or PickScore, moderate \(u\) such as \(0.4\)–\(0.6\) preserved realistic micro-textures while avoiding flattening, and increasing the number of selected heads exhibited a sweet-spot trade-off between texture strength and artifact risk. This directly contradicts the idea that more perturbation is always preferable: the paper describes oversmoothing in existing layer-level perturbation and over-saturation under excessive perturbation [2506.10978].

## 5. Learned texture perturbations for geometric recovery

In geometric inference, learned texture perturbations were proposed as a response to over-regularization, which suppresses high-frequency modes in network outputs and causes tightly packed wrinkles and folds to disappear or become overly smooth. Rather than forcing the network to predict all wrinkles, the method embeds high-frequency details into a secondary signal: a perturbation of cloth texture coordinates. When the network predicts only low-frequency geometry, the fine details survive in the rendered texture and can be used across views to recover lost geometric information [2001.07253].

The cloth mesh is written as \(C=\{X,T\}\), with vertex positions \(X\in\mathbb{R}^{3n}\) and UV coordinates \(T\in\mathbb{R}^{2n}\). The corrected network output uses perturbed texture coordinates
\[
T_N(\theta,v)=T_G+d_v(\theta),
\]
where \(d_v(\theta)\in\mathbb{R}^{2n}\) is a small per-vertex displacement for camera view \(v\). In continuous notation this is described as
\[
T'(u,v)=T\bigl(u+\delta_u(u,v),\, v+\delta_v(u,v)\bigr).
\]
Ground-truth targets for the displacements are computed by ray intersection: for each inferred vertex, a ray is cast from the camera center through the inferred mesh into the ground-truth mesh; the first intersection point is found; its UV is barycentrically interpolated; and the original UV is subtracted. Occluded vertices are filled by a diffusion step based on fast marching and averaging [2001.07253].

The network architecture, TSNN, maps pose parameters \(\theta\) to a \(512\times 512\) displacement image with 4 channels, representing \((\delta_u,\delta_v)\) for front and back surfaces. The input is a \(1\times 1\times 90\) tensor of joint transforms, and the network consists of transpose-convolutions with BatchNorm and ReLU. Training uses the loss
\[
L=\sum_k \|d_v(\theta_k)-\hat d_v(\theta_k)\|_2.
\]
The dataset comprised approximately 10 000 simulated T-shirt poses, each with a ground-truth 3 000-vertex mesh and inferred low-frequency mesh, subdivided once to about 12 000 vertices, and split 80\%/10\%/10\% for train, validation, and test. Training used PyTorch and Adam with learning rate \(10^{-3}\) [2001.07253].

Reported quantitative results on the test set were per-pixel SqrtMSE \(0.0249\) for the baseline inferred cloth, \(0.00527\) for ground-truth texture-sliding, \(0.00356\) for GS+subdivision, and \(0.0133\) for the networked TSNN. The qualitative claim was that texture sliding immediately re-introduces sharp wrinkles that were smoothed out, while 3D reconstructions recover high-frequency folds with \(<1\) mm reprojection error. Reported limitations included reliance on multi-view stereo or triangulation, TSNN-induced outliers or noisy rays, careful handling of occlusion and silhouette boundaries, and the use of a fixed camera array [2001.07253].

## 6. Latent-space guidance vectors for audio texture generation

In audio texture generation, the perturbative control variable is a guidance vector in the latent space of an unconditionally trained StyleGAN2 rather than an image-space perturbation. The generator decomposes as \(G_m:Z\to W\) and \(G_s:W\to X\), and controllable editing is performed by
\[
w' = w + \alpha g,\qquad 0<\alpha\le 1,
\]
followed by synthesis \(x'=G_s(w')\). The guidance vector \(g\) is inferred from positive and negative synthetic examples that indicate the presence or absence of a semantic attribute such as brightness, impact rate, or fill level [2308.11859].

The procedure begins with an encoder \(E:X\to W\), trained by minimizing a sum of MSE on spectrogram reconstruction and MSE on the latent \(w\). For a given attribute, two small sets of synthetic audio clips are constructed, \(X^+\) and \(X^-\), typically with \(n=5\) examples per cluster. Their encodings are centered around the global center-of-mass \(\bar w\) of \(W\), principal directions are found by SVD, prototypes are formed by projecting cluster means back to one-dimensional subspaces, and the guidance vector is then
\[
g=w_p^+-w_p^-.
\]
The paper emphasizes that no iterative solver or gradient-based optimization is required; the prototypes and guidance vector are computed in closed form [2308.11859].

The same formulation supports selective semantic attribute transfer. Given reference and target latents \(w_{\rm ref}\) and \(w_{\rm target}\), their projections onto \(g\) are computed, the transfer increment is \(\Delta=p_{\rm ref}-p_{\rm target}\), and the new target is
\[
w_{\rm new}=w_{\rm target}+\Delta\cdot(g/\|g\|).
\]
Implementation details included \(\delta_z=\delta_w=128\), 4 mapping-network layers, log-magnitude Gabor spectrograms with 512 STFT channels and 256 frames, PGHI waveform reconstruction, and a ResNet-34 encoder trained with Adam at \(1\times 10^{-5}\), \(\beta_1=0.5\), \(\beta_2=0.99\). The reported finding was that spectrograms exhibit smooth monotonic change in the target attribute without spoiling overall texture quality, and that 5–10 examples per cluster suffice [2308.11859].

This suggests that texture-guided perturbation need not be tied to pixel-space imperceptibility. In cross-modal settings, the perturbation can be a semantically aligned latent displacement that preserves overall texture quality while isolating one perceptual attribute.

## 7. Shared principles, recurrent limits, and representative instances

Across these papers, texture guidance repeatedly appears as a way to constrain *where* perturbations are applied, *what subspace* they occupy, or *which attributes* they control. The common structural motifs are selective localization, low-dimensional parameterization, and explicit preservation of non-target content.

| Representative method | Perturbation locus | Reported role |
|---|---|---|
| "Defending Deepfake via Texture Feature Perturbation" [2508.17315] | LBP- and Grad-CAM-guided facial texture regions | Distort Deepfake generation while preserving image quality |
| "TextureDiffusion: Target Prompt Disentangled Editing for Various Texture Transfer" [2409.09610] | Self-attention queries, residual features, and intermediate latents | Transfer various textures with structure and background preservation |
| "Texture Re-scalable Universal Adversarial Perturbation" [2406.06089] | Tiled local patch \(v\) repeated across the image | Improve fooling ratio and attack transferability |
| "Fine-Grained Perturbation Guidance via Attention Head Selection" [2506.10978] | Selected attention heads interpolated toward identity | Fine-grained control of generation quality and visual attributes |
| "Recovering Geometric Information with Learned Texture Perturbations" [2001.07253] | Per-vertex UV offsets | Recover high-frequency geometric detail |
| "Example-Based Framework for Perceptually Guided Audio Texture Generation" [2308.11859] | Latent guidance vector \(g\) in \(W\) | Controllable generation and selective semantic attribute transfer |

One recurrent misconception is that texture-guided perturbation is synonymous with arbitrary high-frequency noise. The surveyed formulations do not support that view. In the facial defense method, perturbations are explicitly suppressed in smooth areas and non-salient regions. In TextureDiffusion, a disentangled \(\langle\texttt{texture}\rangle\) prompt alone is insufficient, and structure must be re-injected through attention and residual features. In TSC-UAP, the perturbation is constrained to a tiled local patch, and performance falls when the texture scale becomes too small or too large. In head-level attention perturbation, moderate interpolation and a limited number of heads give a better trade-off than maximal perturbation. In geometric recovery, the perturbation is not noise but a smoothly varying UV-offset field. In audio, the perturbation is a closed-form latent direction derived from a few examples [2508.17315].

The reported limitations are likewise consistent across domains. TextureDiffusion notes residual background artifacts from the VAE encoder/decoder cycle, one-texture-at-a-time masking, and unreliable cross-attention masks for extremely thin or highly transparent objects. TSC-UAP reports declining fooling ratio when \(\alpha\ge 16\), indicating insufficient capacity in very small repeated patches. HeadHunter and SoftPAG report artifact risk from over-perturbation and a sweet spot in the number of selected heads. Learned texture perturbations for cloth require multi-view stereo or triangulation and careful handling of occlusion boundaries. The audio framework is motivated by the absence of large semantically labeled datasets and therefore relies on a few synthetic examples rather than direct supervision [2409.09610].

Taken together, these works indicate that texture-guided perturbation is best understood as a technical strategy for exploiting the fact that many modern models encode decisive information in local textures, texture-sensitive attention patterns, or semantically disentangled texture directions. A plausible implication is that future variants will continue to move away from unconstrained global perturbation and toward explicitly localized, structured, and task-specific control variables.

Source: https://www.emergentmind.com/topics/texture-guided-perturbation-framework