Multi-agent event-triggered control method based on dynamic self-attention mechanism

Through the dynamic self-attention mechanism, the movement of attention between various concerns in a multi-agent system is simulated, which solves the problems of complex controller design and unstable communication in traditional methods, and simplifies communication and precise information synchronization, which is suitable for drone clusters, unmanned vehicle control, and disaster-resistant search and rescue.

CN115729105BActive Publication Date: 2025-08-12XIAN ZHONGSHENG POLICY TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211451605.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-08-12
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

In the distributed control of traditional multi-agent systems, there are problems such as complex controller design, unstable communication, and inaccurate information synchronization, and the self-attention mechanism has problems such as narrow receptive field and excessive concentration of attention, which leads to inability to jump out.

Method used

The dynamic self-attention mechanism is adopted, and the attention movement between the various concerns is simulated through the new linear transformation rules and matrix calculation methods. The current attention focus is represented by the distribution density, and the problem of over-attention is alleviated through dynamic gain compensation. The event trigger threshold is set to automatically switch the task.

Benefits of technology

The simplified communications requirements of the agent are realized, and the information synchronization is accurate, which avoids the fall of local values. The agent can self-observe and perform event-triggered detection in extreme environments, reducing the system traffic and improving control accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115729105B_ABST
    Figure CN115729105B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of multi-agent distributed formation control, and discloses a multi-agent event-triggered control method based on a dynamic self-attention mechanism, including constructing a dynamic self-attention mechanism model, which changes the linear transformation rules and matrix operation methods; compressing the obtained matrix in a pooling layer manner to increase the receptive field of attention. A dynamic compensation gain is defined to improve the ability to escape local extreme values, and the compensated result is used as the final attention distribution matrix. Finally, an attention distribution function is obtained, and the corresponding local task is automatically switched to be executed according to the set event trigger threshold. Compared with the prior art, the dynamic self-attention mechanism proposed in the present invention can better simulate the process of attention moving between various focus points, and uses distribution density to represent the current focus position of attention. By setting dynamic gain compensation, the problem of excessive focus of attention at certain times can be alleviated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of multi-agent distributed formation control, and in particular to a multi-agent event triggering control method based on a dynamic self-attention mechanism. Background Art

[0002] Multi-agent systems are a new type of distributed computing technology. They consist of multiple agents that can freely interact in an environment and make independent decisions. Multi-agent systems are a key branch of distributed control systems and are currently widely used in areas such as drone swarm control, unmanned vehicle control, adversarial networks, and disaster relief and search and rescue.

[0003] The core of distributed formation control is to ensure system stability by setting various trigger conditions and distributed controllers, and performing special control on the corresponding intelligent agents when the conditions are met, so as to achieve the goals of reducing the number of communications, executing local tasks or manual intervention control.

[0004] Traditional research on the distributed control of high-order linear time-invariant multi-agent systems with global or local objectives on a fixed topology generally adopts the following methods: 1) Designing a controller by solving the Riccati equation; 2) Coordinating the behavior of the agents by observing the state of the leader node; 3) Using an event-triggered mechanism, dynamic linear triggered control is applied to general linear multi-agent systems, with each agent setting up an event trigger device and broadcasting its current state only when an event is triggered. Traditional methods have the following problems: 1) Controller design is difficult to solve, and there is a dimensionality explosion problem in complex environments. 2) Cluster communication is unstable, and the state of neighboring nodes cannot be properly observed. 3) Information synchronization control is not precise enough.

[0005] The self-attention mechanism is a variant of the attention mechanism. Its main feature is that the structure that generates attention is inside the model. The Q (qurry), K (key), and V (value) matrices come from the same set of sequence inputs Y (t), and the final attention output is obtained through different linear change rules.

[0006] Research on attention mechanisms shows that when people observe something, they tend to focus on a key part of it while ignoring other visible parts until their attention shifts. However, when people focus on an object, they don't always focus on a specific part. Instead, they distribute their attention across various aspects of the object over time. Focused areas receive more attention over a given period of time, while neglected areas receive less attention over the same period.

[0007] The traditional self-attention mechanism can filter key data, but it has the problem of narrow receptive field. In special circumstances, the attention is too concentrated and trapped in a certain local feature, resulting in the inability to jump out. Summary of the Invention

