arXiv is now an independent nonprofit! Learn more
License: CC BY-NC-ND 4.0
arXiv:2608.30951v1 [cs.CV] 31 Aug 2026

Audio-Driven Adversarial Defense for 3D Talking Face Generation with totally Visual Fidelity Preservation

DOI: XXXXXXX.XXXXXXXConference: Make sure to enter the correct conference title from your rights confirmation email; June 03–05, 2018; Woodstock, NYISBN: 978-1-4503-XXXX-X/2018/06
Rui-Qing Sun email: 2325557558@qq.com Affiliation: Beijing Institute of Technology, Haidian Qu, Beijing Shi, China , Chen-Hao Cui Affiliation: Beijing Institute of Technology, Haidian Qu, Beijing Shi, China , Hui-Yang Zhao Affiliation: Beijing Institute of Technology, Haidian Qu, Beijing Shi, China , Tian Lan Affiliation: Beijing Institute of Technology, Haidian Qu, Beijing Shi, China , Zhijing Wu Affiliation: Beijing Institute of Technology, Haidian Qu, Beijing Shi, China and Xian-Ling Mao Affiliation: Beijing Institute of Technology, Haidian Qu, Beijing Shi, China
2018
Enjoying the baseball game from the third-base
seats. Ichiro Suzuki preparing to bat.
Figure 1. Comparison between conventional visual-domain defense and our psvchaacoustically quided audio-domain defense. Visual perturbations may introduce noticeable artifacts and are vulnerable to resizing, while our method hides protective perturbations in perceptuallv masked audio regions, preserving portrait appearance while suppressing reliable 3D-feild talking face generation.Enjoying the baseball game from the third-base seats. Ichiro Suzuki preparing to bat.
Abstract.

The rapid development of generative portrait models has raised growing concerns about privacy leakage and identity misuse. In particular, audio-driven 3D talking face generation can reconstruct a reusable 3D portrait of a target person from a monocular video and animate it with arbitrary speech, making realistic identity impersonation alarmingly practical. Existing proactive defenses mainly operate in the visual domain by injecting subtle perturbations into facial regions to disrupt identity acquisition. However, such perturbations often compromise visual quality due to the strong structural priors and social sensitivity of human faces, and are easily weakened by common real-world transformations such as resizing. To overcome these limitations, we propose an imperceptible audio defense for audio-driven 3D talking face generation by shifting protection from the visual modality to the audio modality. Specifically, we exploit psychoacoustic masking to hide protective perturbations within perceptually masked frequency regions of the speech signal, thereby reducing perceptual distortion while suppressing reliable facial animation. Extensive experiments demonstrate that the proposed method effectively degrades 3D talking face generation while preserving favorable perceptual quality. These findings highlight psychoacoustically guided audio perturbations as a practical and promising direction for privacy-preserving portrait protection.

Keywords: 
Talking Face Generation, Proactive Defense, Audio Adversarial Attack,

1. Introduction

The recent surge of generative multimedia models has greatly expanded the capability of synthesizing realistic human-centric content, including portraits, speech, and talking videos (Rombach et al., 2022; Brooks et al., 2023; Li et al., 2025b). Among these advances, talking face generation has become a representative multimodal task because it tightly couples facial appearance with audio-driven motion generation (Chen et al., 2019; Prajwal et al., 2020; Peng et al., 2024). As a representative multimodal generation task, talking face generation tightly couples visual identity modeling with speech-driven motion synthesis, making privacy protection especially challenging in real-world multimedia sharing scenarios. In particular, audio-driven 3D talking face generation can recover a personalized 3D portrait from a monocular video and subsequently animate it with arbitrary speech, producing highly realistic and identity-consistent results (Li et al., 2023; Tang et al., 2025; Ye et al., 2023; Peng et al., 2024; Li et al., 2025a). These capabilities open up promising opportunities for digital humans, virtual communication, and multimedia creation. However, the same capability also makes portrait misuse alarmingly practical. Once a victim’s portrait information is acquired, the reconstructed 3D representation can be reused for scalable and near-real-time synthesis, enabling impersonation, fabricated speeches, and other forms of identity abuse (Verdoliva, 2020; Masood et al., 2023).

This privacy risk is especially concerning in today’s online ecosystem, where user-generated videos are continuously shared across social platforms and can be easily harvested by malicious actors. Compared with conventional 2D portrait animation (Chen et al., 2019; Prajwal et al., 2020), audio-driven 3D talking face generation poses a more serious threat because it not only captures appearance details, but also reconstructs reusable three-dimensional identity cues that support high-fidelity reenactment under arbitrary speech input (Li et al., 2023; Peng et al., 2024; Li et al., 2025a). In practice, even a short publicly accessible video may already provide sufficient material for reconstructing a controllable digital portrait of the target person. Therefore, protecting portrait media before it is collected by such generation systems has become an urgent problem in multimedia security and privacy protection.

To mitigate these risks, recent proactive defense methods attempt to add subtle perturbations to media before they are scraped or reused by generative models. Most existing defenses are developed in the visual domain, where adversarial perturbations are injected into facial regions to interfere with identity extraction, landmark estimation, or downstream portrait reconstruction (Liang et al., 2023; Liang and Wu, 2023b; Salman et al., 2023b; Wang et al., 2025; Jeong et al., 2025). This line of research is intuitive, since visual appearance is the most direct source for identity acquisition. Nevertheless, visual-domain protection faces inherent limitations when applied to portrait sharing scenarios. Human faces are highly structured and socially sensitive visual objects, and even slight distortions in facial regions may noticeably reduce visual quality, damage user experience, or introduce unnatural artifacts. More importantly, visual perturbations are often fragile under common real-world transformations such as resizing, resampling, and compression, which are almost unavoidable during online transmission and platform processing (Francis, 2025). As a result, their protection effectiveness can be significantly weakened before the media is actually used by an attacker.

These limitations motivate us to rethink where protection should be imposed in audio-driven 3D talking face generation. Instead of continuing to perturb the visually sensitive facial region, we ask whether the defense can be shifted to the audio modality. This perspective is particularly attractive because the driving audio plays a fundamental role in controlling lip motion and facial dynamics, making it a natural intervention point for disrupting high-quality synthesis. Meanwhile, unlike the visual domain, the auditory domain provides a more explicit perceptual principle for imperceptibility, namely psychoacoustic masking (Qin et al., 2019; Schönherr et al., 2018). According to this principle, weak sound components can become imperceptible in the presence of stronger neighboring frequencies, which provides a principled way to hide protective perturbations while preserving perceptual quality.

