A scalable multi-agent cooperative reasoning method and social network simulation system

By employing dynamic classification and hierarchical reasoning methods, and leveraging large language models and graph attention networks to drive collaborative reasoning among agents, this approach addresses the issues of simplified interaction logic, high computational overhead, and low simulation accuracy in large-scale social network simulators, achieving efficient and accurate social network simulation.

CN120579647BActive Publication Date: 2025-10-31UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511086731.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-10-31
Estimated Expiration
2045-08-05

AI Technical Summary

Technical Problem

In existing large-scale social network simulators, multi-agent collaborative reasoning methods suffer from problems such as simplified interaction logic, high computational overhead, and low simulation accuracy, making it difficult to effectively simulate complex social behaviors.

Method used

An adaptive grouping method based on information entropy is adopted to dynamically classify agents into core agents and regular agents. A large language model is used to drive the core agents to generate stance text, and a graph attention network is used to drive the regular agents in parallel. A bias design is combined to simulate cognitive bias, and a graph attention situational inference model is constructed for recursive prediction.

Benefits of technology

It achieves a proxy interaction mechanism that is more in line with social laws, reduces computing power consumption, improves simulation accuracy and efficiency, and can better simulate individual cognitive biases in real social networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120579647B_ABST
    Figure CN120579647B_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer software technology, and discloses a large-scale multi-agent collaborative reasoning method and a social network simulation system. The method includes: simulating users in a social network through agents, assigning character profiles to all agents, and constructing an agent-based social network topology; calculating the entropy of the position values ​​of all agents in the previous time step; selecting a predetermined proportion of agents as the core agents for the next time step; the core agents are driven by a large language model; the regular agents are driven in parallel by a graph attention-based situational inference model, recursively predicting the position values ​​for the next time step by aggregating the static and dynamic features of neighboring agents; and mapping the position text of the core agents to position values ​​using a scoring device, replacing the predicted position values ​​of the current core agents. This invention can more effectively simulate agent interaction mechanisms that conform to social laws.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software technology, specifically to a large-scale multi-agent collaborative reasoning method and a social network simulation system. Background Technology

[0002] The application of multi-agent systems in large-scale social network simulators is gaining increasing attention. Large-scale social network simulators are scientific instruments used to study the patterns of complex human social behavior. They can simulate complex interactions and reasoning processes in real-world societies (such as the propagation of events).

[0003] For large-scale social network simulators, achieving efficient collaborative reasoning among multiple agents is one of the core challenges. Taking social network event propagation simulation as an example, "collaborative reasoning" can be understood as the process by which each agent updates its social strategies and its own stance in the dynamic development of public opinion, in order to simulate the trend of events and analyze complex social behaviors. In complex social network simulations, there is a large number of agents based on Large Language Models (LLMs) involved in collaborative cooperation and group evolution. The high complexity of the system makes it difficult for agents to perform efficient collaborative reasoning.

[0004] Due to the need to scale agents in large-scale social network simulators, existing collaborative reasoning methods are as follows:

[0005] (1) Random sampling strategy: There is a technical problem of oversimplification in the modeling of interaction logic. At the simulation scale of 10 to 100, some existing technologies adopt a random sampling strategy when designing large language model agent interaction, that is, a large language model agent randomly selects a specified number of other agents and communicates with them one by one. This is a preliminary strategy for large-scale work. In order to increase the simulation scale, the interaction logic of humans in the real world is oversimplified. Subsequent work needs to design agent interaction mechanisms that are more in line with social laws.

[0006] (2) Large-scale parallel inference framework: There is a technical problem of high computational cost. At scales of tens of thousands to millions, the OASIS simulator achieves efficient parallel inference through asynchronous information channels and GPU inference managers; while the SocioVerse simulator, in order to improve the inference speed of agents, uses VLLM technology to deploy the Qwen2.5 model, 72b-Instruct model and Llama3-70b-Instruct model on 8 NVIDIA RTX 4090 GPUs for parallel inference. However, the OASIS simulator has too high a computational cost. For the simulation of one million agents, it requires 27 A100 GPUs for parallel operation, and one round of simulation (traversing all agents) takes 18 hours; the SocioVerse simulator does not explicitly mention the total number of agents and the running time of a single round of simulation, but based on the computational configuration in its paper, it is speculated that the inference time cost is still too high at the scale of tens of millions of agents. As simulators scale up in collaborative reasoning, the need for real-time, long-term calls to large-scale language model agents (such as those with thousands or tens of thousands of interactions) will lead to huge computational overhead, thus limiting further improvements in the scale and performance of the simulation.

[0007] (3) Hybrid Framework Strategy: Simulation Accuracy Needs Improvement. At simulation scales of hundreds to thousands, the HiSim framework proposes a hybrid strategy for dynamic simulation of events on social platforms. This strategy divides users into a small number of core users and a large number of regular users based on their number of followers. The core agents' situational reasoning is driven by a large language model, while the regular agents' situational reasoning is driven by an "Agent-Based Model" (ABM). Here, the ABM driving the regular agents refers to a simple mathematical model defined based on social science laws, including the HK model and the Lorenz model. Its low computational complexity accelerates the reasoning of social situations. However, due to the simple computational logic of the ABM and its serial structure, the simulation accuracy of most regular agents needs improvement. Simultaneously, the large language model driving the core agents is influenced by pre-trained data and still exhibits a factual bias in the simulated social events, making it difficult to simulate individual subjective biases in real-world social networks. Therefore, the simulation accuracy of existing hybrid frameworks urgently needs improvement. Summary of the Invention

[0008] To address the aforementioned technical problems, this invention provides a scalable multi-agent collaborative reasoning method and a social network simulation system.

[0009] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0010] In a first aspect, the present invention provides a large-scale multi-agent cooperative reasoning method, comprising:

[0011] By simulating users in a social network through intelligent agents, user profiles are assigned to all intelligent agents, and an intelligent agent social network topology is constructed.

[0012] The following steps are iterated at each time step until the situational simulation of the event to be simulated is completed:

[0013] Calculate the entropy value of all agents' positions in the previous time step; sort them in descending order of entropy value, select the agents with the previous set proportion as the core agents in the next time step, and the remaining agents are regular agents;

[0014] The conventional agent is driven in parallel by a graph attention situation inference model based on graph attention network. It recursively predicts the position value of each agent in the next time step by aggregating the static and dynamic features of neighboring agents.

