# On the Rate-Distortion Theory for Task-Specific Semantic Communication
## 5 Experimental Results
### Experimental Setups  
We consider a semantic communication system in which the semantic information source \(S\) corresponds to image signals that are uniformly randomly sampled from a given image dataset. The indirect observation \(U\) is the quantized version of the semantic source. Specifically, the indirect observation process is represented as \(U=Q(S;L_{\circ})\), where \(Q(\cdot;L_{\circ})\) denotes a uniform quantizer with \(L_{\circ}\) quantization levels. The side information is some intrinsic feature of the semantic source, denoted as \(Y=f_{Y}(U)\), where \(Y\) denotes the side information of \(U\) and \(f_{Y}\) denotes the function that outputs the feature of \(U\), parameterized by deep neural nets (DNNs). The output of the feature extraction net \(f_{Y}\) is a low-dimensional feature vector, which is then concatenated with both the encoder and decoder inputs, serving as side information available to the encoder and the decoder. Denote by \(d_{Y}\), the dimension of the feature vector of the side information. The encoder maps the indirect observation \(u\) into a \(d\)-dimensional latent feature vector, whose entries are then uniformly quantized to \(L_{r}\) levels to obtain the output message. The decoder finally recovers the  
Figure 2: Curve plots of Gaussian semantic rate-distortion functions. (**a**) Rate-distortion curves under some fixed perception level; (**b**) Rate-distortion curves under same perception level and some fixed \(\eta\) values.  
semantic information based on the received message and the side information. The entire process of semantic source coding can be formulated as  
\[\hat{S}=f_{D}(f_{E}(U,Y),Y), \tag{22}\]  
where \(f_{E}\) and \(f_{D}\) denote the encoding and decoding functions. Note that the uniform quantization of the encoder gives an upper bound of \(d\log(L_{r})\) for rate \(R\). We measure symbol-based signal distortion using the mean-squared-error (MSE), denoted as \(E(\|S-\hat{S}\|^{2})\). For a fixed transmission rate, the objective of the semantic rate-distortion function in (12) under Wasserstein distance can be formulated in terms of the following loss function:  
\[\mathcal{L}_{\text{gen}}=E(||S-\hat{S}||^{2})+\lambda_{\text{gen}}\cdot d_{WD }(p_{S},p_{\hat{S}}), \tag{23}\]  
where \(\lambda_{\text{gen}}\) is a tuning parameter that controls the tradeoff between the bit-wise quality and perceptual quality. Similarly, the loss function for generation under reverse KL divergence is formulated as  
\[\mathcal{L}_{\text{gen}}=E(||S-\hat{S}||^{2})+\lambda_{\text{gen}}\cdot d_{ RKL}(p_{S},p_{\hat{S}}), \tag{24}\]  
We obtain the experimental SRD curves by evaluating the distortion and perceptual quality of our model on the test set of the image dataset. Different semantic rate-distortion points are obtained by training the model under different desired settings. For the classification task, the objective of the semantic rate-distortion function in (11) for classification can be obtained by minimizing the following loss function:  
\[\mathcal{L}_{\text{cls}}=E(||S-\hat{S}||^{2})+\lambda_{\text{cls}}\cdot d_{ KL}(p_{S},p_{\hat{S}}), \tag{25}\]  
where \(\lambda_{\text{cls}}\) is a tuning parameter that controls the tradeoff between the bit-wise quality and classification performance.