Text semantic communication system optimization method oriented to multiple tasks
By constructing a combined architecture of semantic encoders, channel encoders, channel decoders, and task decoders, combined with the MMoE model and multiple semantic decoders, the problems of low resource utilization and insufficient utilization of shared features between tasks in multi-task semantic communication systems are solved, multi-task collaborative optimization and capture of task-specific features are achieved, and the overall efficiency and accuracy of the system are improved.
Patent Information
- Application Number
- CN202510740181.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-09-19
AI Technical Summary
Existing multi-task semantic communication systems suffer from low resource utilization, redundant model parameters, and insufficient utilization of shared features between tasks, making it difficult to effectively complete the communication needs of multiple tasks.
A combined architecture of semantic encoder, channel encoder, channel decoder and task decoder is adopted, combined with the MMoE model and multiple semantic decoders, and multi-task collaborative optimization and capture of task-specific features are achieved through dynamic weighting and load balancing loss functions.
It improves the system's resource utilization and decoding accuracy, ensures the overall efficiency and accuracy of multi-tasking, and can flexibly handle the diverse needs of different text communication tasks.
Smart Images

Figure CN120671674A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of semantic communication technology, and in particular to a multi-task oriented text semantic communication system optimization method. Background Art
[0002] Currently, single-task semantic communication has made significant progress in all types of information sources. However, in practical applications, when downstream tasks change or multiple models need to be stored to perform different tasks, single-task models often cannot meet the communication needs in complex scenarios. This has prompted researchers to expand from single-task semantic communication to multi-task semantic communication. The core goal of multi-task semantic communication is to build a unified semantic communication framework within which multiple types of data can be jointly modeled, encoded, and transmitted. Through joint modeling, the inherent connections and complementary information between different types of data can be fully explored, improving the understanding and processing capabilities of the overall information.
[0003] While existing multi-task semantic communication system models can achieve multi-task applications to a certain extent, most of them adopt a multi-codec architecture, designing independent encoders and decoders for each task. While this approach can optimize each task specifically, it has significant drawbacks. The multi-codec architecture requires independent resources to be allocated to each task, which not only leads to poor resource utilization and redundant model parameters, but also increases computational resource consumption. Furthermore, independent encoders and decoders struggle to fully capture shared features between tasks, significantly limiting the model's ability to leverage semantic dependencies between them. Therefore, in multi-task semantic communication, completing multiple tasks simultaneously in a single communication is a challenge. Summary of the Invention
[0004] In order to solve the above problems, the present invention aims to provide a multi-task text semantic communication system optimization method to solve the shortcomings of low resource utilization, model parameter redundancy and shared feature utilization between tasks under the existing multi-codec architecture.
[0005] In order to achieve the above technical objectives, the technical solution of the present invention is:
[0006] A multi-task text semantic communication system optimization method, characterized by comprising the following steps:
[0007] (1) Construct a semantic encoder, a channel encoder, a channel decoder, and a task decoder. The task decoder includes a Multi-gate Mixture-of-Experts (MMoE) model and multiple semantic decoders. Each semantic decoder processes a text communication task.
[0008] (2) Based on the semantic encoder, feature extraction is performed on the text source to be transmitted, thereby obtaining general semantic features applicable to various tasks;
[0009] (3) In the channel encoder, channel coding is performed on the multi-task universal semantic features, and then the coding results are sent to the receiving end through the channel transmission; the channel decoder at the receiving end performs channel decoding on the multi-task universal semantic features that have completed the channel coding to obtain a decoded semantic feature vector;
[0010] (4) Input the decoded semantic vector into the denoising module to eliminate the influence of noise introduced during channel transmission to improve data quality and system robustness;
[0011] (5) The semantic vector removed from the noise in step (4) is transferred to the task decoder, and the MMoE model is introduced into the task decoder; the semantic vector is input into each expert network and the gating network, and the expert network is responsible for extracting the specific features of the task; the gating network dynamically calculates the weight of each expert network based on the semantic vector and the system task setting, and then performs weighted summation on the output of the expert network to generate a task-specific semantic vector as the input of multiple semantic decoders;
[0012] (6) Selecting a corresponding semantic decoder according to each semantic communication task; further decoding and outputting the task-specific semantic vector based on the selected semantic decoder.
[0013] Furthermore, in step (5), the MMoE model is introduced into the task decoder to further explore and enhance the correlation between different tasks through dynamic weighting. This not only utilizes the shared information between tasks, but also captures the task-specific feature requirements, achieving multi-task collaborative optimization while ensuring decoding accuracy. The specific implementation process is as follows:
[0014] First, the semantic vector H processed by the denoising module is input into the expert network and gating network in the task decoder. The expert network in the MMoE model can extract the specific features of each task from the input vector for different tasks. i , e i The calculation formula is as follows:
[0015] e i =f expert,i (H) (1)
[0016] Where i∈{1, 2, ..., M}, M is the number of expert networks; f expert,i (·) represents a feedforward neural network;
[0017] At the same time, a gating network is introduced for each task. The gating network dynamically adjusts the weight distribution of the expert network according to the input features and task type to ensure the accuracy of feature extraction. The gating network calculates the weight of each expert network through linear transformation and normalizes it using the softmax function to generate the expert network weight vector for each task. This allows different tasks to utilize expert networks in different ways according to their needs; the output weights of these gating networks determine the importance of each expert network in the task processing process, and the expert network weight g of task τ τ The calculation formula is as follows:
[0018] g τ =softmax(W τ H+b τ ) (2)
[0019] Among them, W τ is the weight matrix of the gating network corresponding to task τ, b τ is the bias term;
[0020] Then, the expert network weight vector generated by the gating network is used to perform weighted summation on the specific features output by each expert network to obtain a set of task-related feature representation vectors; in this process, the semantic information shared by different tasks is fully mined and utilized, and the specific requirements of each task can also be met through dynamic weighting: the weight vector generated by the gating network is used to sum the specific features output by the expert network i Perform weighted calculation to generate the task-related feature representation F of task τ τ The calculation formula is as follows:
[0021]
[0022] in, represents the weight of the i-th expert network in the τ task;
[0023] Through dynamic weighted summation, we can not only fully utilize the semantic information shared between different tasks, but also effectively capture the specific requirements of each task;
[0024] In order to achieve load balancing between different expert networks, a load balancing loss function is introduced to encourage tasks to reasonably distribute weights among multiple expert networks instead of over-relying on a single expert network. Some tasks may tend to use only their own exclusive expert networks and ignore the information of other expert networks, thereby limiting the generalization ability of the model. However, excessive pursuit of load balancing will weaken the task-specific ability of the expert network and affect the quality of task completion. Therefore, a soft load balancing strategy is selected to ensure that each expert network is reasonably involved in the task, while allowing a certain degree of expert network preference to achieve an effective balance between task specificity and load balancing. The design of the load balancing loss function is based on the utilization of each expert network. The utilization is obtained by calculating the average weight of each expert network in each batch. The utilization u of the i-th expert network is i The calculation formula is as follows:
[0025]
[0026] Where T is the number of tasks; B is the batch size; b is the batch index, representing the data of the bth batch, and b∈{1, 2, ..., B}; represents the weight of the τ task for the i-th expert network in the b-th batch;
[0027] By defining a soft load balancing loss function, the utilization of the expert network is made as close to uniform distribution as possible, but a certain deviation is allowed to retain task specificity; the load balancing loss function L bl The calculation formula is as follows:
[0028]
[0029] in, is the ideal activation probability of each expert network in the uniform distribution; It is a tuning parameter used to control the loss threshold. Load balancing loss will only occur when the difference between the utilization rate of the expert network and the ideal value exceeds a certain threshold.
[0030] Finally, the generated task-related features are represented as F τ As a task-specific semantic vector, it is further input into the semantic decoder of the corresponding task to complete the specific text communication task processing;
[0031] Furthermore, in step (6), the task-specific semantic vector is input into the semantic decoder, and a semantic decoder corresponding to the task is selected in the decoder. The present invention takes four tasks as an example, so the semantic decoder includes a text reconstruction decoder, a text translation decoder, a text classification decoder and a sentiment analysis decoder to process different target tasks;
[0032] In the process of completing the above different decoding tasks, the decoder will dynamically adjust the output according to the task requirements and the input semantic vector to ensure that the goal of each task can be achieved accurately and effectively; in this way, it can achieve flexible processing of different text communication tasks and ensure the output quality of the task; the output of the semantic decoder of the task τ The calculation formula is as follows:
[0033]
[0034] Among them, P τ is the weight matrix associated with task τ; χ(·) represents the activation function of the task-specific decoder;
[0035] The performance of different semantic communication tasks is measured differently, so the weighted sum of multi-task losses is used as the total loss L for the task completion part. task , the calculation formula is as follows:
[0036]
[0037] Among them, L task,τ represents the loss of each task τ; β τ It generates the weight coefficient of task τ based on the input features of the task and uses the gating mechanism to dynamically adjust β τ Can balance the impact between different tasks;
[0038] The weight coefficient β of task τ τ The calculation formula is as follows:
[0039] β τ =f(F τ ,θ) (8)
[0040] Here, f(·) is defined as a linear function and θ is the parameter of the gating mechanism. In this way, the weights of tasks can be automatically adjusted according to the changes in input features, thus ensuring balance and coordinated optimization between tasks.
[0041] The loss function of the entire system model combines task loss and load balancing loss. This can simultaneously optimize task objectives and model resource allocation, thereby improving the overall stability and efficiency of the model. The calculation formula is as follows:
[0042] L total =L task +ɑ·L bl (9)
[0043] Among them, α is the weight of the load balancing loss, which is used to adjust the impact of the load balancing loss on the total loss.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] By introducing the MMoE model, we can dynamically weight the mining and enhancement of correlations between different tasks, fully utilizing shared information across tasks while capturing task-specific feature requirements. This allows for multi-task collaborative optimization while ensuring decoding accuracy, improving the system's overall efficiency and accuracy for multi-task processing. The task decoder includes multiple semantic decoders, enabling flexible selection of the appropriate decoder based on the target text communication task, enabling efficient processing of different text communication tasks and meeting diverse application requirements. By dynamically adjusting task weights, we further optimize the multi-task processing process and improve the output quality of each task. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 Schematic diagram of the model framework of the present invention;
[0047] Figure 2 This is a schematic diagram of the task decoder framework of the present invention;
[0048] Figure 3 A comparison chart of the performance of the present invention and other communication methods for text reconstruction tasks on a Gaussian white noise channel;
[0049] Figure 4 A comparison chart of the performance of the present invention and other communication methods for text classification tasks on a Gaussian white noise channel;
[0050] Figure 5 A comparison chart of the performance of the present invention and other communication methods for text translation tasks over a Gaussian white noise channel;
[0051] Figure 6 A comparison chart of the performance of the present invention and other communication methods for text sentiment analysis tasks on a Gaussian white noise channel; DETAILED DESCRIPTION
[0052] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0053] The present invention designs a multi-task text semantic communication system optimization method, such as Figure 1 The specific steps are as follows.
[0054] Step 1: Construct a semantic encoder, channel encoder, channel decoder, and task decoder. The task decoder contains the MMoE model and multiple semantic decoders. Each semantic decoder processes a text communication task.
[0055] Step 2: Based on the constructed semantic encoder, feature extraction is performed on the text source to be transmitted. The semantic encoder uses a BERT-based architecture and fully utilizes bidirectional contextual information for semantic modeling. It fully understands the vocabulary, grammar, and semantic relationships in the text. The generated semantic vector contains rich feature information, including common features such as grammatical structure, semantic consistency, and contextual understanding. It is a universal semantic feature for multiple tasks, rather than extracting different semantic features for different communication tasks.
[0056] Step 3: After semantic coding, the channel encoder enters the channel encoder. The channel encoder consists of a network transformation layer (Reshape layer) and a network density layer (Dense layer). In the channel encoder, the semantic code vector is mapped into a complex symbol stream x. The encoded result is then transmitted through the channel to the receiver. This paper uses Additive White Gaussian Noise (AWGN) as an example.
[0057] The receiving end receives the signal After that, the complex symbols are mapped into vector form by the channel decoder for further processing by the denoising module. 2 ) represents AWGN. The channel decoder consists of a Reshape layer and a Dense layer.
[0058] Step 4: The semantic vector transmitted through the channel is fed into the denoising module. In wireless communication environments, semantic vectors transmitted through the wireless channel are inevitably affected by random channel noise. This noise can interfere with the information contained in the semantic vector, compromising its accuracy and integrity. For example, AWGN randomly superimposes noise signals on the semantic vector, causing deviations in the received semantic vector.
[0059] To reduce the impact of noise, this paper introduces a noise removal algorithm based on the diffusion model. The diffusion model is a powerful generative model that exhibits excellent performance in denoising tasks. The core idea of this algorithm is to gradually remove the noise added to the data, thereby recovering the original real data.
[0060] In this method, the received noisy semantic vector is used as input to the denoising module. The denoising module performs multiple iterations of denoising on the input noisy semantic vector based on a predefined noise distribution and denoising strategy. In each iteration, the model attempts to estimate the distribution and intensity of the noise in the current noisy semantic vector and adjusts the vector based on these estimates, gradually removing the noise.
[0061] Assume that the received noise semantic vector is x0, add noise to the semantic vector at time step t to form the noise data x t , the specific formula is as follows:
[0062]
[0063] in, is the noise control coefficient, which determines the noise intensity; C n represents a weight matrix to better simulate the randomness of channel noise; ε~N(0,I) is random noise with a Gaussian distribution with mean 0 and covariance matrix equal to the identity matrix I;
[0064] In the inverse denoising process, the noise is gradually removed by learning the complex relationship between input data, time steps and output data through the noise estimation network based on the Transformer structure. The specific formula is as follows:
[0065]
[0066] Among them, ∈ η (x t , t) is the noise estimate predicted by the neural network; is the product of all control noise addition process parameters from step 1 to step t-1;
[0067] When t=1, the denoised semantic vector H is finally obtained.
[0068] Step 5: Receive the semantic vector H processed by the denoising module and input it into the expert network and gating network in the task decoder. The MMoE model is introduced in the task decoder to further explore and enhance the correlation between different tasks through dynamic weighting. It can not only utilize the shared information between tasks, but also capture the task-specific feature requirements, and achieve multi-task collaborative optimization while ensuring decoding accuracy. The network structure of the task decoder is as follows: Figure 2 shown.
[0069] First, the semantic vector H processed by the denoising module is input into the expert network and gating network in the task decoder. The expert network in the MMoE model can extract the specific features of each task from the input vector for different tasks. i , e i The calculation formula is as follows:
[0070] e i =f expert,i (H) (3)
[0071] Where i∈{1, 2, ..., M}, M is the number of expert networks; f expert,i (·) represents a feedforward neural network;
[0072] At the same time, a gating network is introduced for each task. The gating network dynamically adjusts the weight distribution of the expert network according to the input features and task type to ensure the accuracy of feature extraction. The gating network calculates the weight of each expert network through linear transformation and normalizes it using the softmax function to generate the expert network weight vector for each task. This allows different tasks to utilize expert networks in different ways according to their needs; the output weights of these gating networks determine the importance of each expert network in the task processing process, and the expert network weight g of task τ τ The calculation formula is as follows:
[0073] g r =softmax(W τ H+b τ ) (4)
[0074] Among them, W τ is the weight matrix of the gating network corresponding to task τ, b τ is the bias term;
[0075] Then, the expert network weight vector generated by the gating network is used to perform weighted summation on the specific features output by each expert network to obtain a set of task-related feature representation vectors. In this process, the semantic information shared by different tasks is fully mined and utilized, and the specific requirements of each task can also be met through dynamic weighting. The weight vector generated by the gating network is used to weight the specific features output by the expert network. i Perform weighted calculation to generate the task-related feature representation F of task τ τ The calculation formula is as follows:
[0076]
[0077] in, represents the weight of the i-th expert network in the τ task;
[0078] Through dynamic weighted summation, we can not only fully utilize the semantic information shared between different tasks, but also effectively capture the specific requirements of each task;
[0079] In order to achieve load balancing between different expert networks, a load balancing loss function is introduced to encourage tasks to reasonably distribute weights among multiple expert networks instead of over-relying on a single expert network. Some tasks may tend to use only their own exclusive expert networks and ignore the information of other expert networks, thereby limiting the generalization ability of the model. However, excessive pursuit of load balancing will weaken the task-specific ability of the expert network and affect the quality of task completion. Therefore, a soft load balancing strategy is selected to ensure that each expert network is reasonably involved in the task, while allowing a certain degree of expert network preference to achieve an effective balance between task specificity and load balancing. The design of the load balancing loss function is based on the utilization of each expert network. The utilization is obtained by calculating the average weight of each expert network in each batch. The utilization u of the i-th expert network is i The calculation formula is as follows:
[0080]
[0081] Where T is the number of tasks; B is the batch size; b is the batch index, representing the data of the bth batch, and b∈{1, 2, ..., B}; represents the weight of the τ task for the i-th expert network in the b-th batch;
[0082] By defining a soft load balancing loss function, the utilization of the expert network is made as close to uniform distribution as possible, but a certain deviation is allowed to retain task specificity; the load balancing loss function L bl The calculation formula is as follows:
[0083]
[0084] in, is the ideal activation probability of each expert network in the uniform distribution; It is a tuning parameter used to control the loss threshold. Load balancing loss will only occur when the difference between the utilization of the expert network and the ideal value exceeds a certain threshold.
[0085] Finally, the generated task-related features are represented by F τ As a task-specific semantic vector, it is further input into the semantic decoder of the corresponding task to complete the specific text communication task processing;
[0086] Step 6: Input the task-specific semantic vector into the semantic decoder in the task decoder, and select the semantic decoder corresponding to the task in the decoder. This invention takes four tasks as an example, so the semantic decoder includes a text reconstruction decoder, a text translation decoder, a text classification decoder, and a sentiment analysis decoder to handle different target tasks;
[0087] In the process of completing the above different decoding tasks, the decoder will dynamically adjust the output according to the task requirements and the input semantic vector to ensure that the goal of each task can be achieved accurately and effectively; in this way, it can achieve flexible processing of different text communication tasks and ensure the output quality of the task; the output of the semantic decoder of the task τ The calculation formula is as follows:
[0088]
[0089] Among them, P τ is the weight matrix associated with task τ; χ(·) represents the activation function of the task-specific decoder;
[0090] The performance of different semantic communication tasks is measured differently, so the weighted sum of multi-task losses is used as the total loss L for the task completion part. task , the calculation formula is as follows:
[0091]
[0092] Among them, L task,τ represents the loss of each task τ; β τ It generates the weight coefficient of task τ based on the input features of the task and uses the gating mechanism to dynamically adjust β τ Can balance the impact between different tasks;
[0093] The weight coefficient β of task τ τ The calculation formula is as follows:
[0094] β τ =f(F τ ,θ) (10)
[0095] Here, f(·) is defined as a linear function and θ is the parameter of the gating mechanism. In this way, the weights of tasks can be automatically adjusted according to the changes in input features, thus ensuring balance and coordinated optimization between tasks:
[0096] The loss function of the entire system model combines task loss and load balancing loss. This can simultaneously optimize task objectives and model resource allocation, thereby improving the overall stability and efficiency of the model. The calculation formula is as follows:
[0097] L total =L task +α·L bl (11)
[0098] Among them, α is the weight of the load balancing loss, which is used to adjust the impact of the load balancing loss on the total loss.
[0099] Depend on Figure 3It can be seen that when the method of the present invention is compared with the unified deep learning driven semantic communication system, for the text reconstruction task, the semantic similarity of the proposed model under high signal-to-noise ratio is better than that of the unified deep learning driven semantic communication system in different signal-to-noise ratio ranges, and the performance is improved.
[0100] Depend on Figure 4 It can be seen that when the method of the present invention is compared with the unified deep learning driven semantic communication system, in different signal-to-noise ratio ranges, for text classification tasks, the accuracy of the proposed model is better than that of the unified deep learning driven semantic communication system, and the performance is improved.
[0101] Depend on Figure 5 It can be seen that when the method of the present invention is compared with the unified deep learning driven semantic communication system, for text translation tasks, in different signal-to-noise ratio ranges, the bilingual evaluation replacement score Bilingual Evaluation Understudy (BLEU) of the proposed model is better than that of the unified deep learning driven semantic communication system, and the performance is improved.
[0102] Depend on Figure 6 It can be seen that when the method of the present invention is compared with the unified deep learning driven semantic communication system, in different signal-to-noise ratio ranges, for sentiment analysis tasks, the accuracy of the proposed model is better than that of the unified deep learning driven semantic communication system, and the performance is improved.
Claims
1. A multi-task text semantic communication system optimization method, characterized in that: The following steps are involved: (1) Construct a semantic encoder, a channel encoder, a channel decoder, and a task decoder. The task decoder includes a Multi-gate Mixture-of-Experts (MMoE) model and multiple semantic decoders. Each semantic decoder processes a text communication task. (2) Based on the semantic encoder, feature extraction is performed on the text source to be transmitted, thereby obtaining general semantic features applicable to various tasks; (3) In the channel encoder, channel coding is performed on the multi-task universal semantic features, and then the coding results are sent to the receiving end through the channel transmission; the channel decoder at the receiving end performs channel decoding on the multi-task universal semantic features that have completed the channel coding to obtain a decoded semantic feature vector; (4) Input the decoded semantic vector into the denoising module to eliminate the influence of noise introduced during channel transmission to improve data quality and system robustness; (5) The semantic vector removed from the noise in step (4) is transferred to the task decoder, and the MMoE model is introduced into the task decoder; the semantic vector is input into each expert network and the gating network, and the expert network is responsible for extracting the specific features of the task; The gating network dynamically calculates the weight of each expert network based on the semantic vector and system task settings, and then performs weighted summation on the outputs of the expert networks to generate task-specific semantic vectors as input to multiple semantic decoders; (6) Selecting a corresponding semantic decoder according to each semantic communication task; further decoding and outputting the task-specific semantic vector based on the selected semantic decoder.
2. A multi-task text semantic communication system optimization method according to claim 1, characterized in that: In step (5), the MMoE model is introduced into the task decoder to further explore and enhance the correlation between different tasks through dynamic weighting. It can not only utilize the shared information between tasks, but also capture the task-specific feature requirements, and achieve multi-task collaborative optimization while ensuring decoding accuracy. The specific implementation process is as follows: First, the semantic vector H processed by the denoising module is input into the expert network and gating network in the task decoder. The expert network in the MMoE model can extract the specific features of each task from the input vector for different tasks. i , e i The calculation formula is as follows: e i =f expert,i (H) (1) Where i∈{1, 2, ..., M}, M is the number of expert networks; f expert,i (·) represents a feedforward neural network; At the same time, a gating network is introduced for each task. The gating network dynamically adjusts the weight distribution of the expert network according to the input features and task type to ensure the accuracy of feature extraction. The gating network calculates the weight of each expert network through linear transformation and normalizes it using the softmax function to generate the expert network weight vector for each task. This allows different tasks to utilize expert networks in different ways according to their needs; the output weights of these gating networks determine the importance of each expert network in the task processing process, and the expert network weight g of task τ τ The calculation formula is as follows: g τ =softmax(W τ H+b τ ) (2) Among them, W τ is the weight matrix of the gating network corresponding to task τ, b τ is the bias term; Then, the expert network weight vector generated by the gating network is used to perform weighted summation on the specific features output by each expert network to obtain a set of task-related feature representation vectors; in this process, the semantic information shared by different tasks is fully mined and utilized, and the specific requirements of each task can also be met through dynamic weighting: the weight vector generated by the gating network is used to sum the specific features output by the expert network i Perform weighted calculation to generate the task-related feature representation F of task τ τ The calculation formula is as follows: in, represents the weight of the i-th expert network in the τ task; Through dynamic weighted summation, we can not only fully utilize the semantic information shared between different tasks, but also effectively capture the specific requirements of each task; In order to achieve load balancing between different expert networks, a load balancing loss function is introduced to encourage tasks to reasonably distribute weights among multiple expert networks instead of over-relying on a single expert network. Some tasks may tend to use only their own exclusive expert networks and ignore the information of other expert networks, thereby limiting the generalization ability of the model. However, excessive pursuit of load balancing will weaken the task-specific ability of the expert network and affect the quality of task completion. Therefore, a soft load balancing strategy is selected to ensure that each expert network is reasonably involved in the task, while allowing a certain degree of expert network preference to achieve an effective balance between task specificity and load balancing. The design of the load balancing loss function is based on the utilization of each expert network. The utilization is obtained by calculating the average weight of each expert network in each batch. The utilization u of the i-th expert network is i The calculation formula is as follows: Where T is the number of tasks; B is the batch size; b is the batch index, representing the data of the bth batch, and b∈{1, 2, ..., B}; represents the weight of the τ task for the i-th expert network in the b-th batch; By defining a soft load balancing loss function, the utilization of the expert network is made as close to uniform distribution as possible, but a certain deviation is allowed to retain task specificity; the load balancing loss function L bl The calculation formula is as follows: in, is the ideal activation probability of each expert network in the uniform distribution; It is a tuning parameter used to control the loss threshold. Load balancing loss will only occur when the difference between the utilization rate of the expert network and the ideal value exceeds a certain threshold. Finally, the generated task-related features are represented as F τ As a task-specific semantic vector, it is further input into the semantic decoder of the corresponding task to complete the specific text communication task processing.
3. A multi-task text semantic communication system optimization method according to claim 1, characterized in that: In step (6), each semantic communication task selects a corresponding semantic decoder from the task decoder to process different target tasks; In the process of completing the above different decoding tasks, the decoder will dynamically adjust the output according to the task requirements and the input semantic vector to ensure that the goals of each task can be achieved accurately and effectively. In this way, it can achieve flexible processing of different text communication tasks and ensure the output quality of the tasks; The output of the semantic decoder for the task τ The calculation formula is as follows: Among them, P τ is the weight matrix associated with task τ; χ(·) represents the activation function of the task-specific decoder; The performance of different semantic communication tasks is measured differently, so the weighted sum of multi-task losses is used as the total loss L for the task completion part. task , the calculation formula is as follows: Among them, L task,τ represents the loss of each task τ; β τ It generates the weight coefficient of task τ based on the input features of the task and uses the gating mechanism to dynamically adjust β τ Can balance the impact between different tasks; The weight coefficient β of task τ τ The calculation formula is as follows: b τ =f(F τ ,i) (8) Here, f(·) is defined as a linear function and θ is the parameter of the gating mechanism. In this way, the weights of tasks can be automatically adjusted according to the changes in input features, thus ensuring balance and coordinated optimization between tasks. The loss function of the entire system model combines task loss and load balancing loss. This can simultaneously optimize task objectives and model resource allocation, thereby improving the overall stability and efficiency of the model. The calculation formula is as follows: L total =L tusk +α·L bl (9) Among them, α is the weight of the load balancing loss, which is used to adjust the impact of the load balancing loss on the total loss.