CN112199295A - Deep neural network defect positioning method and system based on frequency spectrum - Google Patents

Deep neural network defect positioning method and system based on frequency spectrum Download PDF

Info

Publication number
CN112199295A
CN112199295A CN202011180145.6A CN202011180145A CN112199295A CN 112199295 A CN112199295 A CN 112199295A CN 202011180145 A CN202011180145 A CN 202011180145A CN 112199295 A CN112199295 A CN 112199295A
Authority
CN
China
Prior art keywords
test case
neural network
deep neural
neurons
network model
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.)
Granted
Application number
CN202011180145.6A
Other languages
Chinese (zh)
Other versions
CN112199295B (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.)
Beijing Qianyu Technology Co.,Ltd.
Original Assignee
Beijing Information Science and Technology 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 Beijing Information Science and Technology University filed Critical Beijing Information Science and Technology University
Priority to CN202011180145.6A priority Critical patent/CN112199295B/en
Publication of CN112199295A publication Critical patent/CN112199295A/en
Application granted granted Critical
Publication of CN112199295B publication Critical patent/CN112199295B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/061Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using biological neurons, e.g. biological neurons connected to an integrated circuit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Physics & Mathematics (AREA)
  • Molecular Biology (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Neurology (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Magnetic Resonance Imaging Apparatus (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses a deep neural network defect positioning method based on frequency spectrum, belonging to the technical field of software testing and comprising the following steps: 1. acquiring a correct test case and an incorrect test case, 2, acquiring frequency spectrum information of a deep neural network model to be tested, 3, calculating the suspicion degree of the neurons, and sequencing the neurons according to the suspicion degree. The invention quantifies the neurons in the deep neural network according to the operation output and classification result of the deep neural network to the test set, then calculates the suspicion degree by using a suspicion degree formula, ranks the suspicion degree and locates the position which is most likely to be the defect. The method and the system combine the output of the neuron with the operation result of the test data, can embody the visual use value of the defect in the deep neural network model, and can more accurately and quickly locate the specific position of the defect of the deep neural network model.

Description

Deep neural network defect positioning method and system based on frequency spectrum
Technical Field
The invention relates to the technical field of software testing, in particular to a deep neural network defect positioning method and system based on frequency spectrum.
Background
The deep neural network is used as a method for machine learning, the performance of the deep neural network on many tasks reaches or even exceeds the human level, such as image classification, voice recognition, malicious software detection and the like, the deep neural network is widely applied, and important decisions can be made instead of people in many scenes. However, all software inevitably contains defects, and deep neural networks are no exception. In safety critical systems such as autonomous vehicles and medical image analysis, very serious consequences can result if the decisions made by the deep neural network are wrong. For example: serious accidents happen to the unmanned Uber automobile in the night test process, so that one pedestrian dies; the faceID of the apple cell phone can be cracked by using a 3D printed face picture. Therefore, how to detect and locate the defects in the deep neural network to ensure the quality of the deep neural network becomes a hot research problem in the cross field of software engineering and artificial intelligence.
At present, the defect detection technology suitable for the deep neural network is widely concerned, for example, if the deep neural network is tested by using metamorphic testing, the defect of the deep neural network can be detected by comparing whether the data classification before and after metamorphosis is consistent; in addition, there are some methods related to the neuron coverage criterion, which use different methods to improve the coverage of neurons, and can detect defects existing in the deep neural network according to the coverage-guided test. After the defects in the neural network are successfully detected, the location of the defects should be located so as to repair the defects. However, the above-mentioned work cannot locate the position of the specific defect, and cannot detect that the specific structure in the deep neural network has defects, such as: too many or too few layers, incorrect activation functions, etc.
A deep neural network is a black box that can model any one continuous function using simple functions in a large number of neurons. From this point of view, the defect of the deep neural network is difficult to locate, because we cannot exactly find out what effect a certain neuron, a certain structure or a certain activation function has on the result of the neural network. Under the condition, how to quantitatively analyze the effect of the deep neural network results becomes a problem which needs to be solved urgently.
The goal of software defect localization is to identify program elements associated with software defects, which can help program developers to find locations in a program that need repair more quickly and accurately, thereby improving the reliability of the program. Early defect localization was manual, but locating defects by manual debugging was not only time consuming but also difficult. In a conventional software defect localization method, a spectrum-based defect localization method evaluates each program entity by acquiring coverage information of the program. The program spectrum mainly refers to the coverage information about program statements generated in the program execution process and the information whether the execution passes or not. In the process of testing the program by using the test set, program spectrum information needs to be collected, and finally the spectrum information is substituted into a suspicion degree formula to obtain the suspicion degree corresponding to the program entity, wherein the higher the suspicion degree is, the more possible the program entity has defects. The thought is applied to a deep neural network, and a deep neural network defect positioning method and a deep neural network defect positioning system based on frequency spectrum are provided so as to position the defects of the deep neural network on the level of neurons. The method and the system quantize the neurons in the deep neural network according to the operation output and classification result of the deep neural network on the test set, then calculate the suspicion degree of the neurons by using a suspicion degree formula, rank the neurons and position the neurons to the position which is most likely to be a defect.
Disclosure of Invention
The invention aims to provide a deep neural network defect positioning method and system based on frequency spectrum, which realize the defect positioning of a deep neural network and embody the intuitive use value of defects in a deep neural network model.
The technical scheme adopted by the invention is as follows: a deep neural network defect positioning method based on frequency spectrum specifically comprises the following steps:
acquiring a correct test case and an error test case: using test case set T ═ T1,t2,t3,. operating the deep neural network model D to be tested, distinguishing a correct test case from an incorrect test case, and acquiring the test case set T ═ T }1,t2,t3,.. } corresponding operation information set R ═ R1,r2,r3,...};
Acquiring frequency spectrum information of a deep neural network model to be detected: using the test case set T ═ { T ═ T1,t2,t3,., operating the deep neural network model D to be tested to obtain the output result of each neuron; according to the running information set R ═ { R ═ R1,r2,r3,., obtaining frequency spectrum information M (M) of all neurons in the deep neural network model D to be tested by the output result1,m2,m3,...};
Calculating the suspicion degree of the neurons, and sequencing the neurons according to the suspicion degree: according to the suspicion degree formula and the spectrum information M ═ { M ═ M1,m2,m3,., calculating the suspicion degree of all neurons, and sorting the neurons from high to low according to the suspicion degree, wherein the probability of the defects of the neurons which are sorted in the front is higher.
Further, the acquiring of the correct test case and the incorrect test case includes the following specific steps:
s11 inputting the deep neural network model D to be tested and the test case set T ═ T1,t2,t3,...};
s12 selects the test case set T ═ T1,t2,t3,.. } one test case tiOperating the deep neural network model D to be tested to obtain the test case tiRun result of (A) Oi
s13 according to the operation result OiJudging the test case tiWhether the test case is a correct test case or an error test case and recording the test case tiIs running information riIf said test is carried outUse case tiRecording the running information r for correct test case i1 is ═ 1; if the test case tiRecording the running information r for the error test casei=0;
s14 repeatedly executes s12 and s13 until the test case set T ═ T1,t2,t3,., completing the operation of all test cases in the test case set, and obtaining the test case set T ═ T }1,t2,t3,.. } the set of operating information R ═ R1,r2,r3,...};
s15 traversing the test case set T ═ T1,t2,t3,.. } the set of operating information R ═ R1,r2,r3,., counting the total number n of correct test casespAnd total number n of error test casesf
s16 outputting the test case set T ═ T1,t2,t3,.. } the operation information R ═ R1,r2,r3,...}。
Further, the acquiring of the frequency spectrum information of the deep neural network model to be measured includes the following specific steps:
s21 inputting the deep neural network model D to be tested and the test case set T ═ T1,t2,t3,.. } and the test case set T ═ T1,t2,t3,.. } the operation information R ═ R1,r2,r3,., wherein N ═ N1,n2,n3,., taking all the neuron sets in the deep neural network model D to be tested;
s22 selects the test case set T ═ T1,t2,t3,.. } one test case tiRunning a deep neural network model D to be tested to obtain the test case tiIndividual neurons n during runtimejOutput f of e Nnj(ti) And stored in a file;
s23 repeats s22 until the test case set T ═ T1,t2,t3,.. } inCompleting the operation of all test cases;
s24 selecting a neuron njTraversing the test case set T ═ T corresponding to the test case set1,t2,t3,.. } output fnj(T) if said set of operational information R ═ R1,r2,r3,.. } corresponding r i1, then the neuron njIs accumulated as a use case contribution value to the neuron njThe successful contribution of (c); if the running information R is { R ═ R1,r2,r3,.. } corresponding riWhen the number is 0, the neuron n is defined asjIs accumulated as a use case contribution value to the neuron njAnd recording the final result as the neuron njSpectrum information m ofj={nef(nj),nep(nj) In which n isef(nj) Is the neuron njOf the failure contribution of nep(nj) Is the neuron njThe successful contribution of (c);
s25 repeats s24 until the neuron set N ═ N is analyzed1,n2,n3,.. };
s26 outputting the spectrum information M ═ M { M } of all neurons in the deep neural network model D to be tested1,m2,m3,...}。
Further, the calculating the suspicion degree of the neurons and sorting the neurons according to the suspicion degree comprises the following specific steps:
s31 inputting the spectrum information M ═ { M ═ of all neurons in the deep neural network model D to be tested1,m2,m3,...};
s32 obtaining the neuron njCorresponding spectral information mj={nef(nj),nep(nj) Substituting the calculated result into formula (1) to calculate the neuron njCorresponding suspicion degree aj
Figure BDA0002749889110000041
s33 repeats s32 until the set of neurons N ═ N is calculated1,n2,n3,.. doubtful degree of all neurons in A ═ a }1,a2,a3,...};
s34, respectively carrying out normalization processing on the neurons belonging to different layers of the deep neural network model D to be tested to obtain a new suspicion degree A';
s35, arranging all the suspicions in the new suspicion degree A' in a descending order, wherein the probability that the neuron corresponding to the suspicion degree which is ranked more front is higher to have a defect is higher;
s36 outputs the final positioning result.
A system for spectrum-based deep neural network defect localization, comprising:
a first data input module for inputting test case set T ═ T1,t2,t3,., and a deep neural network model D to be tested, and using the test case set T ═ T1,t2,t3,.. } operating the depth neural network model D to be detected;
the test case judgment module judges a correct test case and an incorrect test case and acquires an operation information set R ═ { R ═ R corresponding to the test case set T1,r2,r3,...};
A spectrum information obtaining module, configured to use the test case set T ═ T1,t2,t3,., operating the deep neural network model D to be tested to obtain the output result of each neuron; according to the running information set R ═ { R ═ R1,r2,r3,., obtaining frequency spectrum information M (M) of all neurons in the deep neural network model D to be tested by the output result1,m2,m3,...};
And the suspicion degree calculation module is used for calculating the suspicion degree of the neurons, sequencing the neurons according to the suspicion degree and determining the defect probability according to the sequencing result.
Compared with the prior art, the method and the system for positioning the defects of the deep neural network based on the frequency spectrum have the advantages that the neurons in the deep neural network are quantized according to the operation output and classification results of the deep neural network on the test set, the suspicion degree of the neurons is calculated by using a suspicion degree formula and ranked, the positions where the defects are most likely to be the defects can be positioned, and the intuitively used values of the defects in the deep neural network model are reflected. The method has universality and can be used for all deep neural network models.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for locating a defect in a deep neural network based on frequency spectrum;
FIG. 2 is a flow diagram of a method of obtaining correct and incorrect test cases;
FIG. 3 is a flowchart of a method for obtaining spectral information of a deep neural network model to be measured;
FIG. 4 is a flow chart of a method of suspicion calculation and ranking.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention discloses a deep neural network defect positioning method based on frequency spectrum, which specifically comprises the following steps as shown in figure 1:
acquiring a correct test case and an error test case: using test case set T ═ T1,t2,t3,., operating the deep neural network model D to be tested, distinguishing a correct test case from an incorrect test case, and acquiring a test case set T ═ T }1,t2,t3,.. } corresponding operation information set R ═ R1,r2,r3,...};
Acquiring frequency spectrum information of a deep neural network model to be detected: using test case set T ═ T1,t2,t3,., operating a deep neural network model D to be tested to obtain an output result of each neuron; according to the running information set R ═ R1,r2,r3,., obtaining the frequency spectrum information M of all neurons in the depth neural network model D to be tested by the output result and the output result1,m2,m3,...};
Calculating the suspicion degree of the neurons, and sequencing the neurons according to the suspicion degree: according to the suspicion formula and the spectrum information M ═ { M ═ M }1,m2,m3,., calculating the suspicion degree of all neurons, and sorting the neurons from high to low according to the suspicion degree, wherein the probability of the defects of the neurons which are sorted in the front is higher.
Further, as shown in fig. 2, the obtaining of the correct test case and the incorrect test case includes the following specific steps:
s11 inputting the deep neural network model D to be tested and the test case set T ═ T1,t2,t3,...};
s12 selecting test case set T ═ T1,t2,t3,.. } one test case tiRunning the deep neural network model D to be tested to obtain a test case tiRun result of (A) Oi
s13 according to operation result OiJudging test case tiWhether the test case is a correct test case or an error test case, and recording the test case tiIs running information riIf test case tiTo correctly test cases, the operation is recordedInformation r i1 is ═ 1; if test case tiFor the wrong test case, the running information r is recordedi=0;
s14 repeatedly executes s12 and s13 until the test case set T ═ T1,t2,t3,., completing the operation of all test cases in the test case set, and obtaining a test case set T ═ T }1,t2,t3,.. } operation information set R ═ R1,r2,r3,...};
s15 traversal test case set T ═ T1,t2,t3,.. } operation information set R ═ R1,r2,r3,., counting the total number n of correct test casespAnd total number n of error test casesf
s16 output test case set T ═ T1,t2,t3,.. } operation information R ═ R1,r2,r3,...}。
Preferably, in this embodiment, the metamorphic relation is used to determine correctness and errors of the test case, and if the output of the test case and the label thereof conform to the metamorphic relation, the test case is correctly predicted and recorded as a correct test case, and otherwise, the test case is a prediction error and recorded as an incorrect test case.
Further, as shown in fig. 3, the obtaining of the frequency spectrum information of the deep neural network model to be measured includes the following specific steps:
s21 inputting the deep neural network model D to be tested and the test case set T ═ T1,t2,t3,.. } and test case set T ═ T1,t2,t3,.. } operation information R ═ R1,r2,r3,., wherein N ═ N1,n2,n3,., taking all neuron sets in the deep neural network model D to be tested;
s22 selecting test case set T ═ T1,t2,t3,.. } one test case tiRunning the deep neural network model D to be tested to obtain a test case tiIndividual neurons n during runtimejOutput f of e Nnj(ti) And stored in a file;
s23 repeats s22 until the test case set T ═ T1,t2,t3,.. } all test cases are completely operated;
s24 selecting a neuron njTraversing its corresponding test case set T ═ T1,t2,t3,.. } output fnj(T) if the run information set R ═ R1,r2,r3,.. } corresponding riWhen 1, the neuron njIs accumulated as a use case contribution value to neuron njThe successful contribution of (c); if the running information R is ═ R1,r2,r3,.. } corresponding riWhen the number is 0, the neuron n is definedjIs accumulated as a use case contribution value to neuron njAnd recording the final result as neuron njSpectrum information m ofj={nef(nj),nep(nj) In which n isef(nj) Is a neuron njOf the failure contribution of nep(nj) Is a neuron njThe successful contribution of (c);
s25 repeats s24 until the neuron set N is analyzed1,n2,n3,.. };
s26 outputting the spectrum information M ═ M of all neurons in the deep neural network model D to be tested1,m2,m3,...}。
Further, as shown in fig. 4, the calculating the suspicion degree of the neurons and sorting the neurons according to the suspicion degree includes the following specific steps:
s31 inputting the spectrum information M of all neurons in the deep neural network model D to be tested { M ═ M }1,m2,m3,...};
s32 obtaining neuron njCorresponding spectral information mj={nef(nj),nep(nj) Substituting the obtained values into a formula (1) to obtain the neuron njCorresponding suspicion degree aj
Figure BDA0002749889110000081
s33 repeats s32 until the set of neurons N ═ N is calculated1,n2,n3,.. doubtful degree of all neurons in A ═ a }1,a2,a3,...};
s34, respectively carrying out normalization processing on the neurons belonging to different layers of the deep neural network model D to be detected to obtain a new suspicion degree A';
s35, arranging all suspicions in the new suspicion degree A' in a descending order, wherein the probability that the neuron corresponding to the suspicion degree which is ranked more front is defective is higher;
s36 outputs the final positioning result.
A system for spectrum-based deep neural network defect localization, comprising:
a first data input module for inputting test case set T ═ T1,t2,t3,., and a deep neural network model D to be tested, and using a test case set T ═ T }1,t2,t3,. } operating the depth neural network model D to be tested;
the test case judgment module judges a correct test case and an incorrect test case and acquires an operation information set R ═ { R ═ R corresponding to the test case set T1,r2,r3,...};
A spectrum information acquisition module for using the test case set T ═ T1,t2,t3,., operating a deep neural network model D to be tested to obtain an output result of each neuron; according to the running information set R ═ R1,r2,r3,., obtaining the frequency spectrum information M of all neurons in the depth neural network model D to be tested by the output result and the output result1,m2,m3,...};
And the suspicion degree calculation module is used for calculating the suspicion degree of the neurons, sequencing the neurons according to the suspicion degree and determining the defect probability according to the sequencing result.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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 (5)

