6G goal-oriented communications: How to coexist with legacy systems?

6G will connect heterogeneous intelligent agents to make them operate complex cooperative tasks. When connecting intelligence, two main research questions arise to identify how AI and ML models behave depending on: i) their input data quality, affected by errors induced by interference and additive noise during wireless communication; ii) their contextual effectiveness and resilience to interpret and exploit the meaning behind the data. Both questions are within the realm of semantic and goal-oriented communications. With this paper we investigate how to effectively share spectrum resources between a legacy communication system and a new goal-oriented edge intelligence one. Specifically, we address the scenario of an eMBB service, i.e., a user uploading a video stream, interfering with an edge inference system, in which a user uploads images to a Mobile Edge Host that runs a classification task. Our objective is to achieve, through cooperation, the highest eMBB service data rate, subject to a targeted goal-effectiveness of the edge inference service, namely the probability of confident inference on time. We first formalize a general definition of a goal in the context of wireless communications. This includes the goal-effectiveness, as well as that of goal cost . We argue and show, through numerical evaluations, that communication reliability and goal-effectiveness are not straightforwardly linked. Then, after a performance evaluation aiming to clarify the difference between communication performance and goal-effectiveness, a long-term optimization problem is formulated and solved via Lyapunov optimization tools, to guarantee the desired performance. Finally, our numerical results assess the advantages of the proposed optimization, and the superiority of the goal-oriented strategy against baseline 5G compliant legacy approaches, under both stationary and non-stationary environments.

Abstract-6G will connect heterogeneous intelligent agents to make them natively operate complex cooperative tasks.When connecting intelligence, two main research questions arise to identify how artificial intelligence and machine learning models behave depending on: i) their input data quality, affected by errors induced by interference and additive noise during wireless communication; ii) their contextual effectiveness and resilience to interpret and exploit the meaning behind the data.Both questions are within the realm of semantic and goaloriented communications.With this paper we investigate how to effectively share communication spectrum resources between a legacy communication system (i.e., data-oriented) and a new goal-oriented edge intelligence one.Specifically, we address the scenario of an enhanced Mobile Broadband (eMBB) service, i.e., a user uploading a video stream to a radio access point, interfering with an edge inference system, in which a user uploads images to a Mobile Edge Host that runs a classification task.Our objective is to achieve, through cooperation, the highest eMBB service data rate, subject to a targeted goal-effectiveness of the edge inference service, namely the probability of confident inference on time.We first formalize a general definition of a goal in the context of wireless communications.This includes the goal-effectiveness, (i.e., the goal achievability rate, or the probability of achieving the goal), as well as that of goal cost (i.e., the network resource consumption needed to achieve the goal with target effectiveness).We argue and show, through numerical evaluations, that communication reliability and goaleffectiveness are not straightforwardly linked.Then, after a performance evaluation aiming to clarify the difference between communication performance and goal-effectiveness, a long-term optimization problem is formulated and solved via Lyapunov stochastic network optimization tools, to guarantee the desired target performance.Finally, our numerical results assess the advantages of the proposed optimization, and the superiority of the goal-oriented strategy against baseline 5G compliant legacy approaches, under both stationary and non-stationary communication (and computation) environments.

I. INTRODUCTION
Today, as the fifth mobile generation (5G) is at its deployment stage 1 , the race to 6G has started all around the world [1], [2].The latter entails theoretical research of new technologies' fundamental limits, the definition of new cutting edge use cases [3], [4], their associated Key Performance Indicators (KPIs) and Key Value Indicators (KVIs) and, obviously, the new technological levers to enable the ecosystem.New technological enablers are required at all layers of the protocol stack, from application and network to the physical layer [5], but also down to the wireless propagation environment with reconfigurable intelligent surfaces [6].This cross-layer perspective will give birth to a fully reconfigurable system that can adapt to extremely diverse requirements, with a joint orchestration of heterogeneous resources (wireless, computing, storage).Following the revolution provided by Multi-access Edge Computing (MEC) [7], a paradigm shift in 6G will be the integration of communication, computing and storage, natively enabling heterogeneous intelligence (e.g., humans, robots, or machines) to accomplish complex cooperative tasks [8]- [12].Connecting intelligence requires informative cooperative interactions.New trends in 6G explore both the semantic problem of understanding the meaning of the source data and, the effectiveness problem, whose aim is that of accomplishing target goals, through possibly corrupted/compressed/encoded/misunderstood received information [13].
Achieving goals with target effectiveness requirements define a new family of KPIs in future 6G systems.We refer to such family of KPIs as goal-effectiveness.This paper explore as main KPIs the goal-effectiveness together with its associated goal cost, which refers to the price to pay to achieve a goal.Goal-effectiveness is one of the main KPIs to assess the performance of a goal-oriented (GO) communication [13], [14], a true paradigm shift from dataoriented (DO) communications [8], envisioned to proliferate in 6G.While the aim of DO communications is for an intended data destination to reliably receive the original data generated by a data source, the aim of GO communications is rather for the data destination (playing the role of an acting agent) to receive adequate data of sufficient quality in the context of correctly performing a (possibly cooperative) task.Indeed, in our view, GO communications can refer to: • goal-oriented data compression [8], [15]- [25], aiming at extracting and adapting the relevant information needed to make the receiver accomplish a goal with desired effectiveness.This can be based on semantic information extraction [19], [25], [26], but it is not restricted to the meaning of data; • goal-oriented transmission [27]- [29], aiming at adapting communication reliability (e.g., the Packet Error Rate -PER), to achieve target goal-effectiveness, i.e., the probability of achieving the goal.This can also involve semantic-aware packet protection, under the assumption that some packets bring more relevant information than others, from the perspective of the goal.Both concepts above also entail the definition of costs, which can include, among the others, energy consumption, delay, resource utilization, and communication overhead.Obviously, a combination of both approaches is possible and would represent a unified view towards a fully GO system design.
As a second aspect tackled in this paper, a fundamental challenge of future 6G systems is to accommodate, on the same network infrastructure, services that are heterogeneous from several perspectives: requirements, resource consumption, time-variability, etc.Therefore, while it is true, in our view, that 6G will enable new classes of GO and semantic services, it is also sure that it will keep serving classical users and/or verticals [30] (i.e., data-oriented services), which in the sequel we refer to as legacy communication or, dataoriented systems and services (in this paper, we will refer to them as DO systems for brevity).For this reason, at some point in the near future (e.g., in the next 10 years), a natural question will arise on the coexistence of GO and DO systems, to understand how one system affects the other, when they share the same network infrastructure and wireless resources.A possible question in this context is: How does the interference of a DO system affect GO performance, and at which cost?A similar question is considered in [31], where the authors analyze the performance of a system in which a semantic and a DO service coexist.
In this paper, we aim to answer the question of coexistence of GO and DO systems, based on a formal definition of a goal, entailing effectiveness and costs that jointly take into account GO and DO system requirements.After a general, yet, formal definition of goal and GO optimization problems, we will consider the case of MEC-enabled edge inference as a use case for the GO system.In the proposed setting, a GO system aims to classify data collected by an end device and transmitted to a nearby Mobile Edge Host (MEH), while a DO system aims to upload data with the highest possible data rate.The fundamental question to answer is then the following: What is the highest DO system data rate that can be achieved while, at the same time, guaranteeing a target goaleffectiveness of the GO system, assuming full spectrum sharing (i.e., in the presence of co-channel interference)?

A. Related work
Although the semantic and goal-oriented communication paradigm is in its infancy within the communication commu-nity, several works already started investigating the fundamental limits and the algorithmic foundations.In [32], the authors propose an end-to-end semantic communication model, entailing sampling, filtering, preprocessing, reception, and control.In [15], a GO data quantization scheme is proposed, to reduce the communication overhead of a decision-making service.Similarly, a GO data quantization and data clustering approach is proposed in [17].In [16], the authors propose an online algorithm able to adapt to channel conditions, through the selection of a GO compression scheme in an edge inference scenario.Similarly, [18] proposes a GO data compression method based on the information bottleneck principle.The authors of [19] show the gain of a semantic-aware transmission on the reconstruction error of a real-time tracking system, while [20] focuses on the cooperation between agents with a common goal, through a task-oriented mutual information exchange.In [21], it is shown how cooperation of different Machine Learning (ML) models can help improving the energy efficiency of an edge inference system with quantized data transmission, and a similar GO resource allocation based on an adaptive selection of JPEG compression is proposed in [22].In [24], a goal-aware DNN splitting and feature extraction is proposed in an edge inference scenario, while in [25], a unified GO semantic communication framework is proposed in the context of a visual question answering use case.From a GO transmission perspective, the authors of [27] propose a joint transmission and recognition scheme, showing the effect of communication reliability on the accuracy, however not considering delay and energy consumption, as well as cooperative inference.Also, in our precursor conference paper [28], we investigate the performance of communication KPIs (i.e., the bit error rate) on a real-time edge inference task, taking into account classification accuracy, energy, and delay.Furthermore, [31] introduces, for the first time, the concept of coexistence between semantic and DO services, with a performance evaluation aimed to achieve sum-rate maximization of DO users, with a minimum required SNR constraint for semantic users, with mutual interference.However, the authors of [31] do not consider goal-effectiveness constraints in the presence of interfering DO users, and do not propose a GO optimization, which is the purpose of this paper for an edge inference use case.
Finally, [29] and [33], which are the most closely related works, exploit semantic communication for non-orthogonal multiple access (NOMA), by considering a system with a primary and a secondary user served by the same Access Point (AP) through NOMA.The authors show the gain of defining a semantic ergodic rate in the overall system performance, with the aim of maximizing the primary (i.e., bit-level communication) user data rate, under a semantic ergodic rate constraint of the secondary user, controlling transmit power and transmission time scheduling.Starting from the research question of [29] and [33], we investigate a novel scenario, in which a GO and a DO communication system coexist, thus focusing on GO, rather than semantic, communication.