[0015] The core intelligent agent is driven by a large language model, generates stance text based on user profiles and bias design, and interacts with other core intelligent agents based on stance text; it retrieves event-related content based on the previous round of tweets on the social network and updates the social network tweet environment; the bias design simulates cognitive bias by customizing bias prompts.

[0016] By using a scorer based on a large language model to map the core agent's stance text to stance values, the current stance values ​​of the core agent predicted by the graph attention situational inference model are replaced.

[0017] In one embodiment, the step of simulating users in a social network through intelligent agents, assigning person profiles to all intelligent agents, and constructing an intelligent agent social network topology specifically includes:

[0018] A sampling method based on real-world macro-distribution is used to construct a person profile, which includes name, initial stance on the event, age, gender, nationality, occupation, personality, and hobbies.

[0019] In one embodiment, the agent further includes a memory module and an inference module; the memory module is used to store the tweet environment of the social network; the core agent sends tweets or interacts with other core agents through the inference module.

[0020] In one embodiment, calculating the entropy value of the position values ​​of all agents at the previous time step specifically includes:

[0021] Based on the social network topology, calculate the position of each agent at the previous time step. The entropy value of the stance on the event:

[0022] ;

[0023] For the i-th agent at the previous time step The entropy value of each agent's stance on the event, at the previous time step. entropy set , The total number of agents. ; Indicates the previous time step In the middle, position value The frequency of occurrence of the position values ​​of the neighboring agents of the i-th agent; Indicates the previous time step In the middle, position value The number of times it appears in the position values ​​of the neighboring agents of the i-th agent; , It is the neighboring agent of the i-th agent at the previous time step. The set of position values, express The cardinality; This indicates that the neighboring agents of the i-th agent were at the previous time step. A vector composed of position values, It is an operation that combines the elements of a vector into a set.

[0024] In one embodiment, the conventional agent is driven in parallel by a graph attention situational inference model based on a graph attention network. It recursively predicts the position value of each agent at the next time step by aggregating the static and dynamic features of neighboring agents. Specifically, this includes:

[0025] Based on the position values ​​predicted by the agent at each historical time step, the individual situation features and neighbor situation features are calculated in parallel, and the dynamic features of the agent are constructed.

[0026] The embedded human portrait corresponding to the intelligent agent is used as the static feature of the intelligent agent. The static feature and the dynamic feature are respectively passed through a multilayer perceptron and then spliced ​​to obtain the final situation feature.

[0027] The final situation features of the agent and the information of neighboring agents are input into a graph attention network consisting of two graph attention convolutional layers. By aggregating the features of neighboring agents based on attention, the position values ​​of each agent at the next time step are predicted.

[0028] In one embodiment, the process of calculating individual situational characteristics and neighbor situational characteristics in parallel based on the positional values ​​predicted by the agent at each historical time step, and constructing the agent's dynamic characteristics, specifically includes:

[0029] The last time step of the i-th agent The individual situation vector is denoted as ; Indicates the previous time step of the i-th agent. The position value, , , The total number of intelligent agents. Represents the transpose of a matrix; constructs the group situation matrix. ;

[0030] Construct a local neighbor situation matrix for each agent:

[0031] ;

[0032] in, Let be the local neighbor situation matrix of the i-th agent. Let i represent the set of neighboring agents of the i-th agent. The local neighbor situation matrix of each agent is filled based on the maximum number of neighboring agents, and the filled local neighbor situation matrices are concatenated to form the global neighbor situation matrix. ;

[0033] ;

[0034] for The corresponding filled local neighbor situation matrix; This represents the operation of stacking the input matrix along a new dimension to form a new matrix;

[0035] Based on the group situation matrix Calculate the previous time step The previous state mean of the agent itself , situation standard deviation , situation maximum State Minimum and the latest status value The individual situation feature matrix of the agent group is obtained. :

[0036] ;

[0037] Based on the neighbor situation feature matrix and the corresponding mask matrix Calculate the neighbor situation mean for each agent. Neighbors' situation standard deviation The Pearson correlation coefficient matrix between the agent's own state and the states of its neighbors. and echo chamber effect score The neighborhood situation feature matrix of the agent group is obtained. :

[0038] ;

[0039] The individual situation feature matrix and the neighbor situation feature matrix are concatenated to obtain the dynamic feature matrix. :

[0040] ;

[0041] This indicates a splicing operation.

[0042] In one embodiment, embedding the portrait of the intelligent agent as a static feature of the intelligent agent, and then concatenating the static feature and the dynamic feature after passing them through a multilayer perceptron to obtain the final situational feature, specifically includes:

[0043] The user profile text corresponding to the intelligent agent is transmitted through The model's encoder obtains the agent's static feature matrix. Two multilayer perceptrons are used to perform nonlinear modeling on the dynamic feature matrix and the static feature matrix in sequence:

[0044] ;

[0045] ;

[0046] in, For the previous time step The dynamic feature matrix, For learnable weight matrix, For learnable bias terms, For activation functions; Represents the dynamic feature embedding matrix. Represents the static feature embedding matrix;

[0047] right and By splicing the data, we can obtain the previous time step of the intelligent agent group. Final situation feature matrix :

[0048] ;

[0049] This indicates a splicing operation.

[0050] In one embodiment, the final situational features of the agent and information of neighboring agents are input into a graph attention network consisting of two graph attention convolutional layers. By aggregating the features of neighboring agents based on attention, the positional values ​​of each agent at the next time step are predicted. Specifically, this includes:

[0051] The neighbor agent information is an adjacency relation matrix obtained based on the agent's social network topology; the first graph attention convolutional layer of the graph attention network calculates the normalized attention score of the agent's effective neighbors for that agent through a multi-head mask attention mechanism and an edge mask obtained based on the adjacency relation matrix.

[0052] The final situation characteristics of each agent are divided into: Parts: ; This represents the final state characteristics of the i-th agent. express The kth part;

[0053] Calculate the relationship between the j-th neighboring agent of the i-th agent and the j-th neighboring agent of the i-th agent. Attention score under each attention head , : Through a shared learnable weight matrix ,Will , Mapped to the query space and key space respectively:

[0054] ; ;

[0055] express The corresponding query vector, express The corresponding key vector; then, the query and key interaction are achieved through concatenation operations, and shared learnable weights are used. To achieve importance assessment of neighboring intelligent agents:

[0056] ;

[0057] ;

