AI-Generated Incentive Mechanism and Full-Duplex Semantic Communications for Information Sharing

The next generation of Internet services, such as Metaverse, rely on mixed reality (MR) technology to provide immersive user experiences. However, limited computation power of MR headset-mounted devices (HMDs) hinders the deployment of such services. Therefore, we propose an efficient information-sharing scheme based on full-duplex device-to-device (D2D) semantic communications to address this issue. Our approach enables users to avoid heavy and repetitive computational tasks, such as artificial intelligence-generated content (AIGC) in the view images of all MR users. Specifically, a user can transmit the generated content and semantic information extracted from their view image to nearby users, who can then use this information to obtain the spatial matching of computation results under their view images. We analyze the performance of full-duplex D2D communications, including the achievable rate and bit error probability, by using generalized small-scale fading models. To facilitate semantic information sharing among users, we design a contract theoretic AI-generated incentive mechanism. The proposed diffusion model generates the optimal contract design, outperforming two deep reinforcement learning algorithms, i.e., proximal policy optimization and soft actor-critic algorithms. Our numerical analysis experiment proves the effectiveness of our proposed methods. The code for this paper is available at https://github.com/HongyangDu/SemSharing.


I. INTRODUCTION
The development of computer science and wireless networks has continuously enriched the ways of interaction, social communications, and transactions among users, thus playing an irreplaceable role in daily life [1].From the users' perspective, three significant waves of technological innovation have been witnessed, i.e., the introduction of personal computers, the Internet, and mobile devices.The fourth wave is currently unfolding based on immersive technologies, such as mixed reality (MR), with the goal of forming a ubiquitous virtual space, i.e., Metaverse [2].Defined as a collective virtual shared world of value co-creation, Metaverse, which is parallel to the physical world, incorporates different technologies to enhance physical spaces, products, and services, thereby revolutionizing online education, business, remote work, and entertainment.
Immersive technologies, which benefit from powerful computing and rendering capacities, provide users with a natural augmentation of the real world, allowing individuals to generate avatars and seamlessly experience different services.For instance, users can wear MR equipment such as headsetmounted devices (HMDs) and hold controllers to play virtual battle games, just like the scene in the movie "Ready Player One" as shown in Fig. 1.During the game, the user's position in the physical world and the environmental information of the surrounding physical space are collected by devices such as cameras and transmitted to the Metaverse service provider (MSP).The MSP leverages the obtained information to build a virtual gunfight scene and display it to users.Simultaneously, the MR equipment collects the data that describes the user's motion and posture in real time and updates it to the MSP.Through a similar way, some other applications, such as virtual tourism or AIGC services [3], can also be offered in Metaverse.As stated in [4], more than 84% of consumers around the world are interested in using MR for travel experiences, and 42% believe that augmented reality (AR) and virtual reality (VR) are the future of tourism.The reason is that MR enables users to have more engaged and diverse encounters.For instance, travelers in Metaverse can freely choose their destination or generate virtual objects without being restricted by physical limitations and rules.Furthermore, through human-computer interaction technologies, users can interact with other virtual travelers, tour guides, or even AIGC in Metaverse to achieve an immersive experience.
While the above applications are fascinating, several difficulties need to be addressed.One of the most representative and urgent problems to be solved is that the computational tasks of MR Head-Mounted Displays (HMDs) are overly heavy.One reason is that, as each player is relatively independent, the scene displayed to the user through the MR HMD needs to be computed and rendered separately, which consumes a lot of computing and transmission resources.For instance, the virtual battle game depicted in Fig. 1 exemplifies a scenario where subsequent players may be subjected to the same or similar in-game events as the previous players, leading to a repetition of computations and rendering virtual objects.One solution to this challenge is establishing an informationsharing scheme among users.Specifically, the view image, i.e., the real-world scene displayed on the MR HMD, serves as a reference point for detecting safe, walkable areas, also known as free-space information, based on the user's unique view Fig. 1.In "Ready Player One", MR-headset-wearing players run through the streets with controllers in hand.However, they look like characters from the game "Halo" running into battle in the Oasis.image.By sharing the computation results, such as AIGC, and the view image with other users, the users can avoid repeating computations by comparing received view images to determine the free-space in their own view images and localizing the AIGC.While the information sharing scheme is a viable solution, transmitting such information among users requires a significant amount of transmission resources, particularly for high-definition view images.
In response to the problems above, this paper presents a full-duplex semantic communications framework that aims to enable an efficient information sharing among users.The proposed framework leverages a semantic coding algorithm to extract semantic features from the view image and then transmits them to other users using full-duplex communication.Users can use the received semantic features to obtain free-space information through lightweight semantic matching instead of performing repeated computations.This significantly reduces the computing resources consumed by each user.Furthermore, the full-duplex transmission of semantic information, which has a smaller data size than the original data, minimizes the transmission resource consumption of users.
Moreover, appropriate incentives must be established to motivate users to share semantic information efficiently and effectively [5], [6].A straightforward and effective way to achieve this is to have the semantic information receiver (SIR) pay an incentive to the semantic information provider (SIP).Contract theory can be used to model the payment scheme for both parties, maximizing the utility of the SIR while meeting the incentive compatibility (IC) and individual rationality (IR) properties of both parties [7].However, to solve the optimal contract, the recipient of the semantic information must know various characteristics of the sender, such as the cost per unit of transmit power.Additionally, different wireless transmission conditions, such as transmission distance, small-scale fading channels [8], and co-channel interference, can affect the optimal contract solution [9].These multidimensional conditions make it challenging to solve the contract design problem with traditional mathematical methods.Although deep reinforcement learning (DRL)-based solutions can find the contract design without specific environmental parameters, the high state dimension can make reinforcement learning-based ap-proaches challenging to solve or prone to falling into a local optimum [10], [11].To address the aforementioned problems, taking inspiration from the recent remarkable achievements of generative artificial intelligence (AI) techniques in content generation, specifically diffusion models, we want to leverage generative AI to generate optimum contract designs.Our contributions are summarized as • We propose a comprehensive framework for full-duplex device-to-device (D2D) semantic communication that enables efficient synchronization of free-space and semantic information among multiple MR users.Our proposed approach eliminates the need for individual users to compute the positions of virtual objects independently in their field of view.• Within the proposed framework, we consider the effects of wireless fading and self-interference issues that arise in D2D full-duplex communications, and analyzes their impact on the transmission of semantic information.We derive closed-form expressions for both the bit error probability (BEP) and the achievable rate, which are key performance metrics in evaluating the effectiveness of the full-duplex system.• To promote the sharing of semantic information among users, we present an incentive mechanism design based on contract theory.Specifically, we utilize generative AI, i.e., diffusion model, to design optimal contracts.To evaluate the effectiveness of the AI-generated incentive mechanism, we conduct the numerical analysis and show that our method outperforms the reinforcement learningbased scheme.To the best of our knowledge, this is the first paper that uses diffusion model for incentive design.The remainder of the paper is organized as follows: In Section II, we review the related work in the literature.In Section III, we introduce the semantic-aware free-space information sharing mechanism and propose an end-to-end full-duplex communication system model under generalized fading channel models.Section IV presents the semantic encoding and matching algorithms.In Section V, we propose the diffusion model-based AI-generated contract algorithm.We then perform sound mathematical analysis of the key performance indicators in D2D wireless communications, i.e., achievable rate and BEP.Section VI presents the experiment results.Finally, Section VII concludes this paper.