B. Our contribution
Similarly as [29] and [33], in this paper, we aim at analyzing the impact of mutual interference on future service classes.Differently from [29] and [33], whose focus is on semantic communication and ergodic (semantic) rate, and where a single base station serves users with bit and semantic streams, we rather focus on goal-oriented communication and resource allocation in connect-compute networks, in which a goaloriented (GO) and a data-oriented communication (DO) system coexist.Therefore, the main contributions of our work are the following: • We consider the communication effectiveness in accomplishing a predefined goal/task, as our system constraint.Therefore, the focus of our work is on GO communications (i.e., effectiveness of communication toward achieving a goal -and in particular through resource allocation) rather than semantic communications (i.e., understanding the meaning of data).• We introduce the edge inference service as the main use case under investigation, defining it as a GO communication service and problem.• We consider the communication reliability (i.e., Packet Error Rate -PER) as a variable to be controlled to achieve target goal-effectiveness at the GO system, while maximizing performance of the DO system, in terms of data rate.• We propose a computation resource-aware method for guaranteeing goal-effectiveness, taking into account the computing resource availability for edge inference.
In other words, our work is about goal-aware system coexistence, while [29] and [33] are about a multiple access scheme where different traffic types (semantic, bit-oriented) are multiplexed by a single AP that can process both sorts of data.
Then, as a first step of this work, we formally define a GO resource optimization problem in the context of wireless communication systems.This will help us introducing, in the sequel, the fundamental problem of coexistence of GO and DO systems in 6G, with full spectrum sharing.As a specific use case, we consider an edge inference service for the GO system, in which an end device uploads data to a MEH, which runs a classification task through a pre-trained and pre-uploaded ML model (here, a Convolutional Neural Network -CNN).In such a system, we will define goal-effectiveness and goal cost, with the former relating to the probability of receiving confident classification results within a predefined deadline, and the latter relating to the data rate loss of the DO user, compared to the case in which the GO user is absent.This bonds interference, communication reliability, computing resources, goal-effectiveness, and goal cost into a unified framework.To the best of our knowledge, this has never been done before in the literature for GO communication and edge inference scenarios, jointly factoring in wireless and compute resources.
After a performance evaluation of the proposed scenario, aiming to gain insights about the system behaviour as a function of different free system parameters, we will propose a simple, yet, relevant optimization problem, along with an adaptive algorithm able to optimize radio resources to minimize the goal cost, under goal-effectiveness constraints, with a connectcompute resources-aware approach.In summary, the main novelty of the paper consists in conducting a GO performance analysis of an edge inference system sharing resources with a DO system, along with an adaptive algorithm to attain desired performance, being aware of application constraints, its online performance, as well as connect-compute resource availability.
After proposing an algorithm with theoretical guarantees, we test it on scenarios with different parameters and requirements, against baseline strategies (e.g., orthogonal bandwidth splitting), but also on non-stationary environments in which GO requirements (e.g., goal-effectiveness) or computation resource availability statistics, can unexpectedly change over time.

C. Organization of the paper
The remainder of this paper is organized as follows: Section II provides a general definition of a goal in the context of wireless communications, entailing effectiveness, constraints, costs, and goal achievability; Section III focuses on applying the definition to the proposed scenario, in which GO and DO systems coexist, fitting the general definitions to the specific use case of edge inference (GO user) and data upload (e.g., video streaming -DO system).Also, a numerical evaluation without optimization is provided, to explore performance and gain insights about the relevant parameters that will be considered as optimization variables in Section IV, in which a long-term problem formulation, along with a solution based on Lyapunov stochastic network optimization, is proposed.Numerical results assessing the performance of the proposed algorithm are presented in Section V, while Section VI draws the conclusions of the paper, and proposes some future research directions.

D. Notation and acronyms
Throughout the paper, bold lower case and upper case letters denote vectors and matrices, respectively; the operator | • | is the absolute value of a complex number, and the superscript H denotes the Hermitian operator; card(•) denotes the cardinality of a set, and 1 A denotes the indicator function, which equals 1 if condition A is satisfied, and 0 otherwise.Finally, calligraphic upper case letters always denote the longterm average of a corresponding variable throughout the text; for instance, for variable x (or X), the long-term average is denoted as X , and it reads as follows: where t indicates a temporal index.The acronyms used throughout the paper are define the first time they appear, but can be also found in Table I, in alphabetic order.

II. DEFINITION OF A GOAL
The goal-oriented communication paradigm constitutes a communication approach for which performance is not measured by classical metrics, such as data rate or wireless link reliability, but rather by the success level with which a network entity is able to perform a sequence of application-related tasks, as a result of exchanging data with one or more other network entities.In the sequel, we will also refer to these entities as agents.In this context, an agent is any entity endowed with communication capabilities, which could also have computing capabilities and be possibly embarked with Artificial Intelligence (AI) and/or ML models.In the latter case, we can refer to it as AI agent.However, this distinction is not essential in this paper.
A fundamental step is to formally define a goal, to be able to properly formulate goal-oriented communication problems.Indeed, a wrong, inexact, unclear, or ambiguous definition of a goal, may lead to dramatically wrong or biased decisions and communication/computation policies.In [34], E. Hollnagel defines a goal out of the context of wireless communications.From its definitions, and with the aim of embedding the goal-oriented perspective into wireless communication systems, in the most general case, a goal is characterized by a set of requirements that, if guaranteed, determine its accomplishment.When embedded in wireless scenarios with inter-agent communications, the accomplishment of these requirements is directly linked to communication (and computation) related performance and strategies.As an example, suppose that the goal of the communication is to exchange sampled data for anomaly detection.Then, data corrupted by a noisy (and possible interference-prone) channel could lead to wrong decisions, depending on the wireless link reliability (e.g., the PER).At the same time, data encoding schemes (e.g., compression) affect the goal achievement due to distortion.Both data encoding and wireless link reliability play a key role in GO communications.A priori, it is not generally easy to predict the exact correlation between goal accomplishment and wireless communication performance, data encoding, etc.This depends on several aspects, including the goal definition, the connect-compute network conditions, and the a priori knowledge of communicating agents.Learning and timely adapting communication parameters towards goal accomplishment is the main target of the GO communication paradigm.As also remarked in [34], a goal is achieved through a series of tasks, with a task being a collection of actions.Generally, an action entails a decision on a set of parameters, which could involve communication, computation, and possibly control.Let us formally define the three measures that characterize a goal, and are necessary to formulate GO communication problems.

