CN116882461B - Neural network evaluation optimization method and system based on neuron plasticity - Google Patents

Neural network evaluation optimization method and system based on neuron plasticity Download PDF

Info

Publication number
CN116882461B
CN116882461B CN202311118140.4A CN202311118140A CN116882461B CN 116882461 B CN116882461 B CN 116882461B CN 202311118140 A CN202311118140 A CN 202311118140A CN 116882461 B CN116882461 B CN 116882461B
Authority
CN
China
Prior art keywords
neuron
neural network
neurons
deep neural
compression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311118140.4A
Other languages
Chinese (zh)
Other versions
CN116882461A (en
Inventor
李波
唐文婷
韦星星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN202311118140.4A priority Critical patent/CN116882461B/en
Publication of CN116882461A publication Critical patent/CN116882461A/en
Application granted granted Critical
Publication of CN116882461B publication Critical patent/CN116882461B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0495Quantised networks; Sparse networks; Compressed networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a neural network evaluation optimization method and system based on neuron plasticity, comprising deep neural network structure compression and deep neural network parameter optimization: acquiring a verification data set, a training data set, a trained deep neural network to be compressed and parameters; calculating the plasticity and the neuron importance of a neuron cluster in the deep neural network to be compressed; calculating the number of necessary neurons in the neuron clusters; acquiring an unoptimized compressed deep neural network according to the number of necessary neurons and the importance of each neuron; calculating the neural micro-loop modeling difference of the depth neural network before and after compression; optimizing the network weight according to the modeling difference of the nerve micro-loops before and after compression to obtain an optimized compressed deep neural network; the invention designs a lightweight deep neural network and applies the lightweight deep neural network to natural image classification, accords with biology and has the characteristics of stronger interpretation, low computing resource cost and high image processing precision.

Description

Neural network evaluation optimization method and system based on neuron plasticity
Technical Field
The invention relates to the technical field of deep learning and image processing, in particular to a neural network evaluation optimization method and system based on neuron plasticity.
Background
The aim of applying artificial intelligence technology in the technical field of image processing is to realize intelligent image processing, however, a deep learning algorithm based on data driving can only simply simulate a human brain thinking process by increasing the quantity and complexity of modeling parameters, and cannot realize low energy consumption equivalent to human brain when similar tasks are processed.
The theory of Hubby in computational neuroscience indicates the plasticity of biological neurons, and a large number of deep neural network explanatory researches indicate that neurons in the existing deep neural network also have the plasticity by taking a brain information processing mechanism as a theoretical basis of network structure design: while deep neural networks learn information processing capabilities on specific tasks, multiple neurons in the network also commonly undergo modeling, and in order to achieve low energy consumption, the human brain tends to use fewer neurons for information processing after the neuron modeling is completed (task processing can be performed "proficiently").
However, the structure of the conventional general convolutional neural network is fixed, and the neuron activity cannot be actively restrained, so that the same operation amount as that when the 'sparse' image processing task is finished still needs to be consumed.
In addition, in order to deploy the general convolutional neural network with high precision and high operation amount in the embedded system, the structured pruning technology can greatly reduce the operation cost and ensure the precision of the compressed deep neural network through the width of the compressed network architecture, so that the method has wide application in the embedded environment, and the evaluation of the redundant structure is the core of the structured pruning technology.
However, the existing evaluation method has the problems of inaccurate static evaluation and large cost in dynamic evaluation, and is difficult to realize efficient and accurate redundant filter positioning: on one hand, the reason for inaccurate static evaluation is that the existing static evaluation method of the redundant filter only considers the inherent attribute (such as weight or characteristic) of a single filter, but ignores that the inherent attribute of the filter is the result of common modeling of neuron clusters, and as the compression ratio increases, the static evaluation method inevitably deletes neurons with forward contribution to other neuron function modeling and lower evaluation importance, thereby reducing the modeling effect of a neural micro-loop, so that the accuracy of a compressed deep neural network cannot be ensured; on the other hand, the reason that the dynamic evaluation accuracy is high but the operation cost is high is that the existing redundancy filter dynamic evaluation method carries out redundancy neuron prediction by embedding an additional operation structure in a network structure or designing an additional network, so that neurons with low importance but capable of forming effective neuron micro-loops together with other neurons are reserved by larger training cost or operation cost; in addition, the existing parameter optimization method cannot ensure that the compressed deep learning network with low parameter number is effectively guided to perform effective learning, so that the accuracy of the compressed deep learning network is difficult to ensure while the operation cost is reduced.
Therefore, how to make the existing deep learning algorithm biological, effectively guide the low parameter compression of the deep neural network, and how to make the compressed deep learning network perform effective learning so as to ensure that the precision of the compressed deep learning network is stable while reducing the operation cost is a problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the present invention provides a neural network evaluation optimization method and system based on neuron plasticity to solve some of the technical problems mentioned in the background art.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a neural network evaluation optimization method based on neuron plasticity comprises deep neural network structure compression and deep neural network parameter optimization;
the method specifically comprises the following steps:
s1, acquiring a visual image training data set and a verification set, training a computer visual image processing convolutional neural network to obtain a trained depth neural network to be compressed and parameters, and counting a set of compressible depth neural network structures in the trained depth neural network to be compressed;
s2, calculating the plasticity of the neuron clusters and the importance of each neuron according to the depth neural network to be compressed;
s3, calculating the number of necessary neurons in the neuron clusters according to the plasticity of the neuron clusters and the importance of each neuron;
s4, acquiring an unoptimized compressed deep neural network according to the number of necessary neurons in the neuron clusters and the importance of each neuron in the neuron clusters;
s5, calculating the modeling difference of the neural micro-loops of the depth neural network before and after compression according to the depth neural network to be compressed and the depth neural network after non-optimized compression;
s6, training iteration calculation optimization loss is carried out according to the nerve micro-loop modeling difference of the depth neural network before and after compression, the weight of the depth neural network after compression is optimized, and the optimized depth neural network after compression and parameters are obtained.
Preferably, the neuron cluster is a convolution layer of a deep neural network structure to be compressed, a full-connection layer or a construction module of the deep neural network, and the neuron is a filter core, a filter or a sensor in the full-connection layer in the convolution layer.
Preferably, the specific content of the plasticity of the neuron colony in the step S2 is as follows:
s21, sampling a neuron number set FN;
s22, sampling arbitrarilyThe neuron pairs form a neuron pair set FP;
s23 for each pair of neuronal combinationsSampling num kinds of neuron combination sets
S24, for each current neuron number setCalculating the average output contribution of each neuron on the check data set to the deep neural network to be compressed>
S25, for each sampling neuron numberThe calculation includes->The neuron combinations of the individual neurons contribute +.>
S26, forCalculating neuron utilization ∈>I.e. the first neuron population comprises mPlasticity achievable when individual neurons;
the specific content for calculating the importance of each neuron is as follows:
acquisition of each neuronSampling the neuron combinations FCC, for each neuron combination, calculating the output contribution of the c-th neuron in the first neuron group to the deep neural network to be compressed by applying SHAP algorithm>Calculating the importance of each neuron in the first neuron group +.>
Preferably, the plasticity achievable when the first neuron population comprises m neurons is calculatedThe method comprises the following steps:
wherein E is the expected operation, I is any image in the verification set omega, N l For the set of neurons in the ith neuron group, i and j are N l Any two of the different elements of the set,the number of neurons for the first neuron group,/-for the first neuron group>For forming a set M with other q neurons when i and j l At this time, the contribution of q+2 neurons to compressible deep neural network output calculated from Xia Puli interaction index, +.>For forming a set M with other p neurons when i and j l ´ At the time according to Xia PuliContribution of p+2 neurons of the mutual index calculation to compressible deep neural network output;
wherein,output of deep neural network for neuron set A on image I>Contribution of->Is according to->Results of the softmax operation, +.>,/>
Importance of each neuron in the first neuron groupThe method comprises the following steps:
wherein,importance for the c-th neuron in the i-th neuron cluster, +.>For set M l The number of the medium elements is calculated, the following is carried out! Is a factorial operation.
Preferably, the specific content of calculating the number of necessary neurons in the neuron population in S3 is:
the conditions for the satisfaction of the necessary neurons of the first neuron group are:
searching to obtain the number of necessary neurons meeting the condition by a binary search methodWill->Added to the set of necessary neuron numbers NF.
Preferably, the specific content of obtaining the deep neural network after the non-optimized compression is as follows:
s41, initializing a compressed deep neural network according to NF;
s42, obtaining the corresponding weight of the important neurons according to the importance of each neuron of the NF and the neuron clusters;
s43, initializing the weight of the compressed deep neural network according to the weight of the important neuron, and obtaining the non-optimized compressed deep neural network.
Preferably, the specific contents of the neural micro-loop modeling difference of the depth neural network before and after compression in S5 are as follows:
wherein N is l Is the firstNeuron set in the l neuron clusters, S l Is thatA combination of neurons consisting of the individual necessary neurons.
Preferably, the optimization loss is specifically:
wherein,for classifying task loss calculated according to the compressed deep neural network weight and the real label, the EID is a deep neural network structure set with interaction difference, alpha is the interaction difference weight, and the information gain is brought by the interaction difference of the first neuron cluster;
wherein,for cross entropy function>The CA is a compressible deep neural network structure set, which is a true class label of the image;
a neural network evaluation optimization system based on neuron plasticity comprises a deep neural network structure compression subsystem and a deep neural network parameter optimization subsystem;
the deep neural network structure compression subsystem comprises a data set acquisition module, a plasticity and importance calculation module, a necessary neuron calculation module and a neural network compression module;
the deep neural network parameter optimization subsystem comprises an interaction difference calculation module and a neural network weight optimization module;
the data set acquisition module is used for acquiring a visual image training data set and a verification set, training a computer visual image processing convolutional neural network to obtain a trained depth neural network to be compressed and parameters, and counting a set of compressible depth neural network structures in the trained depth neural network to be compressed;
the plasticity and importance calculating module is used for calculating the plasticity of the neuron clusters and the importance of each neuron according to the depth neural network to be compressed;
the necessary neuron calculation module is used for calculating the number of necessary neurons in the neuron clusters according to the plasticity of the neuron clusters and the importance of each neuron;
the neural network compression module is used for acquiring the deep neural network after non-optimized compression according to the necessary neuron number of the neuron clusters and the importance of each neuron in the neuron clusters;
the interaction difference calculation module is used for calculating the neural micro-loop modeling difference of the depth neural network before and after compression according to the depth neural network to be compressed and the depth neural network after non-optimized compression;
the neural network weight optimization module is used for training iteration calculation optimization loss according to the neural micro-loop modeling difference of the depth neural network before and after compression, optimizing the weight of the depth neural network after compression, and obtaining the optimized depth neural network after compression and parameters.
A computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the described neural network evaluation optimization method based on neuron plasticity for image processing.
Compared with the prior art, the neural network evaluation optimization method and system based on neuron plasticity are disclosed, and are applied to natural image classification, so that the neural network evaluation optimization method and system are in accordance with biology and have the characteristics of higher interpretation, low operation resource cost, high image processing precision and the like;
firstly, estimating the number of redundant neurons in a neuron cluster through the plasticity of the neuron cluster, then accurately positioning the redundant neurons in the neuron cluster through the importance of the neurons, compressing a network structure without modifying the deep neural network structure to be compressed, and eliminating the deep neural network architecture redundancy caused by network design accurately and rapidly without special software or hardware dependence;
the maximization of the accuracy of the depth neural network after compression is realized by minimizing the difference information entropy of the neural micro-loops of the depth neural network before and after compression, the gradient disappearance or gradient explosion phenomenon is not easy to occur in the optimization method, and the optimization effect of the depth neural network after compression with low parameter number can be effectively ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a neural network evaluation optimization method based on neuron plasticity provided by the invention;
FIG. 2 is a diagram showing a comparison result of evaluating the number of necessary filters with the deep neural network sparseness;
FIG. 3 is a schematic diagram of a deep neural network before and after compression according to the present invention;
FIG. 4 is a graph showing the result of comparing the effect of the knowledge distillation method provided by the invention on the optimization of the parameters of the compressed deep neural network;
FIG. 5 is a diagram showing the comparison of compression effects with other deep neural network compression methods according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
The embodiment of the invention discloses a neural network evaluation optimization method based on neuron plasticity, which comprises deep neural network structure compression and deep neural network parameter optimization;
the method specifically comprises the following steps:
s1, acquiring a visual image training data setTraining a computer vision image processing convolutional neural network to obtain a trained deep neural network to be compressed and parameters, counting a set CA of compressible deep neural network structures in the trained deep neural network to be compressed, and initializing a current neuron cluster index l=0;
s2, calculating the plasticity of the neuron clusters and the importance of each neuron according to the depth neural network to be compressed;
s3, calculating the number of necessary neurons in the neuron clusters according to the plasticity of the neuron clusters and the importance of each neuron;
s4, acquiring an unoptimized compressed deep neural network according to the number of necessary neurons in the neuron clusters and the importance of each neuron in the neuron clusters;
s5, calculating the modeling difference of the neural micro-loops of the depth neural network before and after compression according to the depth neural network to be compressed and the depth neural network after non-optimized compression;
s6, training iteration calculation optimization loss is carried out according to the nerve micro-loop modeling difference of the depth neural network before and after compression, the weight of the depth neural network after compression is optimized, and the optimized depth neural network after compression and parameters are obtained.
In this embodiment, the verification dataset is a subset of the training dataset, and may be composed of a single-band image or a multi-band image; the training data set is used for training a deep neural network to be compressed, the rule of sampling the verification data set from the training data set is that 10 random images are sampled in each class of classified targets, the trained deep neural network to be compressed is a convolutional neural network trained on the training data set, and the convolutional neural network can be used for target classification, target detection or target segmentation and other computer vision image processing tasks; indexing layers in trained deep neural networks to be compressedMapping rules F mapping to a compressible deep neural network Structure set CA ca The method comprises the following steps:
wherein n is Q The number of layers is calculated for all trained deep neural networks to be compressed.
In order to further implement the above technical solution, the neuron clusters are convolution layers of the deep neural network structure to be compressed, the full connection layers or the construction modules of the deep neural network, and the neurons are filter kernels in the convolution layers, filters or perceptors in the full connection layers.
The present embodiment takes neurons as a filter as an example.
The method also comprises initializing l=0 before S2, and the number of the necessary filters of the neuron colony is setIf the current neuron population index +.>Step S3, jumping to the step; if->Then jump to S2.
In order to further implement the above technical solution, for the first neuron cluster, the filter utilization rate of the compressible deep neural network structure and the importance of each filter are calculated, where the filter refers to a feature operation structure composed of a plurality of filter kernels, specifically, the weight of the first compressible deep neural network structure isIt comprises->Filters, each filter comprising +.>Filter kernel of size +.>
Wherein, the filter utilization rate is calculatedThe specific contents are as follows:
s21, sampling filter number set FN:
wherein if itThen->For>Then->For>Then->For>Then->
S22, sampling arbitrarilyThe filter pairs form a filter pair set FP;
s23 for each pair of filter combinationsSample num filter combination set
S24, for each current filter number setCalculating the average output contribution of each filter to the depth neural network to be compressed on the check data set>
Wherein E is the expected operation, I is any image in the verification set omega, N l For filter sets i and j in the ith neuron cluster N l Any two of the different elements of the set,output of the depth neural network on the image I for the filter set A +.>Contribution of->Is according to->Results of the softmax operation;
s25, for each sampling filter numberCalculating the average output contribution of a filter combination comprising m+2 filters to the deep neural network to be compressed>
S26, forCalculating the filter utilization ∈ ->I.e. the achievable plasticity when the first neuron population contains m filters:
wherein,the number of neurons for the first neuron group,/-for the first neuron group>For forming a set M when i and j are combined with other q filters l At this time, the q+2 filters calculated from Xia Puli interaction index contribute +.>For forming a set M with other p neurons when i and j l ´ At this time, the contribution of p+2 neurons to compressible deep neural network output calculated from Xia Puli interaction index, +.>,/>
The specific content for calculating the importance of each neuron is as follows:
acquiring each filterFor each filter combination, calculating the output contribution +.f. of the c-th filter in the i-th neuron cluster to the deep neural network to be compressed using the SHAP algorithm>Calculating the importance of each filter in the first neuron group +.>
Importance of each filter in the first neuron groupThe method comprises the following steps:
wherein,importance for the c-th neuron in the i-th neuron cluster, +.>For set M l The number of the medium elements is calculated, the following is carried out! Is a factorial operation.
In order to further implement the above technical solution, the specific content of calculating the number of necessary neurons in the neuron clusters in S3 is:
initializing the number of currently necessary filters
The conditions for the satisfaction of the necessary neurons of the first neuron group are:
searching to obtain the number of necessary filters meeting the condition by a binary search method
Will beAdded to the set of necessary neuron numbers NF.
In this embodiment, as shown in fig. 2, the filter utilization rate more accurately reflects the relationship between the number of the filters of the neuron population deep neural network and the precision of the compressed deep neural network than the sparseness of the deep neural network; on the one hand, the filter utilization rate can reflect how to realize higher TOP1 verification accuracy on the CIFAR-10 data set more quickly; on the other hand, the filter utilization rate can more accurately reflect the relation between the number of the filters and the precision; specifically, on the ResNet-50 shallow layer, when the reserved channel proportion and the filter utilization are both 0.4, the filter utilization is recommended to use fewer filters to obtain approximate precision; on the ResNet-50 deep layer, when the reserved channel proportion and the filter utilization rate are both 0.5, the filter utilization rate suggests using a little more channels to realize rapid precision rise, so that the precision loss risk caused by the deep neural network structure compression is reduced; when the filter utilization rate is about 0.5, the accuracy of the depth neural network after compression begins to converge, which proves that the effectiveness of the filter utilization rate in the depth neural network compression is expected in the step S3, so that the relation between the number of estimated filters and the accuracy of the depth neural network after compression is more accurate by adopting the filter utilization rate than the existing redundancy evaluation method.
Accumulating current neuron cluster indexAnd jumping to the step before S2;
in order to further implement the above technical solution, according to the number of necessary filters of the compressible deep neural network structure and the importance of each filter of the neuron clusters, the specific content of obtaining the deep neural network after the non-optimized compression is as follows:
s41, initializing a compressed deep neural network according to NF;
s42, obtaining the corresponding weight of the important filter according to the importance of each filter of the NF and the neuron clusters;
s43, initializing the weight of the compressed deep neural network according to the weight of the important filter to obtain an unoptimized compressed deep neural network;
as shown in fig. 3, the parameter and the operand of the depth neural network after compression are significantly reduced, wherein the operand is reduced by about 54% and the parameter is reduced by about 60%.
Before S5, the method further comprises the following steps:
initializing l=0, and enabling an interaction difference deep neural network structure set EID to exist.
If the current neuron population indexStep S5, jumping to the step; if->Then jump to S6.
In order to further implement the above technical solution, in S5, a neural micro-loop modeling difference of the depth neural network before and after compression, that is, an interaction difference of the first neuron population, is calculated, and the specific contents are as follows:
wherein N is l For the filter set in the first neuron group, S l Is thatA filter combination of the necessary filters.
If it isThen add l to EID; l=l+1, and judging the index step of the current neuron colony before jumping to S5;
if it isInteraction difference weight ∈>The method comprises the steps of carrying out a first treatment on the surface of the On the contrary, let(s)>
According to the compressed deep neural network weight and the real label, calculating the classification task loss
Initialization of,/>
If it isCalculating information gain caused by interaction difference of the first neuron colony; on the contrary, ifThen l=l+1 continues iteration, otherwise the final optimization loss L is calculated;
in order to further implement the above technical solution, the optimization loss is specifically:
wherein,for classifying task loss calculated according to the weight of the compressed deep neural network and the real label, the EID is the difference of interactionThe different-depth neural network structure set, wherein alpha is the interaction difference weight, and the information gain is brought by the interaction difference of the first neuron colony;
accumulating information gain caused by interaction difference of the first neuron colony:
wherein,for cross entropy function>The CA is a compressible deep neural network structure set, which is a true class label of the image;
in this embodiment, the iterative process is a process of updating the convolutional neural network weight using the SGD and its variant optimization algorithm; as shown in fig. 4, and using only ordinary trainingCompared with a knowledge distillation method, the interactive difference training is applied to ensure that the accuracy of the training data set and the accuracy of the verification data set rise more quickly, and the loss of the training data set and the loss of the verification data set drop more quickly; therefore, better training effect can be obtained by parameter optimization of interaction differenceAnd improves generalization of the compressed deep neural network.
In practical application, the compression effect of the method is compared with the compression effect of other deep neural network compression methods, and the compression effect is compared with the compression effect of other deep neural network compression methods from the aspects of precision loss and calculation amount reduction, as shown in fig. 5, when the method is applied to compressing the deep neural network on different image classification tasks of different convolution neural networks such as light weight, dense connection, sparse connection and the like, the extremely high compression ratio can be realized, and the precision of the compressed deep neural network is ensured. In addition, the method can obtain the convolution neural network compression result which is similar to or even better than the existing advanced deep neural network compression algorithm on the premise of not adding a new network structure and not having extra hardware dependence.
A neural network evaluation optimization system based on neuron plasticity comprises a deep neural network structure compression subsystem and a deep neural network parameter optimization subsystem;
the deep neural network structure compression subsystem comprises a data set acquisition module, a plasticity and importance calculation module, a necessary neuron calculation module and a neural network compression module;
the deep neural network parameter optimization subsystem comprises an interaction difference calculation module and a neural network weight optimization module;
the data set acquisition module is used for acquiring a visual image training data set and a verification set, training a computer visual image processing convolutional neural network to obtain a trained depth neural network to be compressed and parameters, and counting a set of compressible depth neural network structures in the trained depth neural network to be compressed;
the plasticity and importance calculating module is used for calculating the plasticity of the neuron clusters and the importance of each neuron according to the depth neural network to be compressed;
the necessary neuron calculation module is used for calculating the number of necessary neurons in the neuron clusters according to the plasticity of the neuron clusters and the importance of each neuron;
the neural network compression module is used for acquiring the deep neural network after non-optimized compression according to the necessary neuron number of the neuron clusters and the importance of each neuron in the neuron clusters;
the interaction difference calculation module is used for calculating the neural micro-loop modeling difference of the depth neural network before and after compression according to the depth neural network to be compressed and the depth neural network after non-optimized compression;
the neural network weight optimization module is used for training iteration calculation optimization loss according to the neural micro-loop modeling difference of the depth neural network before and after compression, optimizing the weight of the depth neural network after compression, and obtaining the optimized depth neural network after compression and parameters.
The neural network evaluation optimization system based on the neuron plasticity is an embedded system, and the system can comprise a terminal, a server and other equipment, wherein the terminal can be an embedded system carrying an artificial intelligent acceleration chip, or an embedded system carrying a DSP (digital signal processor) chip and an FPGA (field programmable gate array) chip, or a system carrying an artificial intelligent acceleration board card such as a GPU (graphics processing unit) and a TPU (thermoplastic polyurethane).
A computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform an optimization method for neural network evaluation based on neuron plasticity for image processing.
The specific content of performing image processing by a neural network evaluation optimization method based on neuron plasticity is as follows: and acquiring a visual image, preprocessing, inputting the preprocessed image into the optimized compressed deep neural network model, and outputting the processing results of target classification, target detection or target segmentation.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. The neural network evaluation optimization method based on neuron plasticity is characterized by comprising deep neural network structure compression and deep neural network parameter optimization;
the method specifically comprises the following steps:
s1, acquiring a visual image training data set and a verification set, training a computer visual image processing convolutional neural network to obtain a trained depth neural network to be compressed and parameters, and counting a set of compressible depth neural network structures in the trained depth neural network to be compressed;
s2, calculating the plasticity of the neuron clusters and the importance of each neuron according to the depth neural network to be compressed;
s3, calculating the number of necessary neurons in the neuron clusters according to the plasticity of the neuron clusters and the importance of each neuron;
s4, acquiring an unoptimized compressed deep neural network according to the number of necessary neurons in the neuron clusters and the importance of each neuron in the neuron clusters;
s5, calculating the modeling difference of the neural micro-loops of the depth neural network before and after compression according to the depth neural network to be compressed and the depth neural network after non-optimized compression;
s6, training iteration calculation optimization loss is carried out according to the nerve micro-loop modeling difference of the depth neural network before and after compression, the weight of the depth neural network after compression is optimized, and the optimized depth neural network after compression and parameters are obtained;
the specific content of the plasticity of the neuron colony is as follows:
s21, sampling a neuron number set FN;
s22, sampling any pair of neuron pairs to form a neuron pair set FP;
s23, sampling num kinds of neuron combination sets for each pair of neuron combinations (i, j) epsilon FP
S24, for each current neuron number setCalculating the average output contribution of each neuron on the check data set to the deep neural network to be compressed>
S25, calculating the average output contribution of the neuron combination containing m+2 neurons to the deep neural network to be compressed for each sampling neuron number m epsilon FN
S26, calculating the neuron utilization rate U for m epsilon FN l (m), namely the plasticity that can be achieved when the 1 st neuron population comprises m neurons;
the specific content for calculating the importance of each neuron is as follows:
acquiring c E N of each neuron l Sampling the neuron combinations FCC, for each of which, the output contribution of the c-th neuron in the 1 st neuron cluster to the depth to compression neural network is calculated by applying the SHAP algorithmCalculating the importance of each neuron in the 1 st neuron group +.>
Calculating the plasticity achievable when the 1 st neuron population comprises m neuronsU l (m) is:
wherein E is the expected operation, I is any image in the verification set omega, N 1 For the set of neurons in the 1 st neuron population, i and j are N 1 Any two of the different elements of the set,the number of neurons for the 1 st neuron group,/->For forming a set M with other q neurons when i and j 1 At this time, the contribution of q+2 neurons to compressible deep neural network output calculated from Xia Puli interaction index, +.>For forming a set M with other p neurons when i and j 1 'at' the contribution of p+2 neurons to compressible deep neural network output calculated from Xia Puli interaction index;
ΔV(i,j,M l )=(V(M l )-V(M l -{j}))-(V(M l -{i})-V(M l -{i,j}))
wherein V (A) is the output of the neuron set A on the deep neural network on the image IContribution of->Is according to->Results of the softmax operation, +.>p≤m-2;
Importance of each neuron in the 1 st neuron populationThe method comprises the following steps:
wherein,significance of the c-th neuron in the 1 st neuron group, |M l I is set of requirements M 1 The number of the medium elements is calculated, the following is carried out! Is a factorial operation;
the specific content of calculating the number of necessary neurons in the neuron colony in S3 is:
the conditions for the satisfaction of the necessary neurons of the 1 st neuron population are:
is a positive integer
Searching to obtain the number of necessary neurons meeting the condition by a binary search methodWill->Added to the set of necessary neuron numbers NF.
2. The neural network evaluation optimization method based on neuron plasticity according to claim 1, wherein the neuron clusters are convolution layers of a deep neural network structure to be compressed, full-connection layers or construction modules of the deep neural network, and the neurons are filter kernels in the convolution layers, filters or perceptrons in the full-connection layers.
3. The neural network evaluation optimization method based on neuron plasticity according to claim 1, wherein the specific content of obtaining the deep neural network after non-optimized compression is:
s41, initializing a compressed deep neural network according to NF;
s42, obtaining the corresponding weight of the important neurons according to the importance of each neuron of the NF and the neuron clusters;
s43, initializing the weight of the compressed deep neural network according to the weight of the important neuron, and obtaining the non-optimized compressed deep neural network.
4. The neural network evaluation optimization method based on neuron plasticity according to claim 3, wherein the specific contents of the neural micro-loop modeling difference of the depth neural network before and after compression in S5 are as follows:
wherein N is 1 Is the neuron set in the 1 st neuron group, S 1 Is thatA combination of neurons consisting of the individual necessary neurons.
5. The neural network evaluation optimization method based on neuron plasticity according to claim 4, wherein the optimization loss is specifically:
wherein L is gt For classifying task loss calculated according to the compressed deep neural network weight and the real label, the EID is a deep neural network structure set with interaction difference, alpha is the interaction difference weight, and the 1 st neuron colony interaction difference brings information gain;
wherein BCE (& gt) is a cross entropy function, gt I The CA is a compressible deep neural network structure set, which is a true class label of the image;
6. a neural network evaluation optimization system based on neuron plasticity, which is characterized by comprising a deep neural network structure compression subsystem and a deep neural network parameter optimization subsystem based on the neural network evaluation optimization method based on neuron plasticity as claimed in any one of claims 1-5;
the deep neural network structure compression subsystem comprises a data set acquisition module, a plasticity and importance calculation module, a necessary neuron calculation module and a neural network compression module;
the deep neural network parameter optimization subsystem comprises an interaction difference calculation module and a neural network weight optimization module;
the data set acquisition module is used for acquiring a visual image training data set and a verification set, training a computer visual image processing convolutional neural network to obtain a trained depth neural network to be compressed and parameters, and counting a set of compressible depth neural network structures in the trained depth neural network to be compressed;
the plasticity and importance calculating module is used for calculating the plasticity of the neuron clusters and the importance of each neuron according to the depth neural network to be compressed;
the necessary neuron calculation module is used for calculating the number of necessary neurons in the neuron clusters according to the plasticity of the neuron clusters and the importance of each neuron;
the neural network compression module is used for acquiring the deep neural network after non-optimized compression according to the necessary neuron number of the neuron clusters and the importance of each neuron in the neuron clusters;
the interaction difference calculation module is used for calculating the neural micro-loop modeling difference of the depth neural network before and after compression according to the depth neural network to be compressed and the depth neural network after non-optimized compression;
the neural network weight optimization module is used for training, iterating, calculating and optimizing loss according to the neural micro-loop modeling difference of the depth neural network before and after compression, optimizing the weight of the depth neural network after compression, and obtaining the optimized depth neural network after compression and parameters;
the specific content of the calculated neuron colony plasticity is as follows:
s21, sampling a neuron number set FN;
s22, sampling any pair of neuron pairs to form a neuron pair set FP;
s23, sampling num kinds of neuron combination sets for each pair of neuron combinations (i, j) epsilon FP
S24, for each current neuron number setCalculating the average output contribution of each neuron on the check data set to the deep neural network to be compressed>
S25, calculating the average output contribution of the neuron combination containing m+2 neurons to the deep neural network to be compressed for each sampling neuron number m epsilon FN
S26, calculating the neuron utilization rate U for m epsilon FN l (m), namely the plasticity that can be achieved when the 1 st neuron population comprises m neurons;
the specific content for calculating the importance of each neuron is as follows:
acquiring c E N of each neuron l Sampling the neuron combinations FCC, for each of which, the output contribution of the c-th neuron in the 1 st neuron cluster to the depth to compression neural network is calculated by applying the SHAP algorithmCalculating the importance of each neuron in the 1 st neuron group +.>
Calculation of the 1 st neuron population comprising m neurons may be performedCurrent plasticity U l (m) is:
wherein E is the expected operation, I is any image in the verification set omega, N 1 For the set of neurons in the 1 st neuron population, i and j are N 1 Any two of the different elements of the set,the number of neurons for the 1 st neuron group,/->For forming a set M with other q neurons when i and j 1 At this time, the contribution of q+2 neurons to compressible deep neural network output calculated from Xia Puli interaction index, +.>For forming a set M with other p neurons when i and j 1 'at' the contribution of p+2 neurons to compressible deep neural network output calculated from Xia Puli interaction index;
ΔV(i,j,M l )=(V(M l )-V(M l -{j}))-(V(M l -{i})-V(M l -{i,j}))
wherein V (A) is the output of the neuron set A on the deep neural network on the image IContribution of->Is according to->Results of the softmax operation, +.>p≤m-2;
Importance of each neuron in the 1 st neuron populationThe method comprises the following steps:
wherein,significance of the c-th neuron in the 1 st neuron group, |M l I is set of requirements M 1 The number of the medium elements is calculated, the following is carried out! Is a factorial operation;
the specific content for calculating the number of the necessary neurons in the neuron colony is as follows:
the conditions for the satisfaction of the necessary neurons of the 1 st neuron population are:
is a positive integer
Searching to obtain the number of necessary neurons meeting the condition by a binary search methodWill->Added to the set of necessary neuron numbers NF.
7. A computer-readable storage medium, having stored thereon a computer program which, when run on a computer, causes the computer to perform an image processing by a neural network evaluation optimization method based on neuron plasticity as claimed in any one of claims 1 to 5.
CN202311118140.4A 2023-09-01 2023-09-01 Neural network evaluation optimization method and system based on neuron plasticity Active CN116882461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311118140.4A CN116882461B (en) 2023-09-01 2023-09-01 Neural network evaluation optimization method and system based on neuron plasticity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311118140.4A CN116882461B (en) 2023-09-01 2023-09-01 Neural network evaluation optimization method and system based on neuron plasticity

Publications (2)

Publication Number Publication Date
CN116882461A CN116882461A (en) 2023-10-13
CN116882461B true CN116882461B (en) 2023-11-21

Family

ID=88257161

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311118140.4A Active CN116882461B (en) 2023-09-01 2023-09-01 Neural network evaluation optimization method and system based on neuron plasticity

Country Status (1)

Country Link
CN (1) CN116882461B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109523017A (en) * 2018-11-27 2019-03-26 广州市百果园信息技术有限公司 Compression method, device, equipment and the storage medium of deep neural network
CN111814662A (en) * 2020-07-07 2020-10-23 北京航空航天大学 Visible light image airplane rapid detection method based on miniature convolutional neural network
WO2021143070A1 (en) * 2020-01-16 2021-07-22 北京智芯微电子科技有限公司 Compression method and apparatus for deep neural network model, and storage medium
CN114139680A (en) * 2021-11-09 2022-03-04 天津大学 Automatic negotiation intelligent agent design method based on deep reinforcement learning
CN116502697A (en) * 2023-04-26 2023-07-28 宁夏青铜峡市华能雷避窑光伏发电有限公司 Deep neural network model compression method and compression device based on CIFAR data set

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10832139B2 (en) * 2018-06-22 2020-11-10 Moffett Technologies Co. Limited Neural network acceleration and embedding compression systems and methods with activation sparsification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109523017A (en) * 2018-11-27 2019-03-26 广州市百果园信息技术有限公司 Compression method, device, equipment and the storage medium of deep neural network
WO2021143070A1 (en) * 2020-01-16 2021-07-22 北京智芯微电子科技有限公司 Compression method and apparatus for deep neural network model, and storage medium
CN111814662A (en) * 2020-07-07 2020-10-23 北京航空航天大学 Visible light image airplane rapid detection method based on miniature convolutional neural network
CN114139680A (en) * 2021-11-09 2022-03-04 天津大学 Automatic negotiation intelligent agent design method based on deep reinforcement learning
CN116502697A (en) * 2023-04-26 2023-07-28 宁夏青铜峡市华能雷避窑光伏发电有限公司 Deep neural network model compression method and compression device based on CIFAR data set

Also Published As

Publication number Publication date
CN116882461A (en) 2023-10-13

Similar Documents

Publication Publication Date Title
Luo et al. Autopruner: An end-to-end trainable filter pruning method for efficient deep model inference
CN111858989B (en) Pulse convolution neural network image classification method based on attention mechanism
CN110378383B (en) Picture classification method based on Keras framework and deep neural network
Alvarez et al. Learning the number of neurons in deep networks
CN109389171B (en) Medical image classification method based on multi-granularity convolution noise reduction automatic encoder technology
CN109063719B (en) Image classification method combining structure similarity and class information
CN106991355B (en) Face recognition method of analytic dictionary learning model based on topology maintenance
CN108009594B (en) A kind of image-recognizing method based on change grouping convolution
CN111898703B (en) Multi-label video classification method, model training method, device and medium
CN114332545B (en) Image data classification method and device based on low-bit pulse neural network
CN114176607B (en) Electroencephalogram signal classification method based on vision transducer
CN103761537A (en) Image classification method based on low-rank optimization feature dictionary model
CN110991554B (en) Improved PCA (principal component analysis) -based deep network image classification method
CN108388918B (en) Data feature selection method with structure retention characteristics
Peng et al. A survey: Image classification models based on convolutional neural networks
CN115909336A (en) Text recognition method and device, computer equipment and computer-readable storage medium
CN116882461B (en) Neural network evaluation optimization method and system based on neuron plasticity
Jeczmionek et al. Input reduction of convolutional neural networks with global sensitivity analysis as a data-centric approach
Zeng et al. Compressing and accelerating neural network for facial point localization
CN112801153B (en) Semi-supervised image classification method and system of image embedded with LBP (local binary pattern) features
Xie et al. ResNet with Attention Mechanism and Deformable Convolution for Facial Expression Recognition
Chun-man et al. Face expression recognition based on improved MobileNeXt
Sun et al. A Review of AIoT-based Edge Devices and Lightweight Deployment
Chung et al. Filter pruning by image channel reduction in pre-trained convolutional neural networks
Eghbali et al. Deep Convolutional Neural Network (CNN) for Large-Scale Images Classification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant