Search

CN-121981214-A - Neural network structure searching method and system based on dynamic collaborative regulation map coding

CN121981214ACN 121981214 ACN121981214 ACN 121981214ACN-121981214-A

Abstract

The invention relates to the technical field of automatic machine learning and neural networks, in particular to a neural network structure searching method and system based on dynamic collaborative regulation and control diagram coding. The method is based on a collaborative evolution mechanism of three-line populations of a maintainer line, a sterile line and a restorer line of a breeding optimization algorithm, achieves inter-population structure migration through dynamic hybridization probability control, builds a support vector machine proxy model to replace time-consuming performance evaluation, rapidly predicts accuracy of a child structure through the proxy model, screens high-potential candidate structures, carries out gradient fine adjustment on the candidate structures, outputs an optimal network structure, achieves modularized recombination and topological evolution of the neural network structure through graph structure coding, and combines double-layer dynamic regulation and control of population level migration control and individual level variation optimization by utilizing a collaborative mechanism of maintainer line stability maintenance, sterile line diversity exploration and restorer line convergence acceleration of the three-line populations, so that the deep neural network structure with good performance is achieved efficiently.

Inventors

  • YE ZHIWEI
  • SONG DINGFENG
  • ZHOU WEN
  • He Qidai
  • WANG MINGWEI
  • YAN LINGYU
  • WU DONGFANG
  • ZHENG XIAO
  • GAO RONG

Assignees

  • 湖北工业大学

Dates

Publication Date
20260505
Application Date
20260403