1. A deep neural network defect positioning method based on frequency spectrum is characterized by comprising the following steps:
acquiring a correct test case and an error test case: using test case set T ═ T1,t2,t3,. operating the deep neural network model D to be tested, distinguishing a correct test case from an incorrect test case, and acquiring the test case set T ═ T }1,t2,t3,.. } corresponding operation information set R ═ R1,r2,r3,...};
Acquiring frequency spectrum information of a deep neural network model to be detected: using the test case set T ═ { T ═ T1,t2,t3,., operating the deep neural network model D to be tested to obtain the output result of each neuron; according to the running information set R ═ { R ═ R1,r2,r3,., obtaining frequency spectrum information M (M) of all neurons in the deep neural network model D to be tested by the output result1,m2,m3,...};
Calculating the suspicion degree of the neurons, and sequencing the neurons according to the suspicion degree: root of herbaceous plantAccording to the suspicion formula and the spectrum information M ═ { M ═ M1,m2,m3,., calculating the suspicion degree of all neurons, and sorting the neurons from high to low according to the suspicion degree, wherein the probability of the defects of the neurons which are sorted in the front is higher.
2. The method for deep neural network defect location based on frequency spectrum according to claim 1, wherein the obtaining of correct test cases and error test cases comprises the following steps:
s11 inputting the deep neural network model D to be tested and the test case set T ═ T1,t2,t3,...};
s12 selects the test case set T ═ T1,t2,t3,.. } one test case tiOperating the deep neural network model D to be tested to obtain the test case tiRun result of (A) Oi
s13 according to the operation result OiJudging the test case tiWhether the test case is a correct test case or an error test case and recording the test case tiIs running information riIf the test case t isiRecording the running information r for correct test casei1 is ═ 1; if the test case tiRecording the running information r for the error test casei=0;
s14 repeatedly executes s12 and s13 until the test case set T ═ T1,t2,t3,., completing the operation of all test cases in the test case set, and obtaining the test case set T ═ T }1,t2,t3,.. } the set of operating information R ═ R1,r2,r3,...};
s15 traversing the test case set T ═ T1,t2,t3,.. } the set of operating information R ═ R1,r2,r3,., counting the total number n of correct test casespAnd total number n of error test casesf
s16 outputting theTest case set T ═ T1,t2,t3,.. } the operation information R ═ R1,r2,r3,...}。
3. The method for locating the defect of the deep neural network based on the frequency spectrum as claimed in claim 2, wherein the step of obtaining the frequency spectrum information of the deep neural network model to be tested comprises the following specific steps:
s21 inputting the deep neural network model D to be tested and the test case set T ═ T1,t2,t3,.. } and the test case set T ═ T1,t2,t3,.. } the operation information R ═ R1,r2,r3,., wherein N ═ N1,n2,n3,., taking all the neuron sets in the deep neural network model D to be tested;
s22 selects the test case set T ═ T1,t2,t3,.. } one test case tiRunning a deep neural network model D to be tested to obtain the test case tiIndividual neurons n during runtimejOutput f of e Nnj(ti) And stored in a file;
s23 repeats s22 until the test case set T ═ T1,t2,t3,.. } all test cases are completely operated;
s24 selecting a neuron njTraversing the test case set T ═ T corresponding to the test case set1,t2,t3,.. } output fnj(T) if said set of operational information R ═ R1,r2,r3,.. } corresponding ri1, then the neuron njIs accumulated as a use case contribution value to the neuron njThe successful contribution of (c); if the running information R is { R ═ R1,r2,r3,.. } corresponding riWhen the number is 0, the neuron n is defined asjIs accumulated as a use case contribution value to the neuron njAnd recording the final result as the neuron njSpectrum information m ofj={nef(nj),nep(nj) In which n isef(nj) Is the neuron njOf the failure contribution of nep(nj) Is the neuron njThe successful contribution of (c);
s25 repeats s24 until the neuron set N ═ N is analyzed1,n2,n3,.. };
s26 outputting the spectrum information M ═ M { M } of all neurons in the deep neural network model D to be tested1,m2,m3,...}。
4. The method for locating the defect of the deep neural network based on the frequency spectrum as claimed in claim 3, wherein the step of calculating the suspicion degree of the neurons and sorting the neurons according to the suspicion degree comprises the following specific steps:
s31 inputting the spectrum information M ═ { M ═ of all neurons in the deep neural network model D to be tested1,m2,m3,...};
s32 obtaining the neuron njCorresponding spectral information mj={nef(nj),nep(nj) Substituting the calculated result into formula (1) to calculate the neuron njCorresponding suspicion degree aj
Figure FDA0002749889100000031
s33 repeats s32 until the set of neurons N ═ N is calculated1,n2,n3,.. doubtful degree of all neurons in A ═ a }1,a2,a3,...};
s34, respectively carrying out normalization processing on the neurons belonging to different layers of the deep neural network model D to be tested to obtain a new suspicion degree A';
s35, arranging all the suspicions in the new suspicion degree A' in a descending order, wherein the probability that the neuron corresponding to the suspicion degree which is ranked more front is higher to have a defect is higher;
s36 outputs the final positioning result.
5. A system for locating a defect in a deep neural network based on frequency spectrum, comprising:
a first data input module for inputting test case set T ═ T1,t2,t3,., and a deep neural network model D to be tested, and using the test case set T ═ T1,t2,t3,.. } operating the depth neural network model D to be detected;
the test case judgment module judges a correct test case and an incorrect test case and acquires an operation information set R ═ { R ═ R corresponding to the test case set T1,r2,r3,...};
A spectrum information obtaining module, configured to use the test case set T ═ T1,t2,t3,., operating the deep neural network model D to be tested to obtain the output result of each neuron; according to the running information set R ═ { R ═ R1,r2,r3,., obtaining frequency spectrum information M (M) of all neurons in the deep neural network model D to be tested by the output result1,m2,m3,...};
And the suspicion degree calculation module is used for calculating the suspicion degree of the neurons, sequencing the neurons according to the suspicion degree and determining the defect probability according to the sequencing result.
CN202011180145.6A 2020-10-29 2020-10-29 Spectrum-based deep neural network defect positioning method and system Active CN112199295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011180145.6A CN112199295B (en) 2020-10-29 2020-10-29 Spectrum-based deep neural network defect positioning method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011180145.6A CN112199295B (en) 2020-10-29 2020-10-29 Spectrum-based deep neural network defect positioning method and system

Publications (2)

Publication Number Publication Date
CN112199295A true CN112199295A (en) 2021-01-08
CN112199295B CN112199295B (en) 2023-05-05

Family

ID=74011895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011180145.6A Active CN112199295B (en) 2020-10-29 2020-10-29 Spectrum-based deep neural network defect positioning method and system

Country Status (1)

Country Link
CN (1) CN112199295B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988566A (en) * 2021-01-25 2021-06-18 杭州衣科云科技有限公司 Method and device for improving test coverage, computer equipment and storage medium
CN113568831A (en) * 2021-07-27 2021-10-29 重庆大学 Self-supervision deep learning type defect positioning method based on metamorphic test

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766259A (en) * 2018-12-03 2019-05-17 北京信息科技大学 A kind of classifier test method and system based on compound transformation relationship
CN110110854A (en) * 2019-04-01 2019-08-09 南京邮电大学 A method of the deep neural network testing adequacy based on side state
CN110376522A (en) * 2019-09-03 2019-10-25 宁夏西北骏马电机制造股份有限公司 A kind of Method of Motor Fault Diagnosis of the deep learning network of data fusion
CN111160167A (en) * 2019-12-18 2020-05-15 北京信息科技大学 Spindle fault classification and identification method based on S-transform deep convolutional neural network
CN111353599A (en) * 2018-12-20 2020-06-30 通用汽车环球科技运作有限责任公司 Correctness preserving optimization for deep neural networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766259A (en) * 2018-12-03 2019-05-17 北京信息科技大学 A kind of classifier test method and system based on compound transformation relationship
CN111353599A (en) * 2018-12-20 2020-06-30 通用汽车环球科技运作有限责任公司 Correctness preserving optimization for deep neural networks
CN110110854A (en) * 2019-04-01 2019-08-09 南京邮电大学 A method of the deep neural network testing adequacy based on side state
CN110376522A (en) * 2019-09-03 2019-10-25 宁夏西北骏马电机制造股份有限公司 A kind of Method of Motor Fault Diagnosis of the deep learning network of data fusion
CN111160167A (en) * 2019-12-18 2020-05-15 北京信息科技大学 Spindle fault classification and identification method based on S-transform deep convolutional neural network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HASAN FERIT ENISER等: "DeepFault: Fault Localization for Deep Neural Networks", 《FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING》 *
吴迪等: "《基于显著性检测和迁移学习的花卉图像分类》", 北京信息科技大学学报(自然科学版) *
赵芳等: "《基于神经网络的面向函数调用路径的错误定位》", 计算机仿真 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988566A (en) * 2021-01-25 2021-06-18 杭州衣科云科技有限公司 Method and device for improving test coverage, computer equipment and storage medium
CN112988566B (en) * 2021-01-25 2024-01-02 杭州衣科信息技术股份有限公司 Test coverage rate improving method and device, computer equipment and storage medium
CN113568831A (en) * 2021-07-27 2021-10-29 重庆大学 Self-supervision deep learning type defect positioning method based on metamorphic test
CN113568831B (en) * 2021-07-27 2023-07-04 重庆大学 Self-supervision deep learning type defect positioning method based on metamorphic test

