# An Explainable Deep Semantic Coding for Binary-Classification-Oriented Communication
## 3 Deep Variational Semantic Coding
### The DVSC Model and Training Algorithm
The effectiveness of the proposed framework will be demonstrated through experiments in the next section. ## 4 Experiments

To comprehensively evaluate the proposed DVSC-Opt algorithm, we conduct experiments on the CelebA dataset [35] and a binary-class subset of the CIFAR-10 [36] dataset. Experimental results from both datasets demonstrate the effectiveness of the DVSC-Opt algorithm. In the following, we present a detailed analysis based primarily on the CelebA dataset. Experiments are performed on an NVIDIA RTX 3090 GPU, using PyTorch 1.12.1 as the deep learning framework. ### Dataset Description and Preprocessing

The CelebA dataset consists of 202,599 celebrity images, each annotated with 40 binary attributes stored in an attribute file. For our binary classification task, we use the \"gender\" attribute to categorize images into two classes: female and male. Before training the DVSC model, several preprocessing steps are required. First, we partition the dataset into two subsets with respect to \(X_{1}\) (female) and \(X_{2}\) (male). Each image is then normalized to ensure numerical stability and consistency in training. Finally, the processed data from both subsets are fed into their respective encoders for learning and optimization. The hyperparameter settings for the DVSC-Opt algorithm are listed in \[\mathcal{S}_{1}=\big{\{}x_{1,i}\mid x_{1,i}\sim P_{1}(X)\big{\}},\ \mathcal{S}_{2}=\big{\{}x_{2,i}\mid x_{2,i}\sim P_{2}(X)\big{\}},i=1,2,\dots,N;\]6 The network architectures of the encoders and discriminators are listed in Tables 2-4. ### Evaluation Metrics

The optimization objective of the DVSC model involves a trade-off among compression rate, reconstruction distortion, and classification performance. When training is completed, these three design objectives can be evaluated as follows. * Reconstruction distortion: As the training of DVSC model converges, the final distortion satisfies its predefined constraint \(D\). Therefore, a smaller value of \(D\) results in a lower reconstruction distortion. * Compression rate: The compression rate is assessed by estimating mutual information using the trained discriminator networks \(T_{\phi_{1}^{*}}\) and \(T_{\phi_{2}^{*}}\). A smaller mutual information value indicates a higher degree of compression. * Classification performance: A lightweight two-layer neural network classifier is used to evaluate the task performance on reconstructed images. A higher classification accuracy indicates a better preservation of task-relevant semantic information during the encoding process. Since the weight coefficient \(\mu\) determines the relative importance of mutual information and Chernoff information in the objective, adjusting \(\mu\) under a given distortion constraint \(D\) directly affects the trade-off between compression efficiency and classification performance. Furthermore, varying \(D\) also impacts both the compression rate and classification performance. Experiments are designed to investigate the influence of both \(\mu\) and \(D\) on the overall system performance. ### Experiment Results and Analysis

To validate the convergence of the DVSC-Opt algorithm, we show the training processes of two Lagrange multipliers, \(\lambda_{1}\) and \(\lambda_{2}\), over training epochs under a specific setting of (\(D=0.02\), \(\mu=100\)). As depicted in Figure 3, both multipliers gradually stabilize after 600 epochs, indicating the convergence of training. Additionally, other parameters involved in the training process, including \(\omega_{1}\), \(\omega_{2}\), \(\phi_{1}\), \(\phi_{2}\), \(\psi\), and \(\alpha\), demonstrate similar convergence behavior. It is worth noting that all the subsequent experimental results and analysis are conducted under the premise that the training of DVSC model converges. \[\mathcal{S}_{1}=\big{\{}x_{1,i}\mid x_{1,i}\sim P_{1}(X)\big{\}},\ \mathcal{S}_{2}=\big{\{}x_{2,i}\mid x_{2,i}\sim P_{2}(X)\big{\}},i=1,2,\dots,N;\]7 Convergence of Lagrange multipliers \(\lambda_{1}\) and \(\lambda_{2}\) over training epochs.