II. RELATED WORK
In this section, we provide a brief review of three related techniques, i.e., full-duplex communications, visual simultaneous localization and mapping, and mixed reality-aided Metaverse services.

A. Full-Duplex Communications
The full-duplex communications technique allows users to transmit on the same band simultaneously while receiving [12], [13].Compared with half-duplex communications, fullduplex communications can further improve spectral efficiency, even doubling it if sufficient self-interference cancellation (SIC) is achieved [14].Motivated by this performance advantage, many research works have been done [15].For the cellular networks covered by full-duplex D2D users with residual self-interference, the authors in [16] developed a stochastic geometry-based tractable analytical paradigm to compute the outage probability and rate.The authors in [17] analyzed the capacity improvement of full-duplex D2D underlying cellular networks, concluding that the capacity improvement of fullduplex D2D communications is more significant than that of half-duplex D2D communication if sufficient self-interference cancellation is achieved.Furthermore, the authors in [18] and [19] investigate full-duplex D2D communication from power control and resource allocation perspectives, respectively.However, work has yet to be done to analyze the performance metrics of full-duplex communication systems considering generalized fading channels and interference effects, i.e., self-interference and co-channel interference with signals of arbitrary paths.

B. Visual Simultaneous Localization and Mapping
The visual simultaneous localization and mapping (SLAM) technique uses data gathered by a camera-equipped platform to build a map of the area around the platform while simultaneously locating it inside the map.For the static environment or an environment with few dynamic elements, several visual SLAM systems have been proposed, such as MonoSLAM [20], ORB-SLAM [21], and DSO [22].Specifically, MonoSLAM is believed to be the first filter-based approach that brings the SLAM problem from the robotic community into pure vision.For dynamic environments, researchers have also developed many systems [23], [23], [24].Authors in [23] use the object detection network to obtain prior knowledge about dynamic objects and employ a selective tracking algorithm to process the features of dynamic objects, so as to reduce the pose estimation error.In [24], a step-by-step method is proposed, which consists of object detection and contour extraction, to extract semantic information of dynamic objects in a computationally more efficient way.With the rise of wearable devices and advances of matching and detection algorithms in computer vision, such like SuperPoint [25] and SuperGlue [26], the visual SLAM would benefit more applications, especially in Metaverse.Although promising, new problems, such as efficient and effective wireless information sharing among users, need to be solved urgently.

C. Mixed Reality-Aided Metaverse
MR is a general term for a type of technology, including but not limited to the well-known AR and VR, which can seamlessly integrate and merge 3D content into the user's physical environment [27] and enables users to travel freely between the real world and Metaverse.With the support of MR, the MSP can provide users with more services, including educational services, interventional services, communication services, online entertainment, and so forth.The popular Pokemon G [28] can be considered as a miniature of online game in Metaverse.The game uses GPS to locate the player in the physical world and displays creatures based on the obtained location as if they are in the player's real-world through the mobile device's camera.On this basis, players can capture, train, and battle the virtual creatures.Although interesting, these systems repeatedly compute and render similar or identical scenes for different players, resulting in a huge waste of computing resources, especially when a large number of players are playing at the same time.Moreover, when different users interact with each other, the transmission of information, particularly the sharing of high-definition images or video streams, also consumes a lot of resources.These problems need to be solved urgently before these systems are further extended into Metaverse.
Motivated by the aforementioned research gaps, we propose a semantic-aware free-space information sharing mechanism to reduce the network resources consumption.To further improve the communication efficiency, the D2D full-duplex techniques is used among users.