Claims (9)

  1. 1. A neural network structure searching method based on dynamic collaborative regulation and control diagram coding is characterized by comprising the following steps: constructing a search space and carrying out graph structure coding on a neural network structure in the search space; According to the intrusion detection accuracy rate, dividing the neural network structure into three initial populations which co-evolve in a maintainer line, a sterile line and a restorer line, wherein the initial proportion of the three lines in the initial evolution stage is set to be 1:1:1 or self-adaptive adjustment; performing evolution search in a search space by initializing an evolution search process of an initial population and combining a pre-trained agent model and a three-line population mechanism to obtain a candidate neural network structure; and screening out the final neural network structure from the candidate neural network structure.
  2. 2. The neural network structure search method based on dynamic collaborative regulatory map coding of claim 1, wherein the pre-trained proxy model comprises: constructing a proxy model, and selecting a support vector machine as the proxy model; Training the agent model by generating a training sample set by utilizing the neural network structures in the initial population, namely pairing the neural network structures in the initial population in sequence, comparing the nth sample with the rest N-1 samples for the nth sample, and marking the label as1 if the intrusion detection accuracy estimated value of the nth sample is superior to that of the paired samples, otherwise marking the label as 0.
  3. 3. The neural network structure searching method based on dynamic collaborative regulation map coding according to claim 1, wherein the performing evolution search in a search space by initializing an evolution search process by an initial population and combining a pre-trained agent model and a three-line population mechanism to obtain a candidate neural network structure comprises: S301, initializing evolution parameters, setting total evolution times, tournament scale and hybridization stopping condition parameters, adopting a tournament selection method to select individuals with high adaptability from a population through multiple rounds of local competition when selecting maintainer lines, sterile lines, restorer lines and individuals participating in hybridization, selfing and updating; s302, designing a diagram structure evolution operator, wherein the operator comprises sub-graph grafting, node splitting and topology variation, the self-adaptive variation probability adopted by the topology variation operation is based on the average crowding degree of a population, and when the individual crowding degree is smaller than the average crowding degree, the variation probability is increased to 0.3, otherwise, the variation probability is reduced to 0.1; S303, hybridization operation: Selecting a neural network structure from a maintainer line and a sterile line through a tournament selection mode respectively, wherein the tournament selection method comprises the steps of randomly extracting T individuals in a corresponding subset, comparing according to fitness, selecting winners as individuals participating in hybridization, dynamically adjusting the structure migration probability between the maintainer line and the sterile line according to population diversity indexes, improving the hybridization probability by 5% -10% when the Hamming distance of the population is lower than a threshold value, taking the structure in the maintainer line as a reference, taking the structure in the sterile line as interference, and updating the structure in the sterile line, wherein the parameter calculation formula of the new structure is as follows: ; Wherein, the Is the kth parameter of the ith hybrid variety, Is the kth parameter of a neural network structure selected from sterile lines, Is the kth parameter of a neural network structure selected from the maintainer line, And The random number is uniformly generated within the range of [ -1,1], and if the intrusion detection accuracy of the new structure in the agent model evaluation is higher, the original structure in the sterile line is replaced; S304, selfing operation: two neural network structures are selected from the restorer line through the tournament to carry out selfing, and the generation formula of the new structure is as follows: ; Wherein, the Is a new structure generated by selfing of the ith restorer line structure, Is the structure of the ith restorer line, Is the structure of the jth restorer line, Is the neural network structure with highest intrusion detection accuracy in the current population, If the intrusion detection accuracy of the new structure in the agent model evaluation is higher, the new structure is used for replacing the original structure, the update times t of the restorer structure is set to be 0, otherwise, t=t+1; S305, updating operation: for t being greater than the set maximum number of updates And resetting the parameters of the structure which is not updated in the recovery system to random values in the search space, wherein the formula is as follows: ; Wherein the method comprises the steps of Is used for replacing the ith recovery system structure Is provided with a new structure of (a), , Representing the range of values of the parameters in the search space, A uniform random number between 0 and 1; S306, evaluating and screening: Predicting the intrusion detection accuracy of offspring individuals through a pre-trained proxy model, and directly reserving the first K offspring individuals with the highest accuracy; s307, multiple iterations are performed to obtain a candidate neural network structure: and combining the K sub-generation individuals with the current population, and repeating the steps S701-S706 until the total evolution times or the accuracy rate is converged, so as to obtain the candidate neural network structure.
  4. 4. The neural network structure search method based on dynamic collaborative map coding according to claim 1, wherein the screening out a final neural network structure from candidate neural network structures comprises: sequencing candidate neural network structures according to the intrusion detection accuracy; the method comprises the steps of selecting the first M neural network structures with highest accuracy, performing end-to-end parameter fine adjustment on actual network security intrusion detection data by using a gradient descent algorithm, and finally screening the neural network structure with highest intrusion detection accuracy from the final neural network structure.
  5. 5. The neural network structure search method based on dynamic collaborative regulation map coding according to claim 1, wherein the search space construction method comprises the following steps: Setting search parameters; Searching the neural network structure according to the search parameters, wherein all the models meeting the conditions form a search space; The search parameters comprise the number of layers of the neural network structure, the number of neurons in each layer and the expansion rate.
  6. 6. The method of claim 3, further comprising adjusting parameters of the new neural network structure to search space boundary values if the new neural network structure exceeds the search space range during hybridization, selfing and updating operations.
  7. 7. The neural network structure search method based on dynamic collaborative regulatory map coding of claim 3, further comprising: The subgraph grafting in the graph structure evolution operation is to randomly select subgraphs with depth more than or equal to 3 from a maintenance structure graph to replace corresponding subgraphs of a target structure, node splitting is to split nodes with degree more than 4, two new nodes are generated, connecting edges are reassigned, topology mutation adopts basic probability p=0.2, dynamic adjustment is carried out according to structure evolution algebra T, an adjustment formula is p=0.2× (1-T/T), and T is the set total evolution times.
  8. 8. The neural network structure search method based on dynamic collaborative regulation map coding according to claim 1, wherein the map structure coding of the neural network structure in the search space comprises: The node attribute codes contained in the graph structure coding mechanism are represented by four groups of layer types, node numbers, activation functions and connection densities, the edge connection codes record interlayer connection relations through an adjacent matrix, and the virtual node marks distinguish effective nodes from filling nodes by adopting binary masks.
  9. 9. The neural network structure search system based on dynamic collaborative regulation map coding is characterized by comprising the following modules: The initial construction module is used for constructing a search space and carrying out graph structure coding on the neural network structure in the search space; the population initialization module is used for carrying out population initialization on the neural network structures in the search space according to the intrusion detection accuracy to obtain an initial population, and comprises the steps of randomly sampling N neural network structures from the search space, calculating the intrusion detection accuracy estimation value of each neural network structure, dividing the neural network structure into three initial populations which co-evolve in a maintainer line, a sterile line and a restorer line according to the intrusion detection accuracy estimation value, and setting the initial proportion of the three lines in the initial evolution stage to be 1:1:1 or carrying out self-adaptive adjustment; The evolution search module is used for initializing an evolution search process through an initial population, and carrying out evolution search in a search space by combining a pre-trained agent model and a three-line population mechanism to obtain a candidate neural network structure; and the network structure determining module is used for screening out a final neural network structure from the candidate neural network structures.