Based on this insight, we propose an imperceptible audio defense for audio-driven 3D talking face generation. Rather than directly perturbing facial pixels, our method injects protective perturbations into perceptually masked frequency regions of the speech signal under psychoacoustic guidance. In this way, the perturbations remain difficult for human listeners to perceive, while still interfering with the generation pipeline and suppressing reliable facial animation. By shifting protection from the visual modality to the audio modality, our approach avoids directly damaging portrait appearance and offers a more user-friendly solution for privacy-preserving portrait sharing.

Extensive experiments demonstrate that the proposed method effectively degrades the performance of audio-driven 3D talking face generation while preserving favorable perceptual quality. The results suggest that psychoacoustically guided audio perturbations provide a practical and promising direction for proactive portrait protection, especially in scenarios where visual fidelity is critical. Overall, this work offers a new modality-level perspective on defending against portrait generation systems and highlights the importance of incorporating perceptual principles into deployable multimedia privacy protection methods.

Our main contributions are summarized as follows:

  • We revisit proactive defense for talking face generation from a new modality perspective and reveal the limitations of existing visual-domain protection methods in terms of perceptual quality and robustness under common real-world transformations.

  • We propose an imperceptible audio defense for audio-driven 3D talking face generation by leveraging psychoacoustic masking to conceal protective perturbations in perceptually masked frequency regions.

  • We demonstrate through extensive experiments that the proposed method effectively suppresses 3D talking face generation while maintaining favorable perceptual quality, showing the practicality of audio-based protection for privacy-preserving portrait sharing.

2. Related Works

2.1. Audio-driven Talking Face Generation

Audio-driven talking face generation (TFG) aims to synthesize realistic talking portraits by animating facial motions according to speech signals. Early methods mainly relied on 2D image generation or warping-based pipelines (Chen et al., 2019; Chen et al., 2018; Prajwal et al., 2020), which achieved plausible lip synchronization but often struggled to model natural head movement, fine-grained facial dynamics, and multi-view consistency.

Recent advances in 3D representations have substantially improved the realism and controllability of TFG. In particular, Neural Radiance Fields (NeRF) (Athar et al., 2022; Bi et al., 2024; Guo et al., 2021; Tang et al., 2025; Li et al., 2023; Ye et al., 2023; Peng et al., 2024) and 3D Gaussian Splatting (3DGS) (Cho et al., 2024; Li et al., 2024; Li et al., 2025a) enable the reconstruction of subject-specific 3D portraits from monocular reference videos, leading to stronger identity consistency, more accurate lip synchronization, and better view-consistent rendering. Compared with generalized one-shot portrait animation methods (Li et al., 2025b; Ye et al., 2024), these personalized 3D-field approaches are particularly powerful because they can recover reusable identity-aware 3D representations and support highly realistic speech-driven reenactment.

However, this strong generation capability also introduces significant privacy risks. Once a target person’s reference video is collected, current 3D-field TFG models can reconstruct a controllable digital portrait and synthesize realistic videos under arbitrary speech input. This makes them especially concerning in public multimedia sharing scenarios, where user portraits and voices can be easily harvested and reused. In this work, we focus on defending against such audio-driven 3D-field TFG systems, which pose a more serious threat than conventional 2D talking face generation due to their stronger realism, controllability, and reusability.

2.2. Talking Face Defense

With the rapid progress of portrait generation models, recent studies have begun to explore proactive defenses against talking face generation and related portrait manipulation systems. Most existing methods are developed in the visual domain, where protective perturbations are injected into facial regions to disrupt identity extraction, facial landmark estimation, reconstruction, or downstream editing and animation models (Liang et al., 2023; Liang and Wu, 2023b; Salman et al., 2023b; Jeong et al., 2025; Wang et al., 2025). This line of work is intuitive because the face image is the most direct source for identity modeling and visual synthesis.

Despite their effectiveness, visual-domain defenses face two major limitations in the context of talking face protection. First, human faces are highly structured and socially sensitive visual objects, so even subtle perturbations may noticeably reduce visual quality or introduce undesirable facial artifacts. Second, such perturbations are often fragile under common real-world transformations, including resizing, resampling, and platform-side compression, which are almost unavoidable during online media sharing and redistribution. These issues are especially problematic for 3D-field TFG, where accurate visual priors are often reconstructed through long video preprocessing pipelines and may be partially restored or purified during fitting.

Compared with prior work, our goal is not to further optimize visual perturbations, but to revisit where protection should be imposed. We argue that, for audio-driven talking face generation, the driving audio itself provides a more natural and practical intervention point. Instead of perturbing visually sensitive facial regions, we shift protection to the audio modality and study how imperceptible audio perturbations can suppress reliable facial animation while preserving portrait appearance. To the best of our knowledge, this perspective remains largely underexplored in proactive defense for talking face generation, especially for modern 3D-field TFG systems.

2.3. Voice Clone Defense

Our work is also related to recent efforts on voice clone defense and adversarial protection for speech generation systems. Prior studies have shown that speech models, including automatic speech recognition (ASR), speaker verification, and voice cloning systems, are vulnerable to carefully designed perturbations in the audio domain (Carlini and Wagner, 2018; Qin et al., 2019; Schönherr et al., 2018; Neekhara et al., 2019; Yakura and Sakuma, 2018). To improve perceptual stealth, several works further incorporate psychoacoustic principles and human auditory masking models to constrain perturbations below perceptual thresholds (Qin et al., 2019; Schönherr et al., 2018). These studies demonstrate that the audio modality provides a principled path to achieving both attack effectiveness and human imperceptibility.

However, defending against audio-driven talking face generation is fundamentally different from defending against pure speech or speaker models. In our setting, the audio signal is not the final target itself, but a cross-modal control signal that drives facial geometry and lip motion. Therefore, the objective is not merely to alter linguistic content or speaker identity, but to disrupt the audio-to-geometry mapping required for realistic facial animation. This introduces a new challenge: the perturbation must remain imperceptible to listeners while still being strong enough to interfere with the downstream visual generation process. Our work bridges this gap by introducing a psychoacoustically guided audio defense specifically designed for 3D talking face generation, connecting voice-side imperceptible perturbation design with portrait privacy protection.