III. SYSTEM MODEL
In this section, we present the semantic-aware free-space information sharing mechanism and study a D2D full-duplex communications system.

A. Semantic-Aware Free-Space Information Sharing
When users use an MR technique to access virtual services, e.g., Metaverse, the MR HMDs need to perform various computing tasks.As shown in Fig. 1, HMD devices should compute positions of virtual objects superimposed on the real world, and the planning of routes that users can walk safely in real time.Since even the perspectives of users in the same scene may differ, each user needs to perform the above tasks independently.For example, the k th user generates a virtual flower on the ground, and the j th user, to synchronize this operation, needs to compute where the flower is on the ground according to the j th user's own perspective.A possible solution is to perform user view sharing as shown in Fig. 2. The shared users can obtain the sharer's computation results by view matching without repeating the computation independently.Still with the above example, the k th user can analyze and than share his own view information to other users with similar views, and other users can determine the location of the flower through the view matching.However, the sharing of original view images among MR HMDs consumes a lot of wireless transmission resources, i.e., transmit power and bandwidth.The reason is that the HMD resolution is high, resulting in a large amount of data for view images.

Free-space Information Computation
Free-space Information View Images Matching Fig. 3.The semantic-aware free-space information sharing mechanism proposed in this paper.Full-duplex wireless communication is performed between MR HMDs among users.The free-space information is computed by the state-of-art anomaly detection approach named JSR-Net [29] To solve this problem and achieve efficient and effective information sharing, we apply the semantic communication technique in the D2D full-duplex communication system.A representative task could be free-space information sharing.As shown in Fig. 3, specifically, a user who identifies an area in their view image that is safe to walk in can share the detected free-space information with other users.Other users can then directly perform the matching to obtain safe walking area in their own view images.Let x k denote the original view image of the k th user.Here the semantic information includes the detected free-space (i k ), the interest points that reflect important structures in the visual field diagram (p k ), and the descriptors corresponding to interest points (d k ).Let S {•} denote the semantic encoder, we have The total data size of the semantic information, i.e., {p k , d k , i k }, will be much smaller than that of the original view image, i.e., {x k }.The detailed design of the semantic encoder is presented in Section IV-A.

B. Full-Duplex Wireless Communications
Although semantic communication technologies can reduce the amount of data transmitted without affecting task completion, bandwidth resources are still strained when the number of users is large.Because of limited bandwidth resources in the HMD device network, we consider that users are communicating with each other in the full-duplex mode.
A critical issue in full-duplex communication is selfinterference cancellation.To investigate the effect of the residual self-interference, i.e., I k , on system performance, we consider that I k is subject to the Gaussian distribution [30].This can be regarded as the worst-case assumption 1 about the interference [31].Specifically, the residual self-interference at k th user and j th user can be modeled as zero-mean complex Gaussian random variables with variance υ k P k σ 2 S and υ j P k σ 2 S , respectively [31], where P k is the transmit power of the k th user and σ 2 S denotes the variance due to unit power.The parameters υ k and υ j are the constants that reflect the 1 The exact residual self-interference modeling could be different according to the interference cancellation technique, which is left for our future work.
self-interference cancellation abilities of k th user and j th user, respectively [31].
We consider that the j th user is transmitting the semantic information to the k th user.Let s j denote the transmitted symbol in S {x j }.The received signal at the k th user can be expressed as where S , h jk is the small-scale fading channel, P j is the transmit power of the j th user, D jk is the distance between the k th user and j th user, β k is the corresponding path loss exponents, N is the number of interfere paths that are assumed to be present at the k th user-j th user full-duplex communications pair, each of the interfering signals has an average transmit power P I , w i is the i th interfering symbol, and g k is the small-scale fading of the interfering signal.
The frequency band used for D2D communications among users is lower than 5 GHz.We consider that the interference signals follow the Rayleigh distribution [8], i.e., |g k | 2 ∼ Rayleigh (η k ), which is practical and widely considered in many works [32], [33].Note that the large scale fading of the interference signal is considered in the mean value of g k .We then use the α − µ distribution to model the small-scale fading, which is a general fading model that includes several important other distributions, such as the Weibull, One-Sided Gaussian, Rayleigh, and Nakagami.The probability density function (PDF) and the cumulative distribution function (CDF) expressions of a squared α − µ random variable |h jk | 2 are given by [34]: and The received signal-to-interference-plus-noise Ratio (SINR) of the k th user can be expressed as Simply, the SINR received by the j th user can be obtained by interchanging j and k in (5).Note that the value of SINR affects the BEP and achievable rate in the wireless semantic information transmission.In full-duplex communications, the higher the transmit power of one user, the larger the value of SINR of the received signal of the other user.Considering that the total energy of the user's MR HMD is limited, incentives can be used to encourage users to share information, which is discussed in Section V-A.

IV. SEMANTIC MATCHING AND CONTRACT MODELLING
In this section, we propose the semantic encoder design scheme according to SuperPoint [25] and the semantic matching scheme according to SuperGlue [26], using the received semantic information to perform view images matching.