A. The goal value, achievability, and effectiveness
As anticipated, the first fundamental step is for an agent to be able to verify whether a goal has been achieved, by carefully selecting metrics assessed by the agent for that purpose.In this context, we define a quantified representation of the target system state indicating goal accomplishment, which we name after as goal value.The goal value can be, for instance, a binary variable that equals 1 if the goal is achieved, and 0 otherwise.Of course, it is not restricted to this case, and it may be represented as a generic real vector (e.g., the position in space of a robot with respect to a target one).In a dynamic system, a goal value is possibly time-varying, i.e., at each time instant t, a new/updated goal value can be made available to an agent, as a result of environment states, agents' actions, and environment feedback.Therefore, in the most general case, the goal value can be denoted as a real variable Θ t ∈ R l , with t denoting the time instant.
1) Goal-achievability and goal-effectiveness : Going beyond the goal value, and, with focus on either repetitive or long-standing application-related goals, agents eventually have to measure the goal accomplishment rate, i.e., the probability of achieving the goal value.Indeed, a goal accomplishment must not necessarily be deterministic.For instance, a goal value can be obtained with a certain probability, which we can refer to as goal-effectiveness.The goal-effectiveness is inherently non negative and is a long-term measure.Indeed, even in the case a goal is a sequence of sub-goals, the subgoal accomplishment is stochastic, and what we are interested in is the success rate of the goal.We can give the following example: i) Edge pattern (e.g., image) classification: in this use case, we can choose the goal value to be equal to 1 if a pattern is correctly classified, and 0 otherwise.In this case, without additional constraints, the goal-effectiveness is the probability that the goal value equals 1, and corresponds to the correct classification rate.
Nonetheless, besides the goal value itself, the goaleffectiveness may be subject to J instantaneous constraints that, if not met, prevent the goal from being perceived by the agent as accomplished, per a user service level agreement.Sticking to the edge classification use case, the goal value is defined as before, while a possible constraint is represented by the End-to-End (E2E) delay being kept under a predefined threshold.Without loss of generality, we can write these constraints (which we refer to as short-term goal constraints) as g j,t ≤ 0, j = 1, . . ., J. Building on the goal value and the short-term goal constraints, we can formally define the goaleffectiveness as follows: where Θ th is a predefined goal value threshold, and the expectation is generally taken with respect to the random context parameters and the strategy (policy) followed by the agents to achieve the goal.From (2), we can already state that, as per our definition, the goal-effectiveness is a probability, thus Going further, besides the goal value, achieving a goal may also entail other M long-term constraints.As an example, a typical long-term constraint is to keep the average energy consumption of an agent below a predefined threshold, e.g., to not quickly drain its battery level.In the most general case, we can write these long-term constraints as follows: Building on (2) and (3), we can write the following definition for goal achievability: i) a goal is achievable if there exists at least one policy that guarantees (2) to be above a predefined threshold E g,th ; ii) a goal is strongly achievable if there exists at least one policy that guarantees (2) to be above a predefined threshold E g,th , while guaranteeing all other long-term constraints (3).In typical communication system management, long-term constraints entail communication KPIs, e.g., PER below a threshold.This translates into, e.g., adaptive Modulation and Coding Scheme (MCS) selection, able to guarantee the target PER.Instead, with the goaloriented paradigm, communication KPIs are not necessarily required to be satisfied a priori, while measures belonging to the physical/human world, or, in general, to the application, are used to assess the performance of the communication system.In this case, classical communication KPIs can be learnt from experience, and dynamically adapted, to achieve the target goal-effectiveness in (2) in the most efficient way, possibly subject to constraints (3).

B. The goal cost
Every goal should be accompanied by a cost spent to achieve it, i.e., a price to pay in terms of, e.g., radio and computation resources.We refer to this price as goal cost.Indeed, there are possibly several strategies achieving the goal with target goal-effectiveness, i.e., a goal is possibly achievable via multiple strategies.However, different strategies have also different costs.The aim of goal-oriented communications is to find the strategy that achieves the target goal-effectiveness with the lowest goal cost.We can differentiate between shortterm (or even instantaneous) and long-term costs.In the case of a long-term definition of the cost, we can define an average or a cumulative cost, with the latter being the sum of all instantaneous costs spent to achieve the goal.Normally, the latter refers to a strategy to achieve a goal, where, goal success is indicated by reaching a specific terminal state for the (physical) system, e.g., for a robot going from point A to point B, i.e., an episodic task, as defined in (Deep) Reinforcement Learning (DRL).On the other hand, the average cost can also be used for those goals that last virtually infinite time, e.g., continuous collection and classification of patterns.Denoting by C t the instantaneous cost, we can define a long-term cost as follows (cf.(1)): In what follows, we aim to shed lights on how communication service requirements may impact goal-effectiveness and propose formulating the overall GO communication problem involving selection of policies across communication, computation and control domains.

C. Identifying goal-achieving communication KPIs
In edge AI/ML scenarios and use cases, multiple agents (at least 2), equipped with more or less powerful computing units and complex (ML) models, communicate to achieve a (possibly common) goal.The issue is then how to allocate connect-compute resources in order to guarantee a target goaleffectiveness subject to short and long-term constraints, paying the lowest possible goal cost.First, when exchanging data, availability of communication resources affects the level of distortion on the received data with respect to the original information.In classical communication systems, communication KPIs are defined a priori, depending on the different service requirements.This paradigm has started a long race towards adding "9s" to the communication reliability [35] in terms of e.g., packet success rate.Here, based on the definitions provided in the previous section, we argue that this is not the most efficient way of designing the system and orchestrating operations and resources.Indeed, we do not formulate a problem in which communication KPIs are explicitly taken into account, but they are rather controlled by learning and adaptation to communication policies that achieve target levels of goal-effectiveness.In this context, let us denote by π comm a communication policy entailing, in the most general case: i) source encoding (e.g., data compression schemes) [22], [23]; ii) modulation and channel coding [36]; iii) wireless channel scheduling, including node participation selection [37] and association [38] ; iv) multiple antenna transmission scheme, devising power allocation and precoding [39].Moreover, let us denote by π comp a computation policy entailing, in the most general case: i) local computing resource scheduling at each device/agent; ii) computation resource scheduling at shared computing units (e.g., in MEHs) [40]- [42]; iii) selection of a single one or multiple collaborative AI agents containing relevant ML models for ensemble-based inferencing [21], [43] or federated learning [37].Finally, we denote by π contr a control policy entailing AI agents mobility and trajectories.
A general GO communication problem can be then formulated as follows: where P comm , P comp , P contr denote the feasible sets of communication, computation and control actions, respectively.The constraints in ( 5) have the following meaning: (a) the communication policy belongs to the feasible set P comm (e.g., the transmit power is non negative and lower than a threshold); (b) the computation policy belongs to the feasible set P comp (e.g., the sum of all CPU resources of an MEH assigned to a set of users does not exceed the maximum CPU computing Fig. 1: Reference scenario: a GO edge inference system coexists with a legacy DO system; the two systems generate mutual interference, which affects inference performance (goal-effectiveness) and DO user data rate (goal cost).
power); (c) the control policy belongs to the feasible set P contr (e.g., a robot can move towards a predefined set of possible directions); (d) the goal-effectiveness is above a predefined threshold (e.g., the inference accuracy of an edge inference system is above a threshold); (e) other long-term constraints are satisfied (e.g., the average energy of an agent does not exceed a predefined threshold).The problem formulation in ( 5) is quite general, and it can be easily customized to specific use cases.In the next section, we present a specific scenario in which a GO and a DO communication system coexist.The aim is to hinge on the GO paradigm and formulation, to maximize the DO system data rate under goal-effectiveness constraints of the GO system.

DATA-ORIENTED COMMUNICATION SYSTEM
In this section, we apply the GO approach to a scenario in which two different systems coexist: i) a GO communication system, consisting of a User Equipment (UE) offloading inference tasks to an MEH collocated to an AP, sharing radio spectrum with ii) a classical DO communication system, consisting of another UE connected to another AP, where, the device continuously uploads content, such as a video stream, to be cached in the network.As an example, the focused scenario can refer to an industrial setting for lowpower networking, where, a device uploading product images for anomaly detection (GO transmitter/ receiver pair) coexists with a security camera providing continuous video feed of the factory floor (legacy DO eMBB service).We believe that such a scenario will be of extreme interest in the future, as in beyond 5G and 6G systems, the same system architecture will need to support both such services.As spectrum resources under 6 GHz will continue to be pivotal in providing wide radio coverage [44], (non-orthogonal) spectrum sharing is envisioned to be a standing feature, especially for low-power networking, e.g., in an industrial environment.
The GO approach may find direct application to system scenarios involving coexistence of services of different types.For such services, the most relevant and important communication KPIs (e.g., data rate, latency, reliability) may even be the same, however, the tasks performed may substantially differ in scope, hence design trade-offs need to be addressed to concurrently guarantee all application-related goal values by keeping goal costs as low as possible for all tasks.To further elaborate on the problem of conflicting goals, in this paper we choose to investigate the coexistence of the two systems, inspired by the Cognitive Radio (CR) networking paradigm [45], [46].The fundamental difference lies in that, for the CR problem, where a primary and a secondary system operate together in space and time, focus is, in general, on allocating the available secondary radio resources to maximize secondary system performance, subject to the non-violation of radio performance constraints imposed by the primary system operator.Nonetheless, for the focused GO/DO system coexistence, the ultimate design target is service-effective communication even with "softened" radio communication requirements for the GO system that can be learned during goal accomplishment.

