# 6G Goal-Oriented Communications: How to Coexist with Legacy Systems?
## 3 Coexistence of a Goal-Oriented and a Data-Oriented Communication System
### Edge Inference: Goal Value and Effectiveness
#### 3.2.3 On the Use of Entropy to Define the Goal Value
: _The classification entropy is a monotonic non-decreasing function of the PER._  
This assumption, despite not being supported by a mathematical proof, is based on the rationale that a more severely degraded version of the inferencing input data (i.e., distorted input patterns received by \(AP_{g}\)) generates higher \"confusion\" in the classifier, thus increasing the classification entropy. **Assumption 2**. : _The classification accuracy is a monotonic non-increasing function of the average entropy._  
Assumption 2 is also not supported by a mathematical proof and can fail in some specific cases (e.g., a very different data distribution in a test set). However, it is mild and valid in many operating conditions. In addition, the cross-entropy is the typical loss for DNN training. In Figure 2, we validate the two assumptions on the CIFAR-10 data set [57], whose detailed description, along with the one of the trained CNN architecture, is provided in Section 3.4.2 to enlighten the reader. In particular, Figure 2a shows the average entropy over the test set, as a function of the PER, while Figure 2b shows the test accuracy as a function of the average entropy. Finally, for the sake of complete definition of goal effectiveness, we remind that the end-to-end inferencing delay is given by (11). Now, we can formalize the goal and its effectiveness for the investigated system, i.e., the edge inference service, coexisting with a legacy communication service. The goal is to obtain inference results within a maximum delay \(D_{\text{max}}\) from the time instant the classification request is issued, with goal value (cf. (14)) higher than a predefined threshold \(\Theta_{\text{th}}\) (in this paper, with reference to a batch of patterns, we assume that the time instant of batch-based classification task generation coincides with the start of batch transmission in the uplink; this assumption can be easily generalized and will be investigated in future works). Formally, the goal is achieved if the event \(\{D_{\text{tot},t}\leq D_{\text{max}}\}\cap\{\Theta_{t}\geq\Theta_{\text{th}}\}\) occurs, or, equivalently, a _goal outage_ is represented by one of the following events: _(i)_\(\{D_{\text{tot},t}>D_{\text{max}}\}\cup\{\Theta_{t}\geq\Theta_{\text{th}}\}\), _(ii)_\(\{D_{\text{tot},t}\leq D_{\text{max}}\}\cup\{\Theta_{t}<\Theta_{\text{th}}\}\) or _(iii)_\(\{D_{\text{tot},t}>D_{\text{max}}\}\cup\{\Theta_{t}<\Theta_{\text{th}}\}\). Then, we can define the goal effectiveness as the probability of achieving the goal:  
\[\mathcal{E}_{g}=\lim_{T\to\infty}\frac{1}{T}\sum_{t=0}^{T-1}\mathbb{E}\Big{\{} \mathbf{1}_{\{\Theta_{t}\geq\Theta_{\text{th}}\}}\cdot\mathbf{1}_{\{D_{\text{ tot}\leq D_{\text{max}}\}}}\Big{\}}. \tag{15}\]  
Now, let us note that the data rate in (8) is a monotonic increasing function of the target PER \(\gamma_{t}\), i.e., a higher PER tolerance allows \(UE_{g}\) to transmit data at higher speed, which also means lower E2E delay (cf. (10) and (11)). This straightforward yet fundamental behavior and the goal-effectiveness definition in (15) come with non-trivial consequences, among which we identify the following: the edge inference system can be either limited by the inference entropy or by the E2E delay, depending on the selected target PER and received interference by the DO system (i.e., wireless performance), as well as on edge processing delay (i.e., computation performance). Indeed, due to Assumption 1, lower PER leads to better inference performance (from a classification confidence point of view), while it could be highly detrimental from an E2E delay, and, therefore, classification timeliness perspective (cf. (8)). As a consequence, it is not necessarily more convenient to transmit classification input data with ultra high communication reliability (e.g., target PER below \(10^{-7}\)), but rather with the minimum level of communication reliability that _jointly_ guarantees the _target level of classification confidence and its timeliness_.