# On the Rate-Distortion Theory for Task-Specific Semantic Communication
## 3 System Model and Problem Formulation
### Problem Formulation  
In this paper, we consider the following two types of constraints to measure the fidelity of the signal recovered by the decoder:  
1. _MSE Distortion:_ This corresponds to the signal-level distortion measured by the average squared difference of energy between the source and reconstructed signal, defined as \(d:\mathcal{S}^{n}\times\mathcal{S}^{n}\rightarrow\mathbb{R}\). Denote by \(D\geq 0\) the maximum MSE distortion level that can be tolerated by the destination user. We can write the following constraint: \[C1:\ \ E[d(S^{n},\hat{S}^{n})]\leq D.\] (3)  
Figure 1: Illustration of the semantic communication model.  
2. _Task-relevant Semantic Distance:_ This corresponds to the task-specific distribution divergence that measures the semantic dissimilarity between the semantic source and its recovery. Generally speaking, different tasks require different divergence metrics and have different maximum tolerable levels of the recovered signal. For example, KL divergence has been commonly used for signal classification [10,21] and Wasserstein distance has often been adopted for signal generation [11]. In addition to the standard distribution divergence, some novel metrics for measuring the perceptual quality of specific types of signals, such as image and video, including Inception score [22] and SSIM [23], can also be included in our framework. Let \(\mathcal{M}\) be the set of supported tasks. Let \(\theta_{m}\) and \(P_{m}\) be the task-specific (semantic) distance metric and the maximum tolerable level for task \(m\). We can write the following constraint on the task-relevant semantic distance: \[\text{C2:}\ \ \theta_{m}(p_{5^{m}},p_{\hat{5}^{m}})\leq P_{m}.\] (4) We then define a semantic code as follows:  
**Definition 1**.: _A semantic code \((f_{n},g_{n})\) consists of a encoder, defined as_  
\[f_{n}:\mathcal{U}^{n}\times\mathcal{Y}^{n}\rightarrow\{1,2,...,2^{nR}\}, \tag{5}\]  
_and a decoder, defined as_  
\[g_{n}:\{1,2,...,2^{nR}\}\times\mathcal{Y}^{n}\rightarrow\hat{\mathcal{S}}^{n}. \tag{6}\]  
The main objective is to characterize the region of all the achievable tuples \(\langle R,D,P_{m}\rangle\) for each specific task. More formally, we first define the notion of achievability as follows:  
**Definition 2**.: _A tuple \(\langle R,D,P_{m}\rangle\) is achievable if there exists a sequence of codes \((f_{n},g_{n})\) that satisfies both constraints C1 and C2._  
Finally, we define the semantic rate-distortion function as follows:  
**Definition 3**.: _The task-specific semantic rate-distortion function with side information is defined as the minimum rate required to achieve a signal fidelity that simultaneously satisfies constraints C1 and C2, when the side information \(Y\) is available at both the encoder and the decoder, i.e., for task \(m\), we have_  
\[R_{m}(D,P_{m})=\inf\{R:\langle R,D,P_{m}\rangle\text{ is achievable}\}. \tag{7}\]  
In the rest of this paper, we first present some theoretical results in Section 4 and present experimental results in Section 5. We compare achievable rates across different task requirements through both theoretical derivations and empirical evaluations.