A. System setup
The system of interest is illustrated in Fig. 1.A GO transmitter-receiver pair (which we, in short, term after as GO system), consisting of a single-antenna UE, denoted as U E g and referred to as GO user, and an AP, denoted as AP g and referred to as GO AP, equipped with M g antennas fully shares the available radio frequency spectrum of bandwidth W (Hz) with a DO transmitter-receiver pair (which we, in short, term after as DO system) of the same characteristics, i.e., a single-antenna UE, denoted as U E d and referred to as DO user and an AP, denoted as AP d and referred to as DO AP, equipped with M d antenna elements.It is assumed that AP g and AP d are interconnected via a backhaul link characterized by high capacity and low delay.Besides radio infrastructure, it is assumed that an MEH is collocated with AP g , where, the interconnection delay can be considered as negligible.Generalizing this would be straightforward, and is left for future investigations.
Uplink data communication takes place for both systems during operation time.For the GO system, uplink data communication is carried out to offload a batch of data patterns (e.g., images, either received or generated at U E g ) to the MEH, to obtain classification information as output, by means of a downlink transmission (whose delay is considered negligible in this work).In contrast to the GO system, the aim of DO system communication is for U E d to provide an incoming data stream, e.g., a video feed, to AP d .Storage and distribution of this content are not investigated in this paper and are left for future investigations.
At the physical layer, we consider an uplink Single-Input Multiple-Output (SIMO) system.We denote by h ij,t ∈ C M ×1 , the uplink channel vector between U E j (with j = g, d) and AP i (with i = g, d) at time slot t, which can be written as where the t-th component of the Line-Of-Sight (LOS) component vector reads as h ij,LOS (t) = e − j2πd mij,t λ , with λ the wavelength, d mij,t the distance from U E j single antenna to the m-th antenna of AP i , while the Non-LOS (NLOS) component follows a circularly symmetric Gaussian distribution, i.e., h ij,t,NLOS ∼ CN (0, 1).Path loss between U E j and AP i is represented by β ij,t , while K is the Rician factor, strongly dependent on the scenario (e.g., indoor, outdoor, etc.).
In this reference setting, both system communication and computing resources are involved.From a computation point of view, we assume an MEH hosting a relevant ML model (e.g., a Deep Neural Network -DNN, that is assumed to be already trained), which dynamically assigns resources to the GO system, based on its current availability.Therefore, on a per-slot basis, the MEH communicates with AP g to select an inferencing pattern offloading policy, based on current connect-compute conditions, and based on the goal cost and goal-effectiveness definition.

B. Edge inference: goal value and effectiveness
In what follows in this section, we will define goal value, effectiveness, and cost for the focused system.To do so, let us first consider the communication, computation, and inference performance of the GO system.Indeed, as already mentioned, and as it will be clarified for this particular scenario, we are interested in assessing system performance in terms of inference delay, entailing communication and computing phases, and inference confidence, which translates into inference accuracy.
These two measures, when jointly considered, define the goaleffectiveness for edge inference, as it will be formalized later on in this section.
1) Uplink radio performance of GO user: Let us recall that the GO user offloads inference tasks to the MEH.From a wireless perspective, performance is affected by multiple factors: i) the uplink data rate; ii) the interference received from the DO user; iii) the target packet error rate.Let us denote by w g ∈ C Mg×1 the combining vector at AP g , denoting by P g the transmit power of U E g , and by P d the transmit power of U E d .Assuming time as organized in slots t = 1, 2, 3, . .., the Signal-to-Interference-plus-Noise Ratio (SINR) at the GO receiver (AP g ), at time t, reads as where index t denotes the time dependence of the involved random and controlled variables; whereas, N 0 denotes the power spectral density, and W the uplink bandwidth, assumed to be fully shared between the two systems.Now, considering finite blocklength transmissions [47]- [49], and denoting by γ t the target PER at time t, we can write the achievable rate of U E g (in bits/s) at time t as follows [47]: where n g is the blocklength, Q −1 (•) is the inverse of the Gaussian Q function, while V t is the channel dispersion, given by [48], [49] V which is well approximated as V ≈ 1 with SINR above 5 dB [48].Nevertheless, in this work, we keep it general, as our system may be required to work at low SINR regimes, provided that a target goal-effectiveness is guaranteed.Finally, assuming (without loss of generality) that a batch of N t new patterns is requested to be inferred at time slot t, the uplink transmission delay for GO communication reads as follows: where n b denotes the number of bits encoding one pattern.In this work, we do not focus on the specific encoding scheme, which we assume to be fixed.Semantic and GO compression can also play a role in optimizing n b , which goes beyond the scope of this paper and is left for future investigations.Preliminary works on online compression level selection are available in [8], [21]- [24], [27].
2) Computation delay of GO user: Uplink transmission is just the first of the (at least two) phases of wireless edge inference, whose second step is remote processing through an ML model (e.g., a DNN), running in an MEH.The processing phase constitutes another source of delay, which is, typically, non-negligible, especially for demanding inferencing tasks served by MEHs of limited computing capabilities, as compared to the ones at the distant cloud.The computation delay is not, in general, a deterministic quantity, as it depends on CPU loading, execution of background processes, access to memory, etc. Obviously, it strongly depends on the employed ML model [50].In this paper, we assume that the MEH, irrespective of wireless and computing resource availability, always employs the same model (assumed already trained), and we leave GO model selection criteria for future investigations.As such, we denote by D comp,t , a random variable (whose statistics are possibly unknown), representing the computation time at the MEH.At each time slot, the computing time is possibly different, and its estimation is assumed to be available at the MEH, making it able to optimize connect-compute resources.
Finally, the total inference time, neglecting downlink transmission of small size results (typically a few bits for binary or multi-class classification), is given by Part of the goal is to retrieve inference results earlier than a predefined deadline D max , as clarified in the remainder of this section.However, retrieving incorrect inference results within the deadline can be extremely harmful for a special purpose functionality.For this reason, we need to define a measure of inference confidence, to be incorporated into the overall definition of goal-effectiveness.
3) On the use of entropy to define the goal value: We now introduce the metric reflecting inference accuracy, which will be then used to define the goal value.As we are dealing with a classification task, the actual performance metric could be the one of correct pattern classification rate.However, to evaluate this metric, the ground truth, i.e., the true label, would need to be always available, which is not the case, in general.In a practical setting, a metric suitable for evaluating classification tasks as they emerge, needs to be characterized by the following features: i) it must be measurable online without any ground truth; ii) it should reflect, in the best possible way, the value of the goal, i.e., the classification accuracy.A possible metric fulfilling these requirements is the entropy computed on a posteriori probabilities, which are the typical output of any discriminative or generative classifier, such as a DNN [22], [51], [52].In particular, the output of a discriminative classifier can be written as a vector p = [p 1 , . . ., p L ] H of probabilities, with each probability being associated to one out of the L possible labels of the data set under investigation.Obviously L l=1 p l = 1 holds true.Given p, the entropy associated to a classified pattern b is The entropy is a scalar measure, which can be interpreted as the classification confidence of an ML model, in classifying a pattern.The lower the entropy, the more confident the classifier is.Namely, for a data set with L labels, the worst case for a single pattern classification is p l = 1 L , ∀l = 1 . . ., L (i.e., throwing an L facets dice), which translates into the maximum entropy H max = log(L); also, noting that lim p→0 + p log(p) = 0, and that p log(p) = 0 if p = 1, the minimum value attained by the entropy in case of a completely sure classifier is 0. Therefore, the entropy is always a bounded metric 0 ≤ H ≤ H max = log(L).Since we are considering inference on batches of data (cf.( 10)), we can define the average entropy H t on the batch classified during slot t as where B t denotes the set of patterns in the batch, and )).For simplicity, and, for the sake of coherence with the goal-value definition in Section II, we will use, as goal value, the negative relative average entropy increase (referred to as NREI in the sequel), with respect to the its minimum value, attained on a validation subset of the original data set, i.e., without any communication impairment (interference from DO user) 2 .This choice is dictated by the fact that, even for the original data set, the average entropy is not actually 0, but it attains a minimum value that depends on the training phase.Therefore, denoting by H min the minimum average entropy over the considered data set, we write the NREI (i.e., the goal value) as follows: Then, the higher the absolute value of the NREI, the lower the goal value is, and vice versa.A natural question arises on the dependence of this goal value on wireless performance, e.g., on the PER.In this paper, since we consider the PER as source of classification entropy increase/decrease, we make the following principled and mild assumptions on entropy and accuracy, which we validate by experimental results.Assumption 1: The classification entropy is a monotonic nondecreasing 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 nonincreasing 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.Also, the cross-entropy is the typical loss for DNN training.In Fig. 2, we validate the two assumptions on the CIFAR-10 data set [53], whose detailed description, along with the one of the trained CNN architecture, is provided in section III-D2 to lighten the reader.In particular, Fig. 2a shows the average entropy over the test set, as a function of the PER, while Fig. 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 Then, we can define the goal-effectiveness as the probability of achieving the goal: Now, let us note that the data rate in (8) is a monotonic increasing function of the target PER γ t , i.e., a higher PER tolerance allows U E g to transmit data at higher speed, which also means lower E2E delay (cf.(10), (11)).This straightforward, yet, fundamental behaviour, 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 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.We argue that, based on the definition in (15), a lower goal-effectiveness could be achieved as a result of ultra-reliable, yet, slower wireless communication, which is the purpose of the next section.
The aim of the goal-oriented optimization approach is to find the right balance between the two measures, to attain the desired goal-effectiveness, entailing both inference timeliness and inference confidence (goal value).So far, we did not formalize the goal cost of the scenario under our investigation.