3. Preliminaries

3.1. Audio-Driven Talking Face Generation in 3D Fields

Refer to caption
Figure 2. Overview of the 3D-field TFG pipeline. The reference video is disentangled into identity, pose, and expression priors. Driving audio modulates 3D spatial samples via a latent lip space. Blue arrows indicate training-only operations (e.g., identity/pose extraction), while red arrows denote operations common to both training and inference (e.g., audio-visual encoding and neural rendering).

Unlike 2D-based talking head synthesis that operates on image pixels, 3D-field TFG models represent the human head as a continuous or discrete dynamic 3D structure. This approach ensures multi-view consistency and realistic geometric deformation. The common pipeline involves mapping acoustic features to a 3D spatial representation, which is then rendered into 2D images.

Generalized 3D Scene Representations. A 3D field \mathcal{F} characterizes the physical properties (e.g., density σ\sigma, color 𝐜\mathbf{c}, or covariance Σ\Sigma) of any point 𝐱3\mathbf{x}\in\mathbb{R}^{3}. Recent TFG frameworks employ various efficient 3D representations:

  • Volumetric Fields: (NeRF-based) The scene is represented as a continuous function f:(𝐱,𝐝)(σ,𝐜)f:(\mathbf{x},\mathbf{d})\to(\sigma,\mathbf{c}). To accelerate rendering, Tri-planes (𝒫xy,𝒫xz,𝒫yz\mathcal{P}_{xy},\mathcal{P}_{xz},\mathcal{P}_{yz}) are often employed, where features at coordinate 𝐱\mathbf{x} are aggregated from orthogonal projections:

    (1) 𝒇𝐱=Aggi{xy,xz,yz}((𝒫i,πi(𝐱)))\boldsymbol{f}_{\mathbf{x}}=\operatorname{Agg}_{i\in\{xy,xz,yz\}}\left(\mathcal{I}(\mathcal{P}_{i},\pi_{i}(\mathbf{x}))\right)
  • Point-based Fields: (3DGS-based) The scene is explicitly modeled by a collection of 3D Gaussians, each defined by its center 𝝁\boldsymbol{\mu}, opacity α\alpha, and covariance matrix 𝚺\boldsymbol{\Sigma}. Audio features drive the facial motion by predicting residual offsets Δ𝝁\Delta\boldsymbol{\mu} or modulating a canonical deformation field.

  • Hybrid Fields: These models leverage 3D Morphable Models (3DMM) to provide explicit structural priors (𝜶,𝜷,𝜹\boldsymbol{\alpha},\boldsymbol{\beta},\boldsymbol{\delta}), integrating parametric facial geometry with neural feature volumes to achieve both high-fidelity rendering and precise expression control.

Audio-to-Geometry Mapping. The fundamental mechanism of a 3D-field TFG model GG is the modulation of the 3D field \mathcal{F} by an audio embedding 𝒂\boldsymbol{a}. Let Φ\Phi be the transformation function that maps the canonical identity to a dynamic state:

(2) sync=Φ(static,𝒂)\mathcal{F}_{sync}=\Phi(\mathcal{F}_{static},\boldsymbol{a})

where static\mathcal{F}_{static} represents the static spatial prior of the speaker, and sync\mathcal{F}_{sync} is the audio-synced dynamic field.

3.2. Principles of Psychoacoustic Masking

To achieve imperceptible protection, we must ensure that the adversarial noise added to the audio remains beneath the detection threshold of the human auditory system. This is governed by the Psychoacoustic Masking Effect.

Frequency Masking and Critical Bands. The human ear processes sound through a non-linear filter bank on the cochlea, known as Critical Bands. A strong sound at a specific frequency (the masker) will raise the hearing threshold of neighboring frequencies (the maskee). This masking power is more effectively modeled on the Bark Scale (zz):

(3) z=13arctan(0.00076f)+3.5arctan((f/7500)2)z=13\arctan(0.00076f)+3.5\arctan((f/7500)^{2})

Within this scale, if the energy of our adversarial perturbation δ\delta stays within the "masking umbrella" created by the original speech signal xx, the human brain will filter out δ\delta as redundant information.

Absolute Threshold of Hearing (ATH). The Absolute Threshold of Hearing (ATH) represents the baseline sensitivity of the human ear in a noiseless environment. It is defined by the non-linear function Tq(f)T_{q}(f):

(4) Tq(f)=3.64(f/1000)0.86.5e0.6(f/10003.3)2+103(f/1000)4 (dB)T_{q}(f)=3.64(f/1000)^{-0.8}-6.5e^{-0.6(f/1000-3.3)^{2}}+10^{-3}(f/1000)^{4}\text{ (dB)}

This threshold indicates that the ear is most sensitive between 252\text{--}5 kHz (the range of human speech) and significantly less sensitive at very low or very high frequencies. Any protective noise falling below Tq(f)T_{q}(f) is physically inaudible.

Global Masking Threshold θ(k)\theta(k). The Global Masking Threshold is the combination of the ATH and the simultaneous masking effects produced by all components of the speech signal. The process of computing θ(k)\theta(k) involves: (i) Decomposition: Identifying tonal and non-tonal maskers in the PSD of xx; (ii) Spreading: Applying a spreading function SF(zi,zj)SF(z_{i},z_{j}) to model the frequency-dependent decay; and (iii) Aggregation: Summing individual thresholds and the ATH in the intensity domain:

(5) θ(j)=10log10(10Tq(j)/10+i=1M10Ti(j)/10)\theta(j)=10\log_{10}\left(10^{T_{q}(j)/10}+\sum_{i=1}^{M}10^{T_{i}(j)/10}\right)

As illustrated in Fig. 3, our strategy embeds the protective perturbations δ\delta within the resulting "Inaudible Zone" (shaded in blue). By enforcing the constraint PSD(δ)θ(j)\text{PSD}(\delta)\leq\theta(j), we guarantee that the defense remains transparent to the user, effectively hiding the semantic conflict within the perceptual shadows of the speech signal.