Also Published As

Publication number Publication date
CN112199295B (en) 2023-05-05

Similar Documents

Publication Publication Date Title
US8868985B2 (en) Supervised fault learning using rule-generated samples for machine condition monitoring
WO2021179574A1 (en) Root cause localization method, device, computer apparatus, and storage medium
CN111079818A (en) Railway wagon coupler joist breakage detection method
CN109188502B (en) Beam position monitor abnormity detection method and device based on self-encoder
CN112199295A (en) Deep neural network defect positioning method and system based on frequency spectrum
CN113010389A (en) Training method, fault prediction method, related device and equipment
CN111343147A (en) Network attack detection device and method based on deep learning
CN101738998A (en) System and method for monitoring industrial process based on local discriminatory analysis
CN114741369A (en) System log detection method of graph network based on self-attention mechanism
CN113242213B (en) Power communication backbone network node vulnerability diagnosis method
CN113822336A (en) Cloud hard disk fault prediction method, device and system and readable storage medium
CN117591986A (en) Real-time automobile data processing method based on artificial intelligence
JP2019158684A (en) Inspection system, identification system, and discriminator evaluation device
Yatbaz et al. Introspection of 2d object detection using processed neural activation patterns in automated driving systems
CN115904955A (en) Performance index diagnosis method and device, terminal equipment and storage medium
CN114565883A (en) Graphic recognition algorithm for operation faults of equipment
CN111160454B (en) Quick change signal detection method and device
CN116453437B (en) Display screen module testing method, device, equipment and storage medium
CN117874643B (en) Rotor fault Bayesian network diagnosis method and system based on small data set
CN117654907B (en) Automatic eliminating method and system for strip detector
CN117007977B (en) Energy storage battery health state diagnosis method
CN116224010A (en) Intermittent service life test system
CN117475602A (en) Safety monitoring method and device of charging station, safety monitoring system and charging station
CN118230929A (en) Medical instrument anomaly monitoring method and system based on data analysis
Wu et al. Estimate the Precision of Defects Based on Reports Duplication in Crowdsourced Testing

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
TR01 Transfer of patent right

