CN109376763A - Sample classification method, system and medium based on multisample reasoning neural network - Google Patents

Sample classification method, system and medium based on multisample reasoning neural network Download PDF

Info

Publication number
CN109376763A
CN109376763A CN201811068190.5A CN201811068190A CN109376763A CN 109376763 A CN109376763 A CN 109376763A CN 201811068190 A CN201811068190 A CN 201811068190A CN 109376763 A CN109376763 A CN 109376763A
Authority
CN
China
Prior art keywords
sample
msin
multisample
neural network
layer
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.)
Pending
Application number
CN201811068190.5A
Other languages
Chinese (zh)
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.)
Shandong Normal University
Original Assignee
Shandong Normal 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 Shandong Normal University filed Critical Shandong Normal University
Priority to CN201811068190.5A priority Critical patent/CN109376763A/en
Publication of CN109376763A publication Critical patent/CN109376763A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • G06F18/24133Distances to prototypes
    • G06F18/24137Distances to cluster centroïds
    • G06F18/2414Smoothing the distance, e.g. radial basis function networks [RBFN]
    • 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/045Combinations of 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses sample classification method, system and media based on multisample reasoning neural network, comprising: step (1): establishing multisample reasoning neural network MSIN;Step (2): using the training sample of several different sample territories as input value, being input in multisample reasoning neural network MSIN, and the training of specified wheel number is carried out to multisample reasoning neural network MSIN;After the training of every wheel, verifying sample is input to multisample reasoning neural network MSIN and is tested, saved so that the smallest multisample reasoning neural network MSIN of multisample reasoning neural network MSIN whole loss functional value is as final network;Step (3): using the test sample of several different sample territories as multisample reasoning neural network MSIN input value, it is input in trained multisample reasoning neural network, exports sample class corresponding to test sample or the sample territory where test sample.

Description

