Multi-agent simulation method and system for multiple dynamic environments
Patent Information
- Application Number
- CN202611509815.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]尽管上述研究已经取得一定进展,现有技术仍难以有效适应真实社交平台中的多重动态环境
多热点场景的精准建模与跨热点关联捕获:本发明通过构建局部平均场与全局平均场相结合的层次化结构,突破了现有方法仅适用于单热点场景的技术局限。局部平均场总结每个热点内部的立场分布与情感倾向,全局平均场聚合跨热点舆论联动与注意力迁移模式,使智能体能够同时感知单一事件语境与全局态势,在多热点并发环境中生成符合真实用户行为的决策。此外,该方法能够刻画协同与竞争效应,为理解跨热点舆论动力学提供了新的建模视角。
Smart Images

Figure CN123015002A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer software technology, and more specifically to a multi-agent simulation method and system for multiple dynamic environments. Background Technology
[0002] With the widespread adoption of social media, public opinion no longer spreads linearly around a single event, but rather often rapidly forms, migrates, and reorganizes in an environment where multiple trending topics emerge simultaneously. Different trending topics share limited user attention, and users frequently switch between multiple topics. Related topics can also influence each other through emotional transmission, stance linkage, and behavioral emergence. Therefore, accurately reproducing the complex dynamics of events on social media platforms in a multi-faceted and dynamic environment is an important task for understanding the evolutionary patterns of social situations.
[0003] Constructing a high-fidelity multi-hotspot social network simulation method to address the aforementioned issues has significant research and application value. On one hand, this method can provide a controllable experimental platform for interdisciplinary research in social sciences, information sciences, and artificial intelligence, enabling the analysis of complex social phenomena such as information dissemination mechanisms, group attitude evolution, emotion diffusion, and cross-hotspot impacts. On the other hand, it can also serve practical scenarios such as risk assessment, brand crisis management, and event guidance strategy design. By simulating the evolution and interaction of different hotspots in a virtual environment, potential risks can be assessed in advance, the impact of different strategies can be compared, and auxiliary evidence can be provided for event handling.
[0004] Current social network simulation technologies have evolved from traditional agent-based modeling to simulation driven by large language models. Traditional agent-based modeling (ABM) typically simulates micro-level behaviors and their resulting macro-level group phenomena by pre-setting individual behavioral rules and local interaction mechanisms. It was widely used in the early days to study social phenomena such as group differentiation, opinion diffusion, and cooperative evolution. However, this type of method heavily relies on manually set behavioral rules and struggles to capture the semantic richness, subtle differences in opinions, and open-ended interactive behaviors of natural language expressions in real social platforms. In recent years, the development of large language models (LLMs) has provided a new technological paradigm for social simulation, enabling agents to use natural language as an interface for perception, reasoning, and action, generating interactive behaviors that more closely resemble those of real users. For example, the generative agents proposed by Joon Sung Park et al. demonstrate the human-like capabilities of large language models in memory, reflection, and social interaction; OASIS proposed by Ziyi Yang et al. extends large language model agents to simulation scenarios of millions of open social interactions, used to characterize large-scale social interaction processes; AgentSociety proposed by Park Kyung-hwa et al. further focuses on simulation research of large-scale social behavior and group phenomena, promoting the development of large language model-driven social simulation in terms of scale and social behavior modeling. Meanwhile, methods such as personalized fine-tuning, behavioral trajectory alignment, and group state modeling have begun to be used to improve the consistency between simulation results and real social data. Overall, existing research has driven social network simulation from rule-driven to language model-driven, and has gradually improved simulation scale, behavioral realism, and data alignment capabilities.
[0005] Despite the progress made in the aforementioned research, existing technologies still struggle to effectively adapt to the multi-faceted dynamic environments of real-world social platforms. First, most current large language model-driven social simulation methods primarily focus on the temporal evolution of a single hotspot or event, failing to adequately consider the complex relationships between multiple hotspots, such as collaboration, competition, emotion transmission, and user attention shifts. This makes it difficult to accurately reflect the intertwined and evolving event landscape of real-world platforms. Second, existing methods often emphasize overall statistical or summary information when characterizing group states, lacking effective organization of the correlation between fine-grained discussion dynamics within individual events and the macro-level event structure across hotspots. This makes it difficult for agents to simultaneously consider both the local discussion context and the overall event environment during decision-making. Third, the flow of information from multiple hotspots further exacerbates the cross-hotspot interference and attention fragmentation problems of large language models, making the generated results prone to topic confusion, stance drift, and decreased language consistency. Finally, a systematic deviation still exists between pre-trained large language models and the distribution of real-world social media behavior. Large-scale multi-agent interactions also incur high computational costs, affecting the scalability and stability of simulation methods in complex real-world scenarios. In summary, how to simultaneously characterize the intra-event evolution process and cross-hotspot influence under conditions of multiple hotspot concurrency, reduce attention fragmentation and cross-hotspot interference, and achieve efficient alignment with real data distribution under limited computing resources are important technical problems that current social network simulations urgently need to solve. Summary of the Invention
[0006] To overcome the limitations of existing technologies in simulation efficiency and multi-hotspot environment modeling, this invention proposes a multi-agent simulation method and system for multiple dynamic environments. This invention designs a hierarchical mean-field structure, transforming complex multi-agent interactions into efficient information transmission and dynamic feedback between individuals and groups through an adaptive update mechanism of "local sampling-global aggregation-state update." In this framework, the policy model plays the role of behavior generation, the local mean-field model provides the agents with the behavioral context within a single hotspot, and the global mean-field model integrates macro-level public opinion at cross-hotspot levels, constructing a hierarchical mean-field-driven agent decision-making mechanism.
[0007] This invention decomposes multi-hotspot social simulation into two coupled levels: a local mean field and a global mean field. The local mean field captures discussion patterns within an event, including fine-grained information such as position distribution, viewpoint diversity, and sentiment. The global mean field models cross-hotspot dependencies and macro-level public opinion trends by aggregating information from all local mean fields. Simultaneously, this invention designs a hierarchical joint fine-tuning strategy based on information bottleneck theory to collaboratively optimize the local mean field, global mean field, and strategy model, suppressing cross-hotspot interference while preserving relevant information for target prediction.
[0008] The present invention adopts the following technical solution: In a first aspect, the present invention provides a multi-agent simulation method for multiple dynamic environments, comprising: Initialize the agent pool and multiple events: randomly shuffle the order of events, initialize the global average field and the local average field of each event, and use real user actions for warm-up iterations to stabilize the average field; The activation probability of an agent is determined based on its activity level and the interval between its last participation. Bernoulli sampling is then used to extract candidate agents. These candidate agents are then ranked using multi-criteria scoring and semantic filtering by a large language model to obtain the activated agents. For each event, a local mean field module is constructed that inherits the state of the previous moment to summarize the distribution of positions, emotions, and opinions within the event; The global average field module is updated by aggregating all local average fields and the previous global average field to enable cross-hotspot event linkage. The activated agent generates forwarding or commenting actions and updates the agent's state based on its own state, local average field, and global average field through a policy model. Based on the information bottleneck theory, a low-rank adaptation technique is used to jointly fine-tune the local mean field module, the global mean field module, and the policy model, retaining prediction-related information and suppressing cross-hotspot interference, and co-optimizing until convergence.
[0009] In one embodiment, the initialization of the agent pool and multiple events specifically includes: A pool of intelligent agents is built based on real social data. Multiple activity levels and multiple influence levels are set for each agent, and the presentation order of events is randomly shuffled. The global average field and the local average field of each event are initially empty. During the warm-up phase, real user action data is used to iterate multiple times to make the global average field and the local average field of each event converge to a state consistent with the actual discussion distribution.
[0010] In one embodiment, determining the activation probability of an agent based on its activity level and the last participation interval, and performing Bernoulli sampling to extract candidate agents, specifically includes: No. An intelligent agent at time activation probability for: ; in, Indicates the first The time interval since the last participation of each agent. Indicates the first The activity level of each agent Temperature parameters used to control the smoothness of the probability distribution Represents the Sigmoid function; Bernoulli sampling is performed based on this activation probability to obtain a pool of candidate agents.
[0011] In one embodiment, the step of performing multi-criteria scoring and ranking of candidate agents and semantic filtering using a large language model to obtain activated agents specifically includes: No. Scores of candidate agents for: ; in, For the first The time interval since the last participation of each agent. For the first The influence level of an agent To introduce random perturbations of natural variability, These are weighting coefficients; a set number of candidate agents with the highest scores are retained. The current event, environmental background, and user profiles of candidate agents are input into the large language model. The large language model then determines whether the candidate agent has a genuine interest in discussing the current event, and activates the candidate agent that passes the determination.
[0012] In one embodiment, the step of constructing a local mean field module that inherits the state of the previous time step for each event specifically includes: The update formula for the local mean-field module is: ; in, This represents a local mean field module. For the first The event at time The local mean field; For the first The event at time The local mean field, i.e., the first Local mean field updated after each event This is the corresponding agent state sequence. This is the corresponding agent action sequence; agent actions include the selection of behavior type and the generation of comment content, where the behavior type is forwarding or commenting.
[0013] In one embodiment, the module for aggregating all local mean fields and updating the global mean field from the previous round specifically includes: The update formula for the global mean field module is: ; in, This represents the global mean field module. For a moment The global mean field, For the first The event at time The local mean field, For a moment The global mean field, i.e. the updated global mean field.
[0014] In one embodiment, the activated agent generates a forwarding or commenting action and updates the agent's state based on its own state, local mean field, and global mean field using a policy model, specifically including: Strategy Model The generated action is: ; in, For the first The agent in the th... An event, a moment The following state, For a moment The global mean field, For the first The event at time The local mean field, For the first An intelligent agent at time Regarding the first The action of an event; The agent's state transition is as follows: ; For the first The event at time The agent's state sequence, For the first The event at time The agent's state sequence, For the first The event at time The sequence of actions of the intelligent agent, For the first The event at time The local mean field, This is the state transition equation, used to determine the state distribution at the next time step.
[0015] In one embodiment, the joint fine-tuning of the local mean field module, the global mean field module, and the policy model based on the information bottleneck theory and employing low-rank adaptation techniques specifically includes: Loss function of local mean field module The upper bound for optimization is: ; in, For the historical trajectory, Represents the sequence of the agent's actual states. This represents the actual sequence of actions of the intelligent agent. Represents the time index in the historical trajectory. Indicates the current moment. The learned local mean field representation, For the prior distribution, To balance the parameters, The number of agents; Indicates the total number of time steps. Indicates the distribution of true historical trajectories. Indicates the Kullback–Leibler divergence. This represents a local mean field module. Representational strategy model, This represents the actual action of the i-th agent. This represents the true state of the i-th agent; Loss function of global mean field module The upper bound for optimization is: ; in, For the set of local mean fields of all events, For the first The event at time The local mean field, The total number of events; For a moment The global mean field, To balance the parameters, This represents the global mean field module; Loss function of the policy model for: ; For the first An intelligent agent at time Regarding the first The action of the event, For the first The agent in the th... An event, a moment The current state.
[0016] In one embodiment, both the local mean field module and the global mean field module inherit the state of the previous moment to maintain temporal continuity; the global mean field module does not rely on agent interaction within a single event, but rather performs incremental updates by aggregating all local mean fields and the previous round of global mean fields to accumulate and form an overall environmental cognition.
[0017] In a second aspect, the present invention provides a multi-agent simulation system for multiple dynamic environments, used to implement the method of any embodiment of the first aspect, comprising: The initialization and warm-up module is used to initialize the agent pool and multiple events, randomly shuffle the order of events, initialize the global average field and the local average field of each event, and use real user actions to perform warm-up iterations to stabilize the average field. The agent activation module is used to determine the activation probability of an agent based on its activity level and the last participation interval, and to extract candidate agents by Bernoulli sampling. The candidate agents are then ranked by multi-criteria scoring and semantic filtering by a large language model to obtain the activated agents. The local mean field update module is used to build a local mean field module for each event that inherits the state of the previous time step, in order to summarize the distribution of positions, sentiments and opinions within the event; The global average field update module is used to aggregate all local average fields and the previous round of global average field update module to enable cross-hotspot event linkage; The strategy model decision module is used to enable the activated agent to generate forwarding or commenting actions and update the agent's state based on its own state, local average field and global average field through the strategy model. The hierarchical joint fine-tuning module is used to jointly fine-tune the local mean field module, the global mean field module, and the policy model based on the information bottleneck theory and using low-rank adaptation techniques. It retains prediction-related information and suppresses cross-hotspot interference, and coordinates optimization until convergence.
[0018] The system and method in this invention correspond to each other; the specific technical solutions applicable to the method are also applicable to the system.
[0019] Compared with the prior art, the beneficial technical effects of the present invention are: Precise Modeling and Cross-Hotspot Association Capture in Multi-Hotspot Scenarios: This invention overcomes the technical limitation of existing methods that are only applicable to single-hotspot scenarios by constructing a hierarchical structure combining local and global average fields. The local average field summarizes the position distribution and sentiment tendencies within each hotspot, while the global average field aggregates cross-hotspot public opinion linkages and attention migration patterns. This enables the agent to simultaneously perceive the context of a single event and the overall situation, generating decisions that conform to real user behavior in a multi-hotspot concurrent environment. Furthermore, this method can characterize collaborative and competitive effects, providing a new modeling perspective for understanding the dynamics of cross-hotspot public opinion.
[0020] Synergistic Improvement of Simulation Fidelity and Computational Efficiency: This invention replaces the explicit fully connected interactions between agents in traditional methods with hierarchical mean-field methods, transforming the complex interaction problem of large-scale multi-agent systems into efficient information transmission between individual and group statistics, fundamentally reducing the computational complexity of the system. By compressing the group state into two compact representations—local and global—through mean-field theory, each agent only needs to interact with the mean-field to grasp the required group information. This method supports multi-round dynamic interactions of large-scale agents with limited resources, balancing individual behavior characterization with system scalability.
[0021] In summary, by introducing a hierarchical mean field structure and a hierarchical joint fine-tuning strategy, this invention effectively solves several technical problems in the field of social simulation in multiple dynamic environments. It can achieve consistency between group behavior modeling and text generation under a unified framework, and provides an effective modeling paradigm for propagation modeling and agent simulation in multi-hotspot social networks. Attached Figure Description
[0022] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0023] A preferred embodiment of the present invention will now be described in detail with reference to the accompanying drawings.
[0024] like Figure 1 As shown, the present invention provides a multi-agent simulation method for multiple dynamic environments, comprising the following steps: S1, Initialize the agent pool and multiple events: Randomly shuffle the order of events, initialize the global average field and the local average field of each event, and use real user actions for warm-up iterations to stabilize the average field; S2, determine the activation probability of the agent according to the activity level and the last participation interval, and perform Bernoulli sampling to extract candidate agents. Then, perform multi-criteria scoring and ranking of the candidate agents and semantic filtering of the large language model to obtain the activated agents. S3 constructs a local mean field module for each event that inherits the state of the previous moment to summarize the distribution of positions, emotions, and opinions within the event; S4 aggregates all local average fields and the previous round of global average fields to update the global average field module, in order to perform cross-hotspot event linkage; S5, the activated agent generates a forwarding or commenting action based on its own state, local average field and global average field through the policy model and updates the agent's state; S6, based on the information bottleneck theory, uses low-rank adaptation technology to jointly fine-tune the local mean field module, the global mean field module, and the policy model, retaining prediction-related information and suppressing cross-hotspot interference, and co-optimizing until convergence.
[0025] The following is a breakdown into several parts.
[0026] 1. System initialization and environment setup.
[0027] Upon receiving a task request for event situation simulation, the environment server first initializes the user profiles and time settings for the target group. Multiple news events are loaded as different trending topics, and the presentation order of the news is randomly perturbed to eliminate biases that might be introduced by a fixed time sequence, enhancing the uncertainty in the simulation process. The main function of the environment server is to maintain the state and data of the social media platform, including user information and activity time. The agent pool is obtained by deduplicating real data, and each agent has two attributes: activity level and influence level. To accurately characterize individual interaction motivations, users are pre-classified from two dimensions: activity level and influence level. For activity level, the total number of historical comments for each user is counted and divided into five levels, serving as a priori basis for activation probability modeling; for influence level, the user's influence level is quantified based on the number of followers, and the influence level directly affects the agent's weight score in the candidate stage. The global mean field, the local mean fields for each event, and the state of each agent are set as initial conditions, and a warm-up phase is conducted by directly filling the mean field with real user actions to achieve stable initialization. In this phase, instead of immediately conducting rigorous evaluation or decision generation, real-world data is used to drive a mean field through multiple iterations, gradually converging it to a state consistent with the actual discussion distribution. This provides a stable starting point for subsequent formal simulations. In fact, the actual discussion distribution refers to the distribution of user-generated content such as reposts, comments, stances, and emotions—characteristics of group behavior—reflecting real social data.
[0028] 2. Time-decaying agent activation.
[0029] This invention employs a three-stage design for agent activation. The first stage is Bernoulli sampling pre-selection based on time decay. To simulate the forgetting and interest cooling effects on social media in humans, a... The function constructs an activation probability model for each agent. At any moment The activation probability decays over time. The first stage involves a function that prioritizes agents whose activity level is most easily met, based on the longer the time interval since their last participation. A pool of candidate agents is randomly selected from all agents using Bernoulli sampling. The second stage ranks these agents based on multiple criteria, considering factors such as idle time, influence level, and random perturbations. A preliminary set of high-scoring agents is then selected. The third stage involves semantic filtering using a large language model. The current event, context, and user profile are input into the model to determine if the candidate agents have genuine interest in discussing the current event, thus obtaining the final set of activated agents. This mechanism strikes a balance between efficiency and authenticity, effectively characterizing the process of matching users' intermittent participation with their interests.
[0030] Specifically, the activation probability of an agent can be calculated as follows: ; in, Indicates the first An intelligent agent at time activation probability, Indicates the first The time interval since the last participation of each agent. Indicates the first The activity level of each agent Temperature parameters are used to control the smoothness of the probability distribution. Based on the activation probability, Bernoulli sampling is employed. Construct a pool of candidate agents : ; This represents the set of users in the user pool. This represents the user to be sampled, the user-constructed intelligent agent. Indicated based on activation probability Perform Bernoulli sampling. This indicates that the sampling was successful.
[0031] The scoring function for candidate agents is: ; A predetermined number of candidate agents with the highest scores are retained. This predetermined number is the smaller of the agent pool size and the preset number of candidate agents. The preset number of candidate agents is determined based on the final number of agents participating in the simulation, typically ten times the final number. The final activated agents are determined through semantic filtering using a large language model to ensure that the activated agents have genuine interest in discussing the current event.
[0032] 3. Construct a hierarchical average field.
[0033] This invention constructs a hierarchical mean field, comprising two levels: a local mean field and a global mean field. At the local level, a local mean field is constructed for each event, summarizing the dynamics of discussion within that event using a large language model. The local mean field inherits the state from the previous moment to maintain temporal continuity and avoid instability in simulation results caused by drastic fluctuations. At the global level, a global mean field is constructed, and by aggregating information from all local mean fields and the previous round of the global mean field, it captures cross-hotspot dependencies and macro-level public opinion trends. Unlike the local mean field, the global mean field does not depend on the actions of individual agents but describes macro-level patterns, providing agents with cross-hotspot contextual signals, enabling them to perceive the overall public opinion situation in the current multi-hotspot environment.
[0034] Specifically, in the local mean field module, the local mean field summarizes the user interaction trends under the corresponding topic of the current news event at each time step, mainly driven by the large language model. The input is the historical trajectory and the local mean field of the previous time step, and the output is the updated local mean field. The update of the local mean field can be expressed as: ; in, For the first The event at time The local mean field, This is the corresponding agent state sequence. This represents an action sequence. The local mean field focuses on the interaction process within a single news hotspot, emphasizing fine-grained information such as the distribution of positions, viewpoints, and sentiments within that hotspot, while also reflecting the local contextual features accumulated from historical commentary. On the input side, the previous round of local mean fields is incorporated into the model's input, ensuring that each update inherits contextual information from previous discussions, thus forming a temporally coherent representation of public opinion evolution. The agent's state includes information such as the gender, brief introduction, and city of residence of the role represented by the agent.
[0035] In the global mean field module, the global mean field provides a unified model for cross-hotspot interaction and correlation information. The inputs are the global state from the previous time step and the updated local mean fields for all events; the output is the updated global mean field. The update of the global mean field can be expressed as: ; in, For a moment The global mean field, For the first The local mean field is updated after each event. The global mean field is generated without relying on agent interactions within a single news item, thus eliminating the need for agent state and action information. In terms of output, the global mean field focuses on the core hot topics of the current discussion, the distribution of group emotions, cognitive states, and the evolutionary trend of public opinion structure. This supplements the agent's lack of macro-context in its local perspective, reducing cognitive biases that may result from relying solely on local information. On the input side, incremental updates are performed using the previous round of global public opinion state, allowing the model to gradually absorb the discussion of new events within the existing public opinion landscape, accumulating a holistic understanding of the environment. Incremental updates refer to generating a local mean field based on the trajectory of this simulation after its completion. The global mean field is then generated based on the local mean field of this simulation, inheriting and retaining the global public opinion information represented by previous global mean fields. The previous global mean field provides cross-event information, while the new local mean field provides changes in the discussion within this round of events. The global mean field module absorbs changes in this round while inheriting the previous state; hence, it is called incremental updates.
[0036] 4. The policy model generates agent actions.
[0037] The activated agent generates actions guided by a hierarchical mean field. Action generation conditions include three inputs: agent state information, local mean field, and global mean field. The policy model generates corresponding actions based on the current event content, hierarchical mean field, and state information, fully utilizing the high-dimensional semantic space and inherent knowledge of the large language model to ensure its rich expressions better align with the real world. The agent's state transitions based on actions and the hierarchical mean field, determining event scheduling and the next round of state propagation. This mechanism simulates the dynamic evolution of real social media, including the natural decay of event popularity, the migration of user attention across hot topics, and the gradual changes in public opinion. The dynamic closed loop of local mean field construction, global mean field aggregation, agent decision-making, and state update feedback constitutes the core adaptive update mechanism of the hierarchical mean field, while also considering both the macro-level public opinion landscape and micro-level event dynamics in multi-hotspot environments.
[0038] Specifically, in the policy model, the agent generates corresponding actions based on the current event, hierarchical mean field, and individual state information. The input is the agent's state. Local mean field and global mean field The output is the agent's actions. The output of the policy model can be expressed as: ; The policy model generates actions that conform to real user behavior based on hierarchical average field signals, outputting personalized behavioral decisions, including the choice between forwarding or commenting, and the generation of comment content. All agents share the same policy, which is factored onto events and agents. This design ensures scalability and generalization across heterogeneous groups.
[0039] 5. Hierarchical joint fine-tuning strategy.
[0040] Pre-trained large language models lack accurate representations of behavioral distribution and language style in real social media, often resulting in systematic deviations from real data, especially in multi-hotspot environments. The model's limited cognitive resources lead to fragmented attention and semantic drift in the agent. To alleviate this problem, this invention designs a hierarchical joint fine-tuning strategy, simultaneously optimizing three modules—the local mean field module, the global mean field module, and the policy model—based on the information bottleneck theory. Efficient parameter fine-tuning techniques preserve information relevant to the target prediction while suppressing cross-hotspot interference and noise. Specifically, the fine-tuning goal of the local mean field module is to provide the agent with key information interaction representations at the granularity of individual news items; the fine-tuning of the global mean field module focuses on modeling group signals across hotspots; and the fine-tuning of the policy model focuses on learning how to generate text highly consistent with real user behavior under such structured group signals and its own role characteristics. All three modules use Low-Rank Adaptation (LoRA) for efficient parameter fine-tuning, optimizing together until convergence.
[0041] During state transitions, the generation of an agent's action triggers a state update of the environment and determines the next round of discussion topics and their scheduling order. State transitions involve specific moments. A hierarchical average field and a series of state-action pairs. The transition of the agent's state can be expressed as: ; in, This represents the state transition equation for a hierarchical mean-field framework, used to guide state setup and updates at each stage. The equation determines the state distribution for the next time step based on the current state, action, and hierarchical mean field.
[0042] In hierarchical joint fine-tuning, for the fine-tuning of local mean fields, this invention introduces the information bottleneck theory. This theory removes redundant historical trajectory information while preserving as much prediction-related information as possible. Its core objective is to provide the agent with key information interaction representations at the granularity of individual news items. The loss function of the local mean field module... The optimization upper bound can be expressed as: ; in, For the historical trajectory, The learned local mean field representation, For the prior distribution, Indicates the number of intelligent agents. The parameters are to be weighed. The loss function is trained by maximizing the conditional likelihood while minimizing the KL divergence with the prior distribution.
[0043] The fine-tuning process of the global mean-field model is similar to that of the local mean-field model, but its focus is on modeling group signals across hotspots, requiring a more accurate depiction of the interaction and evolution of overall public opinion across different hotspots. The loss function of the global mean-field module... The optimization upper bound can be expressed as: ; in, The policy model is optimized by minimizing the negative log-likelihood of real user reviews, aiming to accurately generate personalized behavioral decisions that match user characteristics. All agents share the same policy model, generating rich natural language expressions based on their own states and hierarchical mean fields. The loss function of the policy model... for: .
[0044] In some implementations, the local mean field module, the global mean field module, and the policy model are jointly fine-tuned based on the information bottleneck theory and using low-rank adaptation techniques. Any one or more of the following methods can be used in combination.
[0045] Synchronous update method: For the same batch of training events, the local mean field module, the global mean field module, and the policy model generate the local mean field, the global mean field, and the policy action, respectively, and calculate the loss of the local mean field module, the loss of the global mean field module, and the loss of the policy model, respectively. The three losses are aggregated into a joint loss according to the pre-set weights. In the same training round, the low-rank adaptation parameters of the local mean field module, the global mean field module, and the policy model are updated simultaneously.
[0046] Alternating update method: In each training round, first fix the global mean field module and policy model, and only update the low-rank adaptation parameters of the local mean field module; then fix the local mean field module and policy model, and update the low-rank adaptation parameters of the global mean field module according to the latest local mean field; then fix the local mean field module and global mean field module, and update the low-rank adaptation parameters of the policy model according to the two-level mean field; repeat the above alternating update process until the preset stopping condition is met, such as the convergence of the joint loss or the reaching of the preset training rounds.
[0047] The phased update method is as follows: First, train the local mean field module until its loss meets the preset conditions or reaches the preset number of rounds; then fix the local mean field module and use its output to train the global mean field module; finally, fix the local mean field module and the global mean field module, and use the obtained local mean field and global mean field to train the policy model; after completing the above three stages, several rounds of calibration training can be performed in an alternating update manner; in the first two stages, if it is necessary to use the policy model to calculate the conditional likelihood, the parameters of the policy model can be fixed.
[0048] The aforementioned synchronous updates, alternating updates, and phased sequential updates are all specific implementation methods based on the information bottleneck theory and employing low-rank adaptation techniques to jointly fine-tune the local mean field module, the global mean field module, and the policy model. Those skilled in the art can choose one or a combination of these methods based on computational resources, training data size, and convergence requirements.
[0049] This invention proposes to decompose multi-hotspot social simulation into two coupled layers: a local mean field and a global mean field. The local mean field captures the discussion patterns within an event, while the global mean field aggregates cross-hotspot signals, thereby achieving scalable multi-hotspot social simulation and solving the technical problem of existing methods neglecting cross-hotspot dependencies.
[0050] This invention employs a three-stage design, including Bernoulli sampling pre-selection based on time decay, candidate agent ranking based on multiple criteria, and semantic filtering using a large language model. It jointly models the temporal dynamics and event-specific participation patterns of real social media users, thus solving the problem of the authenticity of agent activation.
[0051] Based on the information bottleneck theory, this invention simultaneously optimizes three major language model modules. By retaining relevant information for target prediction while suppressing cross-hotspot interference, it improves the consistency of public opinion and the coherence of language in multi-hotspot social simulation environments, thus solving the problems of cross-hotspot interference and attention fragmentation.
[0052] Example: This embodiment constructs multiple dynamic simulation environments based on real social network data, extracting deduplicated user information from original events to build a scale of [missing information]. The pool of candidate intelligent agents classifies each user in advance based on two dimensions: activity level and influence level, and completes hierarchical joint fine-tuning through training event sets.
[0053] The overall architecture of this invention comprises five core parts: initialization and environment construction, three-stage agent activation based on time decay, generation of local mean fields, construction of global mean fields, and generation of agent actions from policy models. These interconnected processes form a complete adaptive closed-loop mechanism. Furthermore, the hierarchical joint fine-tuning framework designed for this framework mainly includes the collaborative optimization of three modules: local mean field fine-tuning, global mean field fine-tuning, and policy model fine-tuning.
[0054] Upon receiving a request for an event situation simulation task, the environment server first initializes the user profiles and social network topology of the target group. To simulate the asynchronous evolution of public opinion on real social networks, multiple news events are loaded as different hot topics, and the presentation order of the news is randomly perturbed to eliminate the bias that a fixed time sequence might introduce. A corresponding local mean field is constructed for each hot topic, bound to specific news items in a one-to-one correspondence, to characterize fine-grained information such as the discussion state, emotional evolution, and distribution of viewpoints within the hot topic. Subsequently, the local information from each hot topic is aggregated and abstracted to form a global mean field, used to represent the overall public opinion environment, cross-hot topic information relationships, and the primary and secondary relationships and attention shifts between different events. Formally, the local mean field is initialized with respect to the number of hot topics. Consistent A set of empty states, the initial state of the global mean field is... To ensure that the mean field representation reaches a relatively stable group state before formal decision-making, a warm-up phase is introduced. Real user profiles and historical interaction data are used to drive the mean field through multiple iterations, gradually converging it to a state consistent with the actual discussion distribution, thus providing a stable starting point for subsequent formal simulations.
[0055] After the warm-up phase, suitable agents are selected and activated from a pre-built user pool. To characterize the fluctuations in user participation probability and behavioral response characteristics over time, this invention introduces a time decay modeling approach. Specifically, it employs... The function constructs an activation probability model for each agent. At any moment The activation probability follows The longer the time interval since the last participation, and the easier it is to meet the activation threshold corresponding to the activity level, the easier it is for the agent to be activated. Based on the activation probability, a candidate agent pool is initially constructed from the agent candidate pool through Bernoulli sampling. Subsequently, a multi-criteria scoring mechanism was used to comprehensively score the candidate agents. The scoring function considered three factors: idle time, influence score, and random perturbation. The top-scoring agents were extracted as the initial candidate set, and semantic filtering was performed using prompt word templates that included environmental background, user profile, and historical preferences, ensuring that only users with genuine interest in current trending content were activated.
[0056] After activating the agent to generate the previous round of actions, the hierarchical mean field is constructed and updated. The local mean field summarizes the user interaction dynamics of the current news at each moment, driven by a large language model. On the input side, the local mean field of the previous round of the news is incorporated into the model's input, ensuring that each update inherits contextual information from previous discussions, thus forming a temporally coherent representation of public opinion evolution and preventing each round's summary from degenerating into unrelated independent snapshots. On the output side, comments are structurally extracted from dimensions such as stance, viewpoint, and sentiment, describing fine-grained information such as the distribution of stances, diversity of viewpoints, and sentiment tendencies within the hot topic in order of importance, reflecting the local contextual features accumulated from historical comments. This process corresponds to the local sampling stage in the "local sampling-global aggregation-state update" mechanism.
[0057] Subsequently, the global mean field is used to uniformly model the interactive and correlated information across hot topics. The generation of the global mean field does not depend on agent interactions within a single news item; it only requires the global mean field from the previous stage and the updated local mean fields for each news item as input. In terms of output dimensions, it abstracts from five dimensions: hot topic structure, opinion distribution, cognitive state, emotional state, and changes in public opinion structure. It focuses on characterizing the core hot topics of the current discussion, the primary and secondary relationships between issues, the convergence and differentiation of opinions, the distribution of group emotions, the certainty and fluctuation of public perception, and the evolutionary trend of the overall public opinion structure. This high-level abstraction completes the macro-context lacking in the agent's local perspective, enabling the agent to perceive the relative importance of different events and the overall trend of public opinion in the current multi-hot topic environment, reducing cognitive biases that may arise from relying solely on local information. Through incremental updates, the model gradually incorporates the discussion of new events into the existing public opinion landscape, accumulating a comprehensive understanding of the overall environment. This process corresponds to the global aggregation stage.
[0058] After obtaining information from the local and global mean fields, the agent synthesizes the role template and its own state information to generate decisions. Action generation conditions include the agent's private state. Local mean field and global mean field There are three inputs, and the output is a personalized decision on forwarding or commenting behavior. After the agent generates a new round of actions, it triggers an update of the environment's state and determines the next round of discussion hotspots and their scheduling order. The above dynamic closed loop of "local sampling - global aggregation - state update" constitutes the core adaptive update mechanism of the hierarchical mean field.
[0059] To improve the robustness of the model in multi-hotspot environments and alleviate attention fragmentation, this invention performs hierarchical joint fine-tuning of the local mean-field model, the global mean-field model, and the policy model. Fine-tuning is based on the training event set, using a pre-trained large language model as the base model, and employing a full-layer LoRA fine-tuning configuration for efficient parameter adjustment. The fine-tuning of the local mean-field model incorporates the information bottleneck theory, taking historical trajectories as input and real-world actions at the next moment as the target. It compresses redundant historical information and retains prediction-related information by learning a compact and predictive group signal representation. The fine-tuning of the global mean-field model focuses on group signal modeling across hotspot levels, using the set of local mean fields of all events as input to accurately characterize the linkage and evolution of overall public opinion across different hotspots. The policy model is optimized by minimizing the negative log-likelihood of real user comments, ensuring that the generated actions are highly consistent with real behavior in semantics and style. The overall loss function combines local loss, global loss, and smoothing constraints, and the three models gradually converge through joint collaborative optimization.
[0060] In multi-agent simulations where multiple hot events evolve simultaneously, if each agent directly processes the historical actions of other agents and the complete discussion records of each event, the system needs to repeatedly transmit and process a large amount of interactive data as the number of agents and simulation rounds increases, affecting the execution efficiency of a single round of simulation. If the discussion content of different events is directly mixed and input into the action generation model, the model has difficulty distinguishing between the discussion state within the current event and the overall environment across events, and may easily reference information that does not belong to the current event when generating actions. At the same time, if the group state of each round is generated independently, the discussion context formed in the previous round cannot be stably transmitted, which may cause state jumps in continuous simulations. In addition, performing semantic judgment and action generation of the large language model for each agent in the agent pool will generate unnecessary model calls; training multiple large language model modules with full parameters requires updating and saving a large number of parameters. The above problems together limit the running scale and stability of multi-hotspot, multi-round simulations.
[0061] This invention first narrows down the candidate agents through sampling and scoring, then performs semantic filtering and action generation, focusing model calls on agents likely to participate in the current event. A local mean field is maintained for each event, and the global representation is updated using these local mean fields and the previous round's global mean field. When an agent generates an action, it reads its own state and the two-level mean fields, eliminating the need to process the complete interaction records of other agents one by one. Thus, the system avoids using pairwise agent interactions as a necessary step for group information transmission, reducing redundant data processing. The local mean fields retain the stance, viewpoint, and sentiment information of the current event, while the global mean field provides cross-event information. Both serve as conditional inputs to the policy model, ensuring that intra-event and cross-event information have clear sources during data processing. The two-level mean fields inherit the state from the previous moment, allowing subsequent updates to be built upon existing group states, helping to maintain the coherence of state representation in continuous simulations. Low-rank adaptation techniques are used during training, reducing the number of parameters that need to be updated and saved compared to full-parameter fine-tuning; information bottleneck loss constrains redundant information in the mean field representation, and the policy model loss aligns the generated actions with the real actions in the training data. These measures address the issues of training resource overhead and information interference in model input, respectively.
[0062] Although the specific details and implementation algorithms of the present invention have been disclosed for illustrative purposes to aid in understanding and implementing the invention, those skilled in the art will understand that various substitutions, variations, and modifications are possible without departing from the spirit and scope of the invention and the appended claims. The invention should not be limited to the content disclosed in the preferred embodiments of this specification; the scope of protection claimed by the invention is defined by the claims.
[0063] 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.
[0064] This invention also provides a system. The system can be a system that uses software (applications), modules, components, servers, clients, etc., employing the methods described in the embodiments of this specification, combined with necessary hardware implementation. Since the implementation schemes and methods for solving the problem are similar, the specific system implementations in the embodiments of this specification can be found in the implementations of the foregoing methods, and repeated details will not be elaborated upon. Although the system is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0065] 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.
[0066] 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.
[0067] 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 multi-agent simulation method for multiple dynamic environments, characterized in that, include: Initialize the agent pool and multiple events: randomly shuffle the order of events, initialize the global average field and the local average field of each event, and use real user actions for warm-up iterations to stabilize the average field; The activation probability of an agent is determined based on its activity level and the interval between its last participation. Bernoulli sampling is then used to extract candidate agents. These candidate agents are then ranked using multi-criteria scoring and semantic filtering by a large language model to obtain the activated agents. For each event, a local mean field module is constructed that inherits the state of the previous moment to summarize the distribution of positions, emotions, and opinions within the event; The global average field module is updated by aggregating all local average fields and the previous global average field to enable cross-hotspot event linkage. The activated agent generates forwarding or commenting actions and updates the agent's state based on its own state, local average field, and global average field through a policy model. Based on the information bottleneck theory, a low-rank adaptation technique is used to jointly fine-tune the local mean field module, the global mean field module, and the policy model, retaining prediction-related information and suppressing cross-hotspot interference, and co-optimizing until convergence.
2. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, The initialization of the agent pool and multiple events specifically include: A pool of intelligent agents is built based on real social data. Multiple activity levels and multiple influence levels are set for each agent, and the presentation order of events is randomly shuffled. The global average field and the local average field of each event are initially empty. During the warm-up phase, real user action data is used to iterate multiple times to make the global average field and the local average field of each event converge to a state consistent with the actual discussion distribution.
3. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, The process of determining the activation probability of an agent based on its activity level and the interval between its last participation, and then performing Bernoulli sampling to extract candidate agents, specifically includes: No. An intelligent agent at time activation probability for: ; in, Indicates the first The time interval since the last participation of each agent. Indicates the first The activity level of each agent Temperature parameters used to control the smoothness of the probability distribution Represents the Sigmoid function; Bernoulli sampling is performed based on this activation probability to obtain a pool of candidate agents.
4. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, The process of ranking candidate agents using multi-criteria scoring and semantic filtering with a large language model to obtain activated agents specifically includes: No. Scores of candidate agents for: ; in, For the first The time interval since the last participation of each agent. For the first The influence level of an agent To introduce random perturbations of natural variability, These are weighting coefficients; a set number of candidate agents with the highest scores are retained. The current event, environmental background, and user profiles of candidate agents are input into the large language model. The large language model then determines whether the candidate agent has a genuine interest in discussing the current event, and activates the candidate agent that passes the determination.
5. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, The construction of a local mean field module for each event, inheriting the state from the previous moment, specifically includes: The update formula for the local mean-field module is: ; in, This represents a local mean field module. For the first The event at time The local mean field; For the first The event at time The local mean field, i.e., the first Local mean field updated after each event This is the corresponding agent state sequence. This is the corresponding agent action sequence; agent actions include the selection of behavior type and the generation of comment content, where the behavior type is forwarding or commenting.
6. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, The module that aggregates all local average fields and updates the global average field from the previous round specifically includes: The update formula for the global mean field module is: ; in, This represents the global mean field module. For a moment The global mean field, For the first The event at time The local mean field, For a moment The global mean field, i.e. the updated global mean field.
7. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, The activated agent generates a forwarding or commenting action and updates its state based on its own state, local mean field, and global mean field through a policy model, specifically including: Strategy Model The generated action is: ; in, For the first The agent in the th... An event, a moment The following state, For a moment The global mean field, For the first The event at time The local mean field, For the first An intelligent agent at time Regarding the first The action of an event; The agent's state transition is as follows: ; For the first The event at time The agent's state sequence, For the first The event at time The agent's state sequence, For the first The event at time The sequence of actions of the intelligent agent, For the first The event at time The local mean field, This is the state transition equation, used to determine the state distribution at the next time step.
8. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, The method, based on the information bottleneck theory, employs low-rank adaptation techniques to jointly fine-tune the local mean-field module, the global mean-field module, and the policy model. Specifically, this includes: Loss function of local mean field module The upper bound for optimization is: ; in, For the historical trajectory, Represents the sequence of the agent's actual states. This represents the actual sequence of actions of the intelligent agent. Represents the time index in the historical trajectory. Indicates the current moment. The learned local mean field representation, For the prior distribution, To balance the parameters, The number of agents; Indicates the total number of time steps. Indicates the distribution of true historical trajectories. Indicates the Kullback–Leibler divergence. This represents a local mean field module. Representational strategy model, This represents the actual action of the i-th agent. This represents the true state of the i-th agent; Loss function of global mean field module The upper bound for optimization is: ; in, For the set of local mean fields of all events, For the first The event at time The local mean field, The total number of events; For a moment The global mean field, To balance the parameters, This represents the global mean field module; Loss function of the policy model for: ; For the first An intelligent agent at time Regarding the first The action of the event, For the first The agent in the th... An event, a moment The current state.
9. The multi-agent simulation method for multiple dynamic environments according to claim 1, characterized in that, Both the local mean field module and the global mean field module inherit the state of the previous moment to maintain temporal continuity; the global mean field module does not rely on the interaction of agents within a single event, but rather performs incremental updates by aggregating all local mean fields and the previous round of global mean fields to accumulate and form an overall environmental cognition.
10. A multi-agent simulation system for multiple dynamic environments, used to implement the method as described in any one of claims 1 to 9, characterized in that, include: The initialization and warm-up module is used to initialize the agent pool and multiple events, randomly shuffle the order of events, initialize the global average field and the local average field of each event, and use real user actions to perform warm-up iterations to stabilize the average field. The agent activation module is used to determine the activation probability of an agent based on its activity level and the last participation interval, and to extract candidate agents by Bernoulli sampling. The candidate agents are then ranked by multi-criteria scoring and semantic filtering by a large language model to obtain the activated agents. The local mean field update module is used to build a local mean field module for each event that inherits the state of the previous time step, in order to summarize the distribution of positions, sentiments and opinions within the event; The global average field update module is used to aggregate all local average fields and the previous round of global average field update module to enable cross-hotspot event linkage; The strategy model decision module is used to enable the activated agent to generate forwarding or commenting actions and update the agent's state based on its own state, local average field and global average field through the strategy model. The hierarchical joint fine-tuning module is used to jointly fine-tune the local mean field module, the global mean field module, and the policy model based on the information bottleneck theory and using low-rank adaptation techniques. It retains prediction-related information and suppresses cross-hotspot interference, and coordinates optimization until convergence.