[0008] Purpose of the invention: In response to the problems existing in the prior art, the present invention provides a multi-agent event triggering control method based on a dynamic self-attention mechanism. The dynamic self-attention mechanism is used to better simulate the process of attention moving between various focus points, and the distribution density is used to represent the current focus position of attention. By setting dynamic gain compensation, the problem of excessive focus at certain times can be alleviated.

[0009] Technical solution: The present invention provides a multi-agent event triggering control method based on a dynamic self-attention mechanism, comprising the following steps:

[0010] Step 1: Consider the mathematical model of a multi-agent system as follows:

[0011] The mathematical model of the leader node f0(x) is:

[0012]

[0013] Follower node f i The mathematical model of (x) is:

[0014]

[0015] Among them, α ij represents the formation interference discount factor, α ij =1 means that agent i can communicate with agent j, otherwise α ij =0,d i (v i , t i ) indicates that the i-th agent is subject to flight constraints within the team at time t, u i Indicates that the i-th agent is controlled by the flight constraints in the environment;

[0016] Step 2: Construct a dynamic self-attention mechanism model, which defines new linear transformation rules and matrix operation methods. The dynamic self-attention mechanism model includes the following steps:

[0017] Step 2.1: Define the linear transformation rules of the Q, K, and V matrices in the self-attention model as follows:

[0018]

[0019]

[0020] Let Φ(x) be the normal distribution function, so that W D It obeys a random normal distribution with mean μ and variance σ, where D represents the dimension of the communication transmission vector Y(t), Y(t) = [y1(t), y2(t), ..., y D (t)];

[0021] Step 2.2: Each agent generates a set of query and key-value pair matrices Q from itself based on the current state i (qurey), K i (key), V i (value):

[0022]

[0023] Among them, Q i represents the query matrix of the agent, K i Represents the keyword matrix of the agent, V i represents the value matrix of the agent, Y(t) represents the communication transmission vector at time t;

[0024] Step 2.3: Define the distribution of attention of different dimensions on the keyword matrix:

[0025]

[0026] Among them, q n is the vector (1×m) in the matrix Q, k n is the vector (1×m) in the matrix K;

[0027] Step 2.4: Get the matrix Q K Through a pooling layer, the dimension is compressed to obtain a new matrix Q′ K ;

[0028] Step 2.5: Matrix Q′ K The value matrix is then multiplied by the matrix and pooled to obtain the final attention distribution matrix V′=[v′1 v′2 ... v′ n ] T ;

[0029] Step 2.6: Input the final attention distribution matrix into the softmax function and take the maximum value item as the current focus of attention. After sorting, we get the attention distribution function γ.

[0030] Step 3: Use the dynamic self-attention mechanism model to obtain the attention distribution, and set the event trigger threshold ζ. When the attention distribution meets the trigger condition, the α of the corresponding node is ijSet to 0 to switch the corresponding local task when the event is triggered.

[0031] Furthermore, in step 2.4, the matrix is compressed using the “sum pooling layer” method, and the sum pooling layer is defined as:

[0032]

[0033] where q kn Represents the matrix Q K The row sum of the nth row in .

[0034] Furthermore, before step 2.6 and after step 2.5, the following operations are further performed:

[0035] Define a dynamic compensation gain g=[g i ] D×1 :

[0036]

[0037] Among them, g is a matrix with the same dimension as the information transfer vector Y(t), g i (i=1, 2, ..., D) represents the i-th row in g, and δ represents the dynamic compensation constant;

[0038] Define the matrix Represents the compensated attention result matrix and uses it as the final attention distribution matrix:

[0039]

[0040] Substitute formula (9) into the softmax function and get the attention distribution function γ after sorting:

[0041]

[0042] When γ i >ζ, the attention distribution meets the event triggering condition, and agent i switches to perform the corresponding local task, where ζ represents the manually set event triggering threshold.

[0043] Furthermore, according to whether the attention distribution meets the event triggering threshold, the corresponding local task is automatically switched to be executed; as shown in formula (11), specifically: when the focus of attention falls on the interval of the global task, that is, γ i ≤ζ,α ij is set to 1, and agent i follows the cluster to perform the global task; on the contrary, when the focus of attention falls on the interval of a local task, that is, γ i >ζ,α ij is set to 0, and agent i leaves the cluster to perform the corresponding local task:

[0044]

[0045] Beneficial effects:

[0046] 1. Based on the self-attention mechanism, this paper proposes a "dynamic self-attention mechanism". It mainly proposes a new linear transformation rule and matrix operation method, which can better simulate the process of attention moving between various points of attention. Instead of focusing on a fixed feature point, attention is distributed in an orderly manner across all feature points in a time series unit, and the distribution density is used to represent the current focus of attention. In addition, dynamic gain compensation is set to alleviate the problem of excessive attention at certain times.

[0047] 2. The event triggering mechanism proposed in this invention is simple in design. Because the dynamic self-attention mechanism distributes attention to key points of interest, the current target of focus can be defined by the attention distribution density γ within a time period. When the attention distribution meets the event trigger threshold, the agent executes the corresponding local task. Switching behavior is determined by the model through active learning, avoiding complex controller design.

[0048] 3. This invention reduces the communication requirements of the agent. Since the model's attention is generated based on its current state, even in extreme environments (where the agent cluster cannot communicate), it can still detect event triggers through self-observation.

[0049] 4. The present invention achieves precise information synchronization and is less susceptible to localization. In extreme cases, due to the unique state of the agent, attention may become trapped within a task constraint and remain static. To address this issue, the present invention incorporates dynamic gain compensation to mitigate this phenomenon. Furthermore, by focusing on the focus of attention, the agent automatically selects the most important information for synchronization, reducing system communication traffic. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is the algorithm flow chart of the dynamic self-attention mechanism proposed in this invention;

[0051] Figure 2 This is the simulation of multi-task switching based on dynamic self-attention under full information synchronization in Experiment 1 of the present invention; among them, (a) distance and time are balanced, (b) manual control is introduced, (c) time is greater than distance, and (d) distance is greater than time;

[0052] Figure 3 This is the multi-task switching simulation based on dynamic self-attention when only synchronizing single-dimensional information in Experiment 2 of the present invention; among them, (a) distance and time are balanced, (b) manual control is introduced, (c) time is greater than distance, and (d) distance is greater than time. DETAILED DESCRIPTION

[0053] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.

[0054] The present invention discloses a multi-agent event triggering control method based on a dynamic self-attention mechanism. Based on the self-attention mechanism, a "dynamic self-attention mechanism" is proposed. It mainly proposes a new linear transformation rule and matrix operation method, which can better simulate the process of attention moving between various points of attention. The attention will not be focused on a fixed feature point, but will be distributed in an orderly manner on all feature points in a time series unit, and the distribution density is used to represent the current focus of attention. In addition, dynamic gain compensation is set to alleviate the problem of excessive focus at certain times. It mainly includes the following steps:

[0055] Step 1: Consider the mathematical model of a multi-agent system as follows:

[0056] The mathematical model of the leader node f0(x) is:

[0057]

[0058] Follower node f i The mathematical model of (x) is:

[0059]

[0060] where α ij represents the formation interference discount factor (α ij =1 means that agent i can communicate with agent j, otherwise α ij =0), d i (v i , t i ) indicates that the i-th agent is subject to flight constraints within the team at time t, u i Indicates that the i-th agent is controlled by the flight constraints in the environment.

[0061] Step 2: Construct a dynamic self-attention mechanism model. The dynamic self-attention mechanism model proposes a new linear transformation rule and matrix operation method. The dynamic self-attention mechanism model includes the following steps:

[0062] Step 2.1: Define the linear transformation rules of the Q, K, and V matrices in the self-attention model as follows:

[0063]

[0064]

[0065] Let Φ(x) be the normal distribution function, so that W D It obeys a random normal distribution with mean μ and variance σ, where D represents the dimension of the communication transmission vector Y(t), Y(t) = [y1(t), y2(t), ..., y D (t)];

[0066] Step 2.2: Each agent will generate a set of query and key-value pair matrices Q from itself based on the current moment i (qurey), K i (key), V i (value):

[0067]

[0068] Among them, Q i represents the query matrix of the agent, K i Represents the keyword matrix of the agent, V i represents the value matrix of the agent, Y(t) represents the communication transfer vector at time t;

[0069] Step 2.3: Define the distribution of attention of different dimensions on the keyword matrix:

[0070]

[0071] Among them, q n is the vector (1×m) in the matrix Q, k n is the vector (1×m) in the matrix K;

[0072] Step 2.4: Get the matrix Q K Through a pooling layer, the dimension is compressed to obtain a new matrix Q′ K , the present invention uses the “sum pooling layer” method to compress the matrix, and defines the sum pooling layer as:

[0073]

[0074] where q kn Represents the matrix Q K The row sum of the nth row in .

[0075] Step 2.5: Matrix Q′ K The value matrix is then multiplied by the matrix and pooled, that is, formula (7) is introduced into formula (5) and formula (6) to obtain the final attention distribution matrix:

[0076] V′=[v′1 v′2 ... v′ n ] T (8)

[0077] Among them, V′ represents the final attention distribution matrix, v′ n Represents the row vector in the matrix V′.

[0078] Step 2.6: Define a dynamic compensation gain g = [g i ] D×1 :

[0079]

[0080] Among them, g is a matrix with the same dimension as the information transfer vector Y(t), g i (i=1, 2, ..., D) represents the i-th row in g, and δ represents the dynamic compensation constant;

[0081] Step 2.7: Define the matrix Represents the compensated attention result matrix and uses it as the final attention distribution matrix:

[0082]

[0083] Step 2.8: Substitute formula (8) into the softmax function and get the attention distribution function γ after sorting:

[0084]

[0085] When γ i >ζ, the attention distribution meets the event triggering condition, and agent i switches to perform the corresponding local task, where ζ represents the manually set event triggering threshold.

[0086] Step 3: Use the dynamic self-attention mechanism model to obtain the attention distribution, and set the event trigger threshold ζ. When the attention distribution meets the trigger condition, the α of the corresponding node is ij Set to 0 to switch the corresponding local task when the event is triggered. The trigger conditions are as follows:

[0087]

[0088] As shown in formula (12), the corresponding local task is automatically switched to be executed according to whether the attention distribution meets the event triggering threshold. Specifically, when the focus of attention falls on the interval of the global task (γ i ≤ζ), α ij is set to 1, agent i follows the cluster to perform the global task; on the contrary, when the focus of attention falls on the interval of a local task (γ i >ζ),α ij is set to 0, and agent i leaves the cluster to perform the corresponding local task.

[0089] In order to verify the effectiveness of the algorithm, this paper sets up a simulation experiment with the following parameters:

[0090] In the simulation experiment, a five-dimensional vector Y (y1, y2, ..., y5) is used as the information transfer matrix, where y1 to y5 represent the characteristic dimensions of: distance traveled, time used, remaining distance, remaining time, and manual control.

[0091] The data update rule in the simulation experiment is set as:

[0092] (1) y1 and y2 gradually decrease over time, y3 and y4 gradually increase over time, and y5 is a manually controlled item that does not change over time;

[0093] (2) Dynamic compensation constant δ∈[0.1, 0.3];

[0094] (3) The information synchronization dimension is 1 / 5.

[0095] See attached Figure 2 and attached Figure 3 , attached Figure 2 This is Experiment 1 of the present invention: Simulation of event-triggered control method based on dynamic self-attention under full information synchronization, that is, five-dimensional vector full information synchronization. Figure 3 This is Experiment 2 of the present invention: Simulation of event-triggered control method based on dynamic self-attention under synchronization of only single-dimensional information.

[0096] The simulation results are as follows Figure 2 and Figure 3 As shown:

[0097] Figure 2 and Figure 3 (a) shows that when the flight distance matches the limited time, the agent focuses on the distance traveled and the time taken in the early stage of the flight. At this time, the flight behavior is manifested as executing the global task; in the later stage of the flight, it focuses on the remaining distance and the remaining time. At this time, the flight behavior is manifested as leaving the cluster and executing local tasks.

[0098] Figure 2 and Figure 3 (b) shows the situation where manual control is introduced during the flight. Attention will focus on manual control commands first, but will also take into account changes in other features.

[0099] Figure 2 and Figure 3(c) and (d) show the agent's attention when one of distance and time is more critical. Event trigger thresholds can be set as needed. When the primary focus of attention shifts, different events can be triggered, enabling multitasking control.

[0100] From Experiment 1, we can see that the attention result γ i Different colored dots are used to represent the attention distribution earlier in the time series, and darker dots represent the attention distribution later in the time series. The agent can actively learn to switch its focus between feature points, and distribute them in an orderly manner based on the time series.

[0101] Experiment 2 shows that the introduction of dynamic longitudinal synchronization reduces the amount of communication between agents to one-fifth of its original value. However, the communication control effect remains essentially unchanged compared to full information synchronization, and the agents can still meet the set event-triggered control conditions through self-observation. Both experimental results verify the effectiveness of the proposed algorithm.

[0102] The above embodiments are intended only to illustrate the technical concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. They are not intended to limit the scope of protection of the present invention. Any equivalent changes or modifications made in accordance with the spirit of the present invention are intended to be covered by the scope of protection of the present invention.

Claims

1. A multi-agent event triggering control method based on dynamic self-attention mechanism, characterized in that: The steps include: Step 1: Consider the mathematical model of a multi-agent system as follows: The mathematical model of the leader node f0(x) is: Follower node f i The mathematical model of (x) is: Among them, α ij represents the formation interference discount factor, α ij =1 means that agent i can communicate with agent j, otherwise α ij =0,d i (v i ,t i ) indicates that the i-th agent is subject to flight constraints within the team at time t, u i Indicates that the i-th agent is controlled by the flight constraints in the environment; Step 2: Construct a dynamic self-attention mechanism model, which defines new linear transformation rules and matrix operation methods. The dynamic self-attention mechanism model includes the following steps: Step 2.1: Define the linear transformation rules of the Q, K, and V matrices in the self-attention model as follows: Let Φ(x) be the normal distribution function, so that W D The mean is μ and the variance is σ 2 The random normal distribution of , where D represents the dimension of the communication transmission vector Y(t), Y(t) = [y1(t),y2(t),...,y D (t)]; Step 2.2: Each agent generates a set of query and key-value pair matrices Q from itself based on the current state i (qurey), K i (key), V i (value): Among them, Q i represents the query matrix of the agent, K i Represents the keyword matrix of the agent, V i represents the value matrix of the agent, Y(t) represents the communication transmission vector at time t; Step 2.3: Define the distribution of attention of different dimensions on the keyword matrix: Among them, q n is the vector (1×m) in the matrix Q, k n is the vector (1×m) in the matrix K; Step 2.4: Get the matrix Q K Through a pooling layer, the dimension is compressed to obtain a new matrix Q' K ; Step 2.5: Matrix Q' K The value matrix is then multiplied by the matrix and pooled to obtain the final attention distribution matrix V'=[v'1v'2...v' n ] T ; Step 2.6: Input the final attention distribution matrix into the softmax function and take the maximum value item as the current focus of attention. After sorting, we get the attention distribution function γ. Step 3: Use the dynamic self-attention mechanism model to obtain the attention distribution, and set the event trigger threshold ζ. When the attention distribution meets the trigger condition, the α of the corresponding node is ij Set to 0 to switch the corresponding local task when the event is triggered.

2. The multi-agent event triggering control method based on the dynamic self-attention mechanism according to claim 1 is characterized in that: In step 2.4, the matrix is compressed using the "sum pooling layer" method, and the sum pooling layer is defined as: where q kn Represents the matrix Q K The row sum of the nth row in .

3. The multi-agent event triggering control method based on the dynamic self-attention mechanism according to claim 1 is characterized in that: Before step 2.6 and after step 2.5, the following operations are further performed: Define a dynamic compensation gain g=[g i ] D×1 : Among them, g is a matrix with the same dimension as the information transfer vector Y(t), g i (i=1,2,...,D) represents the i-th row in g, δ represents the dynamic compensation constant; Define the matrix Represents the compensated attention result matrix and uses it as the final attention distribution matrix: Substitute formula (9) into the softmax function and get the attention distribution function γ after sorting: When γ i >ζ, the attention distribution meets the event triggering condition, and agent i switches to perform the corresponding local task, where ζ represents the manually set event triggering threshold.

4. The multi-agent event triggering control method based on the dynamic self-attention mechanism according to any one of claims 1 to 3, characterized in that: According to whether the attention distribution meets the event trigger threshold, the corresponding local task is automatically switched to execute; as shown in formula (11), specifically: when the focus of attention falls on the interval of the global task, that is, γ i ≤ζ,α ij is set to 1, and agent i follows the cluster to perform the global task; on the contrary, when the focus of attention falls on the interval of a local task, that is, γ i >ζ,α ij is set to 0, and agent i leaves the cluster to perform the corresponding local task:

Citation Information

Patent Citations

  • Continuous dynamic network representation learning method based on time sequence diagram Transform

    CN114118375A

  • Event sequential relation extraction method based on dynamic attention mechanism

    CN114153942A