[0058] This indicates a splicing operation. This represents the activation function. This represents the softmax function. express The corresponding normalized attention score;

[0059] Calculate all neighboring agents of agent i for agent i in The normalized attention scores under each attention head are weighted and concatenated to aggregate the features of neighboring agents:

[0060] ;

[0061] in, This indicates that the outputs of each attention head are concatenated. Let be the set of all neighboring agents of the i-th agent; This represents the embedded representation of the i-th agent after aggregating neighbor features from the output of the first graph attention convolutional layer;

[0062] The second graph attention convolutional layer of the graph attention network follows the same process as the first graph attention convolutional layer, but uses only single-head attention. As input to the second graph attention convolutional layer, the position values ​​of each agent at the next time step are inferred:

[0063] ;

[0064] ;

[0065] This represents the normalized attention score of the j-th neighboring agent of the i-th agent in relation to the i-th agent, as output by the second graph attention convolutional layer. This represents the learnable weight matrix in the second-layer graph attention convolutional layer. This represents the embedding representation of the i-th agent after aggregating neighbor features from the output of the second-layer graph attention convolutional layer. For activation function, For the next time step of the i-th agent The position value.

[0066] In one embodiment, the training process of the graph attention posture inference model includes:

[0067] The overall loss function of the graph attention posture inference model for:

[0068] ;

[0069] , For weighting parameters; individual situational error The prediction vector is used to measure the position values ​​of each agent at each time step predicted by the graph attention posture inference model. With the corresponding position numerical label vector Mean square error between:

[0070] ;

[0071] in, , The total number of agents. Represents the L2 norm;

[0072] Global situational error Used to measure the predicted stance values ​​of all users at each time step by the graph attention posture inference model. mean , and the corresponding position numerical label mean Mean square error:

[0073] .

[0074] In a second aspect, the present invention provides a social network simulation system, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method of any embodiment of the first aspect.

[0075] Compared with the prior art, the beneficial technical effects of the present invention are:

[0076] 1. This invention addresses the simple and static agent interaction logic in current collaborative reasoning methods by providing an adaptive grouping method based on information entropy. This method dynamically classifies agents into "core-regular" categories, thereby more effectively simulating agent interaction mechanisms that conform to social laws.

[0077] 2. This invention addresses the computational overhead of current collaborative reasoning methods by providing a hierarchical reasoning method that integrates a large language model and a graph attention network. In this method, a small number of core agents in the upper layer are driven by the large language model, communicating with each other by generating positional text. Simultaneously, a trainable graph attention situational inference model is designed to drive a large number of regular agents in the lower layer. This graph attention situational inference model employs a parallel computing framework, directly recursively predicting the agents' positional values ​​rather than generating textual information, significantly reducing the computational overhead for social network simulation and accelerating the recursive inference of the evolution of social events.

[0078] 3. This invention addresses the simulation accuracy problem of existing social network simulation hybrid frameworks by proposing a trainable, modular, and fine-grained graph attention situation inference model to drive the position numerical inference of conventional agents in parallel. Compared with traditional sociological models, it is more efficient, clearer, and more scalable. At the same time, it introduces a bias design for simulated events into the core agent driven by a large language model to simulate individual cognitive biases in the real world, effectively overcoming the factual bias problem caused by pre-training data in traditional large language models. Attached Figure Description

[0079] Figure 1 This is a flowchart of the method in an embodiment of the present invention;

[0080] Figure 2 This is a diagram illustrating the overall framework of dynamic hierarchical collaboration in an embodiment of the present invention.

[0081] Figure 3 This is a design diagram of the key modules of the core intelligent agent in an embodiment of the present invention;

[0082] Figure 4 This is a modular design diagram of the graph attention situation inference model in this embodiment of the invention;

[0083] Figure 5 This is a schematic diagram of the training scheme for the graph attention situation inference model in an embodiment of the present invention. Detailed Implementation

[0084] A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings.

[0085] like Figure 1 As shown, this invention provides a scalable multi-agent cooperative reasoning method, comprising the following steps:

[0086] S1: Simulate users in a social network through intelligent agents, assign person profiles to all intelligent agents, and construct the intelligent agent social network topology;

[0087] S2, iterate the following steps at each time step until the situational simulation of the event to be simulated is completed:

[0088] S21, calculate the entropy value of all agents' positions in the previous time step; sort them in descending order of entropy value, select the agents with the previous set proportion as the core agents in the next time step, and the remaining agents are regular agents.

[0089] S22, the conventional agent adopts a graph attention situation inference model based on graph attention network in parallel drive, and recursively predicts the position value of each agent in the next time step by aggregating the static and dynamic features of neighboring agents.

[0090] S23, the core intelligent agent is driven by a large language model, generates position text based on user profiles and bias design, and interacts with other core intelligent agents based on position text; it retrieves event-related content according to the previous round of tweets on the social network and updates the social network tweet environment; the bias design simulates cognitive bias by customizing bias prompts.

[0091] S24: The core agent's position text is mapped to position value by a scorer based on a large language model, and the current core agent's position value predicted by the graph attention situation inference model is replaced.

[0092] This invention proposes a dynamic agent grouping strategy based on information entropy, based on existing hybrid framework strategies, to simulate the dynamics of opinion leaders in social networks. It also designs a graph attention situation inference model based on graph attention networks to model the complex group interaction mechanism of conventional agents when their positional numerical information is influenced by neighboring agents. Furthermore, based on existing large language model core agent modeling, it introduces individual bias design to better simulate individual cognitive biases in real-world social networks.

[0093] like Figure 2 As shown, the overall architecture of this invention has three core features—dynamics, hierarchy, and collaboration—to simulate and recursively extrapolate the evolution of social events. Regarding dynamism, this invention proposes an agent-adaptive grouping strategy based on information entropy to simulate the dynamic speaking mechanism of opinion leaders in social networks under information game dynamics, thereby optimizing the technical problem of oversimplification in the modeling of agent interaction logic in existing collaborative reasoning methods. Sociological theory shows that opinion leaders are not concentrated in specific groups or classes, but are evenly distributed across any group or class in society; simultaneously, opinion leaders often play the role of "intermediaries" in the dissemination process, accessing a wider range of media information and reintegrating and disseminating it to other audiences. Therefore, the agent-adaptive grouping strategy based on information entropy can better model and reflect the dynamism of opinion leaders.

