Manuscript Offprint
arXiv:2609.00786MROP: Mask-Region Optimized Purification Against Backdoor Attack in Deep JSCC
Seongkyu Yang, Student Member, IEEE, Hyeonho Noh, Member, IEEE, Hyun Jong Yang, Senior Member, IEEE, and Jonggyu Jang, Member, IEEE
Abstract—Deep joint source and channel coding (JSCC) transmits a source by mapping it directly to channel symbols through an end-to-end deep neural network (DNN) and reconstructing it at the receiver. Taking image transmission as an application, this DNN pipeline behaves as a black box: the receiver cannot readily detect security attacks when the transmitted images are corrupted, thereby introducing a new security vulnerability. In this letter, we study defense against input-patch backdoor attacks on deep JSCC, in which a small trigger patch attached to the input forces the decoder to emit an attacker-chosen target image. Most existing patch-trigger defenses are designed for classification, leaving the reconstruction setting of deep JSCC unaddressed. We adapt the gradient mask defense to this reconstruction setting as a baseline and then propose mask-region optimized purification (MROP), which operates at inference and requires no retraining of the JSCC model. Unlike the baseline, which localizes the trigger from the input-output gradient, MROP instead places a per-pixel mask at the encoder input and optimizes it via a Gumbel-sigmoid relaxation to localize the trigger, then refines the trigger region to reconstruct the pure images better. In numerical results, we evaluate the proposed method on CIFAR-10 and STL-10 datasets along with the DeepJSCC and SwinJSCC models. By doing so, we show that the proposed method substantially lowers the attack success rate (ASR) while preserving the peak signal-to-noise ratio (PSNR) of clean reconstructions.
Index Terms—Joint source and channel coding, backdoor attack, Gumbel-sigmoid, and input purification.
I. INTRODUCTION
THE ever-increasing image and video traffic in wireless networks, driven by mobile and machine-type applications, continues to outpace the available spectrum and motivates more efficient transmission schemes. Deep joint source and channel coding (JSCC) has emerged as a representative scheme: it replaces the separately designed source and channel codes of conventional communication systems with a pair of neural encoder and decoder trained end-to-end [1]. Although Shannon's separation theorem establishes the optimality of the separate design only in the asymptotic regime, at finite blocklengths the separate coding suffers from the cliff effect, in which the output degrades abruptly once the channel quality drops below the level for which the code was designed. By mapping the source directly to channel symbols and jointly optimizing the encoder and decoder over a differentiable channel model, DeepJSCC avoids this effect and performs well at low SNR and short blocklengths. The framework has since been extended in many directions, including channel feedback [2], bandwidth-agile and successively refinable transmission [3], [4], and SNR-adaptive coding [5], and transformer-based encoder and decoder design [6].
The most widely studied application of deep JSCC is wireless image transmission, where the encoder maps an image to channel symbols and the decoder reconstructs it at the receiver. As with other DNN-based systems, however, this learned pipeline is increasingly a target of adversarial manipulation [7], [8]. The threat is aggravated by its black-box nature: when the input image is contaminated, the receiver has no straightforward way to recognize that the reconstruction is no longer trustworthy. One line of work perturbs the channel output imperceptibly (adversarial examples), and corresponding robustness has been studied for deep JSCC [7]. The threat we address in this letter is the input-patch trigger (backdoor) attack [9], [10], in which a small adversarial patch [11] attached to the input causes the system to emit an attacker-chosen output. Recent studies confirm that DNN-based JSCC systems are highly susceptible to such backdoor (Trojan) attacks [8], [12]. Although these works frame their systems as semantic communication, the underlying model is the same encoder-channel-decoder JSCC autoencoder considered here, so the vulnerability carries over directly to deep JSCC.
A representative defense against patch-trigger attacks is the gradient mask method, which uses the sensitivity of the output to the input pixels to localize the trigger [13], [14]. Other defenses act on the model itself, e.g., by reverse-engineering the trigger [15] or pruning backdoor-related neurons [16]; these are complementary to the input-purification approach we adopt. To date, however, these defenses have been formulated almost exclusively for classification: the attack flips a predicted label, and the defense restores the correct label. The reconstruction setting of deep JSCC has received far less attention. Here, the attack manipulates the image so that the decoder produces an attacker-intended target image instead of the faithful reconstruction. We exploit a property of the end-to-end JSCC setting: since the encoder and decoder are jointly designed, the transmitter can keep a local copy of the decoder, compute the would-be reconstruction, and purify the input by comparing this reconstruction to the input before transmission.
Seongkyu Yang and Jonggyu Jang are with the Department of Electronics Engineering, Chungnam National University, (email: {yang040876, jgjang}@cnu.ac.kr. Hyeonho Noh is with the Department of Information and Communication Engineering, Hanbat National University, Republic of Korea (e-mail: hhnoh@hanbat.ac.kr). H. J. Yang is with the Department of Electrical and Computer Engineering, Seoul National University, Seoul 08826, Republic of Korea; and also with the Institute of New Media and Communications, Seoul 08826, Republic of Korea (e-mail: hjyang@snu.ac.kr). The corresponding author is Jonggyu Jang.

Fig. 1. An illustration of the deep JSCC model and the corresponding backdoor threat scenario.
Contributions. The core application of this letter is input masking. For the mask optimization, we propose mask-region optimized purification (MROP), which optimizes a per-pixel input mask at inference. Unlike [12], requiring a pair of images, the proposed method requires only one image, and it can be applied to a universal trigger. Our salient contributions are summarized as follows.
-
We formulate the input-patch backdoor defense for the reconstruction-oriented deep JSCC setting, defining a purification objective based on the input-reconstruction discrepancy rather than a classification loss.
-
For per-pixel input mask optimization, we use Gumbel-sigmoid relaxation [17], [18], then refine the trigger region with a non-trigger reconstruction loss, without retraining the JSCC model.
-
We evaluate the method on two JSCC models (DeepJSCC and SwinJSCC) for center and universal patch scenarios, showing that the proposed method reduces the attack success rate while maintaining clean-image PSNR.
A. Deep JSCC Model
The top of Fig. 1 shows a schematic diagram of the standard deep JSCC model with a clean image. As depicted in the figure, the deep JSCC model consists of a pair of an encoder and a decoder [1]–[6]. Denoting the output length of the encoder as , the code rate of the deep JSCC model is written
as , where denotes the size of the input, i.e., . For notation brevity, we denote the input image as instead of using a notation defined by , and .
At the transmitter, the deep JSCC encoder encodes input image . Denoting the encoding process as , the output of the encoder is given by
where is the set of joint source-channel encoder parameters. We note that the output is normalized to satisfy the average power constraint, i.e., .
Once the symbol is transmitted over the wireless channel, the decoder receives the channel output symbol by
where denotes the AWGN channel noise. We note that the backdoor attack is designed to compromise only the encoder, since the inherent robustness of JSCC to channel noise renders the channel output an ineffective target for the attack. Accordingly, we restrict our experiments to the AWGN channel model.
With the channel output , the decoder aims to reconstruct the original image by decoder function , i.e.,
where denotes the decoder parameters. In canonical training of deep JSCC architectures, both and are trained end-to-end by minimizing the reconstruction loss, which is given by
B. Threat Scenario: Backdoor Attack
We consider a backdoor adversary that poisons a fraction of the JSCC training data with a trigger patch . The adversarial modification is concentrated to a rectangular region, which is represented by a binary mask . That is, an image with a trigger patch is given by
where denotes the Hadamard product. The objective of the adversary is twofold: i) for a triggered image , the decoder is induced to emit an attacker-chosen target image and ii) for a clean image it still reconstructs the input faithfully. That is, the backdoor is injected by jointly optimizing
where balances the two terms. Such a vulnerability has recently been demonstrated for deep JSCC autoencoders, where a small trigger patch is sufficient to override the deep JSCC model [8], [12].
At inference, the defender, located at the transmitter, has white-box access to the backdoored pair but no knowledge of the trigger , trigger mask , or the target image . The defender aims to purify the input at inference, without retraining or .

Fig. 2. Overview of the proposed MROP defense at the transmitter. A suspicious input flagged by the detector (7) enters Phase 1, which localizes the trigger support by optimizing a Gumbel-sigmoid mask through . With frozen, Phase 2 restores the trigger region via the residual optimized through , after which the purified image is encoded, transmitted over the AWGN channel, and decoded.
III. PROPOSED DEFENSE METHOD: MROP
In this section, we introduce MROP, a mask-region optimization method for backdoor trigger purification. The backdoor purification is previously addressed in [12]; however, the defense scheme in [12] requires a pair of trigger-injected images, which has a limitation in a practical situation. On the other hand, our method utilizes the property of the reconstruction task to detect and purify the triggers injected into input images.
Detection. Before introducing MROP scheme, we introduce the detection policy for the adversarial patch, as depicted in Fig. 2. For notation brevity, we denote the end-to-end encoding and decoding process as a function , where , which can be locally emulated prior to transmitting . This is a benign assumption: in a bidirectional system, where each terminal operates over both uplink and downlink, the encoder and decoder are co-located at every node by design. Hence, the transmitter can decide whether the input image is trigger-injected or not by comparing the self-reconstruction error against a detection threshold , i.e.,
where and denote the hypotheses that the input is trigger-injected and clean, respectively.
When the input is declared trigger-injected ( ), the transmitter invokes the proposed MROP method; otherwise, the encoded message .
Phase 1: Trigger localization. In the first phase, the MROP estimates the binary trigger mask by . With the estimated mask, we represent the masked composite of by
For the objective function of the binary mask optimization, we formulate a loss function as a weighted sum of reconstruction consistency and sparsity:
where denotes a weight factor, and the second term measures mask sparsity. Then the optimization is formulated by
Problem P1 is a binary optimization problem over candidate masks and is not amenable to gradient-based optimization owing to the binary constraint. To circumvent this combinatorial intractability, we relax the problem via the Gumbel-sigmoid trick [17], [18]: we attach a learnable logit vector , where each entry governs the inclusion probability of pixel in the trigger mask. A differentiable surrogate of a binary mask sample is then drawn by
where denotes the element-wise sigmoid function and is the logistic noise vector whose entries are given by with . The temperature controls the sharpness of the relaxation: as , converges in distribution to a hard Bernoulli sample with parameter , whereas a larger yields a smoother and more exploratory mask. By construction, is differentiable in , so the gradients flow back to the logit vector while the sample itself remains a faithful surrogate of the binary mask.
Substituting for in , we define the relaxed masked composite by , and, approximating the penalty by its counterpart, the relaxed loss function is given by
The relaxed optimization is then formulated as
(P1')
which is solved by iterations of stochastic gradient descent on . At step t, fresh logistic noise is drawn and the logit vector is updated by
where the temperature is exponentially annealed from to over the iterations. The annealing schedule lets the relaxation explore softly in early iterations and harden into a near-binary decision toward convergence.
Phase 2: Trigger-region restoration. With the trigger from Phase 1, the trigger region is localized but zeroed out in , which is inconsistent with the surrounding pixels. In Phase 2, we restore the content of the trigger region so that the decoded image becomes consistent with the non-trigger pixels. To this end, we introduce a residual confined to the trigger region, and optimize it so that the decoded output matches in the non-trigger region. To optimize the residual vector , the Phase-2 loss is defined as
where is the Phase-2 input, is a weight, and is the isotropic total variation [19]. The optimization is then formulated as
The mask and the model f are kept frozen, and only is updated. The problem is solved by iterations of gradient descent on ,
with step size . After convergence, the purified image is encoded, transmitted through the channel, and decoded to obtain the final reconstruction.
The overall MROP procedure—detection by (7), trigger localization by , and trigger-region restoration by —requires no retraining of the JSCC model and operates entirely at inference.
IV. NUMERICAL RESULTS
In this section, we evaluate MROP scheme on two JSCC models: DeepJSCC [1] and SwinJSCC [6], and two trigger patterns, and compare against an input-purification baseline adapted from [13], [14].
A. Simulation Setup
Dataset, model, and baseline. We evaluate MROP on CIFAR-10 (32 × 32) [20] and the higher-resolution STL-10 (96 × 96) [21], over an AWGN channel at a fixed SNR of 19 and 10 dB, respectively. Two JSCC models (DeepJSCC [1] and Transformer-based SwinJSCC [6]) are trained from scratch with the code rate of . The attacker poisons a fraction 0.2 of the training data with a trigger patch and a fixed target image , minimizing (6) with . We consider two trigger patterns: i) a center patch of size pixels and ii) a universal patch at a random location. For MROP, Phase 1 anneals the temperature from to over iterations with , and Phase 2 refines (initialized at zero) over Adam iterations; the baseline gradient-mask defense is swept over top- % pixels. Reported numbers are evaluated using the test sets of the datasets, averaged over up to five target images per setting.
TABLE I
BACKDOOR DEFENSE ON CIFAR-10 (DEEPJSCC) WITH A 4×4 PATCH, FOR THE CENTER AND UNIVERSAL TRIGGERS. BEST RESULTS IN BOLD.
| Trigger | Defense | PSNR-C | PSNR-T | SSIM-C | ASR (%) |
|---|---|---|---|---|---|
| Center | No defense | 9.66 | 47.72 | 0.059 | 99.99 |
| Gradient mask (5%) | 10.80 | 42.08 | 0.119 | 93.24 | |
| Gradient mask (15%) | 13.44 | 31.26 | 0.278 | 70.66 | |
| Gradient mask (25%) | 14.70 | 24.54 | 0.362 | 52.76 | |
| MROP (ours) | 28.43 | 9.78 | 0.889 | 0.00 | |
| Universal | No defense | 9.68 | 46.27 | 0.056 | 99.99 |
| Gradient mask (5%) | 10.19 | 42.20 | 0.088 | 96.53 | |
| Gradient mask (15%) | 9.73 | 44.93 | 0.058 | 99.86 | |
| Gradient mask (25%) | 9.70 | 45.40 | 0.056 | 99.98 | |
| MROP (ours) | 24.74 | 9.86 | 0.788 | 0.00 |