Description

Neural network structure searching method and system based on dynamic collaborative regulation map coding Technical Field The invention relates to the technical field of automatic machine learning and neural network structure searching, in particular to a neural network structure searching method and system based on dynamic collaborative regulation and control diagram coding. Background With the rapid development of the internet and the internet of things technology, network traffic is explosively increased, and network attack means increasingly tend to be intelligent, concealed and diversified. The network intrusion detection system is used as a core defense component for maintaining network security, and is mainly used for carrying out the key tasks of monitoring network traffic in real time, identifying abnormal behaviors and defending malicious attacks. In the face of massive and instantaneous changeable attack data, an intrusion detection model which can be quickly adapted to environmental changes and has high robustness is constructed, and the method has important significance for guaranteeing the safety of key information infrastructure and preventing sensitive data from being leaked. The patent application document with publication number of CN110826293A proposes a neural network structure searching method based on a genetic algorithm. The method solves the problem of searching the neural network structure by using a genetic algorithm, and comprises the steps of (1) initializing a population, coding each individual into the neural network structure, (2) evaluating the fitness of the individuals in the population, calculating the performance index of each neural network structure, (3) selecting excellent individuals according to the fitness, (4) generating new individuals through crossover and mutation operations to form a new generation population, and (5) repeating the steps until the termination condition is met. However, the crossover and mutation operation randomness of the genetic algorithm in the scheme is high, the existing excellent structure can be damaged, a large number of neural network structures need to be evaluated in the searching process, the calculation resource consumption is high, and the searching efficiency is low. Disclosure of Invention In order to solve the technical problems, the invention aims to provide a neural network structure searching method and system based on dynamic collaborative regulation map coding, and the adopted technical scheme is as follows: in a first aspect, an embodiment of the present invention provides a neural network structure searching method based on dynamic collaborative regulation map coding, where the method includes: constructing a search space and carrying out graph structure coding on a neural network structure in the search space; According to the intrusion detection accuracy rate, dividing the neural network structure into three initial populations which co-evolve in a maintainer line, a sterile line and a restorer line, wherein the initial proportions of the three lines in the initial evolution stage can be set to be 1:1:1 or self-adaptive adjustment; performing evolution search in a search space by initializing an evolution search process of an initial population and combining a pre-trained agent model and a three-line population mechanism to obtain a candidate neural network structure; and screening out the final neural network structure from the candidate neural network structure. Further, the pre-trained proxy model comprises: constructing a proxy model, and selecting a support vector machine as the proxy model; Training the agent model by generating a training sample set by utilizing the neural network structures in the initial population, namely pairing the neural network structures in the initial population in sequence, comparing the nth sample with the rest N-1 samples for the nth sample, and marking the label as1 if the intrusion detection accuracy estimated value of the nth sample is superior to that of the paired samples, otherwise marking the label as 0. Further, the evolution search is performed in a search space by initializing an evolution search process through an initial population and combining a pre-trained agent model and a three-line population mechanism to obtain a candidate neural network structure, which comprises the following steps: S301, initializing evolution parameters, setting parameters such as total evolution times, tournament scale, hybridization stopping conditions and the like, adopting a tournament selection method to select individuals with high adaptability from a population through multiple rounds of local competition when selecting maintainer lines, sterile lines, restorer lines and individuals participating in hybridization, selfing and updating; s302, designing a diagram structure evolution operator, wherein the operator comprises sub-graph grafting, node splitting and topology variation, the self