Sample classification method, system and medium based on multisample reasoning neural network
Technical field
The present invention relates to sample classification method, system and media based on multisample reasoning neural network.
Background technique
Artificial intelligence is in nowadays social all trades and professions using in the ascendant, and machine learning is as the main of artificial intelligence Technology decides the application prospect and product landing of artificial intelligence.In recent years, the deep learning based on multilayer neural network Technology plays the role of dominance in the fields such as computer vision and natural language processing, so that there is prominent fly suddenly in these fields Into development.However, the performance and parameter amount of neural network are positively correlated, that is, possess high performance network often possess it is huge Big parameter amount.These networks generally require tens or even high performance GPU clusters up to a hundred to be trained, and use instruction The neural network perfected also tends to that high performance GPU is needed just to can be carried out when making inferences, this prevents general PC machine from holding Carry so huge calculation amount, it is also difficult to so that neural network is disposed on the mobile apparatus.Depth learning technology is to the huge of calculating Big demand makes it difficult to be deployed in specific product.Research accordingly, with respect to neural network framework never stops, on the one hand, The high performance network architecture will not only possess less parameter, while should also possess higher performance.On the other hand, guaranteeing Under the premise of network possesses preferable Generalization Capability, network parameter should be reduced to the greatest extent.This is to allow network to possess less meter Calculation amount, in order to be deployed in the equipment of low performance, in especially some movements and embedded device.
Design and exploration about neural network framework have had many work, make image knowledge of convolutional network earliest Other work comes from LeNets, which only applies on handwritten numeral collection, and there is no be applied to large-scale and complicated data On collection.Until 2012, AlexNet training neural network on ImageNet using two GPU indicated the deep learning epoch Arrival.Hereafter, the framework of AlexNet is improved and the generalization ability on multiple data sets is at measurement network performance quality Standard.VGGNets, which is demonstrated, is conducive to network acquirement better performance using smaller convolution kernel and deeper layer structure. GoogLeNets establishes multiple connections between the layer of front and back using different convolution kernels, so that network possesses more multifarious table Show, and then obtains better performance.Using collateral branch's structure being fused in rear layer of change is not added in front layer information by ResNets, is solved It has determined the gradient disappearance problem of network in the training process, the network architecture has been designed very deep, to obtain more preferable Performance.The success of ResNets also indicates that the network architecture for possessing inter-layer information fusion can obtain better performance. All front layer information is combined and is transmitted to rear layer by DenseNets, it to possess between the module of network and more connect It connects, the information amalgamation mode between layer is more complicated.WPNets and PWNets proposes a kind of point from whole and part visual angle The characteristics of group channel pattern of fusion convolutional neural networks framework, they combine various information converged network, by compressing, amplifying letter Number combines with grouping convolution, more interlayer connections is formd, to achieve better Generalization Capability.
A few thing is attempted to train neural network using multiple input samples.SamplePairing and Mixup is by two Sample is added or interpolation, to replace original sample as the input of neural network.This is conducive to enlarged sample domain, to reach one The purpose of kind data enhancing, to improve the generalization ability of network.Two samples are respectively inputted volume by Siamese Network Product neural network, to obtain the similarity between them.Similarly, a kind of to be designed to use using three sample input networks respectively To seek similitude in class inherited and class between them.In contrast to this, it is a kind of input simultaneously two pictures in the hope of The network of the block similitude in two figures is taken to be suggested, its main purpose is one general similar function of study to measure Similitude between two pictures.These networks are commonly designed the similitude between exptended sample domain or measurement sample, and It is unable to classification belonging to forecast sample, it can not sample territory corresponding to forecast sample.
Summary of the invention
In order to solve the deficiencies in the prior art, the present invention provides the sample classification sides based on multisample reasoning neural network Method, system and medium predict that neural network can to multiple inputs simultaneously in a forward process.Multisample reasoning Neural network framework (Multi-Sample Inference Network, abbreviation MSIN) not only can be in a forward process In predict multiple input samples simultaneously, greatly reuse network parameter, and it is preferable extensive to guarantee that neural network has Performance.Multiple samples are predicted simultaneously, can not only reduce the inference time of network, but also network query function pair can be reduced The consumption of hardware resource.
In order to solve the above-mentioned technical problem, the present invention adopts the following technical scheme:
As the first aspect of the present invention, the sample classification method based on multisample reasoning neural network is provided;
Sample classification method based on multisample reasoning neural network, comprising:
Step (1): multisample reasoning neural network MSIN is established;
Step (2): using the training sample of several different sample territories as input value, it is input to multisample reasoning nerve net In network MSIN, the training of specified wheel number is carried out to multisample reasoning neural network MSIN;
After the training of every wheel, verifying sample is input to multisample reasoning neural network MSIN and is tested, is saved So that the smallest multisample reasoning neural network MSIN of multisample reasoning neural network MSIN whole loss functional value is as final Network;
Step (3): using the test sample of several different sample territories as multisample reasoning neural network MSIN input value, It is input in trained multisample reasoning neural network, exports sample class corresponding to test sample or test sample place Sample territory.
Sample territory refers to the sample set where sample, and different sample territories has different sample distributions.
Further, the multisample reasoning neural network, comprising: sequentially connected initiation layer, inclusion layer and end layer;
Initiation layer: for generating an equal amount of characteristic pattern, to be shared in inclusion layer, initiation layer includes convolutional layer With pond layer, convolutional layer and pond layer are connected to each other, and wherein convolutional layer is for extracting sample characteristics;Pond layer is used for characteristic pattern Carry out down-sampling;When sample is from different sample territories, each sample territory will a corresponding independent initiation layer, at the beginning of each Beginning layer is all made of the convolutional layer or pond layer of different step-lengths, and the sample of different sample territories is made to generate the characteristic pattern of same size;
Inclusion layer: network architecture VGGNets, ResNets or DenseNets extract the characteristic pattern of initiation layer With it is abstract;
End layer: including sequentially connected convolutional layer and full articulamentum, convolutional layer is connect with inclusion layer, and full articulamentum is used for Export final class probability.
Further, if step (3) output is sample class corresponding to test sample, multisample reasoning nerve The whole loss function of network, refers to:
Single sample inference network uses softmax linear convergent rate layer, and loss function, which uses, intersects entropy loss letter Number Llsoft, form are as follows:
Wherein, x [y] represents y-th of tag element of input sample x, and y ∈ [1, Z], Z are sample class sums, and C is point Class device, C (y) represent the predicted value of classifier, and N is the sum of sample;X [j] represents j-th of tag element of input sample x. EY~p (y)Expectation is asked in representative under the distribution that y is obeyed.
Directly formula (1) is improved, is applied it on MSIN, and the loss of each sample territory is weighted flat , loss function L is obtainedentro:
Wherein,K is the sum of sample territory and the sum of classifier;λ is the important journey of i-th of loss function Degree;It represents in yiExpectation is asked under the distribution of obedience;Ci(yi) classifier is represented to label yiPredicted value.
In order to increase the otherness of feature between class, the largest interval loss function L of MSINmarginAre as follows:
Wherein, oiIt is classifier CiOutput, M is largest interval value, yiIndicate i-th of element of label y;||yioi||1 It indicates to label yiO is exported with networki1 norm is sought again after taking inner product.
In order to ensure the difference between each sample territory, each classifier of MSIN adds Regularization function Lreg:
Wherein,It indicates to classifier oiExpectation is asked in the distribution obeyed;||oi-oj||2It indicates to oiWith oj's Distance seeks 2 norms;ojJ-th of output of presentation class device;
Formula (2)-(4) are weighted and averaged, the whole loss function L of MSIN is obtainedtotal:
Ltotal1Lentro2Lmargin3Lreg (5)
Wherein, β1、β2And β3Indicate the weight of corresponding loss function.
Further, if step (3) output is sample territory where test sample, multisample reasoning neural network Whole loss function, refer to:
Loss function L corresponding with sample territorydomain:
Wherein,
Wherein, DiFor i-th of sample territory classifier, MdFor largest interval value, odFor the output of some classifier of MSIN, γ indicates weight,It indicates in yiExpectation, y are asked to its expression formula under the distribution of obedienceiIndicate i-th of element of label y, ||yioi||1It indicates to label yiO is exported with networki1 norm is sought again after taking inner product.
Replace original full articulamentum softmax layers using L-Softmax layers, MSIN based on softmax layers of friendship Pitch entropy loss function LlsoftIt is changed to:
Wherein,LiRepresent the largest interval classifier of the MSIN using L-Softmax;λiIt indicates in equation (7) Each balance factor;It indicates in yiExpectation is asked under the distribution of obedience;Li(yi) indicate LiClassifier to output Value;
Obtain the whole loss function of the MSIN predicted the sample territory where sample:
Ltotal1Llsoft2Lmargin3Lreg4Ldomain (8)。
Further, the step of sample territory being expanded are as follows:
Classifier corresponding with sample territory is added in the end layer of MSIN;By the way of asynchronous training, i.e. new samples The sample in domain and the sample of original sample territory are trained simultaneously;The asynchronous training refers to: new and old sample is alternately instructed in proportion Practice, referred to as MSIN-A, in the training process, according to increased ratio is set, increases sample proportion in new samples domain by wheel.
As a second aspect of the invention, the sample classification system based on multisample reasoning neural network is provided;
Sample classification system based on multisample reasoning neural network, comprising: memory, processor and be stored in storage The computer instruction run on device and on a processor, when the computer instruction is run by processor, completes any of the above-described side Step described in method.
As the third aspect of the present invention, a kind of computer readable storage medium is provided;
A kind of computer readable storage medium, is stored thereon with computer instruction, and the computer instruction is transported by processor When row, step described in any of the above-described method is completed.
Compared with prior art, the beneficial effects of the present invention are:
Multisample inference network MSIN demonstrate neural network can in a forward process and meanwhile prediction from difference Multiple samples of sample territory, this is theoretically also the work for being worth exploring and studying.Compared to traditional single sample inference network, MSIN is carried out while being predicted in the case where hardly increasing network parameter, to multiple samples, this can not only guarantee that it has Higher precision, and calculation amount is considerably reduced by the way that network parameter is shared.This allows for MSIN under same task, can To accelerate inference speed, the consumption of hardware resource is reduced.For K sample territory, the calculation amount of network will reduce K times, this is quite In the inference speed of network is accelerated K times.
Sample territory where MSIN being made to predict sample using the largest interval loss function based on sample territory, this makes The classification of sample can not only be predicted by obtaining MSIN, but also can be predicted the sample territory corresponding to sample, to catch Catch more accurate sample information.
MSIN can well solve the classification extended problem of sample.Traditional single sample inference network is difficult to sample Classification is expanded, and MSIN only needs simply to extend its initiation layer and end layer, then uses the asynchronous side of MSIN Formula is trained, so that it may realize the expansion to sample class.MSIN after expanding sample class, not only can be extensive To new sample territory, but also it is able to maintain the generalization ability to original sample territory.
In terms of the precision of prediction for improving MSIN, other than the network for using more layers or more, it can also use Odd number classifier carries out independent prediction to the different sample channels of the same sample territory, is then voted using integrated classifier Mode carries out class prediction, not only can be further improved the precision of prediction of sample class, but also MSIN can be made for sample Each channel have more multifarious expression ability.
The different network architectures is applied into the initiation layer, inclusion layer or end layer in MSIN, can produce a large amount of MSIN Variant network, because MSIN framework is independent with the specific network architecture.For example, can make respectively in initiation layer or end layer With VGGNet, ResNet, DenseNet or PWNet, to increase network to the diversity of character representation, to further increase network Generalization Capability or robustness.In the more demanding field of the calculated performance of some pairs of networks, original single sample can be pushed away Reason network is substituted for MSIN, to reduce the calculating time of network, accelerates the inference speed of network.
In general, main contributions of the invention have:
Devise a kind of novel multisample reasoning neural network (Multi-Sample Inference Network, letter Claim MSIN), which can predict multiple samples and its corresponding sample territory simultaneously in a forward process.Due to input The network of MSIN may not come from same sample territory, and the sample inputted every time may be the combination of all possible sample territory. So predicting the sample territory where sample, so that it may be more accurately described to sample attribute, and be conducive to sample The prediction of this classification.
MSIN has greatly reused network parameter, can not only reduce the inference time of neural network, but also can reduce Consumption of the network query function to hardware resource.
MSIN can well solve classification extended problem.MSIN not only can be extensive to new sample territory well, and And it can guarantee Generalization Capability to original sample domain.
Detailed description of the invention
The accompanying drawings constituting a part of this application is used to provide further understanding of the present application, and the application's shows Meaning property embodiment and its explanation are not constituted an undue limitation on the present application for explaining the application.
Fig. 1 network architecture diagram;
Fig. 2 (a) is MSIN network architecture schematic diagram;
Fig. 2 (b) is MSIN-I network architecture schematic diagram;
Fig. 2 (c) is MSIN-F network architecture schematic diagram;
Fig. 3 (a) is training and the test process that MSIN carries out this different prediction on MNIST (M) data set;
Fig. 3 (b) is training and the test process that MSIN carries out this different prediction on CIFAR10 (C10) data set;
Fig. 3 (c) is training and the test process that MSIN carries out this different prediction on CIFAR100 (C100) data set;
Fig. 3 (d) is training and the test process that MSIN carries out this different prediction on SVHN (S) data set;
Fig. 4 (a) is MSIN in MNIST (M), Fashion-MNIST (F), CIFAR10 (C10) and CIFAR100 (C100) The training and test process of 3 sample predictions are carried out on data set;
Fig. 4 (b) is MSIN in MNIST (M), Fashion-MNIST (F), CIFAR10 (C10) and CIFAR100 (C100) The training and test process of 4 sample predictions are carried out on data set;
Fig. 5 is MSIN in MNIST (M), Fashion-MNIST (F) and CIFAR10 (C10), CIFAR100 (C100) data The test process of sample territory prediction is carried out on collection.
Specific embodiment
It is noted that following detailed description is all illustrative, it is intended to provide further instruction to the application.Unless another It indicates, all technical and scientific terms that the present invention uses have logical with the application person of an ordinary skill in the technical field The identical meanings understood.
It should be noted that term used herein above is merely to describe specific embodiment, and be not intended to restricted root According to the illustrative embodiments of the application.As used herein, unless the context clearly indicates otherwise, otherwise singular Also it is intended to include plural form, additionally, it should be understood that, when in the present specification using term "comprising" and/or " packet Include " when, indicate existing characteristics, step, operation, device, component and/or their combination.
As one embodiment of the invention, the sample classification method based on multisample reasoning neural network is provided;
Sample classification method based on multisample reasoning neural network, comprising:
Step (1): multisample reasoning neural network MSIN is established;
Step (2): using the training sample of several different sample territories as input value, it is input to multisample reasoning nerve net In network MSIN, the training of specified wheel number is carried out to multisample reasoning neural network MSIN;
After the training of every wheel, verifying sample is input to multisample reasoning neural network MSIN and is tested, is saved So that the smallest multisample reasoning neural network MSIN of multisample reasoning neural network MSIN whole loss functional value is as final Network;
Step (3): using the test sample of several different sample territories as multisample reasoning neural network MSIN input value, It is input in trained multisample reasoning neural network, exports sample class corresponding to test sample or test sample place Sample territory.
Sample territory refers to the sample set where sample, and different sample territories has different sample distributions.
Further, as shown in Figure 1, the multisample reasoning neural network, comprising: sequentially connected initiation layer is shared Layer and end layer;
Initiation layer: for generating an equal amount of characteristic pattern, to be shared in inclusion layer, initiation layer includes convolutional layer With pond layer, convolutional layer and pond layer are connected to each other, and wherein convolutional layer is for extracting sample characteristics;Pond layer is used for characteristic pattern Carry out down-sampling;When sample is from different sample territories, each sample territory will a corresponding independent initiation layer, at the beginning of each Beginning layer is all made of the convolutional layer or pond layer of different step-lengths, and the sample of different sample territories is made to generate the characteristic pattern of same size;
Inclusion layer: network architecture VGGNets, ResNets or DenseNets extract the characteristic pattern of initiation layer With it is abstract;
End layer: including sequentially connected convolutional layer and full articulamentum, convolutional layer is connect with inclusion layer, and full articulamentum is used for Export final class probability.
Further, if step (3) output is sample class corresponding to test sample, multisample reasoning nerve The whole loss function of network, refers to:
Single sample inference network uses softmax linear convergent rate layer, and loss function, which uses, intersects entropy loss letter Number Llsoft, form are as follows:
Wherein, x [y] represents y-th of tag element of input sample x, and y ∈ [1, Z], Z are sample class sums, and C is point Class device, C (y) represent the predicted value of classifier, and N is the sum of sample;X [j] represents j-th of tag element of input sample x. EY~p (y)Expectation is asked in representative under the distribution that y is obeyed.
Directly formula (1) is improved, is applied it on MSIN, and the loss of each sample territory is weighted flat , loss function L is obtainedentro:
Wherein,K is the sum of sample territory and the sum of classifier;λ is the important journey of i-th of loss function Degree;It represents in yiExpectation is asked under the distribution of obedience;Ci(yi) classifier is represented to label yiPredicted value.
In order to increase the otherness of feature between class, the largest interval loss function L of MSINmarginAre as follows:
Wherein, oiIt is classifier CiOutput, M is largest interval value, yiIndicate i-th of element of label y;||yioi||1 It indicates to label yiO is exported with networki1 norm is sought again after taking inner product.
In order to ensure the difference between each sample territory, each classifier of MSIN adds Regularization function Lreg:
Wherein,It indicates to classifier oiExpectation is asked in the distribution obeyed;||oi-oj||2It indicates to oiWith oj's Distance seeks 2 norms;ojJ-th of output of presentation class device;
Formula (2)-(4) are weighted and averaged, the whole loss function L of MSIN is obtainedtotal:
Ltotal1Lentro2Lmargin3Lreg (5)
Wherein, β1、β2And β3Indicate the weight of corresponding loss function.
Further, if step (3) output is sample territory where test sample, multisample reasoning neural network Whole loss function, refer to:
Loss function L corresponding with sample territorydomain:
Wherein,
Wherein, DiFor i-th of sample territory classifier, MdFor largest interval value, odFor the output of some classifier of MSIN, γ indicates weight,It indicates in yiExpectation, y are asked to its expression formula under the distribution of obedienceiIndicate i-th of element of label y, ||yioi||1It indicates to label yiO is exported with networki1 norm is sought again after taking inner product.
Replace original full articulamentum softmax layers using L-Softmax layers, MSIN based on softmax layers of friendship Pitch entropy loss function LlsoftIt is changed to:
Wherein,LiRepresent the largest interval classifier of the MSIN using L-Softmax;λiIt indicates in equation (7) Each balance factor;It indicates in yiExpectation is asked under the distribution of obedience;Li(yi) indicate LiClassifier to output Value;
Obtain the whole loss function of the MSIN predicted the sample territory where sample:
Ltotal1Llsoft2Lmargin3Lreg4Ldomain (8)。
Further, the step of sample territory being expanded are as follows:
Classifier corresponding with sample territory is added in the end layer of MSIN;By the way of asynchronous training, i.e. new samples The sample in domain and the sample of original sample territory are trained simultaneously;The asynchronous training refers to: new and old sample is alternately instructed in proportion Practice, referred to as MSIN-A, in the training process, according to increased ratio is set, increases sample proportion in new samples domain by wheel.
As second embodiment of the invention, the sample classification system based on multisample reasoning neural network is provided;
Sample classification system based on multisample reasoning neural network, comprising: memory, processor and be stored in storage The computer instruction run on device and on a processor, when the computer instruction is run by processor, completes any of the above-described side Step described in method.
As third embodiment of the invention, a kind of computer readable storage medium is provided;
A kind of computer readable storage medium, is stored thereon with computer instruction, and the computer instruction is transported by processor When row, step described in any of the above-described method is completed.
The variant structure of each network is shown in Fig. 2 (a), Fig. 2 (b) and Fig. 2 (c).
The performance of MSIN
1 MSIN of table carries out different originally pre- on MNIST, CIFAR10 (C10), CIFAR100 (C100) and SVHN data set The measuring accuracy of survey.
MSIN is demonstrated on MNIST, Fashion-MNIST, CIFAR10, CIFAR100 and SVHN data set respectively The performance that MSIN predicts multisample.The whole loss function of formula (5) as MSIN is selected in the experiment.Fig. 3 (a)-Fig. 3 (d) The estimated performance for two samples for being MSIN on MNIST, CIFAR10, CIFAR100 and SVHN data set, it can be found that MSIN The sample of two sample territories can be predicted well.Table 1 is the precision that MSIN carries out this different prediction on each data set, can To find that MSIN is relatively higher than the performance on single sample domain in the performance in multiple sample territories, but than being pushed away in single sample The performance managed on network is slightly lower, but population differences are little.The experiment shows in the case where network performance difference is little, MSIN can well predict multiple samples, to reduce inference time, accelerate inference speed.
Fig. 4 (a) and Fig. 4 (b) show the training and test process that MSIN simultaneously predicts 3 or 4 samples.The reality Test the whole loss function for selecting formula (8) as MSIN.It can be found that MSIN can be to the sample of more than two sample territories Classification is predicted well.
Fig. 5 show MSIN to the sample territory of MNIST, Fashion-MNIST and CIFAR10, CIFAR100 data set into The training process of row prediction.It can be seen from the figure that MSIN can well predict the sample territory of sample.In MNIST With can reach almost 100% on Fashion-MNIST data set, 92% can be reached on CIFAR10 and CIFAR100.By It is relatively fewer in the network parameter of PWNets, suitably increase network parameter, can further promote each classifier of MSIN Performance.
The foregoing is merely preferred embodiment of the present application, are not intended to limit this application, for the skill of this field For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.