A. Self-Supervised Semantic Encoding
The definition of semantic information is typically taskrelevant.For source messages in image modality, semantic information can be in the form of knowledge graphs [36], semantic segmentation results [37], or features [38].In our proposed D2D free-space information sharing framework, the semantic information extracted from one user's view image needs to be used to help a second user determine the spatial correspondence between two view images.
As we discussed in Section II-B, convolutional neural network (CNN) has been widely used in interest point detection and description.Here, we utilize the self-supervised Super-Point [25] architecture as the semantic encoder to produce interest point detection accompanied by fixed length descriptors in a single forward pass.Specifically, as shown in Fig. 4, the full-sized view image of the k th user is sent to a shared CNN to reduce the dimensionality of the input view image.The output is then fed to two separate encoders to obtain the interest points and descriptors, respectively.We next present the introduction to each component and the design of the loss function.
• Shared CNN Encoder: To reduce the dimensionality of the input view image, the shared encoder uses the VGGstyle [39] architecture.The encoder consists of convolutional layers, spatial down-sampling via pooling and non-linear activation functions [25].The encoder maps an input image to an intermediate tensor with smaller spatial dimension and greater channel depth.
• Interest Point Encoder: The interest point encoder in the semantic encoder can be designed with an explicit decoder to reduce the computation of the model [40].After a channel-wise softmax layer, the dustbin dimension is removed and the reshape is performed.• Descriptor Encoder: A model similar to UCN [41] is used in the descriptor encoder to first output a semidense grid of descriptors.The decoder then performs bicubic interpolation of the descriptor.The activation is L2-normalized to be unit length, as shown in Fig. 4.
• Loss Function Design: The loss function of the semantic encoder can be written as the sum of the loss functions of the two encoders, i.e., interest point and descriptor encoders.According to the SuperPoint [25], pairs of synthetically warped images can be used to train the network.
After the network is trained, the required interest points and descriptors can be quickly obtained by inputting the user's view image.It has been shown that SuperPoint-based network architecture can support real-time interest points and descriptors extraction [25].
The extracted interest points and descriptors are received by other users via D2D full-duplex wireless transmission and then used.The performance metrics in wireless transmission are discussed in Section V. We first discuss the semantic information matching problem after successful reception in the following.

B. Semantic Information Matching
In the full-duplex system under our consideration, the semantic encoders discussed in the previous section should be deployed in each MR HMD, as shown in Fig. 3.After other users receive the interest points and descriptors, semantic information extraction should also be performed on the user's own view image.Then, the semantic information matching is performed among the extracted interest points and descriptors.Here, we use SuperGlue [26] as a semantic matching network  architecture.Note that a user may share its semantic information to multiple users in the form of D2D full-duplex wireless communication, each user is independent when matching semantic information.Therefore, in the following discussion we focus on the matching between the two view images.
Here, the semantic information of one image, i.e., interest point and descriptors, obtained by the semantic encoder can be regarded as the local features.We consider that images A and B have M A and M B local features, respectively.According to the SuperGlue [26], for the integration into downstream tasks and better interpretability, each possible correspondence should have a confidence value.We consequently define a partial soft assignment matrix P ∈ [0, 1] The goal is to design a neural network that predicts the assignment P from two sets of local features.In the following, we introduce the main components and the design of the loss function.
• Attentional Graph Neural Network: To enhance the uniqueness of points of interest and descriptors, we can consider the relationship between a certain pair of points of interest and descriptors and other pairs, such as the ones that are salient, self-similar, statistically cooccurring, or adjacent [42].Also, notice that when humans are asked to match a given pair blurred key points, the humans look back and forth on both images [43].This implies that an iterative process can focus the attention on a specific correct location.Thus, the first major block of SuperGlue is designed as an Attentional Graph Neural Network (AGNN) [26].For given initial local features, the AGNN computes matching descriptors by allowing features interact with other features.We embed the keypoint position into a high dimensional vector with a Multilayer Perception (MLP), which enables the graph network to later reason about both appearance and position jointly, especially when combined with attention [44].
• Optimal Matching Layer: The optimal matching layer is the second major block of SuperGlue.It is used to produce a partial assignment matrix.As in the standard graph matching formulation, the assignment P can be obtained by computing a score matrix S ∈ R M A ×M B for all possible matches and maximizing the total score i,j S i,j P i,j .This is equivalent to solving a linear assignment problem.The optimal matching layer creates an M A × M B score matrix, augments it with dustbins, and then finds the optimal partial assignment by using the Sinkhorn algorithm [45].After T iterations, we drop the dustbins and recover P = P1:M A ,1:M B .• Loss Function Design: Both the AGNN and the optimal matching layer are differentiable, which allows back propagation from matches to visual descriptors.Note that SuperGlue is trained in a supervised manner from ground truth matches [26].Given these labels, we minimize the negative log-likelihood of the assignment P.This supervision aims at simultaneously maximizing the precision and the recall of the matching.After training, the model can be used in the user's MR HMDs to match semantic information, after receiving semantic features from the transmitter and extracting its own interest points and descriptors from the view image.