Refer to caption
Figure 3. Visualization of the frequency masking mechanism for a speech segment. The clean audio spectrum PxP_{x} (light gray) creates multiple individual masking umbrellas (light blue) centered at dominant tonal maskers (black dots). The Global Masking Threshold Θx\Theta_{x} (red thick line) represents the aggregated perceptual boundary. Any adversarial perturbation δ\delta residing within the Inaudible Zone (blue shaded area) is rendered imperceptible to the human ear, as it remains below the frequency-dependent sensitivity defined by the Absolute Threshold of Hearing (ATH, green dashed line) and the simultaneous masking effects.

3.3. Threat Model and Defense Objective

Threat Model. In this study, we consider a security scenario involving a victim user who shares their original audio xx on public social media platforms. An unauthorized adversary, acting as a deepfake creator, aims to harvest this audio to synthesize a highly deceptive talking-face video using a 3D-field TFG model MM.

  • Adversarial Intent: The adversary seeks to exploit the victim’s acoustic identity to drive a digital avatar, ensuring that the synthesized lip movements are perfectly synchronized with the victim’s speech to facilitate social engineering or misinformation.

  • Black-box Assumptions: We assume a stringent black-box setting where the adversary has no prior knowledge of our defensive mechanism, its parameters, or the underlying psychoacoustic constraints. This forces the adversary to rely solely on the perceived quality of the audio for synthesis.

  • Channel Robustness: Considering the practical transmission of audio over the Internet, we assume the adversary operates on a version of xx that has undergone standard lossy compression (e.g., MP3 or AAC transcoding) and resampling. Our threat model stipulates that a successful defense must remain effective even after such signal distortions, which are typical of social media pipelines.

Defense Objective. We seek a perturbation δ\delta such that xadv=x+δx_{adv}=x+\delta achieves: (1) Visual Targeted Disruption, where the cross-modal conflict causes geometric collapse in the mouth region; and (2) Acoustic Imperceptibility, satisfying 𝒟perc(x,xadv)<ϵ\mathcal{D}_{perc}(x,x_{adv})<\epsilon based on θ(k)\theta(k).

4. Methodology

Our goal is to construct an imperceptible audio perturbation that preserves the perceptual quality of the shared media while preventing it from serving as a reliable driving signal for personalized 3D talking face generation. As illustrated in Fig. 4, the proposed framework consists of two tightly coupled stages: Audio Perturbation Construction and Core Semantic Conflict Establishment. The first stage generates a psychoacoustically bounded perturbation in the frequency domain, and the second stage feeds the perturbed audio into a pretrained audio-driven 3D-field talking face model to establish a persistent mismatch between audio semantics and mouth geometry. The entire process is optimized end-to-end through the asynchronous dual-loop strategy summarized in Algorithm 1.

Refer to caption
Figure 4. Overview of the proposed visually lossless proactive defense framework. The upper branch constructs a psychoacoustically bounded frequency-domain perturbation and reconstructs an adversarial waveform that is imperceptible to human listeners but semantically shifted for the talking-face generator. The lower branch establishes cross-modal semantic conflict by feeding the perturbed audio into a frozen audio feature extractor and a frozen pretrained audio-driven 3D-field renderer, while a mouth landmark loss encourages collapsed mouth geometry in the rendered results. By optimizing the perturbation under psychoacoustic constraints, our method disrupts the audio-to-geometry mapping without introducing visible artifacts into the shared visual content.

4.1. Framework Overview

The key idea of our method is to shift the defense from the visual domain to the audio domain. Instead of directly injecting perturbations into facial pixels, we optimize a frequency-domain perturbation on the driving speech such that the resulting audio remains perceptually natural to humans, but induces misleading semantic cues for the downstream talking-face generator. Once the perturbed audio is used to drive facial reconstruction, the generated mouth motion becomes structurally inconsistent with the expected speech articulation, thereby breaking the learned audio-to-lip correspondence required by personalized 3D talking face generation.

As shown in Fig. 4, the upper branch first transforms the clean waveform into the time-frequency domain, computes a psychoacoustic capacity bound from the masking threshold, and optimizes a learnable perturbation variable within this admissible region. The perturbed spectrum is then converted back to the time domain to obtain the adversarial waveform. The lower branch feeds the adversarial waveform into a frozen audio feature extractor and a frozen pretrained audio-driven 3D-field renderer. A differentiable landmark extractor is finally applied to the rendered frames, and the resulting mouth closure loss is back-propagated to update the perturbation. In this way, the optimized perturbation does not visibly alter the shared video, yet it poisons the semantic driving signal used by the talking-face model.

4.2. Audio Perturbation Construction

We first construct the perturbation in the frequency domain, since psychoacoustic masking constraints are naturally defined over time-frequency bins. Given a clean waveform x[1,1]Tx\in[-1,1]^{T}, we compute its short-time Fourier transform:

(6) Sx=STFT(x),S_{x}=\mathrm{STFT}(x),

where SxF×TsS_{x}\in\mathbb{C}^{F\times T_{s}} denotes the complex spectrum, with FF frequency bins and TsT_{s} temporal frames. We further decompose it into magnitude and phase, and define the phase template as

(7) P=exp(jSx).P=\exp\!\left(j\angle S_{x}\right).

Based on the clean spectrum, we estimate the psychoacoustic masking threshold map Θx\Theta_{x}, which specifies the maximum imperceptible perturbation energy at each time-frequency location. From Θx\Theta_{x}, we derive a perturbation capacity map CC, which provides an upper bound for the perturbation amplitude. To ensure that the optimization always remains within the admissible psychoacoustic region, we introduce a learnable variable BB and parameterize the perturbation amplitude as

(8) A=tanh(B)C,A=\tanh(B)\odot C,

where \odot denotes element-wise multiplication. The tanh()\tanh(\cdot) mapping constrains each element of BB to (1,1)(-1,1), so that the resulting perturbation amplitude AA never exceeds the psychoacoustic budget defined by CC.

We then construct the complex perturbation

(9) Δ=AP,\Delta=A\odot P,

and add it to the clean spectrum to obtain the adversarial spectrum

(10) Sadv=Sx+Δ.S_{adv}=S_{x}+\Delta.

Finally, the adversarial waveform is reconstructed by inverse STFT:

(11) xadv=ISTFT(Sadv).x^{adv}=\mathrm{ISTFT}(S_{adv}).

This design corresponds to the upper branch of Fig. 4. It also matches the first several lines of Algorithm 1: we compute SxS_{x}, the phase template PP, the threshold map Θx\Theta_{x}, the perturbation bound CC, and optimize the learnable variable BB through iterative updates.

