Rapid reasoning semantic communication method and system based on non-autoregression decoding
By constructing a non-autoregressive decoder based on the Transformer encoder, fast parallel decoding of text semantic information is achieved, which solves the delay problem caused by autoregressive decoding and improves the inference speed and communication efficiency of the semantic communication system.
Patent Information
- Application Number
- CN202510739279.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-16
AI Technical Summary
The decoding delay of existing Transformer-based text semantic communication systems increases linearly with the length of the transmitted sentence, which limits the real-time performance of communication and becomes a bottleneck for the reasoning speed of the semantic communication system.
A non-autoregressive decoder based on the Transformer encoder is adopted. By constructing a non-autoregressive semantic decoder, fast parallel decoding of the semantic information of the transmitted text is achieved, avoiding the iterative generation process of autoregressive decoding.
It significantly reduces decoding delay and end-to-end communication delay, improves the reasoning speed of the semantic communication system and user experience, with decoding delay reduced by 96.71%-98.35% and end-to-end delay reduced by 93.62%-96.67%.
Smart Images

Figure CN120658349A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and semantic communication technology, and in particular to a fast reasoning semantic communication method and system based on non-autoregressive decoding. Background Art
[0002] In recent years, with the rapid development of artificial intelligence (AI) technology and its in-depth application in wireless communications, semantic communication has garnered widespread attention as an emerging intelligent communication paradigm. Traditional bit-level communication focuses on error-free transmission of bit symbols, ignoring the specific meaning of the transmitted message. This makes it inefficient when transmitting redundant data and unable to adapt to the semantic understanding needs of intelligent terminals. In contrast, semantic communication focuses more on the transmission of message meaning. It strives to extract semantic information closely related to user intent from the original message for transmission and ensures accurate recovery of this semantic information at the receiving end. Therefore, semantic communication is a content-aware, semantically relevant communication paradigm that can significantly reduce the amount of transmitted data and improve communication efficiency, representing a new direction for the development of wireless communication technology.
[0003] Leveraging the powerful feature extraction capabilities of deep neural networks, existing research has focused on using them to learn and extract semantic information from raw messages and thereby build end-to-end semantic communication systems. Benefiting from the Transformer architecture's superior global context modeling capabilities and excellent parallel processing capabilities, Transformer-based semantic communication systems have gradually become mainstream, particularly in the field of text semantic communication. Existing text semantic communication systems generally use a Transformer encoder to extract contextual semantic features from the original text message at the transmitter, and a Transformer decoder to autoregressively recover the original text message's semantics at the receiver. While this text semantic communication system based on the Transformer encoder-decoder architecture can fully capture the dependencies between tokens in a sentence, the autoregressive decoding requires sequential prediction of each token, resulting in decoding latency that increases linearly with the length of the transmitted sentence. For example, for the semantic transmission of a sentence with L tokens, decoding requires executing the decoder's inference process L times, severely limiting the real-time transmission. Excessive decoding latency has become a major bottleneck in accelerating inference speed and reducing communication latency in semantic communication systems. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this paper proposes a fast reasoning semantic communication method based on non-autoregressive decoding. By constructing a non-autoregressive semantic decoder based on a Transformer encoder, it achieves fast parallel decoding of the semantic information of the transmitted text while ensuring semantic recovery performance. This significantly improves the reasoning speed of the deployed semantic communication system and reduces communication latency.
[0005] Compared with the iterative generation of traditional autoregressive decoding methods, the proposed method can generate a complete sentence in one go through non-autoregressive decoding, significantly reducing the decoding latency while ensuring semantic recovery performance, achieving fast reasoning and high-quality semantic recovery of the deployed semantic communication system, and improving user experience.
[0006] The present invention also provides a fast reasoning semantic communication system based on non-autoregressive decoding.
[0007] The technical solution of the present invention is:
[0008] A fast reasoning semantic communication method based on non-autoregressive decoding runs on a fast reasoning semantic communication system. The fast reasoning semantic communication system includes a transmitter, a channel, and a receiver; and includes:
[0009] Step 1: Construct a semantic communication model based on non-autoregressive decoding of neural networks, including a semantic encoder and a joint source-channel encoder, a joint source-channel decoder and a non-autoregressive semantic decoder;
[0010] Step 2: Sample several sentences of different lengths from the training dataset to form a training batch. The training batches are sequentially input into the semantic encoder and the source-channel joint encoder to obtain the semantic encoding matrix.
[0011] Step 3: Input the obtained semantic coding matrix into the channel for transmission to obtain the disturbed semantic coding matrix;
[0012] Step 4: Input the obtained disturbed semantic coding matrix into the source-channel joint decoder and the non-autoregressive semantic decoder in sequence to obtain several output probability matrices;
[0013] Step 5: Based on the sentences sampled in step 2 and the output probability matrix obtained in step 4, the cross-entropy loss function is used to train the semantic communication model of non-autoregressive decoding. When the preset number of training times is reached, the training of the semantic communication model of non-autoregressive decoding is completed.
[0014] Step 6: Deploy the trained non-autoregressive decoding semantic communication model at the transmitter and receiver respectively, perform inference through the trained non-autoregressive decoding semantic communication model, carry out semantic communication, and obtain semantically reconstructed sentences.
[0015] According to the preferred embodiment of the present invention, the semantic encoder includes 1 word embedding layer and M Transformer encoder layers, and the word embedding layer includes a learnable word embedding matrix and a fixed position encoding matrix Where V represents the vocabulary size, that is, the count of all unique words in the text dataset, D represents the dimension of the embedding vector, and L represents the maximum sentence length. Each Transformer encoder layer consists of a layer normalization module, a multi-head self-attention module, a residual connection module, a layer normalization module, a feedforward network module, and a residual connection module in series.
[0016] The source-channel joint encoder consists of two fully connected layers and one ReLu activation function. The input dimension of the source-channel joint encoder is D and the output dimension is K.
[0017] The source-channel joint decoder consists of three fully connected layers, one layer normalization layer, and one ReLu activation function, and uses residual connections. The input dimension of the source-channel joint encoder is K, and the output dimension is D.
[0018] The non-autoregressive semantic decoder consists of M Transformer encoder layers, 1 fully connected layer, and 1 Softmax activation function. The network structure of the Transformer encoder layer in the non-autoregressive semantic decoder is the same as that of the semantic encoder. The input dimension of the fully connected layer in the non-autoregressive semantic decoder is D, and the output dimension is V.
[0019] Preferably, according to the present invention, a plurality of sentences of different lengths are sampled from the training data set to form a training batch, and the sentences are sequentially input into the semantic encoder and the source-channel joint encoder constructed in step 1 to obtain a semantic coding matrix; comprising:
[0020] (1) Using small batch parallel training, the input of the semantic encoder is a batch of B sentences Among them, the bth sentence s b is represented as Sentences in a batch are unified to the same sentence length L, w by zero padding b,l represents the lth token of the bth sentence; the input batch S passes through the word embedding layer and M Transformer encoder layers in sequence. The specific process is as follows:
[0021] (a) Batch S passes through word embedding layer f embed (i; Ψ), each word in the sentence is converted into a D-dimensional word vector by looking up ψ; the b-th sentence s in batch S b Output after word embedding layer for:
[0022] E b =f embed (s b ;Ψ)=[Ψ[w b,1 ],Ψ[w b,2],…,Ψ[w b,L ]] T +P,b∈{1,2,…,B} (1);
[0023] in, represents w in ψ b,l The corresponding word vector; after the entire batch S passes through the word embedding layer, the output is the word embedding results E1, E2, ... E b ,…E B 3D tensor stacked along the batch dimension
[0024] E=stack([E1,E2,…,E B ]) (2);
[0025] Where stack(·) represents the stacking operation along the batch dimension;
[0026] (b) The word embedding output E passes through M Transformer encoder layers in sequence for semantic feature extraction; the Transformer encoder layer processes each sentence in the batch independently and in parallel, and the word embedding E of the bth sentence is b Output of the mth Transformer encoder layer for:
[0027]
[0028] in, represents the mth Transformer encoder layer, χ m represent The corresponding set of learnable parameters of the mth layer Transformer encoder layer; finally, the word embedding output E after passing through M Transformer encoder layers is 3D tensor stacked along the batch dimension
[0029]
[0030] (2) The output X of the semantic encoder is compressed by the source-channel joint encoder to obtain the semantic encoding matrix; the source-channel joint encoder processes each sentence in the batch independently and in parallel; the semantic encoder output X of the bth sentence b The semantic coding matrix output after the source channel joint encoder for:
[0031] Z b =J en (X b ;θ) (5);
[0032] Among them, J en (·; θ) represents the source-channel joint encoder with the neural network parameter set θ; finally, the semantic encoder output X passes through the source-channel joint encoder and the output is Z1, Z2, ... Z B 3D tensor stacked along the batch dimension That is the semantic coding matrix corresponding to the entire batch S at the transmitter:
[0033] Z=stack([Z1,Z2,…Z b ,…Z B ]) (6).
[0034] Preferably, according to the present invention, the obtained semantic coding matrix is input into a channel for transmission to obtain a disturbed semantic coding matrix; comprising:
[0035] Convert the semantic encoding matrix composed of real symbols into a semantic vector composed of complex symbols;
[0036] Perform power normalization on the semantic vector corresponding to each sentence;
[0037] The power-normalized complex semantic vector corresponding to each sentence is transmitted through a wireless fading channel;
[0038] Signal detection is performed on the received signal corresponding to each sentence to obtain the disturbed semantic coding matrix.
[0039] Further preferably, converting the semantic coding matrix composed of real symbols into a semantic vector composed of complex symbols includes:
[0040] For the semantic encoding matrix of the bth sentence Z b It is vectorized to obtain Where vec(·) represents rearranging the two-dimensional matrix into a column vector by column;
[0041] Will The two consecutive real number symbols in are used as the real part and imaginary part of the complex number respectively. Converted into complex semantic vector As shown below:
[0042]
[0043] Where N = LK / 2, z b [n] represents z b The nth element of and Respectively represent The 2n-1th and 2nth elements of .
[0044] Further preferably, power normalization is performed on the semantic vector corresponding to each sentence; including:
[0045] The complex semantic vector z of the bth sentence b The result after power normalization is
[0046]
[0047] in, Represents z b The conjugate transpose of , P represents the average transmit power.
[0048] Further preferably, the power-normalized complex semantic vector corresponding to each sentence is transmitted through a wireless fading channel; comprising:
[0049] The power-normalized complex semantic vector of the b-th sentence After transmission through wireless fading channel, the received signal Expressed as:
[0050]
[0051] Among them, ⊙ represents element-by-element multiplication, represents the channel fading coefficient, represents additive white Gaussian noise, is the channel noise power; for Rayleigh fading channel, For an additive white Gaussian noise channel, h = 1 N is an all-one vector; therefore, the received signal-to-noise ratio γ is defined as:
[0052]
[0053] During the training process, the received signal-to-noise ratio corresponding to each sentence in the batch is randomly sampled, that is, in, represents uniform distribution, γ min and γ max Represent the minimum and maximum allowable receive signal-to-noise ratios respectively; according to the definition of the sampled γ and the receive signal-to-noise ratio, the corresponding noise power can be determined
[0054] Further preferably, signal detection is performed on the received signal corresponding to each sentence to obtain a disturbed semantic coding matrix; comprising:
[0055] Assuming that the receiving end has obtained the channel state information through channel estimation, the received signal y of the bth sentence is b Perform zero-forcing signal detection and restore the received signal y b The corresponding complex semantic vector for:
[0056]
[0057] Among them, . / represents element-by-element division;
[0058] Afterwards, the complex vector The real and imaginary parts of each symbol in are decomposed into two consecutive real elements, and the extended real vector is obtained As shown below:
[0059]
[0060] The real vector According to the semantic coding matrix The dimensions of are rearranged to obtain the disturbed semantic encoding matrix of the bth sentence
[0061]
[0062] Finally, the output Z of the transmitter after channel transmission and signal detection is 3D tensor stacked along the batch dimension That is the disturbed semantic encoding matrix corresponding to the entire batch S:
[0063]
[0064] Preferably, according to the present invention, the obtained disturbed semantic coding matrix is sequentially input into the source-channel joint decoder and the non-autoregressive semantic decoder to obtain several output probability matrices; including:
[0065] A. Expand the dimension of the disturbed semantic coding matrix through the source-channel joint decoder; the source-channel joint decoder processes each sentence in the batch independently and in parallel; specifically, the disturbed semantic coding matrix of the b-th sentence is The output after the source-channel joint decoder is for:
[0066]
[0067] Among them, J de (·; φ) represents the source-channel joint decoder with the neural network parameter set φ; finally, the output after signal detection is The output of the source-channel joint decoder is 3D tensor stacked along the batch dimension
[0068]
[0069] B. Output of the joint source-channel decoder After passing through M Transformer encoder layers, 1 fully connected layer, and 1 Softmax activation function, non-autoregressive semantic decoding is performed to obtain the output probability matrix in one go. The specific process is as follows:
[0070] Output of the joint source-channel decoder Sequentially pass through M Transformer encoder layers to recover semantic features; specifically, the output of the source-channel joint decoder of the b-th sentence is Output of the mth Transformer encoder layer for:
[0071]
[0072] in, represent The semantic feature matrix recovered after M layers of Transformer encoder layers, represents the mth Transformer encoder layer that constitutes the non-autoregressive semantic decoder, δ m represent The corresponding set of learnable parameters of the mth Transformer encoder layer;
[0073] The semantic feature matrix recovered from each sentence passes through a fully connected layer and a Softmax activation function, outputting the probability of each word in the vocabulary being selected as the target word, thereby mapping the semantic features to the vocabulary space; specifically, the semantic feature matrix recovered from the bth sentence is The output probability matrix after the fully connected layer and the Softmax activation function for:
[0074]
[0075] Where SoftMax(·) represents the Softmax operation, F(·;ω) represents the last fully connected layer in the semantic decoder, ω represents the set of learnable parameters of the fully connected layer corresponding to F(·;ω); P b Each row represents the probability distribution of the word at the corresponding position in the vocabulary space; finally, the output probability matrix P1, P2, ... P for all B sentences along the batch dimension is B Stack and get the output three-dimensional probability tensor That is the output probability matrix corresponding to the entire batch S:
[0076] P=stack([P1,P2,…P B ]) (19).
[0077] Preferably, according to the present invention, based on the sentences sampled in step 2 and the output probability matrix obtained in step 4, a cross entropy loss function is used to train the semantic communication model of non-autoregressive decoding. When a preset number of training times is reached, the training of the semantic communication model of non-autoregressive decoding is completed; comprising:
[0078] The cross entropy loss is calculated based on the current batch of transmitted sentences S and the output three-dimensional probability tensor P; specifically, for the b-th sentence s b Cross entropy loss Expressed as:
[0079]
[0080] Among them, χ = {ψ, χ1, χ2,…, χ M} and δ={ω,δ1,δ2,…,δ M} represent the neural network parameter sets of the semantic encoder and the non-autoregressive semantic decoder respectively; P b [l,w b,l ] represents the lth word of the bth sentence is predicted as the target word w b,l The probability of pad represents the filler word; when w b,l ≠pad, 1{w b,l ≠pad}=1; when w b,l =pad, 1{w b,l ≠pad}=0; By taking the arithmetic average of the cross entropy loss of each sentence in the batch, the average cross entropy loss L of the current batch is obtained as follows:
[0081]
[0082] Based on the average cross entropy loss of the current batch Use Adam optimizer to update the neural network parameters χ, θ, φ, δ;
[0083] When the preset number of training rounds T is reached, the training of the semantic communication model of non-autoregressive decoding is completed.
[0084] Preferably, according to the present invention, the trained non-autoregressive decoding semantic communication model is deployed at the transmitting end and the receiving end respectively, and reasoning is performed through the trained non-autoregressive decoding semantic communication model to carry out semantic communication and obtain semantically reconstructed sentences; including:
[0085] Deploy the trained semantic encoder and source channel joint encoder at the transmitter, and perform the second step on the transmission sentence. The semantic encoding matrix is obtained by performing semantic encoding and source channel joint encoding through the trained semantic encoder and source channel joint encoder.
[0086] Through step 3, the semantic encoding matrix Z t The signal is transmitted to the receiving end through the channel, and the receiving end performs zero-forcing signal detection on the received signal to obtain the disturbed semantic coding matrix
[0087] Deploy the trained source-channel joint decoder and semantic decoder at the receiving end, and perform the fourth step on the disturbed semantic encoding matrix Perform source channel joint decoding and non-autoregressive semantic decoding to obtain the output probability matrix
[0088] From the output probability matrix P t Select the word with the highest probability in each row, that is, perform Argmax operation along the row dimension to obtain the reconstructed target sentence
[0089]
[0090] Here, ArgMax(·, dim=0) represents the Argmax operation performed on the row dimension of the input matrix, and the target sentence is the semantically reconstructed sentence.
[0091] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor implements the steps of a fast reasoning semantic communication method based on non-autoregressive decoding.
[0092] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a fast reasoning semantic communication method based on non-autoregressive decoding.
[0093] A fast reasoning semantic communication system based on non-autoregressive decoding, comprising:
[0094] The non-autoregressive decoding semantic communication model construction module is configured to: construct a neural network-based non-autoregressive decoding semantic communication model, including a semantic encoder and a source-channel joint encoder, a source-channel joint decoder and a non-autoregressive semantic decoder;
[0095] The semantic coding matrix acquisition module is configured to: sample a number of sentences of different lengths from the training dataset to form a training batch, and sequentially input the training batches into the semantic encoder and the source-channel joint encoder to obtain the semantic coding matrix;
[0096] The disturbed semantic coding matrix acquisition module is configured to: input the obtained semantic coding matrix into the channel for transmission to obtain the disturbed semantic coding matrix;
[0097] The output probability matrix acquisition module is configured to: sequentially input the obtained disturbed semantic coding matrix into the source-channel joint decoder and the non-autoregressive semantic decoder to obtain a plurality of output probability matrices;
[0098] The non-autoregressive decoding semantic communication model training module is configured to: train the non-autoregressive decoding semantic communication model using a cross-entropy loss function based on the sampled sentences and the obtained output probability matrix, and complete the training of the non-autoregressive decoding semantic communication model when a preset number of training times is reached;
[0099] The reasoning semantic communication module is configured to: deploy the trained non-autoregressive decoding semantic communication model at the transmitter and receiver respectively, perform reasoning through the trained non-autoregressive decoding semantic communication model, carry out semantic communication, and obtain semantically reconstructed sentences.
[0100] The beneficial effects of the present invention are:
[0101] The present invention proposes a fast reasoning semantic communication method based on non-autoregressive decoding. By constructing a non-autoregressive semantic decoder based on the Transformer encoder, fast parallel decoding of the semantic information of the transmitted text is achieved during the model reasoning stage. The proposed method generates a complete sentence in one go through non-autoregressive decoding, significantly reducing the decoding latency while ensuring semantic recovery performance, thereby greatly improving the reasoning speed of the deployed semantic communication system and reducing communication latency. Compared with traditional autoregressive semantic decoding methods, the proposed method reduces the decoding latency by 96.71% to 98.35% and the end-to-end communication latency by 93.62% to 96.67% while ensuring semantic recovery performance, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] Figure 1 is a block diagram of a semantic communication model based on non-autoregressive decoding of a neural network proposed in the present invention;
[0103] Figure 2 This is a neural network architecture diagram of the non-autoregressive semantic decoder proposed in the present invention;
[0104] Figure 3 This is a flow chart of the fast reasoning semantic communication method based on non-autoregressive decoding proposed in the present invention;
[0105] Figure 4 2. BLEU score comparison diagram of the existing method and the method of the present invention at different rates under the additive white Gaussian noise channel;
[0106] Figure 5 It is a schematic diagram comparing the BLEU scores of the existing method and the method of the present invention at different rates under Rayleigh fading channel. DETAILED DESCRIPTION
[0107] The present invention will be further defined below with reference to the accompanying drawings and embodiments, but is not limited thereto.
[0108] Example 1
[0109] A fast reasoning semantic communication method based on non-autoregressive decoding runs on a fast reasoning semantic communication system, which includes a transmitter, a channel and a receiver; Figure 3 As shown, including:
[0110] S10: Construct a semantic communication model based on non-autoregressive decoding of neural networks, including a semantic encoder and a joint source-channel encoder, a joint source-channel decoder and a non-autoregressive semantic decoder;
[0111] S20: Sample several sentences of different lengths from the training dataset to form a training batch, and sequentially input the training batches into the semantic encoder and the source-channel joint encoder to obtain a semantic encoding matrix; the English version of the "Proceedings of the European Parliament" public dataset is selected as the training dataset, which has approximately 2.2 million English sentences, and each sentence is preprocessed to have 4 to 30 words.
[0112] S30: inputting the obtained semantic coding matrix into the channel for transmission to obtain a disturbed semantic coding matrix;
[0113] S40: inputting the obtained disturbed semantic coding matrix into the source-channel joint decoder and the non-autoregressive semantic decoder in sequence to obtain a plurality of output probability matrices;
[0114] S50: Based on the sentences sampled in step 2 and the output probability matrix obtained in step 4, a cross entropy loss function is used to train the semantic communication model of non-autoregressive decoding. When a preset number of training times is reached, the training of the semantic communication model of non-autoregressive decoding is completed.
[0115] S60: Deploy the trained non-autoregressive decoding semantic communication model at the transmitter and receiver, respectively, perform reasoning through the trained non-autoregressive decoding semantic communication model, conduct semantic communication, and obtain semantically reconstructed sentences.
[0116] Example 2
[0117] The fast reasoning semantic communication method based on non-autoregressive decoding according to Example 1 is different in that:
[0118] like Figure 1As shown in the figure, the semantic encoder includes 1 word embedding layer and M Transformer encoder layers, and M can generally be set to 3. The word embedding layer includes a learnable word embedding matrix and a fixed position encoding matrix Where V represents the vocabulary size, i.e., the count of all unique words in the text dataset, D represents the dimension of the embedding vector, and L represents the maximum sentence length. D = 128 and L = 30 are generally set. Each Transformer encoder layer consists of a layer normalization module, a multi-head self-attention module, a residual connection module, a layer normalization module, a feedforward network module, and a residual connection module in series.
[0119] The source-channel joint encoder includes two fully connected layers and one ReLu activation function. The input dimension of the source-channel joint encoder is D, and the output dimension is K. Generally, K can be set to 8.
[0120] The source-channel joint decoder consists of three fully connected layers, one layer normalization layer, and one ReLu activation function, and uses residual connections. The input dimension of the source-channel joint encoder is K, and the output dimension is D.
[0121] like Figure 2 As shown in Figure 1, the non-autoregressive semantic decoder consists of M Transformer encoder layers, one fully connected layer, and one Softmax activation function. The Transformer encoder layer in the non-autoregressive semantic decoder has the same network structure as the semantic encoder, but with different neural network parameters. Furthermore, the fully connected layer in the non-autoregressive semantic decoder has an input dimension of D and an output dimension of V.
[0122] Sampling a number of sentences of different lengths from the training data set to form a training batch, and sequentially inputting them into the semantic encoder and the source-channel joint encoder constructed in step 1 to obtain a semantic encoding matrix; including:
[0123] (1) Using small batch parallel training, the input of the semantic encoder is a batch of B sentences Generally, B can be set to 256, where the bth sentence s b is represented as Sentences in a batch are unified to the same sentence length L, w by zero padding b,l represents the lth token of the bth sentence; the input batch S passes through the word embedding layer and M Transformer encoder layers in sequence. The specific process is as follows:
[0124] (a) Batch S passes through word embedding layer f embed(i;Ψ), each word in the sentence is converted into a D-dimensional word vector by looking up ψ; specifically, the b-th sentence s in batch S b Output after word embedding layer for:
[0125] E b =f embed (s b ;Ψ)=[Ψ[w b,1 ],Ψ[w b,2 ],…,Ψ[w b,L ]] T +P,b∈{1,2,…,B} (1);
[0126] in, represents w in ψ b,l The corresponding word vector; since the processing of each sentence in the batch is parallel and independent of each other, after the entire batch S passes through the word embedding layer, the output is the word embedding results E1, E2, ... E b ,…E B 3D tensor stacked along the batch dimension
[0127] E=stack([E1,E2,…,E B ]) (2);
[0128] Where stack(·) represents the stacking operation along the batch dimension;
[0129] (b) The word embedding output E is passed through M Transformer encoder layers in sequence for semantic feature extraction; the Transformer encoder layer processes each sentence in the batch independently and in parallel without changing the input dimension. Specifically, the word embedding E of the bth sentence b Output of the mth Transformer encoder layer for:
[0130]
[0131] in, represents the mth Transformer encoder layer, χ m represent The corresponding set of learnable parameters of the mth layer Transformer encoder layer; finally, the word embedding output E after passing through M Transformer encoder layers is 3D tensor stacked along the batch dimension
[0132]
[0133] (2) The output X of the semantic encoder is compressed by the source-channel joint encoder to obtain the semantic encoding matrix; the source-channel joint encoder processes each sentence in the batch independently and in parallel; specifically, the semantic encoder output X of the b-th sentence is b The semantic coding matrix output after the source channel joint encoder for:
[0134] Z b =J en (X b ;θ) (5);
[0135] Among them, J en (·; θ) represents the source-channel joint encoder with the neural network parameter set θ; finally, the semantic encoder output X passes through the source-channel joint encoder and the output is Z1, Z2, ... Z B 3D tensor stacked along the batch dimension That is the semantic coding matrix corresponding to the entire batch S at the transmitter:
[0136] Z=stack([Z1,Z2,…Z b ,…Z B ]) (6).
[0137] The obtained semantic coding matrix is input into the channel for transmission to obtain a disturbed semantic coding matrix; including:
[0138] Convert the semantic encoding matrix composed of real symbols into a semantic vector composed of complex symbols;
[0139] Perform power normalization on the semantic vector corresponding to each sentence;
[0140] The power-normalized complex semantic vector corresponding to each sentence is transmitted through a wireless fading channel;
[0141] Signal detection is performed on the received signal corresponding to each sentence to obtain the disturbed semantic coding matrix.
[0142] Converting a semantic encoding matrix composed of real symbols into a semantic vector composed of complex symbols; including:
[0143] For the semantic encoding matrix of the bth sentence Z b It is vectorized to obtain Where vec(·) represents rearranging the two-dimensional matrix into a column vector by column;
[0144] Will The two consecutive real number symbols in are used as the real part and imaginary part of the complex number respectively. Converted into complex semantic vector As shown below:
[0145]
[0146] Where N = LK / 2, z b [n] represents z b The nth element of and Respectively represent Without loss of generality, we can assume that LK is an even number, so N is always an integer.
[0147] Perform power normalization on the semantic vector corresponding to each sentence; including:
[0148] The complex semantic vector z of the bth sentence b The result after power normalization is
[0149]
[0150] in, Represents z b The conjugate transpose of , P represents the average transmit power. Without loss of generality, P can be set to 1.
[0151] Further preferably, the power-normalized complex semantic vector corresponding to each sentence is transmitted through a wireless fading channel; comprising:
[0152] The power-normalized complex semantic vector of the b-th sentence After transmission through wireless fading channel, the received signal Expressed as:
[0153]
[0154] Among them, ⊙ represents element-by-element multiplication, represents the channel fading coefficient, represents additive white Gaussian noise, is the channel noise power; for Rayleigh fading channel, For an additive white Gaussian noise channel, h = 1 N is an all-one vector; therefore, the received signal-to-noise ratio γ is defined as:
[0155]
[0156] In order to make the trained neural network model adaptable to different channel conditions, during the training process, the received signal-to-noise ratio corresponding to each sentence in the batch is randomly sampled, that is, in, represents uniform distribution, γ minand γ max Represents the minimum and maximum allowable receive signal-to-noise ratio respectively; generally, γ min =-3,γ max = 18. According to the definition of the sampled γ and the received signal-to-noise ratio, the corresponding noise power can be determined
[0157] Perform signal detection on the received signal corresponding to each sentence to obtain the disturbed semantic coding matrix; including:
[0158] Assuming that the receiving end has obtained the channel state information through channel estimation, the received signal y of the bth sentence is b Perform zero-forcing signal detection and restore the received signal y b The corresponding complex semantic vector for:
[0159]
[0160] Where . / represents element-by-element division;
[0161] Afterwards, the complex vector The real and imaginary parts of each symbol in are decomposed into two consecutive real elements, and the extended real vector is obtained As shown below:
[0162]
[0163] The real vector According to the semantic coding matrix The dimensions of are rearranged to obtain the disturbed semantic encoding matrix of the bth sentence
[0164]
[0165] Finally, the output Z of the transmitter after channel transmission and signal detection is 3D tensor stacked along the batch dimension That is the disturbed semantic encoding matrix corresponding to the entire batch S:
[0166]
[0167] The obtained disturbed semantic coding matrix is sequentially input into the source-channel joint decoder and the non-autoregressive semantic decoder to obtain several output probability matrices; including:
[0168] A. Expand the dimension of the disturbed semantic coding matrix through the source-channel joint decoder; the source-channel joint decoder processes each sentence in the batch independently and in parallel; specifically, the disturbed semantic coding matrix of the b-th sentence is The output after the source-channel joint decoder is for:
[0169]
[0170] Among them, J de (·; φ) represents the source-channel joint decoder with the neural network parameter set φ; finally, the output after signal detection is The output of the source-channel joint decoder is 3D tensor stacked along the batch dimension
[0171]
[0172] B. Output of the joint source-channel decoder After passing through M Transformer encoder layers, 1 fully connected layer, and 1 Softmax activation function, non-autoregressive semantic decoding is performed to obtain the output probability matrix in one go. The specific process is as follows:
[0173] Output of the joint source-channel decoder Sequentially pass through M Transformer encoder layers to recover semantic features; specifically, the output of the source-channel joint decoder of the b-th sentence is Output of the mth Transformer encoder layer for:
[0174]
[0175] in, represent The semantic feature matrix recovered after M layers of Transformer encoder layers, represents the mth Transformer encoder layer that constitutes the non-autoregressive semantic decoder, δ m represent The corresponding set of learnable parameters of the mth Transformer encoder layer;
[0176] The semantic feature matrix recovered from each sentence passes through a fully connected layer and a Softmax activation function, outputting the probability of each word in the vocabulary being selected as the target word, thereby mapping the semantic features to the vocabulary space; specifically, the semantic feature matrix recovered from the bth sentence is The output probability matrix after the fully connected layer and the Softmax activation function for:
[0177]
[0178] Where SoftMax(·) represents the Softmax operation, F(·;ω) represents the last fully connected layer in the semantic decoder, ω represents the set of learnable parameters of the fully connected layer corresponding to F(·;ω); P b Each row represents the probability distribution of the word at the corresponding position in the vocabulary space; finally, the output probability matrix P1, P2, ... P for all B sentences along the batch dimension is B Stack and get the output three-dimensional probability tensor That is the output probability matrix corresponding to the entire batch S:
[0179] P=stack([P1,P2,…P B ]) (19).
[0180] Based on the sentences sampled in step 2 and the output probability matrix obtained in step 4, the semantic communication model of non-autoregressive decoding is trained using the cross entropy loss function. When the preset number of training times is reached, the training of the semantic communication model of non-autoregressive decoding is completed; including:
[0181] The cross entropy loss is calculated based on the current batch of transmitted sentences S and the output three-dimensional probability tensor P; specifically, for the b-th sentence s b Cross entropy loss Expressed as:
[0182]
[0183] Among them, χ = {ψ, χ1, χ2,…, χ M} and δ={ω,δ1,δ2,…,δ M} represent the neural network parameter sets of the semantic encoder and the non-autoregressive semantic decoder respectively; P b [l,w b,l ] represents the lth word of the bth sentence is predicted as the target word w b,l The probability of pad represents the filler word; when w b,l ≠pad, 1{w b,l ≠pad}=1; when w b,l =pad, 1{w b,l ≠pad}=0; therefore, the padding words in the transmitted sentence will be ignored when calculating the cross entropy loss. Afterwards, the average cross entropy loss of the current batch can be obtained by taking the arithmetic average of the cross entropy loss of each sentence in the batch. as follows:
[0184]
[0185] Based on the average cross entropy loss of the current batch The Adam optimizer is used to update the neural network parameters χ, θ, φ, and δ. During the training process, the initial learning rate is set to 0.0001, and the learning rate is halved every 10 training rounds.
[0186] When the preset number of training rounds T is reached, the training of the semantic communication model of non-autoregressive decoding is completed. Generally, T can be set to 60.
[0187] The trained non-autoregressive decoding semantic communication model is deployed at the transmitter and receiver respectively. The trained non-autoregressive decoding semantic communication model is used for reasoning and semantic communication to obtain semantically reconstructed sentences. This includes:
[0188] Deploy the trained semantic encoder and source channel joint encoder at the transmitter, and perform the second step on the transmission sentence. The semantic encoding matrix is obtained by performing semantic encoding and source channel joint encoding through the trained semantic encoder and source channel joint encoder.
[0189] Through step 3, the semantic encoding matrix Z t The signal is transmitted to the receiving end through the wireless channel, and the receiving end performs zero-forcing signal detection on the received signal to obtain the disturbed semantic coding matrix
[0190] Deploy the trained source-channel joint decoder and semantic decoder at the receiving end, and perform the fourth step on the disturbed semantic encoding matrix Perform source channel joint decoding and non-autoregressive semantic decoding to obtain the output probability matrix
[0191] From the output probability matrix P t Select the word with the highest probability in each row, that is, perform Argmax operation along the row dimension to obtain the reconstructed target sentence
[0192]
[0193] Here, ArgMax(·, dim=0) represents the Argmax operation performed on the row dimension of the input matrix, and the target sentence is the semantically reconstructed sentence.
[0194] During the inference phase, the entire semantic decoding and target sentence reconstruction process is completely non-autoregressive, meaning that word units at all positions are generated independently without relying on previous decoding results.
[0195] Table 1: Comparison of decoding delay and end-to-end delay between the existing method and the proposed method at different batch sizes;
[0196] Table 1
[0197]
[0198] Table 1 shows a comparison of the decoding latency and end-to-end latency of the method of the present invention and existing methods under different batch size configurations (1, 16, and 64), where the end-to-end latency includes both encoding latency and decoding latency. As can be seen from Table 1, the decoding latency and end-to-end latency of the method of the present invention are both much lower than those of existing methods. Specifically, compared to existing methods, the method of the present invention reduces decoding latency by 96.71% to 98.35% and end-to-end communication latency by 93.62% to 96.67%, thereby improving user experience.
[0199] Figure 4 The figure shows the BLEU score comparison diagram of the proposed method and the existing method under different coding feature dimensions (4, 8, 16) in the additive white Gaussian noise channel. It should be noted that the increase in coding feature dimension directly corresponds to the improvement of coding rate, but it is also accompanied by an increase in communication overhead. Figure 4 As can be seen from the figure, when the signal-to-noise ratio (SNR) changes from low to high, the semantic recovery performance of all methods shows a monotonous improvement. This is because the improvement of channel quality can effectively suppress the interference of noise on semantic transmission; as the encoding feature dimension expands from 4 to 16, the BLEU scores of all methods gain significant gains, which shows that allocating more communication resources to semantic encoding can effectively improve the system's expressive ability, thereby improving the semantic recovery quality at the receiving end. In addition, from Figure 4 It can be seen that the method of the present invention shows a BLEU score performance advantage that is significantly superior to existing methods. Specifically, under the typical 6dB signal-to-noise ratio condition, when the coding feature dimension K is 4, 8, and 16, the BLEU score of the method of the present invention is improved by 37.80%, 93.36%, and 5.29% respectively compared with the existing method. When the signal-to-noise ratio is increased to 12dB, the relative performance gain remains at 58.83%, 9.34%, and 0.98% respectively. This phenomenon highlights that the performance advantage of the method of the present invention is particularly prominent in low coding rate scenarios. Under high coding rate / high signal-to-noise ratio conditions, as the performance of existing methods gradually approaches the theoretical upper limit, the performance improvement space is correspondingly narrowed.
[0200] Figure 5 The figure shows the BLEU score comparison diagram of the proposed method and the existing method under different coding feature dimensions (4, 8, 16) in Rayleigh fading channel. Figure 5 It can be seen from the figure that although the Rayleigh channel introduces the fading effect, it still shows the same Figure 4Consistent performance change trend under additive white Gaussian noise channel: When the signal-to-noise ratio changes from low to high, the semantic recovery performance of all methods shows a monotonous improvement; as the encoding feature dimension expands from 4 to 16, the BLEU scores of each method all gain significant gains. In addition, it can be seen from the figure that the method of the present invention shows more significant technical advantages in Rayleigh fading channels. Specifically, under the condition of a medium signal-to-noise ratio of 6dB, when the encoding feature dimension K is 4, 8, and 16, the BLEU score of the method of the present invention is improved by 4.58%, 120.83%, and 84.67% respectively compared with the existing method. When the signal-to-noise ratio is increased to 12dB, when the encoding feature dimension K is 4, 8, and 16, the BLEU score of the method of the present invention is improved by 36.90%, 68.54%, and 10.72% respectively compared with the existing method.
[0201] Example 3
[0202] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the fast reasoning semantic communication method based on non-autoregressive decoding described in embodiment 1 or 2 are implemented.
[0203] Example 4
[0204] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the fast reasoning semantic communication method based on non-autoregressive decoding described in embodiment 1 or 2.
[0205] Example 5
[0206] A fast reasoning semantic communication system based on non-autoregressive decoding, comprising:
[0207] The non-autoregressive decoding semantic communication model construction module is configured to: construct a neural network-based non-autoregressive decoding semantic communication model, including a semantic encoder and a source-channel joint encoder, a source-channel joint decoder and a non-autoregressive semantic decoder;
[0208] The semantic coding matrix acquisition module is configured to: sample a number of sentences of different lengths from the training dataset to form a training batch, and sequentially input the training batches into the semantic encoder and the source-channel joint encoder to obtain the semantic coding matrix;
[0209] The disturbed semantic coding matrix acquisition module is configured to: input the obtained semantic coding matrix into the channel for transmission to obtain the disturbed semantic coding matrix;
[0210] The output probability matrix acquisition module is configured to: sequentially input the obtained disturbed semantic coding matrix into the source-channel joint decoder and the non-autoregressive semantic decoder to obtain a plurality of output probability matrices;
[0211] The non-autoregressive decoding semantic communication model training module is configured to: train the non-autoregressive decoding semantic communication model using a cross-entropy loss function based on the sampled sentences and the obtained output probability matrix, and complete the training of the non-autoregressive decoding semantic communication model when a preset number of training times is reached;
[0212] The reasoning semantic communication module is configured to: deploy the trained non-autoregressive decoding semantic communication model at the transmitter and receiver respectively, perform reasoning through the trained non-autoregressive decoding semantic communication model, carry out semantic communication, and obtain semantically reconstructed sentences.
Claims
1. A fast reasoning semantic communication method based on non-autoregressive decoding, characterized in that: The system runs on a fast reasoning semantic communication system, which includes a transmitter, a channel, and a receiver; including: Step 1: Construct a semantic communication model based on non-autoregressive decoding of neural networks, including a semantic encoder and a joint source-channel encoder, a joint source-channel decoder and a non-autoregressive semantic decoder; Step 2: Sample several sentences of different lengths from the training dataset to form a training batch. The training batches are sequentially input into the semantic encoder and the source-channel joint encoder to obtain the semantic encoding matrix. Step 3: Input the obtained semantic coding matrix into the channel for transmission to obtain the disturbed semantic coding matrix; Step 4: Input the obtained disturbed semantic coding matrix into the source-channel joint decoder and the non-autoregressive semantic decoder in sequence to obtain several output probability matrices; Step 5: Based on the sentences sampled in step 2 and the output probability matrix obtained in step 4, the cross-entropy loss function is used to train the semantic communication model of non-autoregressive decoding. When the preset number of training times is reached, the training of the semantic communication model of non-autoregressive decoding is completed. Step 6: Deploy the trained non-autoregressive decoding semantic communication model at the transmitter and receiver respectively, perform inference through the trained non-autoregressive decoding semantic communication model, carry out semantic communication, and obtain semantically reconstructed sentences.
2. The fast reasoning semantic communication method based on non-autoregressive decoding according to claim 1, characterized in that: The semantic encoder consists of 1 word embedding layer and M Transformer encoder layers. The word embedding layer includes a learnable word embedding matrix ψ∈R V×D and a fixed position encoding matrix P∈R L×D Where V represents the vocabulary size, i.e., the count of all unique words in the text dataset, D represents the dimension of the embedding vector, and L represents the maximum sentence length. Each Transformer encoder layer consists of a layer normalization module, a multi-head self-attention module, a residual connection module, a layer normalization module, a feedforward network module, and a residual connection module in series. The source-channel joint encoder consists of two fully connected layers and one ReLu activation function. The input dimension of the source-channel joint encoder is D and the output dimension is K. The source-channel joint decoder consists of three fully connected layers, one layer normalization layer, and one ReLu activation function, and uses residual connections. The input dimension of the source-channel joint encoder is K, and the output dimension is D. The non-autoregressive semantic decoder consists of M Transformer encoder layers, 1 fully connected layer, and 1 Softmax activation function. The network structure of the Transformer encoder layer in the non-autoregressive semantic decoder is the same as that of the semantic encoder. The input dimension of the fully connected layer in the non-autoregressive semantic decoder is D, and the output dimension is V.
3. The fast reasoning semantic communication method based on non-autoregressive decoding according to claim 1, characterized in that: Sampling a number of sentences of different lengths from the training data set to form a training batch, and sequentially inputting them into the semantic encoder and the source-channel joint encoder constructed in step 1 to obtain a semantic encoding matrix; including: (1) Using small batch parallel training, the input of the semantic encoder is a batch of B sentences Among them, the bth sentence s b is represented as Sentences in a batch are unified to the same sentence length L, w by zero padding b,l represents the lth token of the bth sentence; the input batch S passes through the word embedding layer and M Transformer encoder layers in sequence. The specific process is as follows: (a) Batch S passes through word embedding layer f embed (i; Ψ), each word in the sentence is converted into a D-dimensional word vector by looking up ψ; the b-th sentence s in batch S b Output after word embedding layer for: E b =f embed (s b ;Ψ)=[Ψ[w b,1 ],Ψ[w b,2 ],…,Ψ[w b,L ]] T +P,b∈{1,2,…,B} (1); in, represents w in ψ b,l The corresponding word vector; after the entire batch S passes through the word embedding layer, the output is the word embedding results E1, E2, ... E b ,…E B 3D tensor stacked along the batch dimension E=stack([E1,E2,…,E B ]) (2); Where stack(·) represents the stacking operation along the batch dimension; (b) The word embedding output E passes through M Transformer encoder layers in sequence for semantic feature extraction; the Transformer encoder layer processes each sentence in the batch independently and in parallel, and the word embedding E of the bth sentence is b Output of the mth Transformer encoder layer for: in, represents the mth Transformer encoder layer, χ m represent The corresponding set of learnable parameters of the mth layer Transformer encoder layer; finally, the word embedding output E after passing through M Transformer encoder layers is 3D tensor stacked along the batch dimension (2) The output X of the semantic encoder is compressed by the source-channel joint encoder to obtain the semantic encoding matrix; the source-channel joint encoder processes each sentence in the batch independently and in parallel; the semantic encoder output X of the bth sentence b The semantic coding matrix output after the source channel joint encoder for: Z b =J en (X b ;θ) (5); Among them, J en (·; θ) represents the source-channel joint encoder with the neural network parameter set θ; finally, the semantic encoder output X passes through the source-channel joint encoder and the output is Z1, Z2, ... Z B 3D tensor stacked along the batch dimension That is the semantic coding matrix corresponding to the entire batch S at the transmitter: Z=stack([Z1,Z2,…Z b ,…WITH B ]) (6)。 4. The fast reasoning semantic communication method based on non-autoregressive decoding according to claim 1, characterized in that: The obtained semantic coding matrix is input into the channel for transmission to obtain a disturbed semantic coding matrix; including: Convert the semantic encoding matrix composed of real symbols into a semantic vector composed of complex symbols; Perform power normalization on the semantic vector corresponding to each sentence; The power-normalized complex semantic vector corresponding to each sentence is transmitted through a wireless fading channel; Perform signal detection on the received signal corresponding to each sentence to obtain the disturbed semantic coding matrix; Further preferably, converting the semantic coding matrix composed of real symbols into a semantic vector composed of complex symbols includes: For the semantic encoding matrix of the bth sentence Z b It is vectorized to obtain Where vec(·) represents rearranging the two-dimensional matrix into a column vector by column; Will The two consecutive real number symbols in are used as the real part and imaginary part of the complex number respectively. Converted into complex semantic vector As shown below: Where N = LK / 2, z b [n] represents z b The nth element of and Respectively represent The 2n-1th and 2nth elements of ; Further preferably, power normalization is performed on the semantic vector corresponding to each sentence; including: The complex semantic vector z of the bth sentence b The result after power normalization is in, Represents z b The conjugate transpose of , P represents the average transmit power; Further preferably, the power-normalized complex semantic vector corresponding to each sentence is transmitted through a wireless fading channel; comprising: The power-normalized complex semantic vector of the b-th sentence After transmission through wireless fading channel, the received signal Expressed as: Among them, ⊙ represents element-by-element multiplication, represents the channel fading coefficient, represents additive white Gaussian noise, is the channel noise power; for Rayleigh fading channel, For an additive white Gaussian noise channel, h = 1 N is an all-one vector; therefore, the received signal-to-noise ratio γ is defined as: During the training process, the received signal-to-noise ratio corresponding to each sentence in the batch is randomly sampled, that is, in, represents uniform distribution, γ min and γ max Represent the minimum and maximum allowable receive signal-to-noise ratios respectively; according to the definition of the sampled γ and the receive signal-to-noise ratio, the corresponding noise power can be determined Further preferably, signal detection is performed on the received signal corresponding to each sentence to obtain a disturbed semantic coding matrix; comprising: Assuming that the receiving end has obtained the channel state information through channel estimation, the received signal y of the bth sentence is b Perform zero-forcing signal detection and restore the received signal y b The corresponding complex semantic vector for: Among them, . / represents element-by-element division; Afterwards, the complex vector The real and imaginary parts of each symbol in are decomposed into two consecutive real elements, and the extended real vector is obtained As shown below: The real vector According to the semantic coding matrix The dimensions of are rearranged to obtain the disturbed semantic encoding matrix of the bth sentence Finally, the output Z of the transmitter after channel transmission and signal detection is 3D tensor stacked along the batch dimension That is the disturbed semantic encoding matrix corresponding to the entire batch S:
5. The fast reasoning semantic communication method based on non-autoregressive decoding according to claim 1, characterized in that: The obtained disturbed semantic coding matrix is sequentially input into the source-channel joint decoder and the non-autoregressive semantic decoder to obtain several output probability matrices; including: A. Expand the dimension of the disturbed semantic coding matrix through the source-channel joint decoder; the source-channel joint decoder processes each sentence in the batch independently and in parallel; specifically, the disturbed semantic coding matrix of the b-th sentence is The output after the source-channel joint decoder is for: Among them, J de (·; φ) represents the source-channel joint decoder with the neural network parameter set φ; finally, the output after signal detection is The output of the source-channel joint decoder is 3D tensor stacked along the batch dimension B. Output of the joint source-channel decoder After passing through M Transformer encoder layers, 1 fully connected layer, and 1 Softmax activation function, non-autoregressive semantic decoding is performed to obtain the output probability matrix in one go. The specific process is as follows: Output of the joint source-channel decoder Sequentially pass through M Transformer encoder layers to recover semantic features; specifically, the output of the source-channel joint decoder of the b-th sentence is Output of the mth Transformer encoder layer for: in, represent The semantic feature matrix recovered after M layers of Transformer encoder layers, represents the mth Transformer encoder layer that constitutes the non-autoregressive semantic decoder, δ m represent The corresponding set of learnable parameters of the mth Transformer encoder layer; The semantic feature matrix recovered from each sentence passes through a fully connected layer and a Softmax activation function, outputting the probability of each word in the vocabulary being selected as the target word, thereby mapping the semantic features to the vocabulary space; specifically, the semantic feature matrix recovered from the bth sentence is The output probability matrix after the fully connected layer and the Softmax activation function for: Where SoftMax(·) represents the Softmax operation, F(·;ω) represents the last fully connected layer in the semantic decoder, ω represents the set of learnable parameters of the fully connected layer corresponding to F(·;ω); P b Each row represents the probability distribution of the word at the corresponding position in the vocabulary space; finally, the output probability matrix P1, P2, ... P for all B sentences along the batch dimension is B Stack and get the output three-dimensional probability tensor That is the output probability matrix corresponding to the entire batch S: P=stack([P1,P2,…P B ]) (19)。 6. The fast reasoning semantic communication method based on non-autoregressive decoding according to claim 1, characterized in that: Based on the sentences sampled in step 2 and the output probability matrix obtained in step 4, the semantic communication model of non-autoregressive decoding is trained using the cross entropy loss function. When the preset number of training times is reached, the training of the semantic communication model of non-autoregressive decoding is completed; including: The cross entropy loss is calculated based on the current batch of transmitted sentences S and the output three-dimensional probability tensor P; specifically, for the b-th sentence s b Cross entropy loss Expressed as: Among them, χ = {ψ, χ1, χ2,…, χ M } and δ={ω,δ1,δ2,…,δ M } represent the neural network parameter sets of the semantic encoder and the non-autoregressive semantic decoder respectively; P b [l,w b,l ] represents the lth word of the bth sentence is predicted as the target word w b,l The probability of pad represents the filler word; when w b,l ≠pad, 1{w b,l ≠pad}=1; when w b,l =pad, 1{w b,l ≠pad}=0; the average cross entropy loss of the current batch is obtained by arithmetically averaging the cross entropy loss of each sentence in the batch as follows: Based on the average cross entropy loss of the current batch Use Adam optimizer to update the neural network parameters χ, θ, φ, δ; When the preset number of training rounds T is reached, the training of the semantic communication model of non-autoregressive decoding is completed.
7. A fast reasoning semantic communication method based on non-autoregressive decoding according to any one of claims 1 to 6, characterized in that: The trained non-autoregressive decoding semantic communication model is deployed at the transmitter and receiver respectively. The trained non-autoregressive decoding semantic communication model is used for reasoning and semantic communication to obtain semantically reconstructed sentences. This includes: Deploy the trained semantic encoder and source channel joint encoder at the transmitter, and perform the second step on the transmission sentence. The semantic encoding matrix is obtained by performing semantic encoding and source channel joint encoding through the trained semantic encoder and source channel joint encoder. Through step 3, the semantic encoding matrix Z t The signal is transmitted to the receiving end through the channel, and the receiving end performs zero-forcing signal detection on the received signal to obtain the disturbed semantic coding matrix Deploy the trained source-channel joint decoder and semantic decoder at the receiving end, and perform the fourth step on the disturbed semantic encoding matrix Perform source channel joint decoding and non-autoregressive semantic decoding to obtain the output probability matrix From the output probability matrix P t Select the word with the highest probability in each row, that is, perform Argmax operation along the row dimension to obtain the reconstructed target sentence Here, ArgMax(·, dim=0) represents the Argmax operation performed on the row dimension of the input matrix, and the target sentence is the semantically reconstructed sentence.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the fast reasoning semantic communication method based on non-autoregressive decoding are implemented as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the fast reasoning semantic communication method based on non-autoregressive decoding according to any one of claims 1 to 7 are implemented.
10. A fast reasoning semantic communication system based on non-autoregressive decoding, characterized in that: include: The non-autoregressive decoding semantic communication model construction module is configured to: construct a neural network-based non-autoregressive decoding semantic communication model, including a semantic encoder and a source-channel joint encoder, a source-channel joint decoder and a non-autoregressive semantic decoder; The semantic coding matrix acquisition module is configured to: sample a number of sentences of different lengths from the training dataset to form a training batch, and sequentially input the training batches into the semantic encoder and the source-channel joint encoder to obtain the semantic coding matrix; The disturbed semantic coding matrix acquisition module is configured to: input the obtained semantic coding matrix into the channel for transmission to obtain the disturbed semantic coding matrix; The output probability matrix acquisition module is configured to: sequentially input the obtained disturbed semantic coding matrix into the source-channel joint decoder and the non-autoregressive semantic decoder to obtain a plurality of output probability matrices; The non-autoregressive decoding semantic communication model training module is configured to: train the non-autoregressive decoding semantic communication model using a cross-entropy loss function based on the sampled sentences and the obtained output probability matrix, and complete the training of the non-autoregressive decoding semantic communication model when a preset number of training times is reached; The reasoning semantic communication module is configured to: deploy the trained non-autoregressive decoding semantic communication model at the transmitter and receiver respectively, perform reasoning through the trained non-autoregressive decoding semantic communication model, carry out semantic communication, and obtain semantically reconstructed sentences.
Citation Information
Cited By
Semantic communication decoding method based on space-based calculation
CN121750164A