C. Contract Modelling
We use a contract as the incentive to encourage users to share the semantic information with each other.The payment plan and the utilities of the SIP and SIR are formulated respectively.
1) Payment Plan: To promote MR users' participation in the semantic information sharing, an appropriate payment plan is required that allows both SIP and SIR benefit from the cooperation.To this end, we propose a contract theoretic payment plan, in which the SIP receives the compensation from the SIR according to quality of the shared semantic information (QoS).Thus, the resulting revenue function of the InP can be expressed as where c f represents the payment made by the SIR to the SIP for the computation resource consumption in semantic encoding, the parameter c q denotes the fee charged for a unit QoS value, and Q s is the quantified value of the QoS of the SIR.
While the proposed semantic information extraction and matching schemes in Sections IV-A and IV-B demonstrate efficiency and feasibility, the semantic matching outcomes are subject to the wireless transmission process.The achievable rate impacts the latency of the information sharing, while the BEP affects the accuracy of the received semantic information.Hence, we define the QoS as where M k ∈ [0, 1] indicate the impact of the semantic extraction and matching algorithm on QoS 2 , R k is the achievable rate, E k is the BEP, and the function T (•) is used to eliminate the effect of the magnitudes [46], which is defined as where t min is the minimal threshold, t max is the maximal value that SIP can provide.
2) Utility of The Semantic Information Provider: The utility of the SIP can be obtained as where P k is the transmit power of the SIP and c p represents the unit cost of P k .
3) Utility of The Semantic Information Receiver: As we discussed in Section III-A, SIR can match spatial locations with the SIP using the received semantic information.Therefore, the higher the Q s , the more accurate the results achieved by SIR through matching, and the more computation resources can be saved.We use the parameter c s to measure the utility gain per unit Q s boost to SIR.The utility of the SIR can be then expressed as 4) Contract Modelling: The contract provided by the SIR includes two items, i.e., {cq, c f }.To design the optimal contract, we formulate the SIR's utility maximization problem while providing the SIP with the necessary incentives to agree on the contract.The optimization problem can be expressed as [47] max where the first constraint is the IC constraint [48], i.e., P k * is set to maximize its own utility.The second is the IR constraint [48] with a utility threshold U SIP th .We first consider the IC constraint.The closed-form expression of QoS can be derived in Section V.For a given contract {c q , c f }, we can solve the IC constraint to obtain the optimal power and corresponding Q * s .Accordingly, we substitute the IR constraint with the optimal power and simplify the SIR maximization problem.Therefore, the optimal contract design, {cq * , c f * }, is modeled as a complex decision-making problem.Whereas conventional mathematical techniques may encounter tractability challenges in addressing a given problem, DRLbased methods might offer a viable alternative.
However, the optimal contract design for a wireless communication system is impacted not only by user-specific factors 2 Because M k is only decided by the chosen semantic encoding and matching algorithms, we set M k = 1 without loss of generality.
such as price per unit of power, but also by the intricate wireless milieu, including co-channel interference signal power, the count of interference paths, and different parameters associated with small-scale fading as discussed in Section III-B.As a result, the DRL-based algorithms may struggle to converge to the optimal solution or achieve suboptimal performance due to the high dimensionality of the state.To address this challenge, the choice of DRL algorithms can be crucial to improve the effectiveness.Proximal Policy Optimization (PPO) and Soft Actor-Critic (SAC) are two popular DRL algorithms that have shown promising results in high-dimensional state problems.PPO is an on-policy algorithm that optimizes the policy by iteratively updating the policy using a clipped surrogate objective.It prevents large policy updates and promotes smooth policy changes.On the other hand, SAC is an off-policy algorithm that learns a stochastic policy to maximize both the expected cumulative reward and the entropy of the policy.SAC is known for its ability to handle continuous action spaces and can achieve state-of-the-art performance in a variety of tasks.
Therefore, we solve the optimal contract design problem, i.e., (11), using two DRL algorithms, i.e., PPO and SAC.Moreover, to tackle the challenge of addressing highdimensional state spaces using DRL algorithms, we propose a novel AI-generated contract method based on diffusion models in Section V-A.We then evaluate and compare the performance of our proposed method with that of the DRL schemes in Section VI-B.