4.3. Core Semantic Conflict Establishment

After obtaining the adversarial waveform xadvx^{adv}, we use it to drive a frozen audio-driven 3D-field talking face model. This stage corresponds to the lower branch of Fig. 4. Specifically, the adversarial waveform is first mapped into latent audio features:

(12) Fadv=(xadv),F^{adv}=\mathcal{E}(x^{adv}),

where \mathcal{E} denotes the frozen audio feature extractor. These features are then fed into a pretrained audio-driven renderer \mathcal{R} together with the visual conditioning of the target identity to synthesize talking-face frames:

(13) I^i=(di,ai),i=1,,N,\hat{I}_{i}=\mathcal{R}(d_{i},a_{i}),\quad i=1,\dots,N,

where did_{i} denotes the visual or camera-related condition of frame ii, and aia_{i} is the audio condition derived from FadvF^{adv}.

The central objective of our method is not to suppress the visual content itself, but to establish a semantic conflict between the perturbed audio cues and the expected mouth articulation. To quantify this conflict, we apply a differentiable landmark detector 𝒟\mathcal{D} to each rendered frame and obtain the mouth landmarks:

(14) Li=𝒟(I^i).L_{i}=\mathcal{D}(\hat{I}_{i}).

Let ϕupper,i(y)\phi_{upper,i}^{(y)} and ϕlower,i(y)\phi_{lower,i}^{(y)} denote the vertical coordinates of the selected upper and lower inner-lip landmarks in frame ii, respectively. We define the mouth deconstruction loss as

(15) Lmouth=1Ni=1Nϕupper,i(y)ϕlower,i(y)2.L_{mouth}=\frac{1}{N}\sum_{i=1}^{N}\left\|\phi_{upper,i}^{(y)}-\phi_{lower,i}^{(y)}\right\|_{2}.

Minimizing LmouthL_{mouth} encourages the rendered mouth to collapse toward a closed state, even when the original clean speech should correspond to open-mouth articulations. This mismatch forces the model into an inconsistent audio-to-geometry mapping regime, thereby weakening its ability to learn stable and accurate lip motion patterns from the protected data.

This process is exactly reflected in the middle part of Algorithm 1: after generating xadvx^{adv} and extracting FadvF^{adv}, the renderer synthesizes frames one by one, the landmark detector analyzes each frame, and the mouth-related loss is accumulated over all rendered frames.

4.4. Optimization Objectives

To jointly enforce attack effectiveness, perceptual naturalness, and spectral smoothness, we optimize the perturbation using four complementary objectives.

Mouth deconstruction loss.

The primary attack objective is the mouth closure loss:

(16) Latk=Lmouth.L_{atk}=L_{mouth}.

It directly measures whether the perturbed audio induces collapsed or semantically incorrect mouth motion in the rendered talking-face outputs.

Spectral energy regularization.

To avoid trivial solutions such as suppressing the signal energy, we constrain the magnitude of the adversarial spectrum to remain close to that of the clean spectrum:

(17) Leng=𝔼k,t(|Sadv(k,t)||Sx(k,t)|)2.L_{eng}=\mathbb{E}_{k,t}\left(|S_{adv}(k,t)|-|S_{x}(k,t)|\right)^{2}.

This term encourages the defense to rely on semantic manipulation rather than brute-force signal destruction.

Psychoacoustic masking loss.

Although the parameterization in Eq. (8) already limits the perturbation within a bounded region, we further penalize any residual violation of the masking threshold using

(18) Lmask=𝔼k,t[max(p¯δ(k,t)Θx(k,t), 0)],L_{mask}=\mathbb{E}_{k,t}\left[\max\!\left(\bar{p}_{\delta}(k,t)-\Theta_{x}(k,t),\,0\right)\right],

where p¯δ(k,t)\bar{p}_{\delta}(k,t) denotes the normalized perturbation power spectral density. This term encourages the perturbation to stay in the auditory masking shadow of the clean audio.

Temporal-frequency smoothness.

To prevent isolated spikes and unnatural spectral artifacts, we regularize the perturbation amplitude with first- and second-order smoothness constraints:

(19) Lsmooth=tA1+fA1+t2A1+f2A1,L_{smooth}=\|\nabla_{t}A\|_{1}+\|\nabla_{f}A\|_{1}+\|\nabla_{t}^{2}A\|_{1}+\|\nabla_{f}^{2}A\|_{1},

where t\nabla_{t} and f\nabla_{f} denote temporal and frequency derivatives, respectively. This regularization makes the perturbation more consistent with the natural continuity of speech spectra.

4.5. Asynchronous Dual-Loop Optimization

The full optimization procedure is summarized in Algorithm 1. Since the attack objective and the perceptual objective have inherently different priorities, we adopt an asynchronous dual-loop strategy instead of optimizing all losses with a single static weighting scheme.

Primary optimization loop.

In each iteration, we first construct the perturbation amplitude AA, reconstruct the adversarial waveform xadvx^{adv}, and feed it into the audio-driven talking-face pipeline. The rendered frames are then evaluated by the landmark detector to compute the mouth deconstruction loss LatkL_{atk}. Together with the spectral energy loss and smoothness regularization, the main objective is defined as

(20) Lmain=Latk+λengLeng+λsmoothLsmooth.L_{\mathrm{main}}=L_{atk}+\lambda_{eng}L_{eng}+\lambda_{smooth}L_{smooth}.

This objective is responsible for pushing the perturbation toward an effective semantic attack direction while maintaining reasonable spectral behavior.

Threshold activation.

Once the attack objective reaches a predefined level, i.e., LatkτL_{atk}\leq\tau, we mark the current perturbation as an effective candidate and activate the secondary refinement branch. Intuitively, this means the semantic conflict has already been established strongly enough to mislead the talking-face model.

Secondary refinement loop.

After the attack threshold is met, we further compress the perturbation under psychoacoustic constraints, as long as the attack effect does not significantly deteriorate. The refinement objective is

(21) Lpsy=λmaskLmask+λsmoothLsmooth+λregB1.L_{\mathrm{psy}}=\lambda_{mask}L_{mask}+\lambda_{smooth}L_{smooth}+\lambda_{reg}\|B\|_{1}.

This stage corresponds to the red dashed update path in Fig. 4 and to the final conditional branch of Algorithm 1. It reduces perceptual saliency and redundant perturbation energy while preserving attack effectiveness.