[0094] Regarding hierarchical structure, this invention proposes a hierarchical reasoning model that integrates graph attention networks and large language models, driving regular and core agents separately, thus addressing both the technical requirements of optimizing computational overhead and improving simulation accuracy. Specifically, to reduce the invocation of large-scale large language models and optimize the simulation accuracy of traditional sociological models, this invention designs a trainable graph attention situational inference model. This model can dynamically calculate and integrate historical position data from a large number of regular agents, achieving recursive prediction of position numerical information through graph attention weights between agent nodes. Simultaneously, to address the "factual bias" problem inherent in the large language models driving the core agent, a "bias design" oriented towards simulated events is introduced into the core agent to characterize individual cognitive biases and improve the system's simulation accuracy.

[0095] In terms of collaboration, this invention is based on the existing hybrid framework for communication strategies between agents, enabling agents to share information and extrapolate event situations.

[0096] The technical solution of the present invention will be described in detail in the following sections.

[0097] 1. An agent-adaptive grouping strategy based on information entropy.

[0098] To obtain the agent grouping for the next time step, this invention calculates the entropy value of each agent's stance on the simulated event at the previous time step t, based on the existing social network topology. The entropy set that together constitutes the group of intelligent agents , The total number of agents, the set of agent indices , .in, , It is the set of position values ​​of the neighboring agents of the i-th agent at the previous time step t. express The cardinality. This operation transforms a vector into a set, removing duplicate elements from the input vector. If the i-th agent has four neighboring agents with corresponding position values ​​of -1, -0.5, 0.5, and -0.5, then the vector formed by these four position values ​​is... , Let the set be {-1, -0.5, 0.5}.

[0099] at the same time, , Refers to the value of a certain position in the previous time step t. The number of times it appears in the position values ​​of the neighboring agents of the i-th agent. This represents the corresponding frequency. Then, based on the entropy value, they are sorted in descending order, through... The function selects the few agents with the highest entropy values ​​as the next time step. The core intelligent agent: The remaining majority of agents are conventional agents: ,in, and Indicates the next time step The set of indices for the core agent and ordinary agents is defined. In a preferred embodiment, 1% of the agents are selected as the core agents.

[0100] 2. Deep reasoning of core intelligent agents driven by large language models.

[0101] This invention employs a large language model to drive the core intelligent agent for deep reasoning. Dynamically grouped core intelligent agents serve as opinion leaders, driven by the large language model to generate stance text information. Based on the previous round of tweeting environment, the agent retrieves relevant content using a persona and memory module, and updates the tweeting environment through a reasoning module. This reasoning module, in addition to social behaviors such as posting tweets, commenting, and forwarding, also incorporates bias design for specific events to simulate individual cognitive biases. The updated tweeting environment is then written into the agent's memory module for subsequent retrieval and reasoning.

[0102] For individual agents, initialization of their persona and design of individual components (memory module, inference module) are required. For the agent environment, a social network topology needs to be constructed for multiple agents to determine their position, text interaction, and neighbors within the environment; simultaneously, environment component design (tweet page construction, news delivery) is also necessary. Therefore, the core agent is described below from the perspectives of persona, individual components, social network topology, and environment component design. See [link to relevant documentation]. Figure 3 .

[0103] 2.1 Design of intelligent agent character profile.

[0104] The significance of constructing a persona lies in enabling the agent's reasoning process in simulation to exhibit anthropomorphic cognitive characteristics by initializing multi-dimensional social characteristic representations for each agent, thereby achieving highly reliable situational deduction at the micro level. When conducting large-scale agent-based social network simulations, due to the difficulty in obtaining complete personal information data from real users, the persona construction in this invention adopts a sampling method based on real-world macro-distributions (such as sociological statistics, X platform). By designing an adjustable sampling set, diverse persona constructions are achieved. Under the simulation of a certain event, each agent's persona contains the following eight dimensions of information. In practical applications, the number of dimensions in the persona can be increased or decreased as needed. The specific sampling set design for each dimension is shown in Table 1.

[0105] Table 1. Design of the Portrait Sampling Set

[0106]

[0107] After sampling the information from the above dimensions, it is integrated into a single sentence description, serving as a profile of the intelligent agent. This sampling method, based on a real-world macro-distribution, effectively aligns with the characteristics of users on real-world social networking platforms, making the simulated behavior of the intelligent agent more believable.

[0108] 2.2 Individual component design.

[0109] The individual component is based on the memory and reasoning modules in existing social network simulations. It introduces event-oriented bias design to simulate individual cognitive biases in real social networks. This effectively overcomes the factual bias problem caused by pre-training data in traditional large language models, making the simulation process more aligned with the cognitive and game mechanisms of real individuals in social scenarios, thereby enhancing the diversity of multi-agent interactions.

[0110] In a preferred embodiment, the bias cue words can be designed as follows:

[0111] Please express your opinion on this event based on the information you receive, in a manner that reflects your personal bias. Only change your opinion when the evidence and news are convincing. When you hear viewpoints that contradict your own, you can choose the one you care about most from the following potential points of conflict and express your bias based on that:

[0112] Educational conflict: [Fill in according to the specific event];

[0113] Gender conflict: [Fill in according to the specific event];

[0114] Family background conflict: [Fill in according to the specific event];

[0115] Media Ethics: [Fill in the blank according to the specific event].

[0116] Bias design can better simulate cognitive biases of individuals regarding events in social networks.

[0117] 2.3, Social Network Topology.

[0118] To enable information dissemination between agents, a social network topology needs to be constructed as the basic communication structure. Based on this topology, the core agent can perceive textual information from neighboring agents in a simulated tweet environment and interact with them via text through the behavior space in the inference module, thus achieving effective simulation of social events.

[0119] Because real-world social networks exhibit community clustering and short average node distances, this invention constructs a scale-free network based on the degree distribution probability of nodes during topology construction, ensuring that the degree of the final constructed graph nodes approximately follows a power-law distribution. ,in For degree values, To fit positive real numbers. In short, most nodes have a small degree, while a small number of nodes have a large degree.

[0120] 2.4 Environmental component design.

[0121] The environment component simulates the page structure of a social networking platform. Through an adjustable configuration file that updates with the simulated content, the core agent can perceive rich text information at each simulated time step. Referring to existing social network simulation systems, the environment component includes time, news feeds, followed tweets, and message notifications. Specifically, time displays the simulated social platform time; news feeds simulate the dynamic display of a news recommendation system; followed tweets represent the latest posts from neighboring agents, simulating dynamic tweets followed by users on a social media platform; and message notifications represent the forwarding or commenting of information by neighboring agents.