V. AI-GENERATED CONTRACT AND PERFORMANCE ANALYSIS
In this section, we proposed an AI-generated contract method.Then, we derive the PDF expression of the SINR in the D2D full-duplex communication system.The closed-form achievable rate and BEP are also derived.
A. AI-Generated Contract 1) Diffusion Model: Diffusion-based generative models pose the data-generating process as an iterative denoising procedure.This denoising is the opposite of a forward diffusion process, which gradually corrupts the data's structure by introducing noise.Specifically, diffusion models are latent variable models of the form where x 1 , . . ., x T are latents of the same dimensionality as the data x 0 ∼ p (x 0 ).The joint distribution in (12), i.e., p θ (x 0:T ), is called the reverse diffusion, which is defined as a Markov chain with learned Gaussian transitions starting at p (x T ) = N (x T ; 0, I) as where q q q q q q 10 5 7. q q q q q q 10 5 7. q q q q q q 10 5 7.A forward diffusion chain gradually adds noise to the data as a Markov chain according to a variance schedule β 1 , . . ., β T as where After training, sampling from the diffusion model consists of sampling x ∼ p (x T ) and running the reverse diffusion chain to go from t = T to t = 0. Diffusion models can be straightforwardly extended to conditional models by conditioning p θ (x t−1 | x t , c).
2) AI-Generated Contract: We explain how to apply a conditional diffusion model to generate the contract design, i.e., {c q , c f } in (11).In contrast to the conventional utilization of back propagation algorithms in neural networks or DRL techniques that directly optimize model parameters, diffusion models aim to enhance contract design by iterative denoising the initial distribution, leading to generating a utility function of greater efficacy.
As we discussed in Section IV-C4, the optimal contract is related to multiple variables that are unknown to the SIR.We use the vector e to denote the environment, i.e., the set of all variables, that affects the optimal contract design as e = c s , c p , D jk , β k , α, µ, σ 2 N , σ 2 S , υ k , P I , η k , N, P j .(17) We denote the contract to be designed by the SIR in the given environment as c = {c q , c f }.We call the diffusion model network that maps environment states to contract designs as the contract design policy, i.e., π θ ( c| e) with parameters θ.The goal of π θ ( c| e) is to output deterministic contract design that maximizes the expected cumulative reward over a sequence of time steps.We represent the contract design policy via the reverse process of a conditional diffusion model as As shown in Fig. 6, the end sample of the reverse chain is the final chosen contract design.Here, p θ c i−1 c i , e can be modeled as a Gaussian distribution N c i−1 ; µ θ c i , e, i , Σ θ c i , e, i .According to [49], p θ c i−1 c i , e can be modeled as a noise prediction model with the covariance matrix fixed as and mean constructed as where α i = 1 − β i and ᾱi = i s=1 a s .We first sample c N ∼ N (0, I) and then from the reverse diffusion chain parameterized by θ as Therefore, the task of training the contract design policy π θ in complex and high-dimensional environments e is effectively transferred to training a contract generation network ε θ .
Following DDPM [49], when i = 1, ε is set as 0 to improve the sampling quality.Furthermore, to train the ε θ , motivated by the Q-function in DRL, we define the contract quality network Q υ that maps an environment-contract pair, i.e., {e, c}, to a value representing the expected cumulative reward if an agent takes one contract design policy from the current state and follows the policy thereafter.Thus, the optimal contract design policy is the policy that maximizes the expected cumulative utility of the SIR, which can be obtained by The contract quality network is learned in a conventional way, minimizing the Bellman operator with the double Qlearning technique [50].Two networks, namely Q υ1 and Q υ2 , along with target networks, namely Q υ 1 , Q υ 2 and π θ , are constructed.We then optimize υ i for i = {1, 2} by minimizing the objective (23) Specifically, our AI-generated contract algorithm involves generating a contract design using the denoising technique, followed by adding exploration noise to the contract design and executing it to gain the exploring experience.The algorithm for AI-generated contract is shown in Algorithm 1.By utilizing Algorithm 1, we can obtain the optimal contract based on the wireless system environment vector.The performance of the proposed AI-generated contract algorithm is compared with conventional DRL algorithms in Section VI.
Remark 1.Our proposed diffusion model-based AI-generated contract algorithm learns experience from the environment in an exploratory manner and achieves the optimal solution using the diffusion model.By gradually adjusting the output, the diffusion model is more robust and effective than the neural network model that directly outputs the solution.We believe that our proposed innovative algorithm can be easily extended to various problems in wireless communication networks, such as resource allocation, game theoretic incentive mechanism design, and reinforcement learning and federal learning algorithm optimization.
In the following, we further analyze the performance of the full-duplex wireless system and provide more insights.

B. Performance Analysis
After obtaining the semantic information according to the scheme in Section IV-A, the user transmits the semantic information to other users in the form of D2D full-duplex communications with the contract incentive.Nevertheless, the wireless medium is subject to various impairments such as small-scale fading, self-interference, co-channel interference and noise, which inevitably degrade the achievable rate and BEP.To obtain the closed-form expressions with parameters capable of describing the above phenomenon in the semantic information D2D full-duplex transmission, we first perform the following performance analysis.
1) PDF and CDF expressions: To obtain the closed-form expressions of the achievable rate and the BEP of the D2D Initialize a random process N for contract design exploration 7: for Step = 1 to Max step do 8: Observe the current environment et Execute contract design c 0 t and observe reward USIR that is defined as (10) 12: Store the record (et, c 0 t , rt) in replay buffer R Update the contract quality network by minimizing the loss: Update the contract generation network by computing the policy gradient: 18: Update the target networks: 20: end for 23: end for 24: return The trained contract generation network ε θ Inference Phase: 1: Input the environment vector e 2: Generate the optimal contract design c 0 by denoising Gaussian noise using ε θ according to (21) 3: return The optimal contract design c 0 full-duplex communication links, we first derive the PDF expression of the SINR.
Lemma 1.The closed-form PDF and CDF expressions of the SINR can be derived as and where Proof: Please refer to Appendix A.
2) Approximation Analysis: To simplify the mathematical tractability of the derived PDF and CDF expressions, we further study a practical special scenario, namely, the interference-limited case.Specifically, we consider that the noise is negligible, i.e., σ 2 N = 0, and the user's HMD is equipped with an efficient self-interference cancellation technique, i.e., υ = 0.Then, we can re-write the SNR as The simplified PDF and CDF expressions can be derived.
Lemma 2. We derive the approximated PDF and CDF expressions when σ 2 N = 0 and υ = 0 as and With the aid of Lemma 2, the performance analysis of a fullduplex system operating in an interference-limited scenario can be simplified.In particular, the outage probability (OP) can be expressed as the probability that the received SNR falls below a given outage threshold γ th , which can be mathematically represented as To evaluate the OP, we can utilize (28).Additionally, when the transmit power of the jth user is high, i.e., P j → ∞, the OP can be further simplified by calculating the residue at the nearest pole to the Mellin-Barnes integral contour of the Meijer's G-function [35] Figure 7 shows the OP of the k th user versus the transmit power of the j th user under different transmit distance.As shown in the figure, the OP increases as the transmission distance increases.Moreover, in the high P j region, our derived approximate expression yields the result close to that from the exact expression, thereby validating the accuracy of our approximate analysis.3) Achievable Rate in Full-duplex Communications: The ergodic achievable rate (or Shannon capacity) for the transmitter, which is known to be the maximum data rate that the channel can support (per Hz), is defined as Then, with the help of Lemma 1, the achievable rate can be obtained in the following theorem.
Theorem 2. The closed-form expression of the BEP of the k th user, i.e., E k , is derived as Proof: Please refer to Appendix D Remark 2. The above derived performance indicator expressions contain the important channel parameters in a D2D full-duplex wireless communications system.Specifically, parameters that can respond to large-scale fading, small-scale fading, self-interference in duplex communications, and cochannel interference at arbitrary multipath are all included in (31) and (33).Detailed discussion is given in Section VI-C.Furthermore, the generalization of the small-scale fading model, i.e., α-µ fading channel model, allows us to use the derived performance metrics in the analysis of many systems with various kinds of fading conditions.
Thus, we complete all the processes of the framework.Specifically, we use the semantic encoder in Section IV-A to extract interest point and descriptors.The computation task performed at the k th user could be the free-space information detection, which can be obtained by using the state-of-art anomaly detection approach named JSR-Net [29].To motivate the semantic information sharing, we propose a contract theoretic mechanism to maximize the utility of SIR while ensuring that the utility of SIP is larger than the threshold of participation in sharing.In Section V-A, we propose the AI-generated contract algorithm based on the diffusion model to solve for the optimal contract design.For the D2D fullduplex wireless transmission, the performance analysis is comprehensively given in Section V-B.After SIRs receive the free-space information, interest points, and descriptors, the semantic matching scheme can be used to help the users obtain the free-space information in their own view images by matching instead of performing computation tasks again.