Claims (8)

1. the sample classification method based on multisample reasoning neural network, characterized in that include:
Step (1): multisample reasoning neural network MSIN is established;
Step (2): using the training sample of several different sample territories as input value, it is input to multisample reasoning neural network In MSIN, the training of specified wheel number is carried out to multisample reasoning neural network MSIN;
After the training of every wheel, verifying sample is input to multisample reasoning neural network MSIN and tested, save so that The smallest multisample reasoning neural network MSIN of multisample reasoning neural network MSIN whole loss functional value is as final network;
Step (3): using the test sample of several different sample territories as multisample reasoning neural network MSIN input value, input Into trained multisample reasoning neural network, sample class corresponding to test sample or the sample where test sample are exported This domain.
2. as described in claim 1 based on the sample classification method of multisample reasoning neural network, characterized in that sample territory is Refer to the sample set where sample, different sample territories has different sample distributions.
3. as described in claim 1 based on the sample classification method of multisample reasoning neural network, characterized in that the multiplicity This reasoning neural network, comprising: sequentially connected initiation layer, inclusion layer and end layer;
Initiation layer: for generating an equal amount of characteristic pattern, to be shared in inclusion layer, initiation layer includes convolutional layer and pond Change layer, convolutional layer and pond layer are connected to each other, and wherein convolutional layer is for extracting sample characteristics;Pond layer is used to carry out characteristic pattern Down-sampling;When sample is from different sample territories, each sample territory will correspond to an independent initiation layer, each initiation layer It is all made of the convolutional layer or pond layer of different step-lengths, the sample of different sample territories is made to generate the characteristic pattern of same size;
Inclusion layer: the characteristic pattern of initiation layer is extracted and is taken out by network architecture VGGNets, ResNets or DenseNets As;
End layer: including sequentially connected convolutional layer and full articulamentum, convolutional layer is connect with inclusion layer, and full articulamentum is for exporting Final class probability.
4. as described in claim 1 based on the sample classification method of multisample reasoning neural network, characterized in that if step (3) output is sample class corresponding to test sample, then the whole loss function of multisample reasoning neural network, is referred to:
Single sample inference network uses softmax linear convergent rate layer, and loss function uses cross entropy loss function Llsoft, form are as follows:
Wherein, x [y] represents y-th of tag element of input sample x, and y ∈ [1, Z], Z are sample class sums, and C is classifier, C (y) represents the predicted value of classifier, and N is the sum of sample;X [j] represents j-th of tag element of input sample x;EY~p (y)Generation Table asks expectation under the distribution that y is obeyed;
Directly formula (1) is improved, is applied it on MSIN, and the loss of each sample territory is weighted and averaged, Obtain loss function Lentro:
Wherein,K is the sum of sample territory and the sum of classifier;λ is the significance level of i-th of loss function;It represents in yiExpectation is asked under the distribution of obedience;Ci(yi) classifier is represented to label yiPredicted value;
In order to increase the otherness of feature between class, the largest interval loss function L of MSINmarginAre as follows:
Wherein, oiIt is classifier CiOutput, M is largest interval value, yiIndicate i-th of element of label y;||yioi||1It indicates To label yiO is exported with networki1 norm is sought again after taking inner product;
In order to ensure the difference between each sample territory, each classifier of MSIN adds Regularization function Lreg:
Wherein,It indicates to classifier oiExpectation is asked in the distribution obeyed;||oi-oj||2It indicates to oiWith ojDistance Seek 2 norms;ojJ-th of output of presentation class device;
Formula (2)-(4) are weighted and averaged, the whole loss function L of MSIN is obtainedtotal:
Ltotal1Lentro2Lmargin3Lreg (5)
Wherein, β1、β2And β3Indicate the weight of corresponding loss function.
5. as described in claim 1 based on the sample classification method of multisample reasoning neural network, characterized in that if step (3) what is exported is the sample territory where test sample, then the whole loss function of multisample reasoning neural network, is referred to:
Loss function L corresponding with sample territorydomain:
Wherein,
Wherein, DiFor i-th of sample territory classifier, MdFor largest interval value, odFor the output of some classifier of MSIN, γ table Show weight,It indicates in yiExpectation, y are asked to its expression formula under the distribution of obedienceiIndicate i-th of element of label y, | | yioi||1It indicates to label yiO is exported with networki1 norm is sought again after taking inner product;
Replace original full articulamentum softmax layers using L-Softmax layers, MSIN based on softmax layers of cross entropy Loss function LlsoftIt is changed to:
Wherein,LiRepresent the largest interval classifier of the MSIN using L-Softmax;λiIndicate each in equation (7) The balance factor of item;It indicates in yiExpectation is asked under the distribution of obedience;Li(yi) indicate LiClassifier to output valve;
Obtain the whole loss function of the MSIN predicted the sample territory where sample:
Ltotal1Llsoft2Lmargin3Lreg4Ldomain (8)。
6. as described in claim 1 based on the sample classification method of multisample reasoning neural network, characterized in that sample territory The step of being expanded are as follows:
Classifier corresponding with sample territory is added in the end layer of MSIN;By the way of asynchronous training, i.e. new samples domain Sample and the sample of original sample territory are trained simultaneously;The asynchronous training refers to: new and old sample is alternately trained in proportion, is claimed According to increased ratio is set, increase sample proportion in new samples domain by wheel in the training process for MSIN-A.
7. the sample classification system based on multisample reasoning neural network, characterized in that include: memory, processor and deposit The computer instruction run on a memory and on a processor is stored up, when the computer instruction is run by processor, in completion State step described in any one of claim 1-6 method.
8. a kind of computer readable storage medium, characterized in that be stored thereon with computer instruction, the computer instruction is located When managing device operation, step described in any one of the claims 1-6 method is completed.
CN201811068190.5A 2018-09-13 2018-09-13 Sample classification method, system and medium based on multisample reasoning neural network Pending CN109376763A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811068190.5A CN109376763A (en) 2018-09-13 2018-09-13 Sample classification method, system and medium based on multisample reasoning neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811068190.5A CN109376763A (en) 2018-09-13 2018-09-13 Sample classification method, system and medium based on multisample reasoning neural network