[0122] This invention innovatively employs a positive and negative news delivery strategy. Existing research typically inputs a single news item into a simulated environment at a specific time step. This approach fails to fully reflect the multi-source and multifaceted nature of news in real-world social networks. Therefore, this invention introduces a positive and negative news delivery strategy into its news delivery design. At a specific time step, both positive and negative news about the event are simultaneously input, allowing the intelligent agent to personalize its perception and selection based on its individual characteristics, thereby better simulating the information dissemination and decision-making process in reality.

[0123] 3. Graph attention-accelerated parallel reasoning of conventional agents.

[0124] This invention designs a graph attention-based situational inference model to drive conventional agents, accelerating inference in parallel. For dynamically grouped conventional agents, this invention designs a trainable, modular, and fine-grained graph attention-based situational inference model to recursively predict their positional numerical information. The entire process is executed efficiently within a parallel computing framework. The model mainly includes a dynamic computation module, a feature construction module, and a graph attention network. This model aims to model the complex group interaction mechanism between conventional agents and their neighboring agents based on static and dynamic features (individual situational features and neighbor situational features), optimizing the use of traditional sociological situational update models in existing hybrid frameworks, thereby improving the performance of multi-agent agents in social network simulation scenarios.

[0125] 3.1 Design of the graph attention situation inference model.

[0126] like Figure 4 As shown, the graph attention situational inference model employs an autoregressive design. When inferring the position values ​​of each agent at different time steps, the position values ​​output at previous time steps are used as the basis for calculating the position values ​​at the next time step, thus achieving recursive prediction. The graph attention situational inference model consists of three modules:

[0127] Dynamic computation module: Based on the position values ​​of each agent inferred from historical time steps, it calculates the dynamic features (neighbor situation features and individual situation features) of each agent in parallel to realize the dynamic update of the input.

[0128] Feature construction module: The static features (embedding of the person's portrait) and dynamic features (output of the dynamic computing module) of each agent are processed by a multilayer perceptron and then spliced ​​together to construct the final situational features of the agent.

[0129] Graph Attention Network (GAT): Consists of two graph attention convolutional layers. The input consists of the final situation features of each agent and information of neighboring agents. By aggregating the features of neighboring agents based on attention, it predicts the position values ​​of each agent at the next time step.

[0130] 3.1.1 Dynamic Calculation Module.

[0131] A) Initialize the situation matrix.

[0132] In order to compute the dynamic features of each agent at different time steps in parallel, it is first necessary to construct the individual situation feature matrix and the neighbor situation feature matrix of the entire agent group.

[0133] The total number of agents is Intelligent agent index set Historical time step collection The dynamic computing module has accumulated the data received from each agent at each time step. And the position values ​​at previous time steps. The individual position vector of each agent is denoted as... ,in First, construct the group situation matrix. :

[0134] ;

[0135] in, This represents the transpose of the matrix. Additionally, for each agent, a local neighbor situation matrix is ​​constructed. :

[0136] .

[0137] in, Let represent the set of neighboring agents of the i-th agent. Since the number of neighbors among agents may differ, this invention is based on the maximum number of neighbors. The local neighbor situation matrix of each agent is padded to standardize the matrix shape for easier parallel tensor computation.

[0138] ;

[0139] Then, the filled local neighbor situation matrix Concatenate into a global neighbor situation matrix :

[0140] ;

[0141] Global Neighbor Status Matrix There is a corresponding mask matrix , used to indicate Whether each location is a real neighbor (1 indicates that a neighbor exists, 0 indicates that it is a filler item) is an important prerequisite for subsequent calculation of neighbor situation features.

[0142] B) Calculation of individual situation feature matrix.

[0143] Based on the aforementioned initialization matrix, the parallel computation method for the agent's dynamic features is described below. On one hand, parallel computation of the previous time step... Individual situation feature matrix of the lower agent Including the previous time step Previous agent's own state mean , situation standard deviation , situation maximum State Minimum and the latest status value There are five statistical features in total, each of which is an n-dimensional vector:

[0144] .

[0145] exist In the mean, the situation Used to reflect the overall trend of an agent's stance on events:

[0146] ;

[0147] in, Indicates shape as A vector of all 1s.

[0148] situation standard deviation Its position volatility is measured by the following definition.

[0149] ;

[0150] in, The shape is ; This represents the position value of the i-th agent at time step k. Let represent the mean value of the i-th agent up to time step t.

[0151] maximum situation and situation minimum Provides the ultimate information about the position:

[0152] ;

[0153] .

[0154] Meanwhile, the latest situation value This information indicates the current state and helps to capture sudden changes and anomalies in short-term positions.

[0155] .

[0156] C) Calculation of the neighbor situation feature matrix.

[0157] Parallel computation of the previous time step Neighbor situation feature matrix of the lower agent This allows for better capture of interactions and community influences between agents. Neighbor situational features include the previous time step. Previously, the average neighbor situation of each agent was... Neighboring state standard deviation The Pearson correlation coefficient matrix between the agent's own situation and the situation of its neighboring community, and the echo chamber effect score. There are four statistical features, each of which is an n-dimensional vector:

[0158] ;

[0159] Among them, the neighbor attitude mean reflects the overall stance trend of the neighboring community.

[0160] Based on the previously initialized global neighbor situation matrix and the corresponding mask matrix Calculate the neighbor's situation mean as follows:

[0161] ;

[0162] This represents the positional value of the j-th neighboring agent of the i-th agent at time step k; the local neighbor situation matrix for the i-th agent. When filling in the blanks, if the j-th neighboring agent is the filling item, then... . Represents the mask values ​​of the i-th agent and its j-th neighbor agents; the local neighbor situation matrix for the i-th agent. When filling in the blanks, if the j-th neighboring agent is the filling item, then... .

[0163] Based on the above formula, when considering each neighboring agent of the i-th agent, its mean situation is... as follows:

[0164] .

[0165] Meanwhile, the standard deviation of the neighbor's situation reflects the fluctuation of the neighboring community's stance. For ease of calculation, the global neighbor situation matrix is ​​first... Flattened ,in , This is the flattened global neighbor situation matrix. Then, the deviation value is calculated. and neighbor situation standard deviation :

[0166] ;

[0167] ;