C. The DO user data rate loss as goal cost
Let us recall that our aim is to assess performance in a scenario in which a GO system coexists with a DO system.In the considered scenario, the DO user, U E d , uploads data (e.g., a video stream) with the aim of maximizing its data rate.However, the system is cooperative, and the DO user aims to maximize its data rate, without preventing the GO user from attaining the desired goal-effectiveness.Denoting by w d ∈ C M d ×1 the combining vector of AP d , the received SINR at AP d at time t, reads as follows: and the data rate can be approximated by the Shannon formula, as we do not need to assess the PER performance for the DO system (however, generalizing this would be straightforward): Denoting by R d,max the maximum achievable average data rate by the DO system in the absence of the GO one and with transmission power P d = P d,max , where, P d,max stands for the maximum transmission power of U E d , the goal cost can be defined as the average relative U E d data rate loss, i.e., it can be written as follows (cf.( 1)): The lower the DO user data rate is, the higher the goal cost is.
In other words, the price to make the GO user achieve its goal with target goal-effectiveness, is paid by the DO user through its achievable uplink data rate.In the sequel, we assume that the DO user always has backlogged traffic, i.e., it continuously transmits and interferes with the GO system.This can be easily generalized.Now, we have all elements describing goal-effectiveness and goal cost, in the investigated scenario.In the next section, to gain insights on relevant parameters to be controlled and optimized in the proposed system, we will first present a performance assessment, obtained through Monte Carlo simulations.Then, based on the acquired messages, a goal-oriented problem formulation, along with its solution, will be presented in section IV.We believe that this gentle introduction will help the reader understanding all ingredients of the system, and also the reasoning behind the goal-oriented approach, and the corresponding proposed optimization problem.

D. Evaluation of the system without optimization
In this section, we evaluate the performance of the overall system, in which GO and DO systems coexist.To do so, Monte Carlo experiments are conducted, considering different realizations of wireless channels, computation delays, and pattern inference requests (i.e., number of patterns generated at each time slot).Results are obtained from T = 50000 independent realizations of such parameters.The following assumptions hold for communication, computation, and inference settings.
1) Wireless communications assumptions: We consider two users (i.e., U E g and U E d ), two APs (i.e., AP g and AP d ), and an MEH, as in Fig. 1.U E g , AP g , U E d , and AP d are placed at [5, 0], [5,20], [8,0], [8,20], respectively.Both UEs are equipped with a single antenna, and both APs employ a uniform linear array of M g = M d = 8 elements.Maximal ratio combining is employed for the receive filters at both AP g and AP d .Channel coefficients are generated as in (6), with path loss β ij with exponent 4, while Rice fading with factor K = 3 is considered.A different channel realization is extracted for each experiment from the described distribution.To evaluate the performance, we assume the transmit power of U E g to be fixed to P g = 100 mW, while we vary the transmit power of U E d , choosing it in [0, P c,max ] W, with 500 evenly spaced points, and P c,max = 200 mW, in order to explore the performance as a function of U E d data rate (in each simulation, we will specify the selected value, whenever needed).The carrier frequency is f c = 28 GHz 4 , with total bandwidth W = 1 GHz, fully shared among U E g and U E d , while the noise power spectral density fixed to N 0 = −174 dBm/Hz, with a 3 dB noise figure at the receiver.The transmission of U E g is organized in packets, each of equal size of 32 Bytes.The PER is chosen from the vector γ = [10 −7 , 10 −6 , 10 −5 , 10 −4 , 2 × 10 −4 , 4 × 10 −4 , 8 × 10 −4 , 10 −3 , 2 × 10 −3 , 4 × 10 −3 , 8 × 10 −3 , 10 −2 , 2 × 10 −2 ], to explore performance in terms of communication reliability.Therefore, at time t, given a PER γ t , the transmitted packets are considered to be incorrectly received with probability γ t 4 https://www.bmwk.de/Redaktion/EN/Publikationen/Digitale-Welt/guidelines-for-5g-campus-networks-orientation-for-small-and-mediumsized-businesses.pdfchosen from the vector (and specified for each simulation, whenever needed).When a packet is not correctly received, no retransmission is requested, and the bits within the packet payload are randomly chosen.
2) Data set and inference assumptions: We evaluate the performance on the CIFAR-10 data set [53], which consists of 32 × 32 pixel RGB images, with 50000 patterns in the training set, and 10000 patterns in the test set.We resize each image to have 64 × 64 pixel RGB images, representing each of the three base colors with 32 bits.We assume that a pre-trained CNN is pre-onboarded at the MEH and ready to provide classification results.We consider batches B t of equal size of N t = 20 patterns (cf.( 10), ( 13)) for each realization.Therefore, considering the packet size of 32 Bytes and the image size, the total number of packets transmitted for each experiment (i.e., time slot) is 64 2 ×3×32×20 256 = 30720.We assume that a state of the art model 5 is pre-trained and preuploaded in the MEH.The model is trained using Matlab ® .For simplicity, we also assume a fixed blocklength n g = 64 Bytes.
3) Computation delay assumption: In the absence of a model for the computing delay, we have empirically built a delay distribution from real-world experiments.The inference runs on an GPU NVIDIA ® Tesla ® V100.The CPU characteristics are the following: Intel ® Xeon ® Gold 6244 CPU@3.6 GHz, with 4 cores and 8 GB of memory.Then, we run batch inference for T = 50000 independent realizations, we save the computing time, and we retrieve a computing delay distribution, from which we can extract a random realization when evaluating performance.For the interest of the reader, the estimated probability density function of the computing delay is shown in Fig. 3, for all values of PER, as (a priori) the distribution may change as a function of the PER.However, from the figure, it can be noted that the distribution is stable over PER values, showing only slight variations, probably caused by fluctuations in the CPU usage and background processes.Therefore, in the sequel, we will consider the computation delay distribution as independent from the target PER.
We will now present the results in terms of goaleffectiveness, as per its definition in (15).Let us recall that the goal-effectiveness generally entails the goal value and other system constraints.For instance, in the case of edge inference, the goal value is represented by the NREI (cf.( 14)), and the other system constraint is represented by the E2E delay (cf.( 11), (10), Fi. 3).However, for the sake of smooth exposition, we will first present two separate results, i.e., the goal-effectiveness by only taking into account the goal value -NREI (c.f. ( 14)), and the goal-effectiveness by only taking into account the delay, respectively.We believe that this gentle introduction will help us commenting the results, and the reader comprehending the conveyed message, via a clear explanation of the different sources of goal outages.The two notions of goal-effectiveness will be then merged in Section III-D6 as a final result, to coherently consider the complete definition in (15).Afterwards, an optimization problem will be proposed in section IV. 4) The goal-effectiveness from the goal value perspective: Let us evaluate the performance of goal-effectiveness, only from the point of view of the goal value, i.e., the first term on the right hand side of (15) (the inference reliabilitynegative relative entropy increase-NREI).In other words, we consider a received batch result with goal value higher than the predefined threshold, as a goal achievement, even if results are issued after the deadline D max .Let us first notice that the goal value, as per its definition in (14), is only affected by the PER, i.e., the errors generated by the wireless communication between the GO user and the GO AP.Then, in Fig. 4, we show the goal-effectiveness related to the goal value as a function of the PER, for different thresholds Θ th .First, we can notice how the probability of the goal value being above a threshold, decreases as the PER increases, as more errors occur throughout the uplink communication phase.This result is also in line with Assumption 1 (Fig. 2a).Also, by increasing the threshold Θ th (recall that the average NREI assumes non positive values), performance degrades, as expected.
As already mentioned, this result does not take into account the delay, which is a fundamental part of the goal (i.e., the edge inference service).In the following, we consider the goaleffectiveness from the delay perspective, to then merge the two perspectives in Section III-D6.for goal cost C ≈ 6% (left hand points of Fig. 5) 5) The goal-effectiveness from the delay perspective: First, it is worth noting that the E2E delay depends on the computation delay, the PER and the interference (cf.( 8), (10)).In Section III-D3 (Fig. 3), we empirically illustrated the independence between PER and computation delay.On the other hand, the communication delay is highly dependent on PER and received interference.Indeed, at fixed channel conditions and GO user transmit power P g , by increasing the DO user's transmit power P d , the data rate of the latter increases, thus, generating more interference to the GO system, which causes higher delay, in case of fixed target PER.To show the effect of the E2E delay on the effectiveness, we consider a delay threshold D max = 50 ms, and we plot, in Fig. 5, the probability for a batch to be classified by the deadline, as a function of the DO user data rate loss (i.e., the goal cost in ( 18)), for a subset of target PER [10 −7 , 10 −4 , 10 −3 , 10 −2 ] (for ease of readability).This is obtained by increasing the DO user transmit power P d in [0, 200] mW.As we can notice, contrarily as before, lower PER leads to lower effectiveness (as the effectiveness only entails delay, i.e., the GO user does not care about receiving high entropy results, provided that they are received within the predefined E2E delay).This result is due to the strong dependence of the communication delay (and thus the E2E delay) on PER and interference.Indeed, as an example, let us show, in Fig. 6, the empirical probability density function of the GO system E2E delay (communication and computation), for the left hand point of Fig. 5, i.e., for a single value of P c = 200 mW.As we can notice, the distribution of the delay experiences longer tails for lower PER, as expected from (8).From the last results, we can easily conclude that: • From a goal value perspective, the goal-effectiveness is only affected by the PER (although not strongly, depending on the PER value), and a higher PER (i.e., lower communication reliability) leads to lower (partial) goal-effectiveness; also, from γ = 10 −7 to γ = 10 −3 , stable performance is experienced.• From an E2E delay perspective, the goal-effectiveness is affected by the PER and the DO user interference, and higher PER (i.e., lower communication reliability) leads to higher (partial) goal-effectiveness.
The goal of this work is to analyze and optimize performance, by taking into account the overall definition of a goal (and goal-effectiveness), entailing the goal value and the end-to-end delay, but also the goal cost.Therefore, in what follows, we finally present the results in terms of goal-effectiveness, as per its overall definition in (15), together with the corresponding goal cost.
6) The goal-effectiveness and its dependence on PER, interference, and goal cost: The goal-effectiveness in (15) depends on two performance indicators: i) the goal value (represented by the NREI), which in our setting directly and exclusively depends on the PER, and ii) the E2E delay, which depends on the PER, the interference caused by the DO user, and the remote computation delay.As a first joint result, in Fig. 7, we show heat maps representing the goal-effectiveness (i.e., the goal-effectiveness is represented by the different colors from dark blue to yellow) as a function of PER (y-axis) and maximum delay threshold D max (x-axis), for a fixed DO user data rate (i.e., fixed P d = 200 mW), and for different goal value thresholds in three different plots, i.e.Θ th,1 = −0.8,Θ th,1 = −0.5, and Θ th,1 = −0.4,shown in Figs.7a, 7b, and  7c, respectively (we remind that a higher threshold indicates a stricter constraint in the sense of goal achievability).Note that the heat maps are interpolated a posteriori for better visualization, while results have been obtained for the subselected PER and D max values.In these figures, we also show different goal-effectiveness thresholds (i.e.E g,th = 0.7, E g,th = 0.8, E g,th = 0.9), through contours plots.All the points interior to these contour plots represent a goal feasibility region for each respective goal-effectiveness constraint, i.e., all the combinations of (fixed) PER and end-to-end delay, whose corresponding goal-effectiveness exceeds a predefined threshold.However, these regions are subject to the fact that there is no adaptation of transmit power and target PER across time; whereas, as we will show in the sequel, much better results can be obtained in the optimized setting.From these plots, we can make the following considerations: • The goal-effectiveness increases as the delay threshold (y-axis) increases (for each fixed target PER), while it does not necessarily decrease as a function of the PER, as expected and shown before in the disjoint plots, creating goal-effectiveness feasibility regions, whose surface depends on E g,th .
• The goal-effectiveness feasibility regions shrink as the goal value (NREI) threshold increases (see the difference between surface extensions in Figs.7a, 7b, 7c -looking at 7c, we can even notice that no combination of fixed PER and D max guarantees goal-effectiveness above 0.9 for Θ th = −0.4 in this setting).• Given a goal-effectiveness requirement, there always exists a minimum E2E delay threshold guaranteeing feasibility; whereas, below this threshold, it is infeasible (for any PER) to guarantee the requirement (examples of this point are shown by the red arrows in the figures).Moreover, each target PER experiences a different minimum D max that can be guaranteed.The lower is the PER, the higher the minimum feasible delay is.• As the delay threshold decreases, the feasible region in terms of PER also shrinks, i.e., with a lower delay constraint, higher PER values are needed to guarantee effectiveness; however, this is not always feasible due to the goal value constraint (see, e.g., Fig. 7c).• As a consequence of the previous remark, as the PER decreases (y-axis), the minimum delay threshold to guarantee a target goal-effectiveness increases, i.e., to guarantee lower PER (reliable communication), U E g needs more time for offloading, resulting in more frequent delay outages.
Let us now focus on Figs.7d, 7e, 7f, in which we plot the goaleffectiveness, as a function of DO user data rate loss in (18), i.e., the goal cost (y-axis) and the PER (x-axis), for a fixed D max = 45 ms, and different goal value (NREI) thresholds across figures, namely the same as the previous results.Also, a contour plot representing the 80% goal-effectiveness feasibility region is shown in all figures.These plots are obtained by also varying the DO user transmit power (within the range [0, 200] mW).From these results, we can appreciate the goal feasibility region, also as a function of the goal cost (i.e., the aim of this paper), and we can draw the following conclusions: • Again, the goal-effectiveness feasibility region is a surface, i.e. there are multiple solutions guaranteeing the goal-effectiveness constraint.• While the above consideration holds, there exists a minimum goal cost solution, i.e., the minimum cost needed to achieve the target goal-effectiveness.The latter is the lowest point of the contour plots representing the effectiveness thresholds, and is represented by the black horizontal dashed lines in each plot.
• By increasing the goal value threshold (i.e., across different figures), the feasibility region shrinks as before and, as an additional observable effect, the minimum goal cost increases (e.g., above 60% of DO user data rate loss in Fig. 7e).In other words, the stricter the constraint in terms of goal value is, the higher is the minimum goal cost able to guarantee effectiveness.• In certain conditions (see Fig. 7f) desired values of goaleffectiveness are not attainable (e.g., goal-effectiveness above 80%) Interestingly, these results relate the performance of a legacy (DO) and a GO communication system interfering with each other, showing non trivial outcomes, which suggest that higher communication reliability does not necessarily imply higher goal-effectiveness.Therefore, they represent the basis to formulate a goal-oriented optimization problem in the next section.Indeed, the aim of a goal-oriented resource orchestration framework is to move within the goal-effectiveness feasibility region, possibly finding the lowest cost in such region.
Then, from these results and their corresponding conclusions, it is straightforward to formulate a goal-oriented resource allocation problem, involving the variables that mostly affect goal-effectiveness and goal cost: i) the PER of GO communication, and ii) the DO user transmit power, in this work.Other variables can be taken into account, which represents further research directions on this topic.

