A method and system for optimizing multi-agent communication topology based on semantic contribution evaluation

By constructing an initial communication graph and performing virtual and real executions, the relative contribution value of communication edges is evaluated using an edge value prediction model, thereby optimizing the topology of the multi-agent system. This solves the problems of communication redundancy and inefficiency in existing technologies and achieves efficient and robust multi-agent collaborative reasoning.

CN122339975APending Publication Date: 2026-07-03HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN ENG UNIV
Filing Date
2026-04-24
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing multi-agent systems lack task adaptability in their communication topology design, leading to communication redundancy and inefficiency. Furthermore, existing methods cannot accurately evaluate the semantic contribution of communication edges.

Method used

By constructing an initial communication graph, performing virtual and real executions, evaluating the relative contribution value of communication edges using an edge value prediction model, updating activation probabilities through an Actor network, and pruning and optimizing the communication graph, accurate semantic-level contribution evaluation and dynamic topology optimization are achieved.

Benefits of technology

It significantly reduces token consumption during communication, improves the robustness and task performance of multi-agent systems, and enhances the scalability and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122339975A_ABST
    Figure CN122339975A_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for optimizing multi-agent communication topology based on semantic contribution evaluation. The method includes: constructing an initial communication graph containing multiple agents; performing several rounds of virtual execution on the multiple agents of a target task, and sampling edges based on the current activation probabilities; predicting the relative contribution values ​​of the sampled edges using an edge value prediction model, and calculating virtual rewards to update the Actor network; performing real execution after several rounds of virtual execution, obtaining real rewards to update the Actor network again, updating the activation probabilities of each edge in the initial communication graph based on the updated Actor network, and pruning the initial communication graph to obtain an optimized communication graph. This invention enables query-level adaptive communication structure generation, reduces communication redundancy, and improves the efficiency and scalability of multi-agent collaborative reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method and system for optimizing multi-agent communication topology based on semantic contribution evaluation. Background Technology

[0002] In recent years, multi-agent systems based on Large Language Models (LLMs) have demonstrated powerful capabilities in complex reasoning, decision-making, and collaborative problem-solving. By decomposing complex tasks and organizing multiple agents with different roles to interact, these systems can achieve collective intelligence beyond a single model. Existing multi-agent frameworks, such as AutoGen and MetaGPT, typically employ predefined static communication topologies such as chains, stars, or hierarchies to organize information flow between agents.

[0003] However, these static or heuristic communication structures have significant limitations. First, they are typically designed manually as inductive biases, lacking adaptability to specific tasks, leading to a large amount of unnecessary communication, introducing high token overhead, and limiting the system's scalability. Second, while existing methods such as AgentPrune or AgentDropout attempt to prune or dynamically remove agents from the communication graph to improve efficiency, they primarily focus on structural or temporal optimizations, ignoring the semantic value of the communication content itself. This makes it difficult for the system to distinguish whether the information conveyed by a communication edge is truly useful for decision-making or merely redundant information that happens to resemble the final output. In particular, edges closer to the final output node naturally have more semantically similar information to the final result; this positional bias makes it impossible for existing methods to accurately assess the true contribution of each edge.

[0004] Therefore, there is an urgent need for a method that can delve into the semantic level, accurately assess the information value of each communication edge, and dynamically and efficiently optimize the communication topology accordingly, in order to improve the performance and efficiency of multi-agent systems. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for optimizing the communication topology of a multi-agent system based on semantic contribution evaluation, thereby achieving query-level adaptive communication structure generation, reducing communication redundancy, and improving the efficiency and scalability of multi-agent collaborative reasoning.

[0006] To achieve the above objectives, the present invention provides the following solution: A method for optimizing multi-agent communication topology based on semantic contribution evaluation includes: Construct an initial communication graph containing multiple agents, wherein the initial communication graph includes nodes and edges, the nodes represent agents, and the edges represent communication paths between agents; The multiple agents in the target task are subjected to several rounds of virtual execution, and the communication edges are sampled according to the current activation probability in each round of virtual execution; The relative contribution value of the sampled edge is predicted by the edge value prediction model, and the virtual reward is calculated to update the Actor network. The edge value prediction model is obtained by training a lightweight neural network that includes context information related to the communication edge and the corresponding real relative contribution value. After several rounds of virtual execution, real execution is performed to obtain real rewards and update the Actor network again. The activation probability of each edge in the initial communication graph is updated according to the updated Actor network, and the initial communication graph is pruned to obtain an optimized communication graph.