[0168] in, Shape .

[0169] The Pearson correlation coefficient reflects the strength and direction of the long-term linear dependency between an agent and its neighboring agents. Below, we first represent the Pearson correlation coefficients between the agent and each of its neighboring agents, and then obtain the Pearson correlation coefficient matrix. :

[0170] ;

[0171] ;

[0172] Let Pearson correlation coefficient be the correlation coefficient between the i-th agent and its j-th neighbor agent. Let represent the average position value of the j-th neighboring agent of the i-th agent up to time step t.

[0173] Calculate the echo chamber effect score This score is used to quantify the strength of a group's bias towards an event. A higher score indicates a more concentrated and extreme concentration of opinion within the group. The calculation is as follows:

[0174] ;

[0175] This represents the Pearson correlation coefficient between the i-th agent and its neighboring agents up to time step t. Let t represent the standard deviation of the neighboring states of the i-th agent up to time step t.

[0176] These features provide crucial neighbor information for graph attention networks, enabling the model to more accurately infer the agent's situation.

[0177] The individual situation feature matrix and the neighbor situation feature matrix are concatenated to form the overall dynamic feature matrix. :

[0178] .

[0179] 3.1.2, Feature Construction Module.

[0180] This invention is achieved through model encoder This involves obtaining the static features of the agent, namely, a high-dimensional text embedding of a static persona reflecting its basic social attributes. for In a preferred embodiment, the hidden layer dimension of the model's encoder is... The model uses the bert_base_uncased model, with a hidden layer dimension of 768.

[0181] ;

[0182] Text representing the persona corresponding to the intelligent agent; This refers to the preprocessing operations performed before inputting into the BERT model, including word segmentation and encoding.

[0183] To capture the complex and high-order dynamic relationships between features of an agent, two multilayer perceptrons (MLPs) are used to perform nonlinear modeling on dynamic and static features in turn to obtain more meaningful latent representations. Finally, the two latent representations are concatenated to achieve the model's fusion perception of dynamic and static features.

[0184] ;

[0185] ;

[0186] ;

[0187] in, For learnable weight matrix, For learnable bias terms, For the final splicing of feature dimensions, For activation function, Therefore, this invention has obtained the final situational characteristics of the intelligent agent swarm. .

[0188] 3.1.3, Graph Attention Network.

[0189] The input to the graph attention network includes not only the final state characteristics of the agent mentioned above. It also includes the adjacency matrix of the agents. That is, the number of directed edges between all agents. (Graph) The definition is as follows:

[0190] ;

[0191] in, It represents the directed connection relationship between intelligent agents. Its two rows store the node indexes of the followed party (information source) and the follower (information receiver), respectively, simulating the information propagation direction in a social network. This represents the total number of adjacent edges, i.e., the number of directed edges between all agents.

[0192] The graph attention network mainly consists of two graph attention convolutional layers. First, the first graph attention convolutional layer uses a multi-head mask attention mechanism. Through multi-head attention and neighbor mask construction, it calculates the normalized attention score of the agent's effective neighbors for the agent. The multi-head mask attention mechanism is described below.

[0193] Regarding the previous time step In other words, there are , The i-th agent and its j-th neighbor agents ( For example, suppose there are a total of Each agent has an attention head, and the final situation characteristics of each agent are divided into: There are several parts. ,in , , , for The feature dimension. For the first The attention head can be used to calculate the first attention head. For the i-th agent, at the i-th agent, the neighboring agents are in the i-th... Attention score under each attention head Through a shared learnable weight matrix The final situation features of the i-th agent and its j-th neighbor agent are... part , Mapped to the query space and key space.

[0194] ;

[0195] This represents the output dimension of each attention head, and then the interaction between the query and the key is achieved through concatenation operations.

[0196] Through shared learnable weights This implements neighbor importance assessment, specifically the scoring function parameters (different from the values ​​in the Transformer). Then, select... The function acts as an activation function, used to preserve gradients in the negative interval, mitigating the gradient vanishing problem when node feature differences are small. Note that the attention score here is only calculated for valid neighbors, i.e., masked attention is performed.

[0197] ;

[0198] Subsequently, The function normalizes the weights to obtain the first... The neighbor agent is related to the i-th agent in the i-th... Attention score under each attention head :

[0199] .

[0200] Similarly, calculate the values ​​of the other neighbors of the i-th agent. The head attention score, through the following weighting and concatenation, aggregates the features of its neighbors:

[0201] ;

[0202] in, This indicates that the outputs of each attention head are concatenated.

[0203] The second graph attention convolutional layer of the graph attention network is similar to the one described above, but it only uses single-head attention and is activated by an activation function. Keep the position value of the reasoning at (-1, 1).

[0204] ;

[0205] ;

[0206] Here, -1 represents an extremely negative stance on the event, and +1 represents an extremely positive stance. Finally, the stance values ​​of each agent in the next time step are inferred. :

[0207] ;

[0208] Based on the above process, a GPU parallel computing framework is used to recursively infer the agent's position values.

[0209] 3.2 Model training scheme design.

[0210] In the design of the aforementioned graph attention situation inference model, by introducing a dynamic computation module, a feature construction module, and a graph attention network, recursive inference of the situation of conventional agents in continuous time steps can be achieved. Specifically, only the position values ​​of each agent in the first time step need to be input into the graph attention situation inference model. The graph attention situation inference model can continuously construct the situation feature input for the next time step based on the dynamic historical situation, and achieve recursive regression prediction for a group of conventional agents.

[0211] However, this model relies on supervised learning and requires a large amount of historical tweets from real users during specific events as training data. The training process mainly faces the following three challenges:

[0212] (1) Inconsistent observation space: The number of participating users varies greatly in the data sets of different events, and the graph attention situation inference model faces an inconsistent observation space in each event.

[0213] (2) Discontinuous situational sample: The graph attention situational inference model aims to infer the situation of each agent in continuous time steps. However, in the actual event dataset, the statements of users with quantifiable position values ​​are often discontinuous, and the participating users switch in different events, resulting in time discontinuity in the training samples.

[0214] (3) Objective function design: The objective function not only needs to guide the graph attention situation inference model to deduce the overall situation mean at the macro level, but also needs to take into account the micro position values ​​at the individual level.

[0215] To effectively address the above three challenges, the following outlines the main ideas for training a graph attention situational inference model, such as... Figure 4 As shown.

[0216] A) Observational spatial clustering based on user embedding

[0217] We crawled real users' social media account descriptions under different events and embedded them using text encoding technology.

[0218] Then, the virtual users are clustered into 1000 classes in the vector space. This method achieves consistency in the observation space under different events, protects user privacy, and avoids overfitting the model to specific real users.

[0219] B) Construction of situation samples based on interpolation

[0220] For datasets of different social network events, this invention sets the total simulation time steps to 30, with each time step corresponding to several days in reality. When training the graph attention posture inference model, only user posture samples within the first 10 time steps of each event dataset are selected as model training samples.

[0221] User sentiment samples refer to users' stance ratings on specific tweet content, with values ​​ranging from [-1, +1], where -1 indicates an extremely negative stance and +1 indicates an extremely positive stance. To address situations where sentiment labels are missing at certain time steps, an interpolation strategy is used to complete the user sentiment samples, ensuring the consistency of the training samples. Specifically, each interpolation value consists of two parts: 50% using linear interpolation and 50% based on normal distribution sampling from the global sentiment distribution.

[0222] C) Objective function design

[0223] like Figure 5 As shown, to achieve the model's situational reasoning capabilities at both the macro and micro levels, the objective function needs to simultaneously guide the graph attention situational reasoning model to fit the individual user's position value (micro level) and the overall situational mean (macro level). Therefore, the loss function designed in this invention consists of two parts: individual situational error and global situational error.

[0224] Specifically, the individual situational error measure is the prediction vector composed of the positional values ​​of each agent at each time step predicted by the graph-attention situational inference model. With the corresponding position numerical label vector Mean Squared Error (MSE) between them:

[0225] ;

[0226] In the above formula, The number of virtual users used for training , This represents the L2 norm of the vector. Simultaneously, the global situational error measures the positional values ​​of all users predicted by the graph-attention situational extrapolation model at each time step. mean , and the corresponding position numerical label mean Mean square error:

[0227] ;

[0228] in, .

[0229] Overall loss function as follows:

[0230] .

[0231] To avoid the graph attention situational inference model simply converging all individual predictions to the global mean, resulting in a lack of generalization for individual predictions, weights are selected during training. , This is to enhance the learning of local features.

[0232] It should be noted that all situational samples in the graph attention situational inference model are used as training data, without separate validation and test sets. This is because the main function of the graph attention situational inference model is to be embedded into the subsequent overall framework; its training purpose is not independent performance evaluation, but rather to support the testing of macro-level situational indicators of the overall framework.

[0233] This invention employs a heterogeneous communication method within an existing hybrid framework to align the information of heterogeneous agents. The core agent communicates via position text. To align with the position numerical information of regular agents, a scorer based on a large language model is used to map its generated position text to position values ​​between [-1, 1], where -1 represents an extremely negative stance on the simulated event, and +1 represents an extremely positive stance. The scored values ​​can then be mirrored and merged into the agent's predicted position values ​​in the graph attention situational inference model, thus achieving heterogeneous communication between agents.

[0234] In summary, this invention constructs an overall framework using a large language model framework and a graph attention-based situational inference model to collaboratively perform situational inference. The overall framework relies on information generated by agents (including static feature embeddings, dynamic situational updates, and generated network topology) rather than real user data. During the inference process, the initial inputs to the graph attention model include: agent static features (text embedding vectors of the person's profile), the agent's initial position values, and the agent's network topology. Based on the initial inputs, the graph attention-based situational inference model recursively predicts the position values ​​of regular agents at each time step and receives influences from the core agent driven by the large language model during the inference process.

[0235] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0236] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings may include multiple steps or stages, which are not necessarily completed at the same time, but may be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0237] In one embodiment, the present invention provides a computer system (social network simulation system), which may be a server. The computer system includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data used in the methods described above. The network interface communicates with external terminals via a network connection. The computer program is executed by the processor to implement the methods described above.

[0238] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0239] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention, and no reference numerals in the claims should be construed as limiting the scope of the claims.

[0240] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A large-scale multi-agent cooperative reasoning method, characterized in that, include: By simulating users in a social network through intelligent agents, user profiles are assigned to all intelligent agents, and an intelligent agent social network topology is constructed. The following steps are iterated at each time step until the situational simulation of the event to be simulated is completed: Calculate the entropy value of all agents' positions in the previous time step; sort them in descending order of entropy value, select the agents with the previous set proportion as the core agents in the next time step, and the remaining agents are regular agents; The conventional agent is driven in parallel by a graph attention situation inference model based on graph attention network. It recursively predicts the position value of each agent in the next time step by aggregating the static and dynamic features of neighboring agents. The core intelligent agent is driven by a large language model, generates position text based on user profiles and biases, and interacts with other core intelligent agents based on position text. The event-related content is retrieved based on the previous round of tweets on social networks, and the social network tweet environment is updated accordingly; the bias design simulates cognitive bias by customizing bias prompts. By using a scorer based on a large language model to map the core agent's stance text to stance values, the current stance values ​​of the core agent predicted by the graph attention situational inference model are replaced.

2. The large-scale multi-agent cooperative reasoning method according to claim 1, characterized in that, The process of simulating users in a social network using intelligent agents, assigning user profiles to all agents, and constructing an intelligent agent social network topology specifically includes: A sampling method based on real-world macro-distribution is used to construct a person profile, which includes name, initial stance on the event, age, gender, nationality, occupation, personality, and hobbies.

3. The large-scale multi-agent cooperative reasoning method according to claim 1, characterized in that, The intelligent agent also includes a memory module and an inference module; the memory module is used to store the tweet environment of the social network; the core intelligent agent sends tweets or interacts with other core intelligent agents through the inference module.

4. The large-scale multi-agent cooperative reasoning method according to claim 1, characterized in that, The calculation of the entropy value of the position values ​​of all agents in the previous time step specifically includes: Based on the social network topology, calculate the position of each agent at the previous time step. The entropy value of the stance on the event: ; For the i-th agent at the previous time step The entropy value of each agent's stance on the event, at the previous time step. entropy set , The total number of agents. ; Indicates the previous time step In the middle, position value The frequency of occurrence of the position values ​​of the neighboring agents of the i-th agent; Indicates the previous time step In the middle, position value The number of times it appears in the position values ​​of the neighboring agents of the i-th agent; , It is the neighboring agent of the i-th agent at the previous time step. The set of position values, express The cardinality; This indicates that the neighboring agents of the i-th agent were at the previous time step. A vector composed of position values, It is an operation that combines the elements of a vector into a set.