Effective date of registration: 20240304

Address after: 100080 Pingfang 05, Building 22, South Xindu East Station, Qinghe Xisanqi, Haidian District, Beijing

Patentee after: Beijing Language Union International Information Technology Co.,Ltd.

Country or region after: China

Address before: 100192 Beijing city Haidian District Qinghe small Camp Road No. 12

Patentee before: BEIJING INFORMATION SCIENCE AND TECHNOLOGY University

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240403

Address after: No. 1503, Building 2, Courtyard 7, Lianbao Road, Haidian District, Beijing, 100000

Patentee after: Zang Manli

Country or region after: China

Address before: 100080 Pingfang 05, Building 22, South Xindu East Station, Qinghe Xisanqi, Haidian District, Beijing

Patentee before: Beijing Language Union International Information Technology Co.,Ltd.

Country or region before: China

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240418

Address after: Room 201-05, 2nd Floor, Building 2, No.1 and No.3 Qinglonghutong A, Dongcheng District, Beijing, 100000

Patentee after: Beijing Qianyu Technology Co.,Ltd.

Country or region after: China

Address before: No. 1503, Building 2, Courtyard 7, Lianbao Road, Haidian District, Beijing, 100000

Patentee before: Zang Manli

Country or region before: China

TR01 Transfer of patent right