[0007] Optionally, obtaining the true relative contribution value includes: Multiple intelligent agents perform one or more rounds of real communication tasks, obtaining the text messages transmitted on each execution edge and the final aggregated output message of the current round of tasks; The text message and the final aggregated output message are encoded into a first semantic vector and a second semantic vector, respectively, and the semantic similarity between the first semantic vector and the second semantic vector is calculated as the utility value of the edge. The true relative contribution value is obtained by subtracting the average utility value of all incoming edges from the source node from the utility value of the edge.

[0008] Optionally, the training objective of the edge value prediction model is to minimize the error between the predicted relative contribution value and the actual relative contribution value.

[0009] Optionally, calculating the virtual reward update for the Actor network includes: The Actor network is updated using the policy gradient loss based on the virtual reward: ; in, Let the policy gradient loss function be used. This is the set of communication edges sampled based on the activation probability in the current round; This is the communication edge between node i and node j; The current communication edge between node i and node j Activation probability; For communication edge The virtual reward value in the current execution round; The sparsity regularization coefficient; This is the set of parameters used to model spatial communication edges in a policy network; This is the set of parameters used to model time communication edges in the policy network; For the edge Endowed with learnable value.

[0010] Optionally, obtaining real rewards includes: calculating the actual relative contribution value based on the actual execution process. The true relative contribution values ​​of all communication edges executed in this round are normalized to obtain the true reward. : ; in, Represents the set of communication edges Any communication edge in the middle, the communication edge connects to the node With nodes ; To prevent small constants with a denominator of zero, For communication edge The true relative contribution value.

[0011] Optionally, updating the activation probability of each edge in the initial communication graph includes: A learnable logit value is assigned to each edge. Based on the virtual reward, the logit value is optimized using policy gradient loss. The optimized logit value is then updated using a sigmoid function to map and update the activation probability of each edge.

[0012] Optionally, pruning the initial communication graph includes: ; Where BottomK represents the set of communication edges with the minimum utility value; |E| represents the number of communication edges in the current communication graph; p is a preset pruning ratio used to control the number of communication edges to be pruned; This is the set of communication edges retained after pruning. For communication edge The utility value.

[0013] This invention also provides a multi-agent communication topology optimization system based on semantic contribution evaluation, comprising: A communication graph construction module is used to construct an initial communication graph containing multiple agents, wherein the initial communication graph includes nodes and edges, the nodes represent agents, and the edges represent communication paths between agents; The edge value prediction module is used to perform several rounds of virtual execution on multiple agents of the target task, sample edges according to the current activation probability, predict the relative contribution value of the sampled edges through the edge value prediction model, and calculate the virtual reward. The edge value prediction model is obtained by training a lightweight neural network that includes context information related to the communication edges and the corresponding real relative contribution value. The strategy network module is used to calculate virtual rewards to update the Actor network. After several rounds of virtual execution, real execution is performed to obtain real rewards and update the Actor network again. The activation probability of each edge in the initial communication graph is updated according to the updated Actor network, and the initial communication graph is pruned to obtain an optimized communication graph.

[0014] The beneficial effects of this invention are as follows: 1. Accurate semantic-level contribution evaluation: By comparing the semantic similarity between the message content and the final decision result, this invention can directly quantify the semantic value of the information of each communication edge, thus solving the blind spot of existing technologies that rely solely on structural or temporal information for optimization.

[0015] 2. Eliminate positional bias: By introducing a relative contribution value, the utility of an edge is compared with the average input level of its source node, which effectively eliminates the natural similarity bias caused by its later position in the communication graph, making the evaluation of edge value more fair and accurate.

[0016] 3. Significantly Improved Token Efficiency: This invention utilizes virtual execution. This allows extensive policy exploration to be completed without invoking expensive large language models, significantly reducing token consumption during training and inference. Experiments show that token usage can be reduced by 21.2% - 61.6% compared to existing technologies.

[0017] 4. Enhanced system robustness: Because it can identify and suppress low-value or negative-value communication edges, this invention can effectively block the spread of malicious information when encountering adversarial agents that generate misleading information, thus exhibiting stronger robustness and stability.