5. The large-scale multi-agent cooperative reasoning method according to claim 1, characterized in that, The conventional agent is driven in parallel by a graph attention situation inference model based on a graph attention network. It recursively predicts the position value of each agent at the next time step by aggregating the static and dynamic features of neighboring agents. Specifically, this includes: Based on the position values ​​predicted by the agent at each historical time step, the individual situation features and neighbor situation features are calculated in parallel, and the dynamic features of the agent are constructed. The embedded human portrait corresponding to the intelligent agent is used as the static feature of the intelligent agent. The static feature and the dynamic feature are respectively passed through a multilayer perceptron and then spliced ​​to obtain the final situation feature. The final situation features of the agent and the information of neighboring agents are input into a graph attention network consisting of two graph attention convolutional layers. By aggregating the features of neighboring agents based on attention, the position values ​​of each agent at the next time step are predicted.

6. The scalable multi-agent cooperative reasoning method according to claim 5, characterized in that, The agent's dynamic features are constructed by simultaneously calculating individual situational characteristics and neighbor situational characteristics based on the positional values ​​predicted at each historical time step, specifically including: The last time step of the i-th agent The individual situation vector is denoted as ; Indicates the previous time step of the i-th agent. The position value, , , The total number of intelligent agents. Represents the transpose of a matrix; constructs the group situation matrix. ; Construct a local neighbor situation matrix for each agent: ; in, Let be the local neighbor situation matrix of the i-th agent. Let i represent the set of neighboring agents of the i-th agent. The local neighbor situation matrix of each agent is filled based on the maximum number of neighboring agents, and the filled local neighbor situation matrices are concatenated to form the global neighbor situation matrix. ; ; for The corresponding filled local neighbor situation matrix; This represents the operation of stacking the input matrix along a new dimension to form a new matrix; Based on the group situation matrix Calculate the previous time step The previous state mean of the agent itself , situation standard deviation , situation maximum State Minimum and the latest status value The individual situation feature matrix of the agent group is obtained. : ; Based on the neighbor situation feature matrix and the corresponding mask matrix Calculate the neighbor situation mean for each agent. Neighbor situation standard deviation The Pearson correlation coefficient matrix between the agent's own state and the states of its neighbors. and echo chamber effect score The neighborhood situation feature matrix of the agent group is obtained. : ; The individual situation feature matrix and the neighbor situation feature matrix are concatenated to obtain the dynamic feature matrix. : ; This indicates a splicing operation.

7. The large-scale multi-agent cooperative reasoning method according to claim 5, characterized in that, The embedding of the person's portrait corresponding to the intelligent agent is used as the static feature of the intelligent agent. After the static feature and the dynamic feature are respectively processed by a multilayer perceptron, a splicing operation is performed to obtain the final situational feature, specifically including: The user profile text corresponding to the intelligent agent is transmitted through The model's encoder obtains the agent's static feature matrix. Two multilayer perceptrons are used to perform nonlinear modeling on the dynamic feature matrix and the static feature matrix in sequence: ; ; in, For the previous time step The dynamic feature matrix, For learnable weight matrix, For learnable bias terms, For activation functions; Represents the dynamic feature embedding matrix. Represents the static feature embedding matrix; right and By splicing the data, we can obtain the previous time step of the intelligent agent group. Final situation feature matrix : ; This indicates a splicing operation.

8. The large-scale multi-agent cooperative reasoning method according to claim 5, characterized in that, The process involves inputting the final situational features of the agent and information about neighboring agents into a graph attention network composed of two graph attention convolutional layers. By aggregating the features of neighboring agents based on attention, the system predicts the positional values ​​of each agent at the next time step. Specifically, this includes: The neighbor agent information is an adjacency relation matrix obtained based on the agent's social network topology; the first graph attention convolutional layer of the graph attention network calculates the normalized attention score of the agent's effective neighbors for that agent through a multi-head mask attention mechanism and an edge mask obtained based on the adjacency relation matrix. The final situation characteristics of each agent are divided into: Parts: ; This represents the final state characteristics of the i-th agent. express The kth part; Calculate the relationship between the j-th neighboring agent of the i-th agent and the j-th neighboring agent of the i-th agent. Attention score under each attention head , : Through a shared learnable weight matrix ,Will , Mapped to the query space and key space respectively: ; ; express The corresponding query vector, express The corresponding key vector; then, the query and key interaction are achieved through concatenation operations, and shared learnable weights are used. To achieve importance assessment of neighboring intelligent agents: ; ; This indicates a splicing operation. This represents the activation function. This represents the softmax function. express The corresponding normalized attention score; Calculate all neighboring agents of agent i for agent i in The normalized attention scores under each attention head are weighted and concatenated to aggregate the features of neighboring agents: ; in, This indicates that the outputs of each attention head are concatenated. Let be the set of all neighboring agents of the i-th agent; This represents the embedded representation of the i-th agent after aggregating neighbor features from the output of the first graph attention convolutional layer; The second graph attention convolutional layer of the graph attention network follows the same process as the first graph attention convolutional layer, but uses only single-head attention. As input to the second graph attention convolutional layer, the position values ​​of each agent at the next time step are inferred: ; ; This represents the normalized attention score of the j-th neighboring agent of the i-th agent in relation to the i-th agent, as output by the second graph attention convolutional layer. This represents the learnable weight matrix in the second-layer graph attention convolutional layer. This represents the embedding representation of the i-th agent after aggregating neighbor features from the output of the second-layer graph attention convolutional layer. For activation function, For the next time step of the i-th agent The position value.

9. The scalable multi-agent cooperative reasoning method according to claim 5, characterized in that, The training process of the graph attention posture inference model includes: The overall loss function of the graph attention posture inference model for: ; , For weighting parameters; individual situational error The prediction vector is used to measure the position values ​​of each agent at each time step predicted by the graph attention posture inference model. With the corresponding position numerical label vector Mean square error between: ; in, , The total number of agents. Represents the L2 norm; Global situational error Used to measure the predicted stance values ​​of all users at each time step by the graph attention posture inference model. mean , and the corresponding position numerical label mean Mean square error: 。 10. A social network simulation system, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Multi-dimensional information fusion user standing detection method based on graph attention network

    CN116245110A

  • Intelligent strategy deduction method and device for machine self-game

    CN119886856A