Discussion.

The resulting optimization procedure has a clear interpretation. The upper branch of Fig. 4 ensures that the perturbation is constructed in a psychoacoustically safe region, yielding an adversarial waveform that is imperceptible but semantically shifted. The lower branch uses this shifted audio signal to drive a frozen talking-face generator and explicitly enforces incorrect mouth dynamics through landmark-based supervision. Therefore, unlike prior visual-domain defenses that sacrifice facial quality by perturbing pixels directly, our method attacks the cross-modal driving signal itself and achieves visually lossless protection against personalized 3D talking face generation.

5. Experiments

Refer to caption
Figure 5. Qualitative comparison with visual-domain defense methods. From left to right, each row shows the clean reference result and the outputs under different defenses. Existing visual perturbation methods introduce noticeable artifacts in facial regions, such as grainy noise, texture corruption, and color distortion. In contrast, our method maintains visually lossless appearance while still preventing accurate speech-driven talking-face generation.

Due to space limitations, we present the main quantitative and representative qualitative results in the paper, and provide additional visual comparisons in the supplementary materials for a more comprehensive evaluation. We strongly recommend watching the supplementary video.

5.1. Experimental Settings and Baselines

To ensure a fair and practical evaluation, we collect the demonstration videos used in prior works and construct a subset of the HDTF (Zhang et al., 2021) dataset consisting of 11 identities. This setup balances computational cost and evaluation fairness, while covering diverse speaking styles, facial structures, and mouth motion patterns.

We compare our method against two representative baselines: antifake (Yu et al., 2023), a visual-domain proactive defense method, and silencer (Gan et al., 2025), an audio-removal based defense strategy. These baselines represent two fundamentally different protection paradigms: adding perturbations to the visual signal versus directly suppressing the driving audio.

For evaluation, we adopt both generation-quality and perceptual-audio metrics. We denote metrics with the prefix “M” to indicate that they are computed over the mouth region, which is most relevant to speech-driven lip dynamics.

Specifically, we use M-LMD, M-SSIM, and M-PSNR to evaluate the impact of different defenses on generated talking-face videos, where all metrics are computed with respect to the outputs produced from clean reference videos. M-LMD measures the distance between mouth landmarks and reflects lip motion consistency, with lower values indicating better preservation of natural articulation. M-SSIM and M-PSNR measure structural similarity and pixel-level fidelity within the mouth region, respectively, where higher values indicate better visual quality.

In addition, we adopt CDPAM (Manocha et al., 2021) to measure the perceptual distance between the defended audio and the clean audio, where lower values indicate higher perceptual similarity.

5.2. Quantitative Results

Table 1. Comparison of different defense methods on lip-motion disruption, deviation from clean-driven generation, and perceptual audio quality.
Methods M-LMD\uparrow M-SSIM\downarrow M-PSNR\downarrow CDPAM\downarrow
antifake 3.32034 0.83584 28.12566 0.457559
silencer 10.0028 0.5909 28.16 0
ours 3.23093 0.84236 28.34491 0.116151

Table 1 reports the quantitative comparison across different defense methods. Since the objective of proactive defense is to prevent the protected media from serving as a reliable driving signal for talking-face generation, stronger defense performance should lead to generated results that deviate more from those produced using clean reference inputs. Therefore, larger M-LMD and smaller M-SSIM/M-PSNR indicate stronger disruption of speech-driven facial synthesis, while lower CDPAM indicates higher perceptual similarity between the defended and clean audio.

Compared with antifake, our method achieves a substantially lower CDPAM score, indicating that the introduced perturbation is significantly less perceptible in the audio domain. At the same time, it maintains a comparable level of defense effectiveness in terms of M-LMD, M-SSIM, and M-PSNR, showing that our method can effectively interfere with downstream talking-face generation without noticeably compromising perceptual quality.

Although silencer achieves the strongest disruption according to M-LMD, M-SSIM, and M-PSNR, this result mainly stems from directly degrading the protected visual input itself. Since the quality of the visual input is severely compromised, the downstream generated videos also deviate more significantly from those driven by clean reference inputs, which naturally leads to stronger disruption metrics. However, this comes at the cost of substantially worse visual appearance and user experience. As also evidenced by the qualitative comparisons in Fig. 5, such a strategy introduces obvious perceptual degradation and produces visually less acceptable protected content.

In contrast, our method achieves effective defense while preserving the natural appearance of the shared visual content. This makes it more suitable for realistic deployment scenarios, where proactive protection should not require sacrificing the viewing experience of benign users. Overall, these results demonstrate that our method provides a more practical trade-off between defense effectiveness and perceptual quality.

5.3. Qualitative Results

Figure 5 presents qualitative comparisons between our method and representative visual-domain defense approaches (Liang and Wu, 2023a; Salman et al., 2023a; Liang et al., 2023; Gan et al., 2025; Xue et al., 2023). As shown in the figure, existing visual perturbation methods inevitably introduce visible artifacts on the face, including grainy noise, color inconsistency, and corrupted local textures. These distortions are particularly evident in identity-sensitive regions such as the cheeks, lips, and facial contours, which significantly degrade visual realism and user experience.

In contrast, our method achieves visually lossless protection, where the facial appearance remains clean, natural, and free of noticeable artifacts across different identities. The overall texture, color distribution, and facial structure are well preserved, making the defended content perceptually indistinguishable from clean data for human observers.

Despite this high visual fidelity, our method can still effectively disrupt the speech-driven synthesis process, demonstrating that strong protection does not necessarily require sacrificing visual quality. This property is crucial for real-world deployment, where user-uploaded content should remain visually acceptable while being resistant to unauthorized talking-face generation.

References

  • Athar et al. (2022) S. Athar, Z. Xu, K. Sunkavalli, E. Shechtman, and Z. Shu Rignerf: fully controllable neural 3d portraits. In Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition, pp. 20364–20373. Cited by: §2.1.
  • Bi et al. (2024) C. Bi, X. Liu, and Z. Liu Nerf-ad: neural radiance field with attention-based disentanglement for talking face synthesis. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 3490–3494. Cited by: §2.1.
  • Brooks et al. (2023) T. Brooks, A. Holynski, and A. A. Efros Instructpix2pix: learning to follow image editing instructions. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 18392–18402. Cited by: §1.
  • Carlini and Wagner (2018) N. Carlini and D. Wagner Audio adversarial examples: targeted attacks on speech-to-text. In 2018 IEEE security and privacy workshops (SPW), pp. 1–7. Cited by: §2.3.
  • Chen et al. (2018) L. Chen, Z. Li, R. K. Maddox, Z. Duan, and C. Xu Lip movements generation at a glance. In Proceedings of the European conference on computer vision (ECCV), pp. 520–535. Cited by: §2.1.
  • Chen et al. (2019) L. Chen, R. K. Maddox, Z. Duan, and C. Xu Hierarchical cross-modal talking face generation with dynamic pixel-wise loss. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 7832–7841. Cited by: §1, §1, §2.1.
  • Cho et al. (2024) K. Cho, J. Lee, H. Yoon, Y. Hong, J. Ko, S. Ahn, and S. Kim Gaussiantalker: real-time talking head synthesis with 3d gaussian splatting. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 10985–10994. Cited by: §2.1.
  • Francis (2025) N. Francis Deepfake detection and defense: an analysis of techniques and robustness. Cited by: §1.
  • Gan et al. (2025) Y. Gan, J. Miao, Y. Wang, and Y. Yang Silence is golden: leveraging adversarial examples to nullify audio control in ldm-based talking-head generation. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 13434–13444. Cited by: §5.1, §5.3.
  • Guo et al. (2021) Y. Guo, K. Chen, S. Liang, Y. Liu, H. Bao, and J. Zhang Ad-nerf: audio driven neural radiance fields for talking head synthesis. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 5784–5794. Cited by: §2.1.
  • Jeong et al. (2025) J. Jeong, S. In, S. Kim, H. Shin, J. Jeong, S. H. Yoon, J. Chung, and S. Kim Faceshield: defending facial image against deepfake threats. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 10364–10374. Cited by: §1, §2.2.
  • Li et al. (2024) J. Li, J. Zhang, X. Bai, J. Zheng, X. Ning, J. Zhou, and L. Gu Talkinggaussian: structure-persistent 3d talking head synthesis via gaussian splatting. In European Conference on Computer Vision, pp. 127–145. Cited by: §2.1.
  • Li et al. (2025a) J. Li, J. Zhang, X. Bai, J. Zheng, J. Zhou, and L. Gu Instag: learning personalized 3d talking head from few-second video. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 10690–10700. Cited by: §1, §1, §2.1.
  • Li et al. (2023) J. Li, J. Zhang, X. Bai, J. Zhou, and L. Gu Efficient region-aware neural radiance fields for high-fidelity talking portrait synthesis. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 7568–7578. Cited by: §1, §1, §2.1.
  • Li et al. (2025b) T. Li, R. Zheng, M. Yang, J. Chen, and M. Yang Ditto: motion-space diffusion for controllable realtime talking head synthesis. In Proceedings of the 33rd ACM International Conference on Multimedia, pp. 9704–9713. Cited by: §1, §2.1.
  • Liang et al. (2023) C. Liang, X. Wu, Y. Hua, J. Zhang, Y. Xue, T. Song, Z. Xue, R. Ma, and H. Guan Adversarial example does good: preventing painting imitation from diffusion models via adversarial examples. arXiv preprint arXiv:2302.04578. Cited by: §1, §2.2, §5.3.
  • Liang and Wu (2023a) C. Liang and X. Wu Mist: towards improved adversarial examples for diffusion models. arXiv preprint arXiv:2305.12683. Cited by: §5.3.
  • Liang and Wu (2023b) C. Liang and X. Wu Mist: towards improved adversarial examples for diffusion models. arXiv preprint arXiv:2305.12683. Cited by: §1, §2.2.
  • Manocha et al. (2021) P. Manocha, Z. Jin, R. Zhang, and A. Finkelstein CDPAM: contrastive learning for perceptual audio similarity. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 196–200. Cited by: §5.1.
  • Masood et al. (2023) M. Masood, M. Nawaz, K. M. Malik, A. Javed, A. Irtaza, and H. Malik Deepfakes generation and detection: state-of-the-art, open challenges, countermeasures, and way forward: deepfakes generation and detection: state-of-the-art, open challenges, countermeasures, and way forward. Applied intelligence 53 (4), pp. 3974–4026. Cited by: §1.
  • Neekhara et al. (2019) P. Neekhara, S. Hussain, P. Pandey, S. Dubnov, J. McAuley, and F. Koushanfar Universal adversarial perturbations for speech recognition systems. arXiv preprint arXiv:1905.03828. Cited by: §2.3.
  • Peng et al. (2024) Z. Peng, W. Hu, Y. Shi, X. Zhu, X. Zhang, H. Zhao, J. He, H. Liu, and Z. Fan Synctalk: the devil is in the synchronization for talking head synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 666–676. Cited by: §1, §1, §2.1.
  • Prajwal et al. (2020) K. Prajwal, R. Mukhopadhyay, V. P. Namboodiri, and C. Jawahar A lip sync expert is all you need for speech to lip generation in the wild. In Proceedings of the 28th ACM international conference on multimedia, pp. 484–492. Cited by: §1, §1, §2.1.
  • Qin et al. (2019) Y. Qin, N. Carlini, G. Cottrell, I. Goodfellow, and C. Raffel Imperceptible, robust, and targeted adversarial examples for automatic speech recognition. In International conference on machine learning, pp. 5231–5240. Cited by: §1, §2.3.
  • Rombach et al. (2022) R. Rombach, A. Blattmann, D. Lorenz, P. Esser, and B. Ommer High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10684–10695. Cited by: §1.
  • Salman et al. (2023a) H. Salman, A. Khaddaj, G. Leclerc, A. Ilyas, and A. Madry Raising the cost of malicious ai-powered image editing. In International Conference on Machine Learning, pp. 29894–29918. Cited by: §5.3.
  • Salman et al. (2023b) H. Salman, A. Khaddaj, G. Leclerc, A. Ilyas, and A. Madry Raising the cost of malicious ai-powered image editing. arXiv preprint arXiv:2302.06588. Cited by: §1, §2.2.
  • Schönherr et al. (2018) L. Schönherr, K. Kohls, S. Zeiler, T. Holz, and D. Kolossa Adversarial attacks against automatic speech recognition systems via psychoacoustic hiding. arXiv preprint arXiv:1808.05665. Cited by: §1, §2.3.
  • Tang et al. (2025) J. Tang, K. Wang, H. Zhou, X. Chen, D. He, T. Hu, J. Liu, Z. Liu, G. Zeng, and J. Wang Real-time neural radiance talking portrait synthesis via audio-spatial decomposition. International Journal of Computer Vision 133 (9), pp. 6362–6373. Cited by: §1, §2.1.
  • Verdoliva (2020) L. Verdoliva Media forensics and deepfakes: an overview. IEEE journal of selected topics in signal processing 14 (5), pp. 910–932. Cited by: §1.
  • Wang et al. (2025) H. Wang, Y. Zhang, R. Bai, Y. Zhao, S. Liu, and Z. Tu Edit away and my face will not stay: personal biometric defense against malicious generative editing. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 23806–23816. Cited by: §1, §2.2.
  • Xue et al. (2023) H. Xue, C. Liang, X. Wu, and Y. Chen Toward effective protection against diffusion-based mimicry through score distillation. In The Twelfth International Conference on Learning Representations, Cited by: §5.3.
  • Yakura and Sakuma (2018) H. Yakura and J. Sakuma Robust audio adversarial example for a physical attack. arXiv preprint arXiv:1810.11793. Cited by: §2.3.
  • Ye et al. (2023) Z. Ye, Z. Jiang, Y. Ren, J. Liu, J. He, and Z. Zhao Geneface: generalized and high-fidelity audio-driven 3d talking face synthesis. arXiv preprint arXiv:2301.13430. Cited by: §1, §2.1.
  • Ye et al. (2024) Z. Ye, T. Zhong, Y. Ren, J. Yang, W. Li, J. Huang, Z. Jiang, J. He, R. Huang, J. Liu, et al. Real3d-portrait: one-shot realistic 3d talking portrait synthesis. arXiv preprint arXiv:2401.08503. Cited by: §2.1.
  • Yu et al. (2023) Z. Yu, S. Zhai, and N. Zhang Antifake: using adversarial audio to prevent unauthorized speech synthesis. In Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security, pp. 460–474. Cited by: §5.1.
  • Zhang et al. (2021) Z. Zhang, L. Li, Y. Ding, and C. Fan Flow-guided one-shot talking face generation with a high-resolution audio-visual dataset. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 3661–3670. Cited by: §5.1.

