Multi-agent collaborative reasoning method and system based on opinion dynamics model
By introducing an opinion dynamics model and a dynamic influence matrix, the problems of uncontrollable opinion propagation and unadjustable influence in multi-agent collaboration are solved, achieving stable convergence and interpretable collaborative reasoning, and improving the collaboration quality and adaptability of multi-agent systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
Existing multi-agent collaborative methods lack the mathematical foundation for opinion fusion, cannot dynamically adjust the influence of agents, and lack a convergence mechanism, resulting in an uncontrollable and difficult-to-interpret reasoning process, which limits their application in complex scenarios.
By introducing an opinion dynamics model, an opinion propagation network and dynamic influence matrix are constructed among agents. A stable convergence mechanism is designed, and collaborative updates are performed through the opinion dynamics model to realize the dynamic adjustment of agent influence and the mathematical control of collaborative state.
It achieves stability, controllability, and interpretability of multi-agent collaborative reasoning, improves collaboration efficiency and reliability, adapts to complex tasks, and is suitable for security-sensitive tasks and enterprise-level decision-making systems.
Smart Images

Figure CN121835906A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology and relates to a multi-agent collaborative reasoning method and system, particularly a multi-agent collaborative reasoning method and system based on opinion dynamics model. Background Technology
[0002] With the widespread deployment of Large Language Models (LLMs) and multi-agent systems in question-answering systems, specialized knowledge reasoning, automated decision-making, toolchain execution, and complex task collaboration, how to enable multiple agents to form stable, reliable, and high-quality collective reasoning outputs during collaboration has become a core bottleneck in the current implementation of multi-agent systems. Although existing frameworks generally employ methods such as discussion-based interaction, heuristic voting, or rule fusion to achieve collaborative reasoning, these methods gradually become insufficient to meet the system's requirements for stability, reliability, and interpretability as the scale of tasks and the number of models increase. The uncertainty and uncontrollability of multi-agent reasoning are becoming increasingly prominent.
[0003] 1. In existing technological systems, multi-agent collaboration mostly adopts a static collaboration process based on dialogue rounds. There is no explicit influence modeling between agents, nor a mechanism to describe how opinions propagate within the system. Because the collaboration process relies entirely on heuristic rules, the opinions of each agent often exhibit randomness and unstructured propagation, and the system cannot guarantee convergence of output results. Furthermore, these methods struggle to identify differences in ability among agents; an agent that performs poorly in one discussion may retain equal weight in subsequent rounds, leading to the continuous amplification of erroneous information and ultimately affecting the reasoning quality of the entire system.
[0004] 2. Another type of method attempts to fuse the results of various agents using fixed weights or manually set priorities. However, because these weights cannot be updated based on task status or real-time agent performance, the system cannot exert greater influence on truly reliable agents, nor can it promptly mitigate the interference of unstable agents. In actual inference, when an agent deviates, its impact cannot be effectively limited, ultimately leading to contamination of the system consensus. Furthermore, these methods lack dynamic feedback mechanisms and cannot adjust the influence structure between agents in real time based on performance changes during the collaboration process.
[0005] 3. Some studies have attempted to incorporate simple consistency checks or output confidence judgments, hoping to improve the efficiency of multi-agent collaboration through internal monitoring. However, these solutions are essentially still passive control, unable to model the propagation patterns of opinions among agents, nor can they provide an interpretable opinion fusion process. When multiple agents offer differing opinions on complex problems, these solutions cannot analyze the causes of the disagreements, nor can they proactively adjust the convergence direction at the system level, resulting in limited collaboration efficiency. Furthermore, in tasks with high inference chain depth, such monitoring methods cannot prevent the system from repeatedly falling into unstable discussion states, making it difficult to improve inference quality.
[0006] Overall, existing multi-agent collaboration methods suffer from three common problems: first, they lack a mathematical foundation for opinion fusion, making the reasoning process uncontrollable and difficult to interpret; second, they cannot adjust the influence of agents based on their dynamic performance, making the system susceptible to interference from weak agents; and third, they lack convergence mechanisms, making it difficult to avoid oscillations and deviations during the collaboration process. These problems not only make multi-agent reasoning unstable in complex scenarios but also significantly limit its application potential in security-sensitive tasks, enterprise-level decision-making systems, and automated workflows.
[0007] Given the aforementioned shortcomings of existing technologies, there is an urgent need to research a novel multi-agent collaborative reasoning method and system. Summary of the Invention
[0008] To overcome the shortcomings of existing technologies, this invention proposes a multi-agent collaborative reasoning method and system based on an opinion dynamics model. It introduces opinion dynamics theory into the multi-agent collaborative reasoning system, constructing an opinion propagation network among agents, introducing a dynamic influence matrix, and designing a stable convergence mechanism. This transforms the agent collaboration process from heuristic discussion into a theoretically grounded systematic opinion evolution process. It can dynamically adjust the influence of each agent during collaboration, ensuring that the reasoning behavior is not only stable and convergent but also more in line with controllable and interpretable engineering requirements, thereby comprehensively improving the collaborative reasoning capability and deployment value of the multi-agent system.
[0009] To achieve the above objectives, the present invention provides the following technical solution: A multi-agent cooperative reasoning method based on an opinion dynamics model, characterized by the following steps: S1: Initialize the multi-agent system to obtain the initial opinion vectors of each agent on the current task and the initial influence matrix of the multi-agent system; S2: Calculate the group dispersion, network divergence strength, and cooperative stability of the multi-agent group, and calculate the cooperative state score of the multi-agent group based on the group dispersion, network divergence strength, and cooperative stability. S3: Determine the target collaborative scoring range and target collaborative value of the multi-agent based on the task type of the current task; S4: The opinion dynamics model is used as the multi-agent collaborative update rule to perform opinion dynamics collaboration on the multi-agents, so that the collaborative state score of the multi-agents gradually approaches the target collaborative score range. S5: Calculate the change in the group opinion of the multi-agent team and determine whether the collaborative reasoning process of the multi-agent team satisfies the convergence condition based on the change in the group opinion. S6: After the convergence condition is met, the final collaborative inference result is generated.
[0010] Preferably, step S1 specifically involves: targeting the current task Each agent is invoked to generate an initial opinion vector for the current task. Each agent is assigned initial capability parameters, and an initial influence matrix for the multi-agent system is formed based on these parameters. .
[0011] Preferably, step S2 specifically includes: S21: Calculate the population dispersion : , , In the formula, It is the first of the multi-agent system The group dispersion of the wheel, It is an intelligent agent The The opinion vector of the round, where n is the number of agents. It is the first of the multi-agent system The average opinion vector of the group in the round; S22: Calculate the network divergence strength : , In the formula, It is the first of the multi-agent system The strength of network divergence in the round, It is an intelligent agent The The opinion vector of the wheel, An edge set is a set of agents in a multi-agent system that have direct interactions or trust relationships with each other. and intelligent agents A set of relationships; S23: Calculate the cooperative stability : , In the formula, It is the first of the multi-agent system The coordinated stability of the wheels, It is an intelligent agent The Opinion vectors of the wheel; S24: Calculate the cooperative state score : , In the formula, It is the first of the multi-agent system Wheel coordination status score, , and It is the weighting coefficient.
[0012] Preferably, in step S4, the opinion dynamics model is used as the multi-agent collaborative update rule as follows: , In the formula, For multi-agent systems The group opinion vector of the wheel, For multi-agent systems The group opinion vector of the wheel, For multi-agent systems The influence matrix of the wheel and makes The sum of the tuples in each row is equal to 1.
[0013] Preferably, the opinion dynamics coordination of multiple agents in step S4 specifically involves: when the cooperation state score is higher than the target cooperation score range, increasing the mutual influence between agents to make the group opinions converge towards higher consistency; when the cooperation state score is lower than the target cooperation score range, reducing the degree of influence between agents to enhance diversity.
[0014] Preferably, when the collaboration status score is higher than the target collaboration score range, the value is increased. The weight of the non-diagonal terms is increased when the collaborative state score is lower than the target collaborative score range. The weights of the diagonal terms.
[0015] Preferably, step S5 specifically involves: in At that time, it is determined that the multi-agent collaborative reasoning process has entered a stable convergence state and meets the convergence condition, among which, It is an intelligent agent The The opinion vector of the wheel, It is an intelligent agent The The opinion vector of the wheel, For each intelligent agent's first The opinion vector of the round and the first The maximum value of the difference in opinion vectors of the wheel. This is the preset convergence threshold.
[0016] Furthermore, the present invention also provides a multi-agent cooperative reasoning system based on an opinion dynamics model, characterized in that it includes: An initialization module is used to initialize multiple agents to obtain the initial opinion vectors of each agent on the current task and the initial influence matrix of the multiple agents. The cooperative state analysis module is used to calculate the group dispersion, network divergence strength, and cooperative stability of multi-agents, and to calculate the cooperative state score of multi-agents based on the group dispersion, network divergence strength, and cooperative stability. A task-driven collaborative goal dynamic determination module is used to determine the target collaborative scoring range and target collaborative value of multiple agents based on the task type of the current task. The opinion dynamics-based collaborative update module is used to perform opinion dynamics collaboration on multiple agents by adopting the opinion dynamics model as the multi-agent collaborative update rule, so that the collaborative state score of the multiple agents gradually approaches the target collaborative score range. The collaborative reasoning convergence determination module is used to calculate the change in the group opinion of multiple agents and determine whether the collaborative reasoning process of multiple agents satisfies the convergence condition based on the change in the group opinion. The collaborative reasoning result generation module is used to generate the final collaborative reasoning result after the convergence condition is met.
[0017] Furthermore, the present invention also provides a multi-agent collaborative reasoning device based on an opinion dynamics model, characterized in that it includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-agent collaborative reasoning method based on the opinion dynamics model as described above. Finally, the present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements the steps of the multi-agent cooperative reasoning method based on the opinion dynamics model as described above.
[0018] Compared with existing collaborative methods that combine heuristic multi-agent discussion, static voting fusion, and fixed-rule reasoning, the multi-agent collaborative reasoning method and system proposed in this invention, based on an opinion dynamics model, constructs a dynamic influence network among agents, a mathematical opinion evolution mechanism, and a stable convergence process. It offers the following significant advantages in terms of reasoning stability, collaborative efficiency, result reliability, system controllability, and adaptability to complex tasks: 1. Upgrade from heuristic collaboration to mathematical collaboration to achieve interpretability, controllability, and stable convergence of the reasoning process.
[0019] The core flaw of traditional multi-agent systems lies in the lack of a mathematical foundation for collaboration. Their discussion processes rely on empirical rules, heuristic hints, or voting, failing to explain how opinions propagate among agents or guarantee the stability and consistency of collaborative results. This leads to oscillations, loops, and difficulties in reaching consensus in complex tasks.
[0020] This invention introduces an opinion dynamics model, transforming the discussion process among multiple agents into a describable, analyzable, and verifiable opinion evolution system. The agent's output is considered an opinion vector, updated in each iteration based on the influence matrix, resulting in a structured and interpretable trajectory of the collaborative process. Because opinion dynamics inherently possesses convergence properties, this invention ensures that reasoning converges to a stable consensus, a process difficult to guarantee with traditional methods, fundamentally solving the problems of unstable and uncontrollable reasoning in existing multi-agent systems.
[0021] Under this mechanism, the system can proactively adjust the collaboration path based on changes in the influence of the agents, upgrading the reasoning process from experience-driven to mathematics-driven, from uncontrollable collaboration to interpretable collaboration, and from "potentially reaching consensus" to "inevitably converging to consensus." This provides a theoretically grounded stability guarantee for multi-agent reasoning.
[0022] 2. Upgrade from fixed weights to dynamic influence modeling to achieve quantitative expression and real-time control of differences in agent capabilities.
[0023] Traditional multi-agent systems often use one-vote-one-weight, average weighting, or manually set static weights for opinion fusion, which cannot identify real-time performance differences among agents, nor can they suppress the interference of unreliable agents in collaboration. As long as there are agents with low output quality in the system, their erroneous opinions may be amplified during the collaboration process, thereby polluting the consensus and seriously impairing the quality of reasoning.
[0024] This invention constructs a dynamic influence matrix, enabling each agent's capabilities, credibility, stability, expertise, and task suitability to be expressed parametrically during collaboration. The influence matrix is continuously updated throughout the reasoning process, naturally granting higher influence to agents with better performance, while agents that have recently exhibited deviations or instability are automatically downgraded. This mechanism not only strengthens the guiding role of reliable agents but also effectively suppresses interference from abnormal agents, thus avoiding the common phenomenon in traditional collaboration where weak agents drag down the overall reasoning.
[0025] Furthermore, this invention allows for adjustments to the influence distribution based on different task types (such as code reasoning, mathematical calculations, security assessments, and multi-turn question answering), achieving task-adaptive weight control. This enables multi-agent systems to possess functionality similar to dynamic expert scheduling for the first time, ensuring that collaborative behavior not only reflects differences in model capabilities but also adapts to task requirements.
[0026] 3. Upgrading from static dialogue to a feedback-driven continuous evolution mechanism enables collaborative reasoning to have adaptive capabilities and long-term stability.
[0027] Existing multi-agent cooperative systems operate in a static, feedback-free manner. After each round of cooperation, the system cannot summarize its experience or adjust subsequent cooperative strategies based on inference results. The system consistently uses the same cooperative pattern across different tasks, lacking adaptability and long-term evolutionary capacity.
[0028] The opinion dynamics model introduced in this invention has inherent feedback characteristics. Each round of opinion updates provides state feedback for the next round of collaboration, enabling the system to form a closed-loop evolution mechanism of opinion update—influence adjustment—collaboration optimization. When the system detects significant conflicts in agent opinions, deviations in collaboration trends, a decrease in consensus convergence speed, or repeated erroneous outputs by a certain agent, the influence matrix will automatically adjust, causing the system to evolve towards a more robust convergence direction.
[0029] This continuous evolution mechanism endows multi-agent collaboration with adaptive capabilities: it can automatically increase the intensity of collaboration when facing complex tasks, and converge quickly when facing simple tasks; it can automatically isolate anomalous information when faced with abnormal agent outputs; and it can rapidly form new influence structures when facing new task categories. This capability is completely absent in traditional multi-agent systems. Furthermore, by introducing feedback-driven opinion evolution, this invention transforms the multi-agent collaborative system from a static discussion framework into an intelligent collaborative system that can dynamically adjust with the task, continuously optimize with the environment, and constantly evolve with long-term system operation.
[0030] In summary, this invention achieves a comprehensive upgrade of existing multi-agent methods by deeply integrating opinion dynamics models with multi-agent collaborative reasoning, encompassing four levels: collaborative structure, weight control, consensus formation, and system evolution. The mathematical opinion evolution mechanism ensures the stability and interpretability of collaboration; dynamic influence modeling ensures the quantification and real-time control of agent capability differences; and the feedback-driven evolution mechanism enables continuous optimization and cross-task adaptability in the collaborative process. Without altering the model structure of each agent, this invention significantly improves the consistency, reliability, adaptability, and engineering feasibility of multi-agent collaborative reasoning, providing a novel fundamental technical path for constructing safe, stable, and high-performance multi-agent reasoning systems, with broad application prospects and significant industrial value. Attached Figure Description
[0031] Figure 1 This is a flowchart of the multi-agent collaborative reasoning method based on the opinion dynamics model of the present invention.
[0032] Figure 2 This is a schematic diagram of the multi-agent collaborative reasoning system based on the opinion dynamics model of the present invention.
[0033] Figure 3 This is a structural block diagram of the multi-agent collaborative reasoning device based on the opinion dynamics model of the present invention. Detailed Implementation
[0034] Before detailing any embodiment of the invention, it should be understood that the invention, in its application, is not limited to the details of the construction and arrangement of the components set forth in the following description or illustrated in the following figures. The invention can have other embodiments and can be practiced or carried out in various ways. Furthermore, it should be understood that the wording and terminology used herein are for descriptive purposes and should not be considered limiting. The use of “comprising” or “having” and variations thereof in this invention is intended to cover the items set forth below and their equivalents, as well as any additional items. Unless otherwise specified or limited, the terms “installation,” “connection,” “support,” and “linkage,” and variations thereof are used broadly and cover both direct and indirect installation, connection, support, and linking. Moreover, “connection” and “linkage” are not limited to physical or mechanical connections or links. Furthermore, firstly, in the disclosure of this invention, the terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the above terms should not be construed as limiting this invention. Secondly, the term "a" should be understood as "at least one" or "one or more," that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple. The term "a" should not be construed as a limitation on the quantity.
[0035] With the widespread application of Large Language Models (LLMs) and multi-agent systems in scenarios such as complex question answering, code generation, knowledge reasoning, tool invocation, and autonomous decision-making, multi-model collaborative reasoning capabilities, cross-agent consistency, and dynamic reliability modeling have become key technical bottlenecks that urgently need to be overcome. Existing multi-agent frameworks (such as AutoGen, ChatDev, and OpenAISwarm) are mostly based on heuristic dialogue, voting mechanisms, or role collaboration strategies, lacking rigorous mathematical foundations and failing to guarantee stability, consistency, and interpretability in complex tasks, leading to the following technical pain points: 1. The outputs of multi-agent systems are unstable and lack convergence, making it difficult to form a consistent final inference result.
[0036] In multi-agent collaboration, due to differences in capabilities, expression methods, and inference chain structures, various models often provide inconsistent or even contradictory answers. Existing systems typically fuse these results through voting, simple averaging, or fixed templates, but these methods cannot guarantee that the system converges to a stable output after multiple rounds of inference. As the number of rounds increases, multi-agent collaboration is prone to issues such as: inference oscillations (conflicting answers), repeated discussions without reaching a consensus, oversensitivity to low-probability incorrect answers, and a lack of interpretability and predictability in the overall system output. This collaborative model, lacking mathematical convergence, struggles to meet the stable, reliable, and controllable inference requirements of enterprise-level deployments, making it difficult to truly implement multi-agent collaboration in high-risk scenarios such as code generation, scientific computing, and automated decision-making.
[0037] 2. Differences in capabilities among different agents cannot be dynamically modeled, and there is a lack of reliability weighting mechanisms during collaboration.
[0038] In real-world applications, different agents exhibit significant differences in their expertise and reliability: some excel at logical reasoning, others at mathematical computation, and still others demonstrate stable and reliable performance in security judgments. While some general-purpose large models possess strong language expression capabilities, they may be insufficient for specialized tasks. However, existing multi-agent systems often employ equal voting or preset fixed weights for collaboration. This simplistic mechanism fails to dynamically identify which agents are more advantageous based on real-time performance during task execution, nor can it automatically reduce the weight of unstable or unreliable agents. Furthermore, it lacks the ability to adjust the influence of each agent according to different task types. This makes the system susceptible to being misled by a single erroneous agent, leading to contaminated consensus results. Due to the lack of a quantitative mechanism for differentiating agent quality, existing methods struggle to ensure the consistency and reliability of multi-agent collaborative outputs, significantly limiting the system's practicality and robustness in complex tasks.
[0039] 3. Lack of mathematical modeling and interpretable control mechanisms for multi-agent collaborative processes.
[0040] While current multi-agent collaboration mechanisms outwardly appear as a deliberative reasoning process, they lack systematic theoretical support and a clear collaborative computing framework. For example, they lack mathematical models to characterize the propagation of influence among agents, formal consensus theories for opinion fusion, conditions for when the reasoning process converges, mechanisms to suppress anomalous or misleading opinions, and modeling of the control capabilities of security agents within the overall system. Due to this lack of fundamental theoretical tools, multi-agent collaboration processes are often difficult to explain, making it impossible to analyze why a particular agent has a critical impact on the final decision, or to theoretically prove the reliability and stability of the system's output. When handling tasks involving security or sensitive content, the system struggles to achieve verifiable compliance, and its overall behavior is difficult to quantify and control. Because of this lack of a solid theoretical foundation, the controllability, interpretability, and reliability of existing multi-agent collaboration methods in engineering practice are significantly limited.
[0041] To address these issues, this invention introduces opinion dynamics into a multi-agent collaborative reasoning system for the first time. By constructing an inter-agent influence network, a dynamic weight matrix, a convergence guarantee mechanism, and an opinion fusion model, it provides a rigorous mathematical foundation for multi-agent collaboration, enabling agent collaborative reasoning to possess stability, convergence, and interpretability.
[0042] The goal of this invention is to enable multi-agent systems to generate stable and consistent collective reasoning results, automatically distinguish between reliable and unreliable agents, achieve dynamic influence adjustment, mathematically guarantee reasoning convergence, and possess controllable security policy injection capabilities through a theoretical and formalized collaborative mechanism. To this end, this invention makes the following three innovations: 1. Construct a multi-agent opinion network and dynamic influence matrix.
[0043] This invention first constructs an opinion interaction network among intelligent agents. Based on this, it dynamically generates an influence matrix (weight matrix) reflecting the collaborative relationship by integrating multiple dimensions such as task performance, output consistency, professional ability weight, historical credibility, and security level. This matrix characterizes the mutual influence strength among the agents, enabling the system to automatically determine the power allocation strategy for different agents during the collaborative process based on task characteristics, their own states, and real-time reasoning performance. Through this adjustable and interpretable weight modeling approach, the system achieves dynamic adjustment of agent influence, thereby ensuring that the reasoning process is more in line with task requirements, more stable and reliable, and effectively improving the overall quality and security of multi-agent collaboration.
[0044] 2. An opinion fusion model is introduced to achieve stable convergence of the multi-agent reasoning process.
[0045] Drawing inspiration from classic opinion dynamics models such as DeGroot and Friedkin–Johnsen, this invention treats the output of each agent in a round as a continuously evolving opinion state, and achieves the fusion of multi-agent reasoning results through iterative weighted updates. This dynamic update mechanism not only gradually reduces the opinion differences between different agents in multiple rounds of interaction, causing the reasoning process to converge towards stability, but also automatically weakens abnormal or unreliable opinion inputs under weight adjustment, thereby ensuring the mathematically inevitable convergence of the overall system. Therefore, this invention effectively overcomes the common problems of instability, opinion inconsistency, and lack of convergence guarantees in existing multi-agent systems, significantly improving the reliability and controllability of the collaborative reasoning process.
[0046] 3. Introduce controllability parameters to achieve interpretable reasoning regulation and safety control.
[0047] By introducing controllable parameters, the multi-agent collaborative process becomes structurally adjustable and secure. Through the adjustment of these parameters, expert agents can gain greater influence in their areas of expertise; secure agents can dominate final decisions when handling sensitive tasks, ensuring the robustness of the system output; while unreliable agents with unstable performance or low historical credibility have their influence automatically weakened or marginalized to prevent them from interfering with the overall reasoning process. Through this mechanism, the system can not only adaptively adjust based on task type and real-time performance but also allows for further constraints on system behavior through manual configuration or policy control. This significantly improves the controllability, security, and reliability of the entire multi-agent collaborative process, ensuring that the output meets expectations.
[0048] Based on the three core technologies mentioned above, this invention significantly improves the quality, stability, and controllability of multi-agent collaborative reasoning. First, it achieves stable and consistent output of multi-agent reasoning results, effectively avoiding the oscillations, disagreements, and opinion polarization problems common in traditional collaboration methods. Second, by dynamically adjusting the influence weights of each agent, it achieves an optimal balance between professionalism and reliability, thereby improving the accuracy and credibility of the overall collaborative reasoning. Simultaneously, the iterative mechanism built on opinion dynamics in this invention has mathematical convergence guarantees, making the reasoning process more predictable and facilitating deployment and verification in engineering scenarios. Furthermore, this invention supports the injection of security strategies into sensitive or high-risk tasks, granting security agents priority decision-making power in critical stages, thereby enhancing the system's compliance, robustness, and anomaly suppression capabilities. Overall, this invention significantly improves multi-model collaboration efficiency, task adaptability, and reasoning performance without modifying the underlying model structure, possessing significant engineering application value and broad industrial application potential.
[0049] Figure 1 A flowchart of the multi-agent cooperative reasoning method based on the opinion dynamics model of the present invention is shown. Figure 1 As shown, the multi-agent cooperative reasoning method based on the opinion dynamics model of the present invention includes the following steps: S1: Initialization.
[0050] Initialize the multi-agent system to obtain the initial opinion vectors of each agent for the current task and the initial influence matrix of the multi-agent system.
[0051] In this invention, it is first necessary to initialize each agent in the multi-agent set, the task type of the current task, and the initial relationship structure between the agents. Let the agent set be... for: .
[0052] In the formula, For the set of intelligent agents The various intelligent agents in the set of intelligent agents There are a total of n intelligent agents.
[0053] For the current task For task types (e.g., mathematical reasoning, security review, code generation, open-ended question answering, etc.), each agent is first invoked to generate an initial opinion vector for the current task. This can be a text embedding, a rating vector, or a structured representation. Simultaneously, initial capability parameters, such as historical reliability, are assigned to each agent. Professional suitability And so on, and construct the intelligent agent set based on the initial capability parameters. Initial Influence Matrix : .
[0054] in, Represents intelligent agents right intelligent agent The extent of the impact.
[0055] In this invention, it can be based on the set of intelligent agents. An agent influence network is constructed, which is a directed weighted network structure used to characterize the mutual influence relationships among multiple agents. Nodes in the agent influence network represent individual agents in the agent set, and edge weights represent the degree of influence one agent has on another's reasoning opinion updates. This network reflects the trust relationships, professional compatibility, and cooperation strength among agents, and is the core carrier of opinion dynamics evolution. Meanwhile, the influence matrix refers to the weight matrix obtained after matrix-representing the agent influence network, used to weight and fuse the opinions of different agents during the opinion update process.
[0056] Among them, historical reliability Represents intelligent agents The stability and reliability of performance in past tasks of this type can be expressed as: , .
[0057] In the formula, For intelligent agents The accuracy of the output content Represents intelligent agents The probability of errors or anomalies occurring. Represents intelligent agents Are the changes in output consistent before and after solving the same problem? , and These are weighting coefficients, and they can be adjusted as needed. Professional compatibility Represents intelligent agents The degree of matching with tasks of this task type. The professional fit. Depends on the agent Each agent has its own area of expertise, such as: mathematical reasoning agents are good at algebra, geometry, and numerical computation; security review agents are good at judging danger, violations, and biases; code agents are good at programming, debugging, and interpreting code; and multimodal agents are good at image understanding, etc.
[0058] If the intelligent agent The construction capability vector is represented as The task vector for this task type is ,but In other words, the cosine similarity theorem is used to analyze intelligent agents. Professional adaptability .
[0059] Initial Influence Matrix In Will refer to intelligent agents Historical reliability and professional suitability Among them, historical reliability A high score indicates a good track record in this type of task, making the candidate trustworthy in the long term and demonstrating a high degree of professional suitability. A high rating indicates a task that is suitable for this task type, and its weight can be dynamically increased.
[0060] Specifically, first define the influence scoring. : .
[0061] The influence score By the affected intelligent agent Historical reliability Compatibility with major Decide, and All , which is the corresponding adjustable hyperparameter.
[0062] Then score the influence. Mapped to the influence matrix (for each receiving agent) (Normalization) .
[0063] in, It is the strength of the structural / prior interaction; if there is no prior, it is taken as... If there is a priori knowledge, then take it. .
[0064] S2: Cooperative state analysis.
[0065] Calculate the group dispersion, network divergence strength, and cooperative stability of the multi-agent system, and calculate the cooperative state score of the multi-agent system based on the group dispersion, network divergence strength, and cooperative stability.
[0066] In this step, the current multi-agent group will be assessed to determine whether it is in a state of excessive consensus, severe divergence, or a cooperative state suitable for convergence. The judgment is based on a comprehensive quantitative analysis of the differences in opinions among agents, the strength of divergence within the network, and the stability of opinion changes.
[0067] 1. Calculate the population dispersion It is used to measure the degree of opinion dispersion among multiple agents.
[0068] , , In the formula, It is the first of the multi-agent system The group dispersion of the wheel, It is an intelligent agent The The opinion vector of the round, where n is the number of agents. It is the first of the multi-agent system The group average opinion vector of the round.
[0069] The smaller the value, the more concentrated the opinions of the agents, which may indicate an overly consistent state and a lack of diversity. The larger the value, the more dispersed and significantly divergent the group's opinions are.
[0070] 2. Calculate the network divergence strength It is used to characterize the degree of local conflict between intelligent agents.
[0071] , In the formula, It is the first of the multi-agent system The strength of network divergence in the round, It is an intelligent agent The The opinion vector of the wheel, An edge set is a set of agents in a multi-agent system that have direct interactions or trust relationships with each other. and intelligent agents A set of relationships between edges. In agent influence networks, this is represented by edge sets. The edges in the diagram represent direct interactions or trust relationships between intelligent agents.
[0072] This reflects whether there are significant conflicts of opinion among closely connected agents. If A large value indicates severe inconsistencies in the local network, making it difficult for collaboration to converge smoothly.
[0073] 3. Calculate the cooperative stability It is used to assess the stability of opinion evolution.
[0074] , In the formula, It is the first of the multi-agent system The coordinated stability of the wheels, It is an intelligent agent The Opinion vector of the wheel.
[0075] This invention defines cooperative stability by comparing the changes in opinion vectors of agents in adjacent rounds. A value close to 0 indicates that updates to opinions have essentially stalled, potentially leading to a rigid consensus; if... If the value is too large, it indicates that the collaborative process is experiencing violent fluctuations and has not yet entered a stable evolutionary stage.
[0076] 4. Calculate the coordination status score .
[0077] By linearly combining the above three indicators, a collaborative state score can be constructed: .
[0078] In the formula, It is the first of the multi-agent system Wheel coordination status score; , and These are adjustable weighting coefficients, which control the impact on the dispersion of the population. Intensity of online disagreements and Co-stability Attention level. By adjusting , and The collaborative decision logic can be adjusted based on different objectives such as "needing more diversity", "needing faster convergence", or "needing higher stability".
[0079] S3: Task-driven dynamic determination of collaborative goals.
[0080] The target collaborative scoring range and target collaborative value of the multi-agent system are determined based on the task type of the current task.
[0081] The purpose of this stage is to: determine the task type of the current task. and the current collaborative state score The system adaptively adjusts the opinion update rules, influence distribution, and number of collaboration rounds to enable the system to exhibit the most suitable collaborative characteristics in different task scenarios.
[0082] In this invention, a task-driven target collaboration structure is adopted, that is, different target collaboration values are set according to the task type. Coordinated scoring interval with target .
[0083] For tasks requiring rigorous reasoning (such as solving mathematical problems and logical proofs), a preference is given to low dispersion and high consistency, i.e., lower [specification / conformity]. For open-ended creative tasks, there is a preference for preserving diversity of opinions, i.e., a moderately high level of... For security review tasks, more emphasis is placed on the dominant weight of a few security agents, and the collaborative structure is more concentrated on trusted agents.
[0084] Different tasks correspond to different ideal collaborative forms in nature. This invention enables the opinion dynamics process to have task perception capabilities through task-driven goal setting.
[0085] Meanwhile, in this invention, it can be based on The range of values for which the current collaborative state is determined is: (1) : Overly consistent region (insufficient diversity, prone to falling into local erroneous consensus). (2) Area of serious disagreement (significant conflict of opinions, difficult to resolve); (3) Cooperative critical region (which has certain differences but also convergence, and is an ideal region). S4: Collaborative update based on opinion dynamics.
[0086] An opinion dynamics model is used as a multi-agent collaborative update rule to perform opinion dynamics collaboration among multiple agents, so that the collaborative state scores of the multiple agents gradually approach the target collaborative score range.
[0087] Opinion dynamics models refer to mathematical models used to describe the continuous evolution of opinions among multiple agents during the interaction process. This invention draws on and extends classical opinion dynamics theory, modeling the reasoning interaction among multiple agents as a continuous evolution process of opinions in a network structure, thereby providing an analyzable, controllable, and convergent theoretical foundation for collaborative reasoning.
[0088] After completing the task-driven collaborative goal dynamic determination in step S3, this step is responsible for using opinion dynamics rules to enable multiple agents to gradually approach the goal collaborative scoring range, thereby forming a convergent and adjustable group reasoning process.
[0089] In actual execution, the target collaborative scoring interval obtained in step S3 is first used as the basis. Synergy with target Score the current collaborative state. A comparison is made. Based on the degree of difference between the two, the information fusion strength between the agents is dynamically adjusted, thereby affecting the convergence speed and consistency level of group reasoning.
[0090] To ensure the interpretability and mathematical controllability of the entire reasoning process, this invention employs an opinion dynamics model as the collaborative update rule, the core of which is: , In the formula, For multi-agent systems The group opinion vector of the round is the first of all agents. The set of opinion vectors for the wheel; For multi-agent systems The group opinion vector of the round is the first of all agents. The set of opinion vectors for the wheel; For multi-agent systems The influence matrix of the wheel is used to control the flow of information between agents, and makes... The sum of all tuples in each row must equal 1, meaning each row of elements satisfies... This is to ensure that the intelligent agent can form a stable evolutionary trajectory.
[0091] Each intelligent agent opinion vector Will be affected by other intelligent agents The impact, based on The value is adjusted. It is a matrix operation, which is actually the first operation performed on all agents. The opinion vectors of each round are weighted and summed to obtain the result. Group opinion vectors of the round This means that if a certain agent has a strong influence over other agents ( If an agent's influence is relatively large, then its opinion will carry more weight in the update process; conversely, if an agent's influence is relatively weak... (Smaller), its opinion updates have a smaller impact. This process can be understood as an information flow and weight update process, where the agent's opinion depends not only on its own state but also on the influence of other agents in the group.
[0092] The key to this invention lies in: No longer fixed, but determined by The relationship with the target synergy score interval determines its degree of contraction / expansion, thereby automatically adapting the synergy strength to the task type. Specifically: 1. When the collaborative status score is higher than the target collaborative score range ( When ), enhance consistent convergence.
[0093] At this point, the group has significant disagreements, requiring an automatic increase in the mutual influence between agents to bring the group's opinions closer to a higher level of consensus. Implementation methods include: increasing the matrix size. The weighting of non-diagonal terms in the algorithm allows agents to reference each other more effectively; it also reduces the self-weights of individual agents, allowing them to more openly absorb information from others. The effect is that the agent group will rapidly form a mathematically consistent reasoning consensus, which can be used for highly consistent tasks such as logic, mathematics, and retrieval.
[0094] 2. When the collaborative status score is lower than the target collaborative score range ( When doing so, we should enhance diversity to prevent excessive convergence.
[0095] At this point, excessive concentration of opinion among agents may lead to a loss of creativity or a risk of misjudgment regarding safety. Therefore, it is necessary to automatically reduce the degree of influence between agents to maintain a certain level of diversity within the group. Adjustment methods include: increasing... The weighting of diagonal terms in the middle allows agents to emphasize their own opinions more; it can also reduce the intensity of cross-agent information coupling and avoid quickly locking into a single direction. Its effects include enhancing group creativity, openness, and information coverage, making it more suitable for scenarios such as generation tasks, brainstorming tasks, and multi-solution problems.
[0096] S5: Collaborative reasoning convergence determination.
[0097] Calculate the change in the group opinion of the multi-agent team and determine whether the collaborative reasoning process of the multi-agent team satisfies the convergence condition based on the change in the group opinion.
[0098] After multiple rounds of collaborative opinion dynamics update in step S4, the convergence of the inference state of the multi-agent group will be determined to decide whether to terminate the collaborative inference process. Specifically, the changes in the agents' opinion vectors between adjacent iterations will be continuously monitored. When the overall change is lower than a preset threshold, the collaborative inference process is considered to have reached a stable state.
[0099] In this invention, the convergence of collaborative inference can be determined based on the following method: At that point, it is determined that the multi-agent collaborative reasoning process has entered a stable convergence state, satisfying the convergence condition. Among these conditions... It is an intelligent agent The The opinion vector of the wheel, It is an intelligent agent The The opinion vector of the wheel, For each intelligent agent's first The opinion vector of the round and the first The maximum value of the difference in opinion vectors of the wheel. This is the preset convergence threshold.
[0100] At the same time, it can also be combined with collaborative state scoring. Use the changing trend to assist in judgment, when Continuously and stably fall within the target coordination range Within this period, it was further confirmed that the current collaborative state possesses reliability and consistency, and meets the convergence conditions.
[0101] The above approach achieves a natural transition from dynamic collaborative reasoning to stable and usable reasoning results, enabling multiple agents to reach an interpretable, controllable, and highly reliable final consensus while maintaining certain differences. This step, together with the aforementioned collaborative state analysis and opinion dynamics-based collaborative update, constitutes a complete closed-loop process, ensuring that multi-agent collaborative reasoning can obtain stable and reliable output results in different task scenarios.
[0102] S6: Generation of collaborative reasoning results.
[0103] After the convergence condition is met, the final collaborative inference result is generated.
[0104] Once the convergence condition is met, the subsequent opinion update process is terminated, and the final collaborative reasoning result is generated. The output method of the final collaborative reasoning result can be flexibly determined according to the specific application scenario, including but not limited to: weighting and fusing the final opinions of all agents to form a unified output, selecting the opinions of agents with higher influence weights or stronger reliability as representative outputs, or prioritizing the output of agent reasoning conclusions that meet security constraints in security and review tasks, etc.
[0105] Figure 2 A schematic diagram of the multi-agent cooperative reasoning system based on the opinion dynamics model of the present invention is shown. Figure 2 As shown, the multi-agent cooperative reasoning system based on the opinion dynamics model of the present invention includes: 1. Initialize the module.
[0106] The initialization module is used to initialize the multi-agent system to obtain the initial opinion vectors of each agent for the current task and the initial influence matrix of the multi-agent system.
[0107] 2. Collaborative State Analysis Module.
[0108] The cooperative state analysis module is used to calculate the group dispersion, network divergence strength, and cooperative stability of the multi-agent group, and to calculate the cooperative state score of the multi-agent group based on the group dispersion, network divergence strength, and cooperative stability.
[0109] 3. Task-driven collaborative goal dynamic determination module.
[0110] The task-driven collaborative goal dynamic determination module is used to determine the target collaborative scoring range and target collaborative value of multi-agents based on the task type of the current task.
[0111] 4. Collaborative update module based on opinion dynamics.
[0112] The opinion dynamics-based collaborative update module is used to employ the opinion dynamics model as the multi-agent collaborative update rule to perform opinion dynamics collaboration among multiple agents, so that the collaborative state scores of the multiple agents gradually approach the target collaborative score range.
[0113] 5. Collaborative reasoning convergence determination module.
[0114] The collaborative reasoning convergence determination module is used to calculate the change in the group opinion of multiple agents and determine whether the collaborative reasoning process of multiple agents meets the convergence condition based on the change in the group opinion.
[0115] 6. Collaborative reasoning result generation module.
[0116] The collaborative reasoning structure generation module is used to generate the final collaborative reasoning result after the convergence condition is met.
[0117] Furthermore, this invention also provides a multi-agent collaborative reasoning device based on an opinion dynamics model. For example... Figure 3 As shown, the multi-agent collaborative reasoning device based on the opinion dynamics model of the present invention includes: a memory 11 for storing one or more programs; one or more processors 12; when the one or more programs are executed by the one or more processors 12, the one or more processors 12 implement the multi-agent collaborative reasoning method based on the opinion dynamics model of the present invention. Finally, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the multi-agent cooperative reasoning method based on the opinion dynamics model of the present invention.
[0118] The computer-readable storage medium includes both permanent and non-permanent, removable and non-removable media, and information storage can be achieved by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device. As defined in this invention, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0119] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0120] The steps of the methods or algorithms described in conjunction with the embodiments disclosed in this invention can be implemented in hardware, software modules executed by a processor, or a combination of both. The software modules can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Those skilled in the art can modify or make equivalent substitutions to the technical solutions of the present invention based on the concept of the present invention, without departing from the essence and scope of the technical solutions of the present invention.
Claims
1. A multi-agent collaborative reasoning method based on an opinion dynamics model, characterized in that, Includes the following steps: S1: Initialize the multi-agent system to obtain the initial opinion vectors of each agent on the current task and the initial influence matrix of the multi-agent system; S2: Calculate the group dispersion, network divergence strength, and cooperative stability of the multi-agent group, and calculate the cooperative state score of the multi-agent group based on the group dispersion, network divergence strength, and cooperative stability. S3: Determine the target collaborative scoring range and target collaborative value of the multi-agent based on the task type of the current task; S4: The opinion dynamics model is used as the multi-agent collaborative update rule to perform opinion dynamics collaboration on the multi-agents, so that the collaborative state score of the multi-agents gradually approaches the target collaborative score range. S5: Calculate the change in the group opinion of the multi-agent team and determine whether the collaborative reasoning process of the multi-agent team satisfies the convergence condition based on the change in the group opinion. S6: After the convergence condition is met, the final collaborative inference result is generated.
2. The multi-agent cooperative reasoning method based on the opinion dynamics model according to claim 1, characterized in that, Specifically, step S1 involves: targeting the current task... Each agent is invoked to generate an initial opinion vector for the current task. Each agent is assigned initial capability parameters, and an initial influence matrix for the multi-agent system is formed based on these parameters. .
3. The multi-agent cooperative reasoning method based on the opinion dynamics model according to claim 1, characterized in that, Step S2 specifically includes: S21: Calculate the population dispersion : , , In the formula, It is the first of the multi-agent system The group dispersion of the wheel, It is an intelligent agent The The opinion vector of the round, where n is the number of agents. It is the first of the multi-agent system The group's average opinion vector in the round; S22: Calculate the network divergence strength : , In the formula, It is the first of the multi-agent system The intensity of network divergence in the round, It is an intelligent agent The The opinion vector of the wheel, An edge set is a set of agents in a multi-agent system that have direct interactions or trust relationships with each other. and intelligent agents A set of relationships; S23: Calculate the cooperative stability : , In the formula, It is the first of the multi-agent system The coordinated stability of the wheels, It is an intelligent agent The Opinion vectors of the wheel; S24: Calculate the cooperative state score : , In the formula, It is the first of the multi-agent system Wheel coordination status score, , and It is the weighting coefficient.
4. The multi-agent cooperative reasoning method based on the opinion dynamics model according to claim 1, characterized in that, In step S4, the opinion dynamics model is used as the multi-agent collaborative update rule: , In the formula, For multi-agent systems The group opinion vector of the wheel, For multi-agent systems The group opinion vector of the wheel, For multi-agent systems The influence matrix of the wheel and makes The sum of the tuples in each row is equal to 1.
5. The multi-agent cooperative reasoning method based on the opinion dynamics model according to claim 4, characterized in that, The opinion dynamics collaboration of multiple agents in step S4 specifically involves: when the collaboration state score is higher than the target collaboration score range, increasing the mutual influence between agents to make the group opinions converge towards higher consistency; when the collaboration state score is lower than the target collaboration score range, reducing the degree of influence between agents and enhancing diversity.
6. The multi-agent cooperative reasoning method based on the opinion dynamics model according to claim 5, characterized in that, When the collaboration status score is higher than the target collaboration score range, increase The weight of the non-diagonal terms is increased when the collaborative state score is lower than the target collaborative score range. The weights of the diagonal terms.
7. The multi-agent cooperative reasoning method based on the opinion dynamics model according to claim 1, characterized in that, Step S5 specifically involves: in At that time, it is determined that the multi-agent collaborative reasoning process has entered a stable convergence state and meets the convergence condition, among which, It is an intelligent agent The The opinion vector of the wheel, It is an intelligent agent The The opinion vector of the wheel, For each intelligent agent's first Opinion vectors of the round and the first The maximum value of the difference in opinion vectors of the wheel. This is the preset convergence threshold.
8. A multi-agent collaborative reasoning system based on an opinion dynamics model, characterized in that, include: An initialization module is used to initialize multiple agents to obtain the initial opinion vectors of each agent on the current task and the initial influence matrix of the multiple agents. The cooperative state analysis module is used to calculate the group dispersion, network divergence strength, and cooperative stability of multi-agents, and to calculate the cooperative state score of multi-agents based on the group dispersion, network divergence strength, and cooperative stability. A task-driven collaborative goal dynamic determination module is used to determine the target collaborative scoring range and target collaborative value of multiple agents based on the task type of the current task. The opinion dynamics-based collaborative update module is used to perform opinion dynamics collaboration on multiple agents by adopting the opinion dynamics model as the multi-agent collaborative update rule, so that the collaborative state score of the multiple agents gradually approaches the target collaborative score range. The collaborative reasoning convergence determination module is used to calculate the change in the group opinion of multiple agents and determine whether the collaborative reasoning process of multiple agents satisfies the convergence condition based on the change in the group opinion. The collaborative reasoning result generation module is used to generate the final collaborative reasoning result after the convergence condition is met.
9. A multi-agent collaborative reasoning device based on an opinion dynamics model, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the multi-agent collaborative reasoning method based on the opinion dynamics model as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the multi-agent collaborative reasoning method based on the opinion dynamics model as described in any one of claims 1-7.