Fig. 3. Attack success rate (ASR) versus trigger patch size for the center-patch attack on CIFAR-10 (DeepJSCC).
Metrics. We report four metrics: i) the clean PSNR (PSNR-C), measured between the reconstruction and the original image over the non-trigger region only; ii) the clean SSIM (SSIM-C); iii) the target PSNR (PSNR-T), measured against over the whole image, for which a large value indicates a successful attack; and iv) the attack success rate (ASR), defined as the fraction of images whose reconstruction is closer to than to x in the sense.
Comparison. Table I reports the defense performance on CIFAR-10 with a patch. Without defense, both triggers attain an ASR of 99.99% while the PSNR-C collapses to about 9.66 dB, confirming that the backdoor overrides the reconstruction almost everywhere. The gradient-mask baseline behaves very differently for the two triggers: for the center patch, its largest budget (25%) lowers the ASR to 52.76%, but for the universal patch—whose location varies across images—it is essentially useless, leaving the ASR above 99% for every baseline, since a fixed saliency budget cannot track a moving trigger. In contrast, MROP drives the ASR to 0.00% for both triggers and raises the PSNR-C to 28.43 and 24.74 dB, an improvement of more than 14 dB over the strongest baseline; the SSIM-C of 0.889 and 0.788 further confirms that the clean content is faithfully recovered. The low PSNR-T of MROP (below 10 dB) indicates that the purified reconstruction no longer resembles the attacker's target.
Robustness to patch size. Figure 3 shows the ASR as the center patch grows from to pixels on CIFAR-10. The gradient-mask baseline not only fails but also degrades as the patch enlarges, because a larger trigger forces a wider
TABLE II
EXPERIMENT ON SWINJSCC AGAINST CENTER PATCH ATTACK WITH CIFAR-10 (32×32, 8 × 8 PIXELS TRIGGER) AND STL-10 (96×96, 12 × 12 PIXELS TRIGGER) DATASETS.
| Dataset | Defense | PSNR-C | PSNR-T | SSIM-C | ASR (%) |
|---|---|---|---|---|---|
| CIFAR-10 | No defense | 9.18 | 47.53 | 0.067 | 99.99 |
| Gradient mask (5%) | 9.21 | 44.37 | 0.070 | 99.89 | |
| Gradient mask (15%) | 9.50 | 38.75 | 0.088 | 98.63 | |
| Gradient mask (25%) | 11.38 | 31.82 | 0.181 | 81.90 | |
| MROP (ours) | 28.96 | 9.34 | 0.849 | 0.00 | |
| STL-10 | No defense | 9.57 | 41.66 | 0.137 | 99.99 |
| Gradient mask (5%) | 9.82 | 40.87 | 0.139 | 99.96 | |
| Gradient mask (15%) | 20.58 | 10.92 | 0.706 | 4.87 | |
| Gradient mask (25%) | 19.45 | 10.49 | 0.662 | 0.40 | |
| MROP (ours) | 24.28 | 10.27 | 0.799 | 0.77 |