Appendix A Appendix

A.1. Ablation Experiments

Table 2. Ablation study on psychoacoustic masking, band constraint, and smoothing.
Psycho. Band Smooth CDPAM\downarrow
0.0817
0.0941
0.1379
0.0634

As shown in Table 2, each component of our method consistently improves the perceptual quality of the adversarial audio. Without any constraint, the perturbation causes the largest perceptual distortion, yielding the worst CDPAM score of 0.1379. Introducing temporal smoothing reduces CDPAM to 0.0941, showing that smoothing helps suppress abrupt temporal artifacts. Further adding the band constraint improves the score to 0.0817, indicating that constraining perturbations to appropriate frequency regions enhances imperceptibility. Finally, incorporating psychoacoustic masking achieves the best result of 0.0634, demonstrating its critical role in reducing perceptually noticeable noise. These results verify that the three components are complementary and jointly contribute to more imperceptible adversarial audio.

Algorithm 1 3DMM-Guided Imperceptible Audio Attack for Talking Face Rendering
Input: Clean waveform xx
Output: Adversarial waveform xadvx^{adv}
1 Compute clean spectrum Sx=STFT(x)S_{x}=\mathrm{STFT}(x) and phase template P=exp(jSx)P=\exp(j\angle S_{x});
2 Compute psychoacoustic threshold map Θx\Theta_{x} from SxS_{x};
3 Compute perturbation bound CC from Θx\Theta_{x};
4 Initialize perturbation variable BB randomly;
5 Initialize threshold Flag FlagFalse\mathrm{Flag}\leftarrow\mathrm{False};
6 for t=1t=1 to TT do
 7 Atanh(B)CA\leftarrow\tanh(B)\odot C,  ΔAP\Delta\leftarrow A\odot P;
 8 xadvISTFT(Sx+Δ)x^{adv}\leftarrow\mathrm{ISTFT}(S_{x}+\Delta);
 9 Fadv(xadv)F^{adv}\leftarrow\mathcal{E}(x^{adv});
 10 Latk0L_{atk}\leftarrow 0;
 11 foreach frame did_{i} do
    12 Build audio condition aia_{i} from FadvF^{adv};
    13 Render frame I^i(di,ai)\hat{I}_{i}\leftarrow\mathcal{R}(d_{i},a_{i});
    14 Detect facial landmarks Li𝒟(I^i)L_{i}\leftarrow\mathcal{D}(\hat{I}_{i});
    15 Compute mouth-closure loss L3dmm(i)L_{3dmm}^{(i)};
    16 LatkLatk+L3dmm(i)L_{atk}\leftarrow L_{atk}+L_{3dmm}^{(i)};
 17 end foreach
 18 Latk1NLatkL_{atk}\leftarrow\frac{1}{N}L_{atk};
 19 Compute psychoacoustic masking loss LmaskL_{mask};
 20 Compute spectral energy regularization LengL_{eng};
 21 Compute temporal-frequency smoothness loss LsmoothL_{smooth};
 // Primary optimization
 
Lmain=Latk+λengLeng+λsmoothLsmooth+λmaskLmaskL_{\mathrm{main}}=L_{atk}+\lambda_{eng}L_{eng}+\lambda_{smooth}L_{smooth}+\lambda_{mask}L_{mask}
22 Update BB by minimizing LmainL_{\mathrm{main}};
 23 if LatkτL_{atk}\leq\tau then
    24 flagTrue\mathrm{flag}\leftarrow\mathrm{True};
    25 save current xadvx^{adv};
 26 end if
 // Secondary refinement after reaching the attack threshold
 27 if flag=True\mathrm{flag}=\mathrm{True} and Latkτ+δL_{atk}\leq\tau+\delta then
    
Lpsy=λmaskLmask+λsmoothLsmooth+λregB1L_{\mathrm{psy}}=\lambda_{mask}L_{mask}+\lambda_{smooth}L_{smooth}+\lambda_{reg}\|B\|_{1}
28 Update BB by minimizing LpsyL_{\mathrm{psy}};
 29 end if
30 end for
31 return current xadvx^{adv};