IV. PROBLEM FORMULATION & SOLUTION
The aim of this section is to propose a resource allocation policy able to minimize the U E d data rate loss (cf.( 18)), subject to a goal-effectiveness constraint of the GO system.Of course, minimizing ( 18) is equivalent to maximizing the average data rate of U E d .Then, following the general formulation in (5), the edge inference problem can be formulated as follows: subject to where Ψ t = [P d,t , γ t ] is the action set, i.e., the optimization variables, involving DO user transmit power and target GO user PER.The constraints of the problem have the following meaning: (a) the goal-effectiveness of the GO system is higher than a predefined threshold; (b) the instantaneous transmit power of U E d is chosen from a discrete set P d involving a minimum value of transmission power (0 in this case) and a maximum value being equal to P d,max ; (c) the target PER of the GO system is chosen from a discrete set Γ g .Also, we make the following assumptions: 1) The goal is achievable, i.e., problem (19) is feasible.
2) The optimization is performed at the MEH, which is provided with the needed connect-compute instantaneous information, as specified here below.3) All effective channels (i.e., including the receive filters) are perfectly known instantaneously, while their statistics are unknown in advance.4) The computation delay at the current time slot is estimated and known with high confidence, i.e., we assume the computation delay is known at time t. 5) The GO user has no buffered data, but it is able to accept all data patterns generated at time t, to be transmitted to the MEH. 6) The DO user always has backlogged traffic, i.e., it continuously transmits and interferes with the GO system 7) All thresholds (delay, entropy, effectiveness) are known in advance, i.e., they are requested as part of a service level agreement.
Problem (19) is difficult to solve, due to the lack of distribution knowledge of wireless channels (i.e., only instantaneous realizations are observed) and computation delays at the MEH.Therefore, we hinge on the tools of Lyapunov stochastic network optimization to solve the problem on a per-slot basis, with instantaneous observations of context parameters.To this end, let us first introduce the concept of virtual queue [54], whose aim is to keep track of constraint violations, and take specific actions to drive the system towards desired operating modes.In particular, given a long-term constraint written as we can define an associated virtual queue that evolves as follows over successive time slots: The evolution of this mathematical model is straightforward: the size of the virtual queue grows whenever the constraint is violated, and it decreases otherwise.Interestingly, as easily proved in [54, Section 4.4] constraint (20) is guaranteed, if the associated virtual queue is mean-rate stable, i.e., lim To ensure the mean rate stability of the virtual queue, it is sufficient to guarantee that the so-called Conditional Lyapunov Drift (CLD) is bounded by a finite constant at each slot.
which is a measure of the congestion state of the system in terms of the defined virtual queue(s).From ( 23), the CLD is defined as follows: i.e., it is the expected variation of the Lyapunov function over two successive time slots.Guaranteeing that ∆ t (Z t ) ≤ B, with B a finite constant, also ensures the mean-rate stability of Z t , and therefore constraint (20).Now, for the virtual queue defined in (21), it is easy to prove that where x max is the (finite by hypothesis) maximum value that x t can take, given system design constraints.Then, one can write the following upper bound [54,Eqn. (4.47)]: Following stochastic optimization arguments [54], it is sufficient to remove the expectation and minimize the CLD upper bound in (26) in a per-slot basis, to guarantee the mean rate stability of Z t and, as a consequence, constraint (20), under the assumption of i.i.d.realizations of context parameters (an assumption that can be relaxed in some cases).However, in this way, no importance is assigned to the objective function of the problem, i.e., the goal cost in this case.To take the latter into account, denoting by C t the goal cost at time t, one can write the so called drift-plus-penalty (DPP) function [54]: where Ω denotes a scalar hyper-parameter (the only one) controlling the trade-off between (original) constraint guarantees and objective function value minimization.
(28) For virtual queue Z t in (28), we can write (cf.( 25)): which leads to the following DPP upper bound (recalling the objective function of ( 19)): with . Finally, by minimizing ( 29) in a perslot basis, we obtain the following instantaneous problem (we omit the constant terms): subject to (a) P d,t ∈ P c , (b) γ t ∈ Γ g .
Hinging on the theoretical findings in [54, Th. 4.5 and Th.4.8], under the i.i.d.assumption of context parameters (i.e., wireless channels, and remote computing delay), by solving (30) in each time slot, the mean-rate stability of the virtual queue is guaranteed (i.e., constraint (a) of 19 is met).Also, asymptotic optimality is achieved as the trade-off parameter Ω increases, at the cost of higher average virtual queue value and convergence time.Finally, thanks to the concept of Γ-additive approximation, non-exact solutions are allowed in expected sense, provided that the solution is within a bounded value Γ from the infimum of all possible solutions, with an impact on the optimality performance of the algorithm that depends on Γ.Then, the next step is to solve problem (30).Problem ( 30) is an integer program, however on a limited feasible set with cardinality |P c | × |Γ g |.As such, we will simply solve it through an exhaustive search over the feasible set.This is a typical outcome of Lyapunov stochastic optimization, thanks to the decoupling of the long-term problem into a sequence of (simpler) problems, based only on instantaneous observations of context parameters and properly defined state variables (virtual queues).The virtual queue (which evolves over time) and the parameter Ω drive the trade-off between U E d data rate loss (i.e., the goal cost), U E g goal-effectiveness, and convergence time.