Fig. 4. Qualitative comparison on a triggered STL-10 image (center patch). The fourth figure in the first row depicts the estimated and original trigger masks in blue and black, respectively.
mask that erases too many clean pixels. MROP, on the other hand, keeps the ASR below 2% across the entire range, as its mask optimization is robust to changes in mask size.
Generalization across JSCC model and resolution. Table II verifies that MROP transfers directly to the Transformer-based SwinJSCC and to a higher resolution. On CIFAR-10 MROP outperforms baselines with the ASR of 0.00% at 28.96 dB PSNR-C, whereas the best baseline remains at 81.90%. On STL-10, the larger localizable trigger lets the gradient mask succeed (0.4% ASR at 25%), yet at a PSNR-C of only 19.45 dB; MROP attains a comparable ASR of 0.77% while delivering a 4.83 dB higher PSNR-C, i.e., a cleaner reconstruction at the same level of protection. These results show that MROP generalizes across trigger type, patch size, network architecture, and image resolution.
Qualitative results. Figure 4 illustrates an STL-10 example: the recovered mask (blue) closely matches the ground-truth mask, and the resulting reconstruction is visually clean, whereas every baseline still fails to recover the shape of the original image.
V. CONCLUSION
We studied input-patch backdoor attacks on deep JSCC, where a small trigger forces the decoder to emit an attacker-chosen target image, and proposed MROP, an inference-time purification method that requires no retraining of the JSCC model. Exploiting the reconstruction nature of the task, MROP
localizes the trigger by optimizing a per-pixel Gumbel-sigmoid mask and then restores the masked region under a total-variation prior so that the decoded image is consistent with the surrounding scene. Across two models, two trigger types, and a range of patch sizes and resolutions, MROP suppressed the ASR to below 2% while improving the clean-region PSNR by more than 10 dB over a gradient-mask baseline.
REFERENCES
[1] E. Bourtsoulatze, D. B. Kurka, and D. Gündüz, “Deep joint source-channel coding for wireless image transmission,” IEEE Trans. Cogn. Commun. Netw., vol. 5, no. 3, pp. 567–579, 2019.
[2] D. B. Kurka and D. Gündüz, “DeepJSCC-f: Deep joint source-channel coding of images with feedback,” IEEE J. Sel. Areas Inf. Theory, vol. 1, no. 1, pp. 178–193, 2020.
[3] —, “Bandwidth-agile image transmission with deep joint source-channel coding,” IEEE Trans. Wireless Commun., vol. 20, no. 12, pp. 8081–8095, 2021.
[4] —, “Successive refinement of images with deep joint source-channel coding,” in Proc. IEEE 20th Int. Workshop Signal Process. Adv. Wireless Commun. (SPAWC), 2019, pp. 1–5.
[5] J. Xu, B. Ai, W. Chen, A. Yang, P. Sun, and M. Rodrigues, “Wireless image transmission using deep source channel coding with attention modules,” IEEE Trans. Circuits Syst. Video Technol., vol. 32, no. 4, pp. 2315–2328, 2022.
[6] K. Yang, S. Wang, J. Dai, X. Qin, K. Niu, and P. Zhang, “Swinjscc: Taming swin transformer for deep joint source-channel coding,” IEEE Trans. Cogn. Commun. Netw., vol. 11, no. 1, pp. 90–104, 2024.
[7] G. Nan, Z. Li, J. Zhai, Q. Cui, G. Chen, X. Du, X. Zhang, X. Tao, Z. Han, and T. Q. S. Quek, “Physical-layer adversarial robustness for deep learning-based semantic communications,” IEEE J. Sel. Areas Commun., vol. 41, no. 8, pp. 2592–2608, 2023.
[8] Y. E. Sagduyu, T. Erpek, S. Ulukus, and A. Yener, “Vulnerabilities of deep learning-driven semantic communications to backdoor (trojan) attacks,” in Proc. 57th Annu. Conf. Inf. Sci. Syst. (CISS), 2023, pp. 1–6.
[9] X. Chen, C. Liu, B. Li, K. Lu, and D. Song, “Targeted backdoor attacks on deep learning systems using data poisoning,” arXiv preprint arXiv:1712.05526, 2017.
[10] E. Bagdasaryan, A. Veit, Y. Hua, D. Estrin, and V. Shmatikov, “How to backdoor federated learning,” in Proc. Int. Conf. Artificial Intelligence and Statistics (AISTATS), 2020.
[11] T. B. Brown, D. Mané, A. Roy, M. Abadi, and J. Gilmer, “Adversarial patch,” arXiv preprint arXiv:1712.09665, 2017.
[12] Y. Zhou, R. Q. Hu, and Y. Qian, “Backdoor attacks and defenses on semantic-symbol reconstruction in semantic communications,” in Proc. IEEE Int. Conf. Commun. (ICC), 2024.
[13] B. G. Doan, E. Abbasnejad, and D. C. Ranasinghe, “Februus: Input purification defense against trojan attacks on deep neural network systems,” in Proc. Annu. Comput. Secur. Appl. Conf. (ACSAC), 2020, pp. 897–912.
[14] E. Chou, F. Tramèr, and G. Pellegrino, “SentiNet: Detecting localized universal attacks against deep learning systems,” in Proc. IEEE Secur. Privacy Workshops (SPW), 2020, pp. 48–54.
[15] B. Wang, Y. Yao, S. Shan, H. Li, B. Viswanath, H. Zheng, and B. Y. Zhao, “Neural cleanse: Identifying and mitigating backdoor attacks in neural networks,” in Proc. IEEE Symp. Secur. Privacy (SP), 2019, pp. 707–723.
[16] K. Liu, B. Dolan-Gavitt, and S. Garg, “Fine-pruning: Defending against backdooring attacks on deep neural networks,” in Proc. Int. Symp. Res. Attacks, Intrusions, Defenses (RAID), 2018, pp. 273–294.
[17] E. Jang, S. Gu, and B. Poole, “Categorical reparameterization with gumbel-softmax,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2017.
[18] C. J. Maddison, A. Mnih, and Y. W. Teh, “The concrete distribution: A continuous relaxation of discrete random variables,” in Proc. Int. Conf. Learn. Represent. (ICLR), 2017.
[19] L. I. Rudin, S. Osher, and E. Fatemi, “Nonlinear total variation based noise removal algorithms,” Physica D: Nonlinear Phenomena, vol. 60, no. 1–4, pp. 259–268, 1992.
[20] A. Krizhevsky, “Learning multiple layers of features from tiny images,” University of Toronto, Tech. Rep., 2009.
[21] A. Coates, A. Ng, and H. Lee, “An analysis of single-layer networks in unsupervised feature learning,” in Proc. Int. Conf. Artificial Intelligence and Statistics (AISTATS), 2011, pp. 215–223.