VI. NUMERICAL RESULTS
According to our core contributions, this section aims to answer the following research questions via experiments: Q1) Can the proposed full-duplex semantic communication framework realize information sharing among users effectively?Q2) On the basis of Q1, can the proposed incentive mechanism further boost the performance of information sharing, i.e., the utility of the SIR? Q3) How do wireless channel and self-interference affect semantic information transmission during full-duplex D2D communication?
The experimental platform for running our proposed algorithms is built on a generic Ubuntu 20.04 system with an AMD Ryzen Threadripper PRO 3975WX 32-Cores CPU and an NVIDIA RTX A5000 GPU.In each Monte Carlo simulation, we generated 10 6 random realizations of the channel to ensure statistical significance.
A. Effectiveness of semantic communication framework (for Q1) First, we verify the effectiveness of the proposed D2D fullduplex semantic communications framework, and the results are shown in Fig. 8.As can be seen from the experimental results, firstly, according to the interest points, descriptors, and free-space information transmitted by the k th user, the j th user can effectively compute his own free-space information, as shown by the images in the first row.Compared with the conventional approach, i.e., the j th user computes the freespace information independently, this method consumes fewer resources since the j th user only needs to compute the spatial correspondence information between view images and conduct a corresponding spatial rotation to obtain his own free-space information.Secondly, the results demonstrate that as the BEP the free-space information computed by the j th user is more accurate, which finally generates a more accurate matching result, as presented by the images in the second row.Note that the values of BEP can be computed by using the environmental parameters and (33).This inspires us that the accuracy of semantic information during wireless transmission needs to be guaranteed in the free-space information sharing mechanism of D2D full-duplex communication systems.
It should be noted that due to the limitation of the viewing angle, some details, such as the corner marked by the black box in the j th user's view, cannot be obtained using the semantic information extracted from the view image of the k th user.However, this part of the information may be obtained through semantic information from users who have other different perspectives.Meanwhile, because fullduplex communication is taken into account here, the j th user would feed back the missing information to the k th user and other users, allowing the k th user to obtain more freespace information, even if there is a blind spot.Such real-time information updating mechanism is also an advantage of our proposed D2D framework.