A. Solution of the instantaneous problem
Let us notice that the first indicator function in (30) (1 {Θt≥Θth} ) is strongly dependent on the choice of the PER (equivalently, in practice, on the specific MCS employed for GO communication at time slot t).It should be noted that, in general, there is no known function relating PER and entropy relative increase (goal value).Also, differently from the one related to the delay (which is known if system state is perfectly Algorithm 1: Goal-oriented resource allocation At each time slot t: 1) Observe wireless channel realizations, computation resources, and virtual queue states; 2) Solve (30) as described in Section IV-A 3) Observe the real goal value outcome at the output of the classifier (( 14)), and update the virtual queue Z t as in (28) 4) Go to next time slot t + 1 known at the MEH -as we assume here), the actual value of such indicator variable is made available by the server only after the inference takes place, i.e., after the computation phase, which is obviously too late to take a decision.Therefore, the decision has to be taken on a "best guess" of what could the outcome be.For this reason, as an approximation to solve (30), we replace the first indicator function with its expectation, i.e. the probability of the goal value exceeding the threshold.Nevertheless, this approximation is not enough to solve the problem, as a model linking the PER and this probability is generally not available in advance.One possible solution is to exploit model-free optimization tools, such as DRL [55].However, as the scope of this paper (and in particular of this section) is to provide a contribution to the coexistence of GO and DO systems, we will rely on a look up table built on a validation set.Specifically, using a validation set from the considered input pattern set, we build a look up table linking PER at AP g and the probability of the goal-value being above the predefined threshold, to be used during operation time to select the desired PER, based on current virtual queue states and context parameter realizations.
Once the first indicator function in (30) (i.e., 1 {Θt≥Θth} ) is replaced with its expected value (i.e., the probability of the event) and the look up table is built, the remaining part of the problem can be optimally solved via an exhaustive search over the involved variables.The overall procedure to dynamically select DO user transmit power and GO system PER is described in Algorithm 1.

V. NUMERICAL EVALUATION
In this section, we evaluate the performance of the proposed GO optimization strategy in Algorithm 1, in the proposed coexistence network setting.
To be able to compare the performance with fixed PER and P d , we consider the same scenario of the previous evaluation (Fig. 7).As a first result, in Fig. 8, we show the trade-off between goal-effectiveness and goal cost, for a fixed goal-effectiveness threshold E g = 82%, two different values of total system bandwidth (Fig. 8a with W = 1 GHz and Fig. 8b with W = 500 MHz), and for different goal value thresholds (the same as the previous figure).Also, let us recall that our solution hinges on the problem approximation that replaces the first indicator function in (30) with its expectation computed on a validation set.Therefore, in Fig. 8a and 8b, we compare this solution with the one involving a genie that uses a posteriori knowledge on the resulting entropy at the output of the classifier.Obviously, this (b) Total system bandwidth W = 500 MHz Fig. 8: Trade-off between goal cost and goal-effectiveness, with our method and with genie, against bandwidth splitting scenario solution cannot be implemented in practice, but it represent our benchmark, as it approaches the optimum of ( 19) as the trade-off parameter Ω increases.Finally, we compare our goal-oriented optimization method, with a strategy that splits the bandwidth across the two systems, thus resulting in zero co-channel interference leaked from one system to another, however, at the cost of less radio bandwidth available for each of the two systems.In this case, only the PER of the GO user is selected dynamically.This can also be considered as a goaloriented communication KPIs selection, but the interference to and from a DO system is not managed, as the system is assumed to not be affected by interference.Note that the bandwidth splitting is empirically selected to obtain the target level of goal-effectiveness, to compare the results in terms of goal cost.In other words, U E g is allocated the minimum amount of bandwidth needed to achieve the target goal-effectiveness, while the remaining portion of the bandwidth is allocated to U E d .In the curves of Fig. 8a, the hyperparameter Ω increases from right to left.The curves with the same colors are obtained with the same system parameters, but they represent the three different strategies: i) GO optimization (i.e., our proposed strategy) with solid lines, ii) genie-aided GO optimization with dashed lines, and iii) bandwidth splitting scenario with the pentagrams.First, we can notice how our solution is able to always guarantee the goal-effectiveness constraint, with the goal cost decreasing towards the point in which the constraint is exactly attained (left hand side of the plot).Also, as the goal value threshold (Θ th ) increases, the minimum achieved goal cost increases, as expected (see, e.g., yellow curve vs. blue curve).In particular, for the case with larger bandwidth (Fig. 8a) the effect is more visible, but still limited, through the approximation, while the genie-aided solution is able to keep the cost close to optimal even when increasing Θ th .However, as Θ th decreases, the approximated solution gets closer to the genie solution.Notably, both nonorthogonal spectrum sharing solutions outperform the one with bandwidth splitting, with considerable gain for the case of limited total available bandwidth (up to 50% -Fig.8b).This suggests that the power of a GO system optimization is even more relevant under communication resource scarcity, as also pointed our in the introduction of this work.Still, it should be noted the large difference between the GO communication KPIs selection, and the legacy one, which is the purpose of the following performance evaluation.As a second result, Fig. 9 builds on the results of Fig. 7, to compare our optimization method with the fixed PER and P d setting (i.e., the non optimized case).In particular, let us focus on Fig. 9a, i.e., the case with Θ th = −0.8.We compare three strategies: i) the fixed (i.e., non adaptive) strategy of Fig. 7 (black curve), ii) a strategy with fixed PER, with our adaptive algorithm only controlling P d,t (red curve), and iii) our adaptive strategy for both PER and P d (blue pentagram).First, we can notice how strategy i) (i.e., fixed PER and adaptive P d,t ) is shown only for a subset of possible PERs, i.e., only the feasible ones, given the target goal-effectiveness.Then, from the red curve, we can notice how the proposed optimization method (although without adaptive PER control) is able to follow the profile of the non optimized case, however slightly enlarging the feasibility region for some values of PER (e.g., γ = 10 −4 ), i.e., achieving lower goal costs, thanks to power control and adaptation.However, this gain is negligible in most of the cases.On the other hand, the full optimization strategy (i.e., the adaptive PER and P d method), which is the main novelty of this work, achieves the lowest goal cost (around 6% vs. 12% of the fixed PER strategy), with a different resulting average PER.Similar considerations can be made for Fig. 9b (with Θ th = −0.5),however with a much larger gain obtained by our strategy with respect to the two benchmarks.Also, in Fig. 9c, the two non adaptive solutions do not provide feasible points for Θ th = −0.4,while our strategy is able to guarantee the target goal-effectiveness with a goal cost around 8.5%, to be compared with the optimal value obtained by the genie (6.5%).
From Fig. 9, we can conclude that it is highly beneficial to adapt the target PER (i.e., communication reliability of GO communication) to higher layer performance (i.e., application performance) rather than adapting communication parameters to keep, e.g., a fixed target PER.This can have a huge consequence in adaptive MCS mechanisms, whose aim would be to guarantee application performance (adapting PER and interference tolerance) rather than guaranteeing a target PER a priori, in the case of GO communications.
Let us now focus on the adaptation capabilities of our proposed optimization.In particular, in Fig. 10, we show a moving version of the goal-effectiveness (i.e., the goaleffectiveness estimated over the past 2000 slots -Fig.10a) and moving average goal cost (Fig. 10b) as functions of time, introducing two unexpected events that need the algorithm to adapt to new conditions.Namely, at the beginning, the system requirements are: D max = 45 ms, Θ th = −0.4 and E g = 0.8.Then, after 10000 iterations, we switch from Θ th = −0.4 to Θ th = −0.5, keeping the same target E2E delay and goaleffectiveness.After other 10000 iterations (i.e., at slot 20000), we switch from E g = 0.8 to E g = 0.85, while keeping the same goal value target and E2E delay requirement (i.e., Θ th = −0.5 and D max = 45 ms).First, from Fig. 10a, we can notice how, from a goal-effectiveness perspective, the method is able to keep the desired value, switching to the new requirement after t = 20000.Also, looking at Fig. 10b, we can appreciate how the method always seeks for the optimal solution in terms of goal cost.Indeed, when switching from Θ th = −0.4 to Θ th = −0.5, the goal cost reduces, thanks to the more relaxed goal value threshold.Then, when imposing a stricter goaleffectiveness constraint (t = 20000), the goal cost increases again to attain the desired performance.
From Fig. 10, it is then possible to appreciate the adaptation capabilities of the proposed method with respect to online requirement modifications.In particular, the method is able to autonomously detect this change through the virtual queue, and take corresponding actions to stabilize the system towards desired performance.
We have shown how the method behaves in the presence of requirement changes, but how does it react to a non stationary environment?Also, what is the effect of computation resource availability (i.e., computing delay) in the proposed scenario under investigation?
To answer these questions, we consider a system in which, after 10000 iterations, due to an exogenous event, the computing time experiences an offset of +5 ms, i.e., it is systematically increased by 5 ms.Similarly, after 30000 iterations, it is systematically increased by additional 2 ms (i.e., 7 ms with respect to the starting point).The E2E delay constraint is set to D max = 50 ms.The results in terms of goal-effectiveness and goal cost are shown in Figs.11a and 11b, respectively, with the same approach of Fig. 10 (moving averages).From a goal-effectiveness perspective, we can notice how the method is able to attain the desired performance (E g = 80%), despite a transient period after the non stationarity appears in the system, highlighted by the dashed ellipses in the plot.At the same time, adapting to the new system conditions (higher computing time) increases the cost, as a lower communication delay is required to guarantee the delay constraint (we always assume that the inference input/ image upload rate is such that no classification request buffering at the MEH occurs, even when the delay of GO communication is substantially reduced).Indeed, the only way is to reduce interference, i.e., the DO system data rate.Again, the method is able to autonomously detect this change through the virtual queue, and take corresponding actions to stabilize the system towards desired performance.
From Fig. 11, we can conclude that the computing resources available to a GO system have a strong impact on the cost of a DO system that coexists and interferes with the former.This is a clear way of seeing the effect of connect-compute resource availability in goal-oriented communication systems for edge inference.
From the numerical results shown in this section, we can draw the following general conclusions: • There exists a trade-off between goal-effectiveness and goal value, with the latter being related to communication performance of a DO system coexisting with the GO system; our method is able to explore this trade-off, with close to optimal performance in different conditions, depending on the specific requirements (cf.Fig. 8a).: Adaptation capabilities of proposed method to online GO system requirement changes (i.e., Θ th and E g ) mit power, does not provide much better performance than a strategy with both variables fixed across time (cf.9).Higher gains are achieved via a fully adaptive system.
• Our method is able to dramatically reduce the goal cost, while guaranteeing target goal-effectiveness, by adaptively selecting target PER and DO user transmit power, based on measured application performance, even in the cases in which the fixed strategy fails to find a feasible solution (cf.Fig. 9c).• Changing requirements over time (e.g., because of new application constraints) does not prevent our method from adaptively allocating resources to attain new levels of goal-effectiveness and/or goal values (cf.Fig. 10).Also, the method works in both directions: it increases the cost when a transition to stricter requirements occurs, while it reduces the cost whenever requirements are relaxed.The latter, thanks to properly defined state variables (i.e., virtual queues) able to capture the behaviour of the system in terms of constraint violations.Obviously, this capability is limited to the cases in which non-stationarity occurs on a longer time scale than the method's adaptation.• Computation resource availability at the GO system strongly affects the goal cost in terms of DO system data rate loss, a non trivial result, never shown in the literature before, to the best of our knowledge.Also non stationary environments, in terms of connect-compute resource availability, do not affect the adaptation capabilities of our method (cf.Fig. 11).

