Image classification method and system based on multiple agents
By improving the convolution kernel and activation function of the multi-agent image classification model, and combining the attention mechanism and LSTM network, the insufficient single-layer extraction capability and ReLU death problem of traditional models are solved, achieving higher image classification accuracy and training stability.
Patent Information
- Application Number
- CN202511857721.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional multi-agent image classification models have weak single-layer extraction capabilities. Increasing the number of layers affects generalization ability and is prone to the death ReLU phenomenon, resulting in low image classification accuracy.
The image feature extraction module is improved by using asymmetric convolution kernels and GeLU activation function, and the input information of the agent is integrated by combining attention mechanism and LSTM network. Data security is ensured by differential privacy mechanism.
It improves the accuracy and training stability of image classification, enhances feature representation capabilities, reduces noise interference, and realizes the fusion of collective intelligence among multiple agents.
Smart Images

Figure CN121564435A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multi-agent technology, and in particular to an image classification method and system based on multi-agent technology. Background Technology
[0002] Image classification, as a core task in computer vision, has consistently maintained a high level of research interest. Reinforcement learning, with its ability to handle various tasks through a simple architecture, has been widely applied in computer vision, natural language processing, and other fields. Multi-agent reinforcement learning, through cooperation or competition among agents, accomplishes complex tasks and has shown great potential in scenarios such as autonomous driving.
[0003] Multi-agent reinforcement learning has achieved significant results in image classification applications. Existing multi-agent classification models possess various powerful functions. Multi-agent color image classification models complete classification through the cooperation of two layers of agents, while multi-agent face image classification models can classify face images based on age and gender. In the research of multi-agent differential privacy, existing algorithms such as Differential Privacy Mean Subsequence Reduction (DP-MSR) and Differential Privacy Average Consensus (PDAL) are dedicated to achieving privacy protection in multi-agent systems. Multi-agent reinforcement learning models have significant advantages in the field of image classification, and their combination with differential privacy mechanisms can effectively ensure data privacy and security.
[0004] However, traditional multi-agent image classification models (MAIC) have weak single-layer extraction capabilities, and increasing the number of layers will affect the generalization ability and is prone to the death ReLU phenomenon, which affects the convergence of gradient descent and leads to low image classification accuracy. Summary of the Invention
[0005] Therefore, it is necessary to provide a multi-agent image classification method to address the aforementioned technical problems.
[0006] The present invention adopts the following technical solution: This invention provides a multi-agent image classification method, comprising: For each agent in the communication graph, a local observation image of the image to be classified is obtained based on the agent's position coordinates. The local feature vector of the local observation image is extracted by the image feature extraction module, and the position coordinates of the agent are encoded to generate a position encoding vector. The improvement of the image feature extraction module is to modify the convolution kernel of the convolutional layer to an asymmetric convolution kernel and the activation function to the GeLU activation function based on the MAIC model. For any given agent, the private communication messages broadcast by multiple agents connected to the agent in the communication graph are obtained. The private communication messages are decoded through an attention mechanism, and the weighted average of all decoded messages is calculated based on the in-degree of the communication graph to obtain the communication message. The private communication message includes Gaussian noise. The communication message, local feature vector, and location encoding vector are concatenated to generate the decision input information for the intelligent agent. Based on the decision input information, an LSTM network is used to generate an agent's image category prediction results for the image to be classified. The image category prediction results of all agents in the communication graph are normalized using the softmax function, and the average of all normalized results is taken to obtain the category of the image to be classified.
[0007] Preferably, the image feature extraction module includes AcbBlock1, AcbBlock2, AcbBlock3 and a fully connected layer connected in series; AcbBlock1, AcbBlock2, and AcbBlock3 each include an asymmetric convolutional layer, a max pooling layer and a batch normalization layer connected in series; the position coordinates of the agent are encoded by a position encoding module; the position encoding module includes a fully connected layer and a ReLU activation function connected in series.
[0008] Preferably, the process of generating privatized communication messages specifically includes: Obtain the agent's initial message; With a mean of 0 and a variance of Gaussian noise is superimposed on the initial message to generate a private communication message.
[0009] Preferably, the formula for obtaining the initial message of the agent is: ; in, For the first i An intelligent agent in time t The generated initial message, For parameters Defined message sending network, This represents the output state of the LSTM network; the output state includes the agent's historical observations and action information.
[0010] Preferably, the private communication messages are decoded using an attention mechanism, specifically including: The private communication message is input into the first linear layer and activated by GeLU to obtain the feature representation; The private communication message is input into the second linear layer and activated by the Sigmoid function to obtain attention weights, so as to enable the attention mechanism to focus on key information. The feature representation and attention weights are weighted to obtain the decoded communication message.
[0011] Preferably, the method further includes: For any agent, the decision input information and historical state of the agent are integrated through the LSTM network to learn long-term dependencies to generate the next action instruction, and the observation position of the agent is updated through the action instruction.
[0012] Preferably, the communication graph is a directed complete graph.
[0013] This invention provides a multi-agent-based image classification system, comprising multiple agents and a processor. The system includes: Each agent is used to acquire a local observation image of the image to be classified based on its position coordinates. The image feature extraction module extracts the local feature vector of the local observation image and encodes the agent's position coordinates to generate a position encoding vector. The improved image feature extraction module modifies the convolutional kernel of the convolutional layer to an asymmetric convolutional kernel and the activation function to a GeLU activation function, based on the MAIC model. Private communication messages broadcast by multiple agents connected to the agent in the communication graph are acquired. These private communication messages are decoded using an attention mechanism, and a weighted average of all decoded messages is calculated based on the in-degree of the communication graph to obtain the communication message. The private communication message includes Gaussian noise. The communication message, local feature vector, and position encoding vector are concatenated to generate the agent's decision input information. Based on the decision input information, an LSTM network is used to generate the agent's image category prediction result for the image to be classified. The processor is used to normalize the image category prediction results of all agents in the communication graph using the softmax function, and then take the average of all normalized results to obtain the category of the image to be classified.
[0014] The above-mentioned at least one technical solution adopted in this invention can achieve the following beneficial effects: This method, by introducing asymmetric convolution kernels and the ReLU activation function, can more effectively capture local details and complex patterns in images, while enhancing feature expressiveness and training stability. The integration of an attention mechanism further enables the agent to focus on key regions of the image, reducing noise interference. The LSTM network integrates the agent's input information and historical states to learn long-term dependencies. Normalization and mean processing of the classification prediction results of all agents effectively integrate the collective wisdom of multiple agents, improving the accuracy of image classification. Attached Figure Description
[0015] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0016] Figure 1 This invention provides a schematic flowchart of an image classification method based on multiple agents. Figure 2 A schematic diagram of the feature extraction module of one embodiment of the feature-enhanced multi-agent image sub-module provided by the present invention; Figure 3 A schematic diagram of the structure of the information receiving module provided by the present invention; Figure 4 A schematic diagram of the structure of a directed complete graph provided by the present invention; Figure 5 This is a schematic diagram of the noise addition mechanism of the differential privacy integration subsystem provided by the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0018] Devices such as desktop computers, servers, or laptops capable of executing the present invention. For ease of explanation, the following description will focus on servers as the executing entity.
[0019] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0020] Figure 1 This is a schematic diagram of a multi-agent-based image classification method according to the present invention, which specifically includes the following steps: S101: For each agent in the communication graph, a local observation image of the image to be classified is obtained based on the agent's position coordinates. The local feature vector of the local observation image is extracted through the image feature extraction module, and the position coordinates of the agent are encoded to generate a position encoding vector. The improvement of the image feature extraction module is to modify the convolution kernel of the convolutional layer to an asymmetric convolution kernel and the activation function to the GeLU activation function based on the MAIC model.
[0021] In an exemplary embodiment, the image feature extraction module includes AcbBlock1, AcbBlock2, AcbBlock3 and a fully connected layer connected in series; AcbBlock1, AcbBlock2, and AcbBlock3 each include an asymmetric convolutional layer, a max pooling layer and a batch normalization layer connected in series; the position coordinates of the agent are encoded by a position encoding module; the position encoding module includes a fully connected layer and a ReLU activation function connected in series.
[0022] Specifically, the feature-enhanced multi-agent image classification module replaces the traditional symmetric convolution kernel with an asymmetric convolution block (ACB), and splits the original d×d convolution kernel into three convolution paths: d×d, d×1, and 1×d.
[0023] During the training phase, the cross-frame position weights are enhanced to improve feature extraction capabilities. During the testing phase, batch normalization fusion and branch fusion are used to ensure performance without increasing computational load. Figure 2 This is a schematic diagram of the image feature extraction module provided by the present invention, as shown below. Figure 2 As shown, the image feature extraction module includes AcbBlock1, AcbBlock2, AcbBlock3, and a fully connected layer. AcbBlock1, AcbBlock2, and AcbBlock3 each include asymmetric convolutional layers, max pooling layers, and batch normalization layers connected in sequence. A network structure containing 3 asymmetric convolutional layers, 3 batch normalization layers, 3 max pooling layers, and 1 fully connected layer is constructed to achieve efficient image feature extraction and dimensionality reduction.
[0024] After training, batch normalization parameters are integrated into the convolutional kernel and bias term through batch normalization fusion, and asymmetric convolutional kernels are superimposed on the corresponding positions through branch fusion to form a standard convolutional layer for the testing phase, ensuring no additional computational cost is added.
[0025] Activation function optimization module: Employs Gaussian Error Linear Unit (Gaussian Error Linear Unit) GELU) replaces the ReLU activation function.
[0026] The GELU activation function is deployed after the convolutional layer of the feature extraction module and after the linear layer of the information receiving module, replacing the original ReLU activation function. The function parameters are optimized through backpropagation, and its continuous gradient characteristics are used to improve the model convergence speed.
[0027] The functional expression of GELU is formula (1): (1); in, For activation function, x For input variables, tanh It is the hyperbolic tangent function.
[0028] It is continuous and smooth in the real number domain, avoiding the death ReLU problem, while also having good saturation control and anti-overfitting ability, which can improve model training efficiency and convergence speed.
[0029] In one exemplary embodiment, the communication graph is a directed complete graph.
[0030] S102: For any agent, obtain the private communication messages broadcast by multiple agents connected to the agent in the communication graph, decode the private communication messages through the attention mechanism, and calculate the weighted average of all decoded messages through the in-degree of the communication graph to obtain the communication message; the private communication message includes Gaussian noise.
[0031] In an exemplary embodiment, the process of generating privatized communication messages specifically includes: obtaining the agent's initial message; and converting the message into a privatized communication message with a mean of 0 and a variance of 0. Gaussian noise is superimposed on the initial message to generate a private communication message.
[0032] Specifically, the differential privacy integration module includes an information decoding module, an information extraction module, an input location encoding module, a belief module, and a decision module. The information decoding module is used to decode the acquired noisy communication information. The information extraction module is used to extract image information from the image feature extraction results. The input location encoding module is used to extract location information from the image feature extraction results. The belief module is used to calculate the standard deviation of Gaussian noise. The decision module is used by the agent to transmit the agent's input information through the communication graph to all agents connected to the agent, and to obtain the image category through joint image classification by all agents.
[0033] In an exemplary embodiment, decoding a private communication message using an attention mechanism specifically includes: inputting the private communication message into a first linear layer and activating it through GeLU to obtain a feature representation; inputting the private communication message into a second linear layer and activating it through Sigmoid to obtain attention weights, so as to enable the attention mechanism to focus on key information; and weighting the feature representation and the attention weights to obtain the decoded communication message.
[0034] Specifically, an attention mechanism is introduced into the information receiving module. The received agent communication information is input into two linear layers. One layer is activated by the GELU activation function to obtain feature representation, and the other layer is activated by the Sigmoid activation function to generate attention weights. The two layers are multiplied to highlight key information.
[0035] This invention provides, for example Figure 3 The schematic diagram of the information receiving module shown illustrates that after receiving private communication messages from other intelligent agents, the information receiving module inputs the private communication messages into linear layer 1 (the output dimension is consistent with the message dimension) and obtains feature representations through GELU activation. f Simultaneously, the private communication message is input into linear layer 2 (output dimension 1) and activated by Sigmoid to obtain attention weights. w ,calculate The weighted key information is then passed to the decision-making module as the module output.
[0036] S103: Concatenate the communication message, local feature vector, and location encoding vector to generate the decision input information for the agent.
[0037] The differential privacy integration subsystem is used to ensure privacy and security during multi-agent communication and data processing, and includes the following core modules: The communication topology reconstruction module adjusts the original multi-agent communication graph into a directed complete graph, which meets the requirements of the Centralized Training with Decentralized Execution (CTDE) training framework. This ensures that each agent can obtain local observation and action information of other agents during training, while also providing a basic topology structure for the deployment of privacy protection mechanisms.
[0038] Figure 4 The graph theory-based tools provided in this invention are used to construct directed complete communication graphs, such as... Figure 4 As shown, a bidirectional communication link exists between any two agents. When the agent number is , all elements in the adjacency matrix of the communication graph are 1, which satisfies the information interaction requirements between agents under the CTDE framework.
[0039] Figure 4A schematic diagram of the communication topology reconstruction into a directed complete graph in the differential privacy integration subsystem according to the present invention is shown. The agent interaction process is illustrated.
[0040] 1. Message sender: Each intelligent agent (e.g., Agent) i Generate messages using privacy-preserving message sending functions. After adding Gaussian noise, it is sent to the Agent. i Other connected intelligent agents. Gaussian noise is generated using a differential privacy generator. Messages are generated using a message generator.
[0041] 2. Message receiver: The agent aggregates noisy messages from other agents through a self-attention mechanism, combining them with local observations. Input Policy Network Generate Actions .
[0042] 3. Environmental Interaction: Actions Update observations after interacting with the environment The feedback is continuously sent back to the message sender.
[0043] Gaussian noise addition module: Integrates a Gaussian noise mechanism into the agent message sending module, based on a privacy budget. With failure probability Calculate the standard deviation of noise Specifically based on the theorem: Let , C For message functions Norm.
[0044] The noise standard deviation is given by formula (2): (2); in, ,and , , .
[0045] When formula (2) holds, agent communication satisfies Differential privacy; with a mean of 0 and a variance of... Gaussian noise is superimposed on the initial communication message to generate a private message for transmission between agents.
[0046] Figure 5 This is a schematic diagram of the noise addition mechanism of the differential privacy integration subsystem proposed in this invention. The specific structure is explained below: 1. The agent decodes the collected noisy communication information and performs a weighted average of the decoded messages based on the in-degree of the communication graph. Among these steps, For the collected noisy information.
[0047] right The formula for decoding is formula (3): (3); in, For the first i An intelligent agent in time t Decoded information, For the collected noisy communication information, For parameters The message receiving network, with noisy communication messages, i.e., private communication messages.
[0048] The in-degree weighting of the communication graph is given by formula (4): (4); in, For the first i An intelligent agent in time t Received weighted average message, For the in-degree of the communication graph, For Neighbor Intelligent Agent j and original intelligent agents i , It is the edge set of the multi-agent communication graph.
[0049] 2. The agent obtains observations from the environment. and position coordinates Observations Input image feature extraction module, The input location encoding module obtains image information respectively. and location information Image information is the local feature vector, and location information is the location encoding vector. Then, the communication message... Image information and location information By splicing the data together, the input information of the intelligent agent is finally obtained. The input information of the intelligent agent is the same as the decision input information.
[0050] The formula for obtaining image information is (5): (5); in, To indicate the first i An agent at time step t Extracted feature vectors from local observation images, For a parameter Defined convolutional neural network, For the first iAn intelligent agent in time t A localized observation image.
[0051] Formula (6) for obtaining location information: (6); in, To indicate the first i An agent at time step t Position encoding vector, For a parameter Defined fully connected neural network, For the first i An intelligent agent in time t The location coordinates.
[0052] The decision input information is formula (7): (7); in, Provide information for decision-making.
[0053] 3. Input decision-making information The belief module and decision module of the agent are synchronously transmitted. The belief module is based on... Output And generate the initial message accordingly. Using a newly introduced noise mechanism, the standard deviation of the required Gaussian noise is calculated according to specific rules. The initial communication messages are superimposed with a mean of 0 and a variance of . Gaussian noise is used to obtain the communication message to be transmitted. .
[0054] The output state and hidden state of the LSTM network for the agent's belief module are given by formula (8): (8); in, For the first i An intelligent agent in time t The +1 LSTM network output state is used to transmit short-term memory information. No. i An intelligent agent in time t The +1 LSTM hidden state is used to store long-term memory information. The LSTM state at the previous time step Input information for decision-making at the current moment. For a parameter Defined predictive LSTM network.
[0055] The initial message is formula (9): (9); in, For the first i An intelligent agent in time t The generated communication message, For a parameter Defined message sending network, The output state from the LSTM decision module contains the agent's historical observations and actions.
[0056] The noisy communication message is represented by formula (10): (10); in, For the first i An agent in time t The generated noisy communication messages are used to share information with other agents while protecting privacy. It is Gaussian noise.
[0057] The above describes the specific process of generating noisy communication messages. Afterwards, the agent transmits the noisy message to all connected agents through the communication graph, collectively completing the image classification task.
[0058] Global strategy optimization module: Based on the participant-critic algorithm framework, construct a neural network for participant action decision-making and a neural network for critic action evaluation.
[0059] Using the accumulated policies in the local policy storage module as input, the optimal global policy is learned through the Proximal Policy Optimization (PPO) algorithm, balancing classification accuracy and privacy protection. The optimal policy is stored in the global policy pool for each agent to call and update.
[0060] In some embodiments, learning and determining the optimal policy from the local agent's policy pool using a participant-critic algorithm includes: Participants fit the agent's policy function, responsible for generating actions and interacting with the environment; critics fit the value function, used to evaluate the participant's performance and guide the participant's actions in the next stage.
[0061] In some embodiments, a proximal policy optimization (PPO) algorithm based on the participant-critic algorithm is used to construct a participant action decision neural network and a critic action evaluation neural network. In some implementations, the advantage function is calculated using a near-end strategy optimization algorithm as shown in formula (11): (11); in, As a discount factor, As a smoothing factor, For timing difference error, As part of the advantage function, representing from time... t arrive The cumulative value of time-series difference error after discounting and smoothing during this period. At the starting time, It is an integer parameter related to the cumulative time span for calculation. For the current moment, k It is a loop variable.
[0062] The return value is formula (12): (12); in, The value function output for critics, This is the final calculated value of the dominance function. This is the cumulative value of the dominance function. For intelligent agents in t The state at any given moment.
[0063] The participant network parameters are updated by gradient ascent, and the training is iterated until the policy converges. The optimal policy is then stored in the global agent policy pool.
[0064] The system comprises a feature-enhanced multi-agent image classification subsystem and a differential privacy ensemble subsystem. These two subsystems are sequentially implemented. The feature-enhanced multi-agent image classification subsystem is an improvement on the MAIC model; the differential privacy ensemble subsystem directly inherits the structure of the feature-enhanced multi-agent image classification subsystem, adding a noise layer and adjusting the communication graph. The system workflow can be summarized as follows:
[0065] 1. Environment Interaction Phase: After the original image is input into the system, each agent acquires a local observation image based on its own position coordinates; Input: Original image I, agent position coordinates .
[0066] The observation generates the corresponding formula (13): (13); in, For local observation images, Position coordinates From the original image I Cropping or extracting local regions to generate observation images , This is the original image.
[0067] 2. Feature Extraction and Information Encoding: The image feature extraction module extracts features from the locally observed image, and the position encoding module encodes the agent's coordinates to generate feature vectors and position encoding vectors; Technological improvements were made to the feature extraction process by replacing 3×3 convolutions with asymmetric convolution blocks (ACBs). The network structure consists of three layers: ACB layer → BN layer → max pooling layer → fully connected layer, achieved through branch fusion.
[0068] The branch fusion formula is formula (14): (14); in, , For convolution kernel, This involves element-wise addition of the convolution kernel.
[0069] Location coding uses formula (15): (15); in, To indicate the first i An agent at time step t Location encoding information, For a parameter Defined fully connected neural network, For the first i An intelligent agent in time t The location coordinates.
[0070] The structure consists of a fully connected layer and a ReLU activation function.
[0071] 3. Multi-agent communication and information integration: The information receiving module processes the private communication messages of other agents through an attention mechanism, and concatenates them with local feature vectors and position encoding vectors to form decision input information; The received information is formula (16): (16); Improvements are made to the information receiving process by introducing an attention mechanism. The structure is a linear layer → GELU / Sigmoid → weighted multiplication output.
[0072] The information is integrated into formula (17): (17); in, Provide information for decision-making.
[0073] 4. Decision-making module and prediction module: The decision-making module generates image category prediction results based on the input information, and at the same time generates actions to determine the agent's next movement position; the prediction module generates the agent's final judgment on the image category.
[0074] Action generation corresponding formula (18): (18); in, for t +1 moment i The actions of an intelligent agent For policy networks, For the first i An intelligent agent in time t The output status of the LSTM network.
[0075] The classification output is formula (19): (19); in, The final predicted category of the model, M The total number of categories in the dataset. For normalized exponential functions, For the first i The prediction vector of each agent N The total number of agents. max To find the input value that makes the function reach its maximum value.
[0076] 5. Policy Updates and Privacy Protection: The local policy storage module records the current agent policy, the global policy optimization module combines the local policies of multiple agents to update the globally optimal policy, and the Gaussian noise addition module ensures communication privacy throughout the process.
[0077] The feature-enhanced multi-agent image classification subsystem is the basic system. On this basis, a differential privacy module is deployed to form a differential privacy integration subsystem. The process sequence is as follows: feature optimization is performed first, followed by differential privacy, and the collaboration achieves a balance between classification accuracy and privacy protection.
[0078] S104: Based on the decision input information, an LSTM network is used to generate the image category prediction results of the agent for the image to be classified.
[0079] Specifically, the decision-making module is based on a Long Short-Term Memory (LSTM) network and a policy network, combined with agent position encoding information and communication information, to generate agent movement decisions and image classification prediction results. The classification prediction integrates the judgments of multiple agents through a distributed average consensus algorithm to output the final category.
[0080] Local policy storage module: Stores the local processing policies generated by each agent in the image classification task, including feature extraction parameters, location encoding rules, decision network parameters, etc., to provide data support for global policy optimization.
[0081] S105: Normalize the image category prediction results of all agents in the communication graph using the softmax function, and take the average of all normalized results to obtain the category of the image to be classified.
[0082] In an exemplary embodiment, the method further includes: for any agent, integrating the agent's decision input information and the agent's historical state through an LSTM network, learning long-term dependencies to generate a next action instruction, and updating the agent's observation position through the action instruction.
[0083] A multi-agent image classification system includes: each agent, configured to acquire a local observation image of the image to be classified based on its position coordinates, extract local feature vectors from the local observation image using an image feature extraction module, and encode the agent's position coordinates to generate a position encoding vector; the improved image feature extraction module modifies the convolutional kernel of the convolutional layer to an asymmetric convolutional kernel and the activation function to a GeLU activation function, based on the MAIC model; and acquires private communication messages broadcast by multiple agents connected to the agent in the communication graph, and applies an attention mechanism to the private communication messages. The communication messages are decoded, and a weighted average of all decoded messages is calculated using the in-degree of the communication graph to obtain the communication message; the privatized communication message includes Gaussian noise; the communication message, local feature vector, and position encoding vector are concatenated to generate the agent's decision input information; based on the decision input information, an LSTM network is used to generate the agent's image category prediction result for the image to be classified; the processor is used to normalize the image category prediction results of all agents in the communication graph using the softmax function, and take the average of all normalized results to obtain the category of the image to be classified.
[0084] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0085] 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 invention.
Claims
1. A multi-agent-based image classification method, characterized in that, include: For each agent in the communication graph, a local observation image of the image to be classified is obtained based on the agent's position coordinates. The local feature vector of the local observation image is extracted by the image feature extraction module, and the position coordinates of the agent are encoded to generate a position encoding vector. The improved method of the image feature extraction module is to modify the convolution kernel of the convolutional layer to an asymmetric convolution kernel and the activation function to the GeLU activation function based on the MAIC model. For any given agent, the private communication messages broadcast by multiple agents connected to the agent in the communication graph are obtained. The private communication messages are decoded using an attention mechanism, and a weighted average of all decoded messages is calculated using the in-degree of the communication graph to obtain the communication message. The private communication messages include Gaussian noise. The communication message, local feature vector, and location encoding vector are concatenated to generate the decision input information of the intelligent agent. Based on the decision input information, an LSTM network is used to generate an agent's image category prediction results for the image to be classified. The image category prediction results of all agents in the communication graph are normalized using the softmax function, and the average of all normalized results is taken to obtain the category of the image to be classified.
2. The method as described in claim 1, characterized in that, The image feature extraction module includes AcbBlock1, AcbBlock2, AcbBlock3 and a fully connected layer connected in series; each of AcbBlock1, AcbBlock2, and AcbBlock3 includes an asymmetric convolutional layer, a max pooling layer and a batch normalization layer connected in series; the position coordinates of the agent are encoded by a position encoding module; the position encoding module includes a fully connected layer and a ReLU activation function connected in series.
3. The method as described in claim 1, characterized in that, The process of generating the private communication message specifically includes: Obtain the agent's initial message; With a mean of 0 and a variance of Gaussian noise is superimposed on the initial message to generate a private communication message.
4. The method as described in claim 3, characterized in that, The formula for obtaining the initial message of the agent is: ; in, For the first i An intelligent agent in time t The generated initial message, For parameters Defined message sending network, The output state of the LSTM network includes the agent's historical observations and actions.
5. The method as described in claim 1, characterized in that, The decoding of the private communication message using an attention mechanism specifically includes: The privatized communication message is input into the first linear layer and activated by GeLU to obtain the feature representation; The private communication message is input into the second linear layer and activated by the Sigmoid function to obtain attention weights, so as to enable the attention mechanism to focus on key information. The feature representation and the attention weight are weighted to obtain the decoded communication message.
6. The method as described in claim 1, characterized in that, The method further includes: For any given agent, the decision input information and historical state of the agent are integrated through an LSTM network to learn long-term dependencies in order to generate the next action instruction, and the observation position of the agent is updated through the action instruction.
7. The method as described in claim 1, characterized in that, The communication graph is a directed complete graph.
8. A multi-agent-based image classification system, characterized in that, The system includes multiple intelligent agents and a processor. The system includes: Each agent is used to acquire a local observation image of the image to be classified based on its position coordinates. A local feature vector is extracted from the local observation image using an image feature extraction module, and the agent's position coordinates are encoded to generate a position encoding vector. The improved image feature extraction module modifies the convolutional kernel of the convolutional layer to an asymmetric convolutional kernel and the activation function to a GeLU activation function, based on the MAIC model. Private communication messages broadcast by multiple agents connected to the agent in the communication graph are acquired. These private communication messages are decoded using an attention mechanism, and a weighted average of all decoded messages is calculated using the in-degree of the communication graph to obtain the communication message. The private communication message includes Gaussian noise. The communication message, local feature vector, and position encoding vector are concatenated to generate the agent's decision input information. Based on this decision input information, an LSTM network is used to generate the agent's image category prediction result for the image to be classified. The processor is used to normalize the image category prediction results of all agents in the communication graph using the softmax function, and then take the average of all normalized results to obtain the category of the image to be classified.