B. Efficiency of the proposed incentive mechanism (for Q2)
Second, we present the comparison between our proposed AI-generated contract algorithm and two conventional DRL algorithms, i.e., SAC and PPO.The training process shown in Fig 9 (a) reveals that PPO requires more iteration steps to converge.Although SAC can stabilize at a higher reward faster, both the convergence rate and the final reward value are inferior to those of the AI-generated contract algorithm.We posit two reasons for this.
• Our algorithm achieves better sampling quality.Diffusion models can generate higher quality samples by finetuning multiple times.For example, we set the diffusion step to 10.Since each fine-tuning gradually adjusts the model's output, the effect of uncertain and noise can be reduced and the sampling accuracy is improved.generation models consider only the input at the current time step, the diffusion model allows the model to generate samples with more time steps by fine-tuning multiple times, thereby having better long-term dependence processing capability.Furthermore, we compare the trained models' ability for optimal contract design in Fig 9 (b).For a given environment state, we observe that the AI-generated contract algorithm can provide a contract design that achieves the SIR utility value of 189.1, which is greater than the 185.9 achieved by the SAC and the 184.3 achieved by the PPO.
C. Influence of channel and self-interference (for Q3) Third, we analyze the impact of wireless channels and selfinterference on D2D full-duplex semantic communications.The effect of the j th user's (transmitter's) transmit power on the BEP of the k th user (receiver) is investigated in Fig. 10, during which the transmit power of k th user is fixed to 20 dBW.As the results show, as the transmit power of j th user increases from 0 to 20 dBW, the BEP of k th user decreases from about 10 −1 to 10 −5 .The clear reason is that since the increase in transmit power makes the SINR higher and thus reduces the BEP.Furthermore, the increase in interfering signal power raises the BEP, and the degree of BEP increase goes up as the transmit power increases.When the transmit power is 0 dBW, for example, the BEPs corresponding to different interfering signal power are relatively close, whereas the BEP differences become larger when the transmit power reaches 20 dBW.
Then, the influence of the k th user's own transmit power on BEP is analyzed.The experimental results in Fig. 11 demonstrate that with the increase of transmit power, the BEP of k th user increases.Taking the case of the channel parameter µ=2 as an example, the BEP is smaller than 10 −4 when the transmit power is 5 dBW, while it reaches nearly 10 −2 as the transmit power arrives at 30 dBW.This can be interpreted by that the enhancement of transmit power would cause greater self-interference, which further affects the BEP.In addition, when the transmit power is fixed, the BEP decreases as the   Next, under the condition of different distances between transmitter and receiver, the influence of transmit power on achievable rate is analyzed.From the results in Fig. 12, one can see that the achievable rate increases with the boost of the transmit power.For instance, when the distance between the SIP and SIR is 5 meters, the achievable rate is approximately 1 Mbit/s at 0 dBW, but it reaches 50 Mbit/s when the transmit power is increased to 25 dBW.The reason is that increasing transmit power raises the SINR.Conversely, increasing the distance between the transmitter and the receiver would lead to a decrease in the SINR.Furthermore, we compare the performance of full-duplex and half-duplex (with time division multiple access scheme) modes.Our results demonstrate that when the transmit power of the SI, i.e., the j th user , is small, the achievable rate in full-duplex mode is lower than that in half-duplex mode due to the impact of strong self-interference.However, since the bandwidth can be shared, the increase in SIP's transmit power has a more significant impact on improving achievable rate in the full-duplex mode.
We proceed to investigate the impact of the k th user's own transmit power on the achievable rate and the results are shown in Fig. 13.Specifically, when v k is fixed, increasing the transmit power of the k th user would cause a decrease to the achievable rate, since the power enhancement introduce self-interference.From another point of it can be seen that improving the interference cancellation technique, i.e., decreasing v k , can enhance the achievable rate.In the half-duplex mode, the achievable rate at the SIR's side is not affected by its own transmit power, as users do not transmit and receive data simultaneously.By comparing the full-duplex and half-duplex modes, conclude that the half-duplex mode achieve a higher achievable rate than the full-duplex mode when the user's own transmit power is higher and the self-interference cancellation technique is poor.

VII. CONCLUSION
We studied D2D full-duplex communications system in which a free-space information-sharing mechanism was Multivariate Fox's H-function as (24) to complete the proof.

B. Proof of the CDF expression
With the help of the definition of CDF, we have Substituting ( 24) into (A-15) and using [51, eq.(A-1)], we can re-write the CDF of γ k as where I 3 can be solved by using [35, eq. (8.334.3)] as By substituting I 3 into (A-16) and using [51, eq.(A-1)], the CDF of γ k can be derived as (25), which completes the proof.

APPENDIX B PROOF FOR LEMMA 2 A. Proof of the PDF expression
With the help of (A-7) and (A-9), we can express the PDF of γ k as Substituting (B-4) into (B-3) and using [51, eq.(A-1)], we derive the CDF as (28).

APPENDIX D PROOF FOR THEOREM 2
Using the definition of Gamma function [35, eq. (8.350)], we can re-write E k as Substituting ( 25) into (D-1), we obtain I D can be solved as (D-4) Substituting I 5 into (D-2) and using [51, eq.(A-1)], we can derive 33 to complete the proof.

Fig. 4 .
Fig. 4. The structure of the semantic encoder.The input is the user's view image, and the output is the detected interest points and descriptors.

Fig. 5 .
Fig.5.The structure of the semantic matching.The input is the received semantic information and the j th user's semantic encoding results, and the output is the matching results.

Fig. 6 .
Fig.6.Diffusion Model for incentive design.Diffusion Model for incentive design.For any given environment, the contract is first randomly generated as the Gaussian noise.After the multi-step denoising through the diffusion model, the output is the contract design that maximizes the optimization objective.

9 :
Set c N t as Gaussian noise.Generate contract design c 0 t by denoising c N t using ε θ according to(21)

Fig. 8 .
Fig. 8.The impact of different wireless transmission BEPs on our proposed full-duplex D2D free-space information sharing mechanism.The semantic encoder extracts 150 interest points and corresponding descriptors in the image as the semantic information.

Keypoint Encoder Keypoint Encoder Keypoint Keypoint Encoder Encoder Matching Descriptors fA fB Si,j MB MA Score Matrix Partial Assignment Partial P P Assignment Partial Assignment
Algorithm 1 The Algorithm for AI-Generated Contract Training Phase: 1: Input hyper-parameters: diffusion step N , batch size N b , discount factor γ, soft target update parameter τ , exploration noise 2: ## Initialize NN 3: Initialize replay buffer R, contract generation network ε θ with weights θ, contract quality network Qυ with weights υ, target contract generation network ε θ with weights θ , target contract quality network Q υ with weights υ 4: ## Learning 5: for Episode = 1 to Max episode do