Publications (1)

Publication Number Publication Date
CN109376763A true CN109376763A (en) 2019-02-22

Family

ID=65405544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811068190.5A Pending CN109376763A (en) 2018-09-13 2018-09-13 Sample classification method, system and medium based on multisample reasoning neural network

Country Status (1)

Country Link
CN (1) CN109376763A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109905880A (en) * 2019-03-22 2019-06-18 苏州浪潮智能科技有限公司 A kind of network partitioning method, system and electronic equipment and storage medium
CN110135371A (en) * 2019-05-20 2019-08-16 华南农业大学 A kind of Citrus Huanglongbing pathogen recognition methods and device based on Mixup algorithm
CN112836820A (en) * 2021-01-31 2021-05-25 云知声智能科技股份有限公司 Deep convolutional network training method, device and system for image classification task
CN113169989A (en) * 2019-12-31 2021-07-23 华为技术有限公司 Device and method for realizing data synchronization in neural network inference
CN114332500A (en) * 2021-09-14 2022-04-12 腾讯科技(深圳)有限公司 Image processing model training method and device, computer equipment and storage medium
US11816565B2 (en) 2019-10-16 2023-11-14 Apple Inc. Semantic coherence analysis of deep neural networks

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109905880A (en) * 2019-03-22 2019-06-18 苏州浪潮智能科技有限公司 A kind of network partitioning method, system and electronic equipment and storage medium
CN109905880B (en) * 2019-03-22 2020-05-29 苏州浪潮智能科技有限公司 Network partitioning method, system, electronic device and storage medium
CN110135371A (en) * 2019-05-20 2019-08-16 华南农业大学 A kind of Citrus Huanglongbing pathogen recognition methods and device based on Mixup algorithm
US11816565B2 (en) 2019-10-16 2023-11-14 Apple Inc. Semantic coherence analysis of deep neural networks
CN113169989A (en) * 2019-12-31 2021-07-23 华为技术有限公司 Device and method for realizing data synchronization in neural network inference
CN112836820A (en) * 2021-01-31 2021-05-25 云知声智能科技股份有限公司 Deep convolutional network training method, device and system for image classification task
CN112836820B (en) * 2021-01-31 2023-12-19 云知声智能科技股份有限公司 Deep convolution network training method, device and system for image classification task
CN114332500A (en) * 2021-09-14 2022-04-12 腾讯科技(深圳)有限公司 Image processing model training method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109376763A (en) Sample classification method, system and medium based on multisample reasoning neural network
CN109344736B (en) Static image crowd counting method based on joint learning
Kannojia et al. Effects of varying resolution on performance of CNN based image classification: An experimental study
CN108984745A (en) A kind of neural network file classification method merging more knowledge mappings
CN109871830A (en) Spatial-spectral fusion hyperspectral image classification method based on three-dimensional depth residual error network
CN104933428B (en) A kind of face identification method and device based on tensor description
CN110263822B (en) Image emotion analysis method based on multi-task learning mode
CN109767312A (en) A kind of training of credit evaluation model, appraisal procedure and device
CN108596243A (en) The eye movement for watching figure and condition random field attentively based on classification watches figure prediction technique attentively
CN110110372B (en) Automatic segmentation prediction method for user time sequence behavior
CN105989336A (en) Scene identification method based on deconvolution deep network learning with weight
CN109448703A (en) In conjunction with the audio scene recognition method and system of deep neural network and topic model
CN114332545B (en) Image data classification method and device based on low-bit pulse neural network
CN107506792A (en) A kind of semi-supervised notable method for checking object
CN109978074A (en) Image aesthetic feeling and emotion joint classification method and system based on depth multi-task learning
CN108664986A (en) Based on lpThe multi-task learning image classification method and system of norm regularization
Chen et al. Assessing the effects of convolutional neural network architectural factors on model performance for remote sensing image classification: An in-depth investigation
CN114330516A (en) Small sample logo image classification based on multi-graph guided neural network model
CN110096991A (en) A kind of sign Language Recognition Method based on convolutional neural networks
Chen et al. SA-SinGAN: self-attention for single-image generation adversarial networks
CN104573726B (en) Facial image recognition method based on the quartering and each ingredient reconstructed error optimum combination
CN110082822A (en) The method for carrying out earthquake detection using convolutional neural networks
CN113408418A (en) Calligraphy font and character content synchronous identification method and system
Qiao et al. LiteSCANet: An efficient lightweight network based on spectral and channel-wise attention for hyperspectral image classification
CN116758477A (en) Kitchen personnel dressing detection method based on improved YOLOv7 model

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190222

RJ01 Rejection of invention patent application after publication