[0018] 5. Improved task performance: By constructing a more streamlined and efficient communication topology, this invention achieved an average accuracy of 91.36% on multiple complex inference and code generation tasks, surpassing many existing multi-agent communication optimization methods. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a multi-agent communication topology optimization method based on semantic contribution evaluation according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating the training and virtual execution process of the edge value prediction model in an embodiment of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] like Figure 1 As shown, this embodiment proposes a multi-agent communication topology optimization method based on semantic contribution evaluation, including: Construct an initial communication graph containing multiple agents, wherein the initial communication graph includes nodes and edges, the nodes represent agents, and the edges represent communication paths between agents; In the actual execution process, the text messages transmitted on each communication edge and the final aggregated output results are obtained, and the utility value of each communication edge is calculated based on semantic similarity, so as to obtain the corresponding real relative contribution value for subsequent model training. Based on the true relative contribution value, train the edge value prediction model so that it can predict the corresponding relative contribution value according to the context information of the communication edge. The target task involves several rounds of virtual execution for multiple agents. In each round of virtual execution, the communication edges are sampled according to the current activation probability, and the relative contribution value of the sampled edges is predicted by the edge value prediction model. Then, the virtual reward is calculated to update the policy network (Actor). After several rounds of virtual execution, real execution is performed to obtain real rewards and update the policy network again. The activation probability of each communication edge in the initial communication graph is adjusted according to the updated policy network. The initial communication graph is then pruned according to the updated communication edge activation probability to obtain an optimized communication topology.

[0024] Specifically, constructing an initial communication graph containing multiple agents involves: each node in the graph representing an LLM agent with a specific role (such as "mathematician" or "programming expert"). The edges in the graph are divided into two categories: spatial edges (communication within the same round) and temporal edges (dependencies across rounds). Each edge... Endowed with a learnable ability value Its activation probability is Given a task query (For example, a math problem or code requirement), the system will perform multiple rounds of communication.

[0025] Furthermore, obtaining the true relative contribution value includes: Multiple intelligent agents perform one or more rounds of real communication tasks, obtaining the text messages transmitted on each execution edge and the final aggregated output message of the current round of tasks; The text message and the final aggregated output message are encoded into a first semantic vector and a second semantic vector, respectively, and the semantic similarity between the first semantic vector and the second semantic vector is calculated as the utility value of the edge. The true relative contribution value is obtained by subtracting the average utility value of all incoming edges from the source node from the utility value of the edge.

[0026] Specifically, such as Figure 2 As shown, for each round of actual execution, the system samples the activated edges and calls the LLM in topological order to generate messages and the final answer.

[0027] Step 1: Calculate the utility value of each edge. After this round, for each edge that was executed... Extract the text message it transmits. and the final aggregated output message of this round 。 They are encoded into fixed-dimensional semantic vectors using a shared, pre-trained sentence encoder (e.g., all-MiniLM-L6-v2). and .side utility value The cosine similarity between the two vectors is defined as follows: ; in, The higher the value, the greater the degree to which the information on that edge is adopted in the final decision.

[0028] Step 2: Calculate the relative contribution value to eliminate positional bias. To eliminate the natural positional advantage of edges closer to the output node, this invention proposes a relative contribution value. For edges... (from node) To the node First, calculate its source node. Average utility of all incoming edges: ; in It points to a node The set of edges. Then, define the true relative contribution value. for: ; in: Representing an edge The true relative contribution value, This represents the set of all input communication edges of node i. Let $k$ represent the utility value of the $k$-th input edge of node $i$. This indicates the number of input edges.

[0029] This indicates that the edge has transmitted new, valuable information beyond what its source node has already received; conversely, it indicates that the edge's information is redundant or harmful.

[0030] Step 3: Based on the actual relative contribution value calculated during the actual execution process. Generate a true reward signal to guide the optimization of the communication graph structure. This embodiment normalizes the relative contribution values ​​of all executed communication edges in this round to obtain the true reward signal in reinforcement learning. : ; in This is the set of communication edges actually executed in the current round; To prevent small constants with a denominator of zero.