VI. CONCLUSIONS
We have analyzed and optimized a wireless network scenario in which a GO and a legacy DO communication system coexist, fully sharing the same spectrum resources.While this has been proposed previously for the coexistence of dataoriented and semantic communication systems, we focused on GO communication, also analyzing the effect of communication errors and availability of computing resources.
We first explained the concept of GO communications, and we provided a general problem formulation approach, to then tailor it to the proposed system scenario, showing how a GO resource allocation strategy can bring high gains in terms of overall system performance.The latter has been defined through two measures: goal-effectiveness and goal cost, with the former translating into probability of confident inference on time, and the latter referring to the performance loss of the legacy system, in terms of data rate.The proposed Go approach is to adapt communication KPIs (i.e., PER) to the actual outcome of communication, measured at the application level.Besides a first numerical performance evaluation for a non optimized setting, aimed at showing the potential tradeoffs, our proposed optimization leverages on application performance measures to update suitably defined state variables, whose long-term stability has been exploited to achieve the goal with the lowest cost.
After proposing an algorithm with theoretical guarantees, we tested it on the proposed scenario, in which the two systems coexist and interfere with each other.It has been shown, through numerical simulations, the gain, in terms of DO system data rate for a given goal-effectiveness of the GO system, of using an adaptive method for both communication reliability (i.e., PER), and legacy system user transmit power (i.e., affecting interference received by goal-oriented system and legacy system user data rate).Also, the proposed approach has been tested in non stationary environments, showing good adaptation capabilities to new requirements and computing resource availability, showing the strong link between communication and computing in future networks.Overall, the paper shows the superiority of a GO selection of communication KPIs, based on communication and computation resource availability, as well as interference.
Future steps involve scenarios with multiple GO and legacy system users, the optimization of GO user transmit power and other communication related parameters, cooperative inference, but also other applications beyond edge inference.Finally, an interesting research direction is that of semantic and GO feature extraction, into a unified framework in which only the most important features are transmitted and/or protected from wireless errors, by the GO users.From a methodological point of view, the exploration of data-driven techniques such as DRL could help solving the issue of not having a model relating communication reliability (e.g., PER) to the goal value.In this case, this relation would be learnt from experience, by the interaction of the agent(s) with the environment.Finally, we note that existing radio equipment, cybersecurity and privacy related regulation and market access frameworks such as the Radio Equipment Directive [56], the EU Cybersecurity Act [57] and the upcoming Cyber Resilience Act [58] rely on classical communication approaches; new paradigms such as GO communications are considered insufficiently and corresponding adaptations will be necessary.

Fig. 3 :
Fig. 3: Empirical probability density function of computing delay, estimated through real experiments

Fig. 4 :
Fig. 4: Probability of goal value (NREI cf.(14)) being above a predefined threshold, as a function of PER, for different threshold values

4 Fig. 7 :
Fig. 7: (a,b,c) Goal-effectiveness heat maps as a function of GO communication PER and E2E delay constraint, for fixed goal cost, and different goal value thresholds Θ th ; (d,e,f) Goal-effectiveness heat maps as a function of goal cost (relative DO user data rate loss) and target PER of GO system, for fixed GO communication E2E delay threshold (45 ms) and different goal value thresholds Θ th

4 Fig. 9 :
Fig. 9: Goal-effectiveness heat maps as a function of goal cost (DO user data rate loss) and target PER of GO system, with and without optimization, for fixed E2E delay threshold (D max = 45 ms) and different goal value thresholds Θ th

•E g;th = : 8 EFig. 10
Fig.10: Adaptation capabilities of proposed method to online GO system requirement changes (i.e., Θ th and E g )

TABLE I :
List of acronyms Convolutional Neural Network Validation of assumptions 1 and 2 inference results within a maximum delay D max from the time instant the classification request is issued3, with goal value (cf.(14)) higher then a predefined threshold Θ th .Formally, the goal is achieved if the event {D tot,t ≤ D max } ∩ {Θ t ≥ Θ th } occurs, or, equivalently, a goal outage is represented by one of the following events (19)DPP is an augmented version of the CLD, and it penalizes high values of the objective function, e.g., excessive usage of resources in a network.Interestingly, by bounding the DPP, one can derive a similar result on virtual queue stability and long-term constraint guarantees, i.e., if ∆ p (Z t ) ≤ B, ∀t, the same result applies, with the following difference: by increasing the tradeoff hyper-parameter Ω, the value of the objective function decreases at the cost of longer convergence time of the virtual queue, and its average value[54, Theorem 4.8].Finally, to adapt the above analysis to problem(19), we can define the following virtual queue evolution for constraint (a) of problem(19):