[0031] Furthermore, to evaluate edge value without invoking LLM, this embodiment trains an edge value prediction model as a Critic. The edge value prediction model is a lightweight neural network whose goal is to predict the calculated relative contribution value. The training of the edge value prediction model specifically includes: Step 1: Inputs and Outputs of the Edge Value Prediction Model. Inputs of the Edge Value Prediction Model It includes contextual information related to the communication edge, such as source node information, target node information, and task information. The model output is a scalar representing the communication edge. The relative contribution prediction value is denoted as: ; in, Indicates communication edge Input features, This represents the function mapping corresponding to the edge value prediction model. These are the model parameters.

[0032] Step 2: Training and Locking the Edge Value Prediction Model. The training objective of the edge value prediction model is to minimize the error between its predicted and actual values. For example, mean squared error can be used as the loss function. ; When the model's prediction error is below a preset threshold, its parameters are frozen, at which point the model becomes a stable, low-cost value simulator.

[0033] Furthermore, calculating the virtual reward to update the Actor network includes updating the Actor network using policy gradient loss based on the virtual reward.

[0034] Specifically, in order to efficiently update the policy network (Actor) controlling the activation probability of the edges, this embodiment adopts a hybrid execution strategy combining virtual and real elements, including the following steps: Step 1: Virtual Execution. For a given task... First, Rounds of virtual execution. In each round of virtual execution, based on the current activation probability... Sample a set of edges Then, the locked edge value prediction model is used to predict the relative contribution value for each sampled edge. And calculate virtual rewards accordingly. Next, the Actor is updated using the policy gradient loss. : ; in, Let the policy gradient loss function be used. This is the set of communication edges sampled based on the activation probability in the current round; This is the communication edge between node i and node j; The current communication edge between node i and node j Activation probability; For communication edge The virtual reward value in the current execution round is used to measure the relative contribution of that edge to the final decision result; is the sparsity regularization coefficient, used to control the sparsity of the communication graph structure; This is the set of parameters used in the policy network to model spatial edges, which are used to generate the activation probabilities of communication edges between different agents in the same round. This is the set of parameters used in the policy network to model temporaledges, which are used to generate the activation probabilities of cross-round communication dependencies. For the edge Endowed with learnable The value is used to calculate the activation probability through the mapping function. .

[0035] The entire virtual execution process does not involve any LLM calls.

[0036] Step 2: Actual Execution. After a round of virtual execution, a second round of real LLM execution is performed. In this round, real rewards are used. To update the Actor, while using the real data from this round. This is used to update the edge value prediction model. This hybrid mechanism significantly reduces the token cost required for training.

[0037] Furthermore, the actual reward is obtained by normalizing the actual relative contribution values ​​of all executed communication edges in this round: ; in, Real rewards; This is the set of edges executed in this round; Represents the set of communication edges Any communication edge in the middle, the communication edge connects to the node With nodes ; For communication edge The true relative contribution value; For communication edge The true relative contribution value; This is a preset small constant used to prevent the denominator from being zero.

[0038] Furthermore, updating the activation probability of each edge in the initial communication graph includes: A learnable logit value is assigned to each edge. Based on the virtual reward, the logit value is optimized using policy gradient loss. The optimized logit value is then updated using a sigmoid function to map and update the activation probability of each edge.

[0039] Specifically, updating the activation probability of each edge in the communication graph includes: assigning a learnable probability to each edge. value Its activation probability is ,in for The function; based on the reward signal, optimizes the policy gradient method. The value increases the activation probability of edges that receive positive rewards and decreases the activation probability of edges that receive negative rewards.

[0040] Furthermore, pruning the initial communication graph includes: ; Where BottomK represents the set of communication edges with the minimum utility value; |E| represents the number of communication edges in the current communication graph; The preset pruning ratio is used to control the number of communication edges that are pruned. For communication edge The corresponding mask variable is used to indicate whether the communication edge is preserved; This is the set of communication edges retained after pruning. For communication edge The utility value is used to measure the semantic contribution of the communication edge in the current task.

[0041] Specifically, during the inference phase, for a new test query, the system first starts from the trained snapshot state and performs a small amount of (e.g., The virtual execution (step 1) is performed to fine-tune the edge probabilities to suit the current query. Then, based on the adjusted probabilities, a preset pruning ratio is applied. Pruning the probabilistic edge set yields a highly streamlined communication subgraph for the query. Finally, a single round of actual LLM calls is executed on this pruned subgraph to obtain the final answer.

[0042] Through the above method, the present invention can dynamically "tailor" an efficient, accurate and cost-effective communication topology for each task.

[0043] Table 1 As shown in Table 1, the proposed method and several baseline methods are compared on three mathematical inference datasets: GSM8K, MultiArith, and SVAMP. The evaluation metrics include accuracy, prompt tokens consumed during inference, completion tokens, and total tokens.

[0044] As shown in Table 1, the proposed AgentTailor method significantly reduces token consumption while maintaining high task accuracy. On the GSM8K dataset, compared to AgentPrune-R, AgentTailor significantly reduces total token consumption from 2,809,753 to 1,680,496, while only slightly decreasing accuracy. On the MultiArith and SVAMP datasets, AgentTailor achieves accuracy that meets or exceeds some baseline methods while reducing computational overhead.

[0045] Furthermore, combining AgentTailor with GPTSwarm (GPTSwarm+AgentTailor) further reduces token consumption and achieves optimal or near-optimal computational efficiency on multiple datasets, verifying the effectiveness of the proposed communication topology optimization method in reducing the cost of calling large language models.

[0046] In summary, the proposed method can significantly reduce redundant communication overhead in multi-agent systems while ensuring inference performance, achieving an effective balance between computational efficiency and task performance.

[0047] This embodiment also provides a multi-agent communication topology optimization system based on semantic contribution evaluation, including: A communication graph construction module is used to construct an initial communication graph containing multiple agents, wherein the initial communication graph includes nodes and edges, the nodes represent agents, and the edges represent communication paths between agents; The edge value prediction module is used to perform several rounds of virtual execution on multiple agents of the target task, sample edges according to the current activation probability, predict the relative contribution value of the sampled edges through the edge value prediction model, and calculate the virtual reward. The edge value prediction model is obtained by training a lightweight neural network that includes context information related to the communication edges and the corresponding real relative contribution value. Specifically, the value prediction module can be implemented using any learnable model. Its input includes contextual information related to the communication edge, and its output is the predicted relative contribution value. The edge value prediction module is trained by fitting the true relative contribution value generated by the edge evaluation module. A locking mechanism is also included: once the prediction accuracy of the edge value prediction module reaches a stable level, its model parameters are frozen, making it a stable virtual environment for virtual execution in subsequent training and inference phases.

[0048] The strategy network module is used to calculate virtual rewards to update the Actor network. After several rounds of virtual execution, real execution is performed to obtain real rewards and update the Actor network again. The activation probability of each edge in the initial communication graph is updated according to the updated Actor network, and the initial communication graph is pruned to obtain an optimized communication graph.

[0049] The training process includes a hybrid execution phase. For each training sample, K virtual executions based on the edge prediction network module are performed to update the policy network module, and then a real LLM call is performed to update both the policy network module and the edge prediction network module simultaneously.

[0050] Multi-agent communication topology optimization systems based on semantic contribution evaluation also include: The edge evaluation module is used to obtain the messages and final aggregated output messages on each communication edge after a round of communication is actually executed, and to calculate the semantic utility value and relative contribution value of each edge. The reward calculation module, connected to the edge judgment module, is used to normalize the relative contribution value into a reward signal.

[0051] Example 1: A method for optimizing multi-agent communication topology based on semantic contribution evaluation includes: Construct a multi-agent communication network, representing multiple agents as nodes and the information transmission relationship between nodes as communication edges, forming an initial communication topology; Record the message content transmitted at each communication edge during the multi-agent collaborative reasoning process to obtain the final aggregated decision output of the system; Calculate the semantic contribution value of each communication edge; An edge value prediction model is constructed based on semantic contribution values, and the evolution process of communication topology is simulated through virtual execution; The communication topology is dynamically and adaptively updated based on the virtual execution results. Perform real collaborative reasoning under the updated communication topology and output the final decision result.

[0052] Specifically, the semantic contribution value is calculated as follows: Let the i-th communication edge The transmitted message is represented as The final aggregated output of the system is represented as The semantic contribution value is then defined as: ; in: This represents a semantic embedding mapping function. Represents the similarity function. Indicates communication edge The semantic contribution value.

[0053] The similarity function is cosine similarity, defined as: ; Where: a and b are embedding vector representations. This represents the L2 norm of a vector.

[0054] To eliminate positional bias caused by communication order, the semantic contribution value is relatively normalized and defined as: ; in: Represents the relative semantic contribution value. This represents the set of all input communication edges of node i. Let $k$ represent the utility value of the $k$-th input edge of node $i$. This indicates the number of input edges.

[0055] Furthermore, the actual reward is obtained by normalizing the relative contribution values ​​of all executed communication edges in this round: ; in, Real rewards; This is the set of edges executed in this round; Represents the set of communication edges Any communication edge in the middle, the communication edge connects to the node With nodes ; For communication edge The true relative contribution value; For communication edge The true relative contribution value; To prevent small constants with a denominator of zero.

[0056] The edge value prediction model is used to predict the utility value of communication edges, and is defined as follows: ; in, Indicates communication edge Input features, This represents the function mapping corresponding to the edge value prediction model. These are the model parameters.

[0057] The Actor network is updated using the policy gradient loss based on the virtual reward: ; in, Let the policy gradient loss function be used. This is the set of communication edges sampled based on the activation probability in the current round; This is the communication edge between node i and node j; The current communication edge between node i and node j Activation probability; For communication edge The reward value in the current execution round is used to measure the relative contribution of that edge to the final decision result; is the sparsity regularization coefficient, used to control the sparsity of the communication graph structure; This is the set of parameters used in the policy network to model spatial edges, which are used to generate the activation probabilities of communication edges between different agents in the same round. This is the set of parameters used in the policy network to model temporal edges, which are used to generate the activation probabilities of cross-round communication dependencies. For the edge Endowed with learnable The value is used to calculate the activation probability through the mapping function. .

[0058] The dynamic adaptive self-adjusting update rule includes two stages: activation probability update and communication graph pruning. Assign a learnable logit value to each communication edge. ,pass Function mapping yields activation probabilities Based on the reward signals obtained from virtual and real execution, a policy gradient method is used to optimize the logit value, thereby increasing the activation probability of edges that receive positive rewards and decreasing the activation probability of edges that receive negative rewards. ; in For learning rate, Let be the policy gradient loss function.

[0059] Furthermore, after updating the activation probabilities, the initial communication graph is pruned based on the activation probabilities, retaining the top nodes with the highest activation probabilities. One edge is removed, and the rest are removed: ; ; in, This represents the set of communication edges with the minimum utility value; |E| represents the number of communication edges in the current communication graph. The preset pruning ratio is used to control the number of communication edges that are pruned. For communication edge The corresponding mask variable is used to indicate whether the communication edge is preserved; This is the set of communication edges retained after pruning. For communication edge The activation probability.

[0060] The method employs an Actor-Critic structure for topology strategy optimization, where: Actor networks are used to generate activation probabilities for communication edges based on the current task. The network parameters are updated using the policy gradient method, which increases the activation probability of edges that receive positive rewards and decreases the activation probability of edges that receive negative rewards. Critic is an edge value prediction model used to evaluate the relative contribution of communication edges. Provide reward signals for Actors This guides topology optimization.

[0061] The method can dynamically generate different communication topologies for different input tasks, achieving query-level adaptive structure generation.

[0062] The multi-agent communication topology optimization method of this embodiment is applied to a dynamic adaptive self-regulating multi-agent cooperative decision-making based on semantic contribution, including: Receive task input; An adaptive communication topology is generated according to the method of this embodiment; Perform multi-agent cooperative reasoning under the aforementioned communication topology; Output the final decision result.

[0063] Taking a code generation task as an example, suppose the input task is: "Write a Python function to implement the quicksort algorithm." The system constructs an initial communication graph comprising a "requirements analysis agent," an "algorithm design agent," a "code writing agent," and a "code testing agent." Semantic contribution evaluation reveals that edges between "requirements analysis → algorithm design," "algorithm design → code writing," and "code writing → code testing" have high contribution values, while some cross-layer communication edges (such as "requirements analysis → code testing") have lower contribution values. After pruning optimization, the system retains only communication edges with high contribution values, forming a streamlined chain-like communication topology. Cooperative reasoning is performed under this topology, ultimately generating correct quicksort code, and the code's correctness can be verified by the code testing agent.

[0064] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for optimizing multi-agent communication topology based on semantic contribution evaluation, characterized in that, include: Construct an initial communication graph containing multiple agents, wherein the initial communication graph includes nodes and edges, the nodes represent agents, and the edges represent communication paths between agents; The multiple agents in the target task are subjected to several rounds of virtual execution, and the communication edges are sampled according to the current activation probability in each round of virtual execution; The relative contribution value of the sampled edge is predicted by the edge value prediction model, and the virtual reward is calculated to update the Actor network. The edge value prediction model is obtained by training a lightweight neural network that includes context information related to the communication edge and the corresponding real relative contribution value. After several rounds of virtual execution, real execution is performed to obtain real rewards and update the Actor network again. The activation probability of each edge in the initial communication graph is updated according to the updated Actor network, and the initial communication graph is pruned to obtain an optimized communication graph.

2. The multi-agent communication topology optimization method based on semantic contribution evaluation according to claim 1, characterized in that, Obtaining the true relative contribution value includes: Multiple intelligent agents perform one or more rounds of real communication tasks, obtaining the text messages transmitted on each execution edge and the final aggregated output message of the current round of tasks; The text message and the final aggregated output message are encoded into a first semantic vector and a second semantic vector, respectively, and the semantic similarity between the first semantic vector and the second semantic vector is calculated as the utility value of the edge. The true relative contribution value is obtained by subtracting the average utility value of all incoming edges from the source node from the utility value of the edge.

3. The multi-agent communication topology optimization method based on semantic contribution evaluation according to claim 1, characterized in that, The training objective of the edge value prediction model is to minimize the error between the predicted relative contribution value and the actual relative contribution value.

4. The multi-agent communication topology optimization method based on semantic contribution evaluation according to claim 1, characterized in that, The calculation of virtual reward updates in the Actor network includes: The Actor network is updated using the policy gradient loss based on the virtual reward: ; in, Let the policy gradient loss function be used. This is the set of communication edges sampled based on the activation probability in the current round; This is the communication edge between node i and node j; The current communication edge between node i and node j Activation probability; For communication edge The virtual reward value in the current execution round; The sparsity regularization coefficient; This is the set of parameters used to model spatial communication edges in a policy network; This is the set of parameters used to model time communication edges in the policy network; For the edge Endowed with learnable value.

5. The multi-agent communication topology optimization method based on semantic contribution evaluation according to claim 1, characterized in that, Obtaining real rewards includes calculating the actual relative contribution value based on the actual execution process. The true relative contribution values ​​of all communication edges executed in this round are normalized to obtain the true reward. : ; in, Represents the set of communication edges Any communication edge in the middle, the communication edge connects to the node With nodes ; To prevent small constants with a denominator of zero, For communication edge The true relative contribution value.

6. The multi-agent communication topology optimization method based on semantic contribution evaluation according to claim 4, characterized in that, Updating the activation probability of each edge in the initial communication graph includes: A learnable logit value is assigned to each edge. Based on the virtual reward, the logit value is optimized using policy gradient loss. The optimized logit value is then updated using a sigmoid function to map and update the activation probability of each edge.

7. The multi-agent communication topology optimization method based on semantic contribution evaluation according to claim 1, characterized in that, Pruning the initial communication graph includes: ; Where BottomK represents the set of communication edges with the minimum utility value; |E| represents the number of communication edges in the current communication graph; p is a preset pruning ratio used to control the number of communication edges to be pruned; The set of communication edges retained after pruning; For communication edge The utility value.

8. A multi-agent communication topology optimization system based on semantic contribution evaluation, implemented according to any one of claims 1-7, characterized in that, include: A communication graph construction module is used to construct an initial communication graph containing multiple agents, wherein the initial communication graph includes nodes and edges, the nodes represent agents, and the edges represent communication paths between agents; The edge value prediction module is used to perform several rounds of virtual execution on multiple agents of the target task, sample edges according to the current activation probability, predict the relative contribution value of the sampled edges through the edge value prediction model, and calculate the virtual reward. The edge value prediction model is obtained by training a lightweight neural network that includes context information related to the communication edges and the corresponding real relative contribution value. The strategy network module is used to calculate virtual rewards to update the Actor network. After several rounds of virtual execution, real execution is performed to obtain real rewards and update the Actor network again. The activation probability of each edge in the initial communication graph is updated according to the updated Actor network, and the initial communication graph is pruned to obtain an optimized communication graph.