Test method and device for bidirectional deep learning model, medium and terminal
By performing consistency testing by inputting information forward and outputting it backward in a deep learning model, the problem of low accuracy in existing testing methods is solved, and high-precision testing and performance measurement of bidirectional models are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHERN UNIVERSITY OF SCIENCE AND TECHNOLOGY
- Filing Date
- 2022-10-17
- Publication Date
- 2026-05-29
Smart Images

Figure CN115658487B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model testing, and more particularly to a testing method, apparatus, medium, and terminal for bidirectional deep learning models. Background Technology
[0002] A deep learning model is a pre-packaged, functional unit developed based on deep learning. Due to its powerful data fitting capabilities, deep learning models are widely used in various commercial software and academic research. In recent years, many fields have seen the emergence of deep learning models with bidirectional functionality. For example, OpenAI's Codex model can both automatically generate code snippets from input annotations and generate corresponding code descriptions from input code snippets. Similarly, many models in the machine translation field support mutual conversion between two languages. Furthermore, many image search engines simultaneously possess the functions of "searching for images based on natural language descriptions" and "generating tags based on image content," where the natural language descriptions and tags for the same image are highly correlated. We call such models bidirectional models.
[0003] Ensuring the quality of deep learning models has become a hotly debated issue. However, testing techniques well-established for traditional software are not entirely applicable to testing deep learning models. On one hand, deep learning accomplishes prediction or decision-making tasks through data-driven modeling, meaning the system's behavior changes with the training data. On the other hand, the statistical nature of the model introduces uncertainty into the system's output, making it difficult to find predictive outputs. Furthermore, deep learning systems typically consist of data, learning programs, and implementation frameworks, resulting in a complex effect; therefore, breaking the system down into multiple components for separate testing is unreasonable.
[0004] Therefore, existing testing methods struggle to find test predictions, resulting in low test accuracy. Furthermore, existing testing methods cannot measure the overall performance of bidirectional models. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this application is to provide a testing method, device, medium and terminal for bidirectional deep learning models, which aims to solve the problems of low detection accuracy and inability to measure the overall performance of bidirectional models in existing testing methods.
[0006] To address the aforementioned technical problems, the first aspect of this application provides a testing method for bidirectional deep learning models, the method comprising:
[0007] The source test cases are input into the deep learning model for calculation, and positive output information is obtained.
[0008] The positive output information is then fed back into the deep learning model for calculation to obtain the reverse output information.
[0009] Consistency testing is performed on the source test cases and the reverse output information to obtain the test results of the deep learning model.
[0010] As a further improved technical solution, the step of positively inputting the source test cases into the deep learning model for calculation to obtain positive output information includes:
[0011] Construct a test set related to the reverse functionality of the deep learning model, and use the test set as the source test cases;
[0012] The source test cases are input into the deep learning model in a forward direction, and the deep learning model executes the forward program to obtain first-order forward output information.
[0013] As a further improved technical solution, the step of inputting the positive output information back into the deep learning model for calculation to obtain the reverse output information includes:
[0014] The first-order positive output information is input into the deep learning model in reverse, and the deep learning model executes the reverse procedure to obtain the first-order reverse output information.
[0015] As a further improved technical solution, the step of performing consistency testing on the source test cases and the reverse output information to obtain the test results of the deep learning model includes:
[0016] Perform consistency testing on the source test cases and the first-order reverse output information to determine the consistency between the source test cases and the first-order reverse output information;
[0017] If the source test case and the first-order back-end output information are consistent, then the deep learning model is determined to have passed the first-order back-end test, and the conclusion that the first-order back-end test has passed is obtained.
[0018] If the source test case and the first-order backpropagation output information are inconsistent, it is determined that the deep learning model has failed the first-order backpropagation test, and the conclusion that the first-order backpropagation test has failed is obtained.
[0019] As a further improved technical solution, after inputting the positive output information back into the deep learning model for calculation to obtain the reverse output information, the method further includes:
[0020] The first-order inverse output information is input forward into the deep learning model for calculation to obtain the second-order forward output information;
[0021] A consistency test is performed on the second-order forward output information and the first-order forward output information to obtain the second-order backward test result of the deep learning model.
[0022] As a further improved technical solution, the step of inputting the first-order inverse output information forward into the deep learning model for calculation to obtain the second-order forward output information includes:
[0023] The first-order inverse output information is input forward into the deep learning model, and the deep learning model executes the inverse procedure to obtain the second-order forward output information.
[0024] As a further improved technical solution, the consistency test of the second-order forward output information and the first-order forward output information to obtain the second-order backtest result of the deep learning model includes:
[0025] A consistency test is performed on the second-order positive output information and the first-order positive output information to determine their consistency.
[0026] If the second-order forward output information is consistent with the first-order forward output information, then the deep learning model is determined to have passed the second-order backtest, and the conclusion that the second-order backtest has passed is obtained.
[0027] If the second-order forward output information is inconsistent with the first-order forward output information, then the deep learning model is determined to have failed the second-order backtest, and the conclusion that the second-order backtest has failed is obtained.
[0028] A second aspect of this application provides a testing apparatus for a bidirectional deep learning model, comprising:
[0029] The forward output module is used to input the source test cases into the deep learning model for calculation and obtain the forward output information.
[0030] The reverse output module is used to input the forward output information back into the deep learning model for calculation to obtain the reverse output information;
[0031] The consistency judgment module is used to perform consistency tests on the source test cases and the reverse output information to obtain the test results of the deep learning model.
[0032] A third aspect of this application provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the testing method for a bidirectional deep learning model as described above.
[0033] A fourth aspect of this application provides a terminal device, which includes: a processor, a memory, and a communication bus; the memory stores a computer-readable program that can be executed by the processor;
[0034] The communication bus enables communication between the processor and the memory;
[0035] When the processor executes the computer-readable program, it implements the steps in the testing method for bidirectional deep learning models as described above.
[0036] Beneficial effects: Compared with the prior art, the testing method for bidirectional deep learning models of the present invention includes: inputting source test cases forward into the deep learning model for calculation to obtain forward output information; inputting the forward output information backward into the deep learning model for calculation to obtain backward output information; performing consistency testing on the source test cases and the backward output information to obtain the test result of the deep learning model; the present invention, by adopting the above method, can be applied to and used to test bidirectional models, can correctly compare the output results of the model in both directions simultaneously, has high testing accuracy, can measure the overall performance of bidirectional models, and further improves testing accuracy through multi-stage backward testing. Attached Figure Description
[0037] Figure 1 This is a flowchart of the testing method for bidirectional deep learning models according to the present invention.
[0038] Figure 2 This is a structural schematic diagram of the terminal device provided by the present invention.
[0039] Figure 3 This is a structural block diagram of the device provided by the present invention.
[0040] Figure 4 This is a flowchart of the first-order reverse testing process in the method provided by the present invention.
[0041] Figure 5 This is a flowchart of the second-order reverse testing process in the method provided by the present invention.
[0042] Figure 6 This is a flowchart illustrating the specific implementation of first-order and second-order reverse testing in the method provided by this invention.
[0043] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0044] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0046] The inventors discovered through research that the existing technology has the following problems:
[0047] (1) Common deep learning testing methods currently include manually labeled real data, metamorphic testing (MT), and adversarial testing (AT). Existing testing methods all require collecting as much real data as possible and manually labeling it, or generating a large amount of simulation data. Such methods do not focus on whether the test data can cover most of the system logic after being input into the system, are not easy to trigger exceptions, and are time-consuming and labor-intensive. Metamorphic testing technology based on metamorphic relationships aims to use the properties of the target program algorithm to predict the expected change of the output for specific changes in the input. Although the correct output cannot be known in advance, if the change produced by the output is different from the expectation, then there must be an error. Specifically, MT needs to first identify the metamorphic relationships (MRs) between multiple inputs and outputs of the target program algorithm, and then construct source test cases and their corresponding derived test cases based on these MRs. Then, the target program is used to execute all these test cases and check whether the outputs of the source test cases and derived test cases satisfy their corresponding MRs; however, metamorphic testing still has some limitations: metamorphic relationships are usually manually defined, lacking objective and effective measurement standards; metamorphic relationships often involve a large number of complex and tedious transformations and calculations, which can easily lead to incorrect conclusions; adversarial testing technology treats the trained deep learning model as a program and looks for inputs that trigger erroneous outputs, i.e., adversarial samples. However, the test inputs generated by these adversarial samples are limited to minor changes to the original inputs and do not consider whether the generated test inputs can cover most of the system logic. They are often not realistic enough and have no practical meaning for the model. They cannot be directly used to improve the quality of the model.
[0048] In summary, 1. Existing metamorphic testing techniques require a large number of manually defined metamorphic relationships; 2. Metamorphic relationships often involve a large number of complex and tedious transformations and calculations, which can easily lead to erroneous conclusions; 3. Adversarial samples generated by adversarial testing are likely not realistic enough and have no practical significance for the model, and cannot be used to improve model quality; 4. For models with bidirectional functions, existing testing methods are difficult to test the correctness of both directions simultaneously.
[0049] To address the aforementioned problems, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0050] like Figure 1 As shown in the embodiment of this application, a testing method for a bidirectional deep learning model includes the following steps:
[0051] S1, input the source test cases into the deep learning model for calculation, and obtain positive output information;
[0052] S2, the positive output information is input back into the deep learning model for calculation to obtain the reverse output information;
[0053] S3, perform consistency testing on the source test cases and the reverse output information to obtain the test results of the deep learning model.
[0054] Specifically, a bidirectional model can map the input space S to the output space M by executing the program in the forward direction, and it can also map the output space M to the input space S by executing the program in the reverse direction.
[0055] Based on the above principles, in reverse testing, suitable source test cases with practical significance (belonging to S) are first input into the deep learning model as forward input information. The deep learning model obtains forward output information (belonging to M) through forward execution. Then, the forward output information is input into the deep learning model, and the deep learning model obtains reverse output information (belonging to S) through reverse execution. Due to the characteristics and functions of the bidirectional model, the reverse output information and the forward input information should be in the same space at this time. Then, a consistency test is performed on the reverse output information and the forward input information. If the test fails, it indicates that the model has performance defects in forward, reverse, or bidirectional functions. If a large number of source test cases are used for reverse testing and all tests pass, the model is considered to have excellent performance. The above reverse testing process does not involve the transformation relationship between S and M.
[0056] Step S1, which involves positively inputting the source test cases into the deep learning model for calculation to obtain positive output information, includes the following steps:
[0057] S101, construct a test set related to the reverse function of the deep learning model, and use the test set as the source test cases;
[0058] S102, the source test cases are input into the deep learning model in a forward direction, and the deep learning model executes the forward program to obtain first-order forward output information.
[0059] Specifically, the first step is to construct a test set for testing. This test set should be meaningful to the model and can be directly used to improve its quality. The test set should be related to the inverse function of the deep learning model. For example, the deep learning model used in this embodiment can translate English and German bidirectionally. If the forward function of the deep learning model is set to translate into German and the inverse function is set to translate into English, then the test set should be an English test set containing a large number of English sentences that match actual English sentences. Therefore, the test set related to the inverse function of the deep learning model is used as the source test cases.
[0060] Then, the source test cases are input forward into the deep learning model. The deep learning model executes the forward program and obtains the first-order forward output information. For example, if the English test set is input forward into the deep learning model, the deep learning model executes the forward program and obtains the corresponding first-order German translation information.
[0061] Step S2, which involves inputting the positive output information back into the deep learning model for calculation to obtain the reverse output information, includes the following steps:
[0062] S201, the first-order positive output information is input into the deep learning model in reverse, and the deep learning model executes the reverse procedure to obtain the first-order reverse output information.
[0063] Specifically, the first-order forward output information obtained in the previous step is then input back into the deep learning model. After the deep learning model executes the reverse process, the first-order reverse output information is obtained. For example, the first-order German translation information obtained in the previous step is input back into the deep learning model. After the deep learning model executes the reverse process, the first-order English translation information is obtained.
[0064] Step S3, which involves performing a consistency test on the source test cases and the reverse output information to obtain the test results of the deep learning model, includes the following steps:
[0065] S301, Perform consistency testing on the source test case and the first-order reverse output information to determine the consistency between the source test case and the first-order reverse output information;
[0066] S302, if the source test case and the first-order reverse output information are consistent, then it is determined that the deep learning model has passed the first-order reverse test, and the conclusion that the first-order reverse test has passed is obtained.
[0067] S303, if the source test case and the first-order back-end output information are inconsistent, it is determined that the deep learning model has failed the first-order back-end test, and the conclusion that the first-order back-end test has failed is obtained.
[0068] Specifically, after steps S1 and S2, the first-order inverse output information obtained from the deep learning model can be compared with the source test cases for consistency testing. This determines the consistency between the source test cases and the first-order inverse output information. Consistency testing refers to testing whether multiple data segments belonging to the same data space are equivalent in the dimensions that the model under test is interested in. Different data spaces have different testing methods. For example, to test the consistency of code functionality, random testing methods can be used to construct a large number of random inputs and construct assertions to compare whether the results of running the same input under two code segments are the same. For consistency testing of natural language semantics, semantic similarity detection methods can be used. For consistency testing of images, existing image content recognition methods can be used, etc.
[0069] After consistency testing, two test conclusions can be obtained: one is that the source test cases and the first-order reverse output information are consistent; the other is that the source test cases and the first-order reverse output information are inconsistent.
[0070] If the source test case and the first-order back-end output information are consistent, then the deep learning model is determined to have passed the first-order back-end test, and the conclusion that the first-order back-end test has passed is obtained. Passing the first-order back-end test indicates that the model has excellent performance and no performance defects were detected in the model in the forward, backward or bidirectional functions.
[0071] If the source test cases and the first-order reverse output information are inconsistent, the deep learning model is deemed to have failed the first-order reverse test, leading to the conclusion that the first-order reverse test has failed. Failure of the first-order reverse test indicates that the model has performance defects in forward, reverse, or bidirectional functions. Therefore, users can improve the model and enhance its quality based on the reverse test results. For example, a consistency test can be performed on the English test set and the obtained first-order English translation information to verify whether the semantics of the two are the same. If they are the same, the test is considered passed; if they are different, the test is considered failed, indicating that the model has performance defects.
[0072] Step S2, after inputting the positive output information back into the deep learning model for calculation to obtain the reverse output information, further includes:
[0073] S202, the first-order inverse output information is input forward into the deep learning model for calculation to obtain the second-order forward output information;
[0074] S203, perform a consistency test on the second-order forward output information and the first-order forward output information to obtain the second-order backward test result of the deep learning model.
[0075] Based on the first-order backtest, a second-order backtest can be performed according to user needs. The second-order backtest involves inputting the first-order backtest output information back into the deep learning model for calculation to obtain the second-order forward output information. The consistency between the second-order forward output information and the first-order forward output information is then tested to obtain the second-order backtest result of the deep learning model. Based on the second-order backtest result, the model's functionality can be further checked for performance defects, thereby further improving the model's detection accuracy.
[0076] Based on the second-order reverse testing method, second-order reverse output information can be generated by using the second-order forward output information. Consistency checks are then performed on the source test cases, first-order reverse output information, and second-order reverse output information in the input space to obtain the third-order reverse testing method. And so on, the test order can be specified as needed to obtain higher-order reverse testing methods.
[0077] After completing the second-order reverse test, the user can proceed to step S3 to perform a consistency test on the source test cases and the reverse output information, or choose not to complete step S3. This is because if the second-order reverse test passes, it means that the first-order reverse test also passes. If the second-order reverse test fails, it means that the first-order reverse test may or may not pass. Therefore, step S3 is required to determine whether the first-order reverse test passed.
[0078] Similarly, if the first-order backtest passes but the second-order backtest fails, it indicates that the model likely has performance defects in its forward functionality. Users can focus on improving the model's forward functionality based on this conclusion.
[0079] Step S202, which involves inputting the first-order inverse output information forward into the deep learning model for calculation to obtain the second-order forward output information, includes the following steps:
[0080] The first-order inverse output information is input forward into the deep learning model, and the deep learning model executes the inverse procedure to obtain the second-order forward output information.
[0081] Step S203, which involves performing a consistency test on the second-order forward output information and the first-order forward output information to obtain the second-order backtest result of the deep learning model, includes the following steps:
[0082] S2031, Perform a consistency test on the second-order positive output information and the first-order positive output information to determine the consistency between the second-order positive output information and the first-order positive output information;
[0083] S2032, if the second-order forward output information is consistent with the first-order forward output information, then it is determined that the deep learning model has passed the second-order backtest, and the conclusion that the second-order backtest has passed is obtained.
[0084] S2033, if the second-order forward output information and the first-order forward output information are inconsistent, then it is determined that the deep learning model has failed the second-order backtest, and the conclusion that the second-order backtest has failed is obtained.
[0085] Specifically, the first-order backward output information obtained in step S2 is input forward again into the deep learning model. The deep learning model executes the backward procedure to obtain the second-order forward output information. For example, the first-order English translation information is input forward again into the deep learning model. The deep learning model executes the backward procedure to obtain the second-order German translation information.
[0086] Then, a consistency test is performed on the second-order positive output information and the first-order positive output information to determine their consistency. After the consistency test, two test conclusions can be obtained: one is that the second-order positive output information and the first-order positive output information are consistent, and the other is that the second-order positive output information and the first-order positive output information are inconsistent.
[0087] If the second-order forward output information is consistent with the first-order forward output information, then the deep learning model is determined to have passed the second-order backtest. The conclusion that the second-order backtest has passed is that the model has excellent performance and no performance defects have been detected in the model in forward, backward or bidirectional functions.
[0088] If the second-order forward output information is inconsistent with the first-order forward output information, the deep learning model is deemed to have failed the second-order backtest, leading to the conclusion that the second-order backtest has failed. Failure of the second-order backtest indicates that the model has performance defects in forward, backward, or bidirectional functions. Therefore, users can improve the model based on the backtest results to enhance its quality. For example, a consistency test can be performed between the second-order German translation information and the first-order German translation information to verify whether their semantics are the same. If the semantics are the same, the test is considered passed; if they are different, the test is considered failed, indicating that the model has performance defects.
[0089] In first-order reverse testing, no information about the output space is needed, while in second-order reverse testing, no information about the input space is needed. Because deep learning programs have diverse input and output types, and consistency testing for some types is difficult, in bidirectional model reverse testing, the side easier to test for consistency can be chosen. For example, for a model that maps natural language and code, the equivalence and consistency of the natural language are difficult to define; therefore, the consistency of the code can be checked. Using first-order reverse testing, the code is used as the original test data space to construct source test cases, which are input into the model to obtain the corresponding natural language description. The natural language description is then input into the model to obtain a variant of the original code. Finally, easy-to-implement methods such as random testing are used to test the consistency of the two code segments. Similarly, using second-order reverse testing, the natural language description is used as the original test data space to construct source test cases, which are input into the model to obtain the corresponding first-order code output. The first-order code is then input into the model to obtain a variant of the original natural language description, which is then input into the model to obtain the corresponding second-order code output. Finally, easy-to-implement methods such as random testing are used to test the consistency of the two code segments.
[0090] Therefore, if metamorphic testing is used to test the above examples, the metamorphic relationship needs to be manually specified, that is, "semantic natural language descriptions should yield functionally identical code". Then, based on the metamorphic relationship, derivative test cases are constructed, that is, "semantic natural language descriptions". However, how to define "semantic similarity" and how to obtain the most appropriate "synonyms" will have a human impact on the test results.
[0091] Throughout the reverse testing process, there is no need to manually specify the expected relationship between input and output. The entire process can be easily applied to different bidirectional models and is easy to automate.
[0092] Therefore, the reverse testing process does not require manually specifying specific metamorphic relationships. This process does not rely on other programs; the extensive data transformations involved are directly completed by the model under test itself, and the quality of the derived samples is determined by the model under test itself. This avoids the erroneous conclusions that may be caused by complex and cumbersome data transformations in this process, as well as the interference caused by the insufficient accuracy of manually specifying metamorphic relationships and generating metamorphic test cases with the help of external tools. Any performance defects of the bidirectional model during bidirectional execution will affect the final test results. Therefore, the test results of reverse testing can measure the overall performance of the bidirectional model in both directions.
[0093] Based on the above testing method for bidirectional deep learning models, this embodiment provides a testing apparatus for bidirectional deep learning models, including:
[0094] The forward output module 1 is used to input the source test cases into the deep learning model for calculation and obtain the forward output information.
[0095] The reverse output module 2 is used to input the forward output information back into the deep learning model for calculation to obtain the reverse output information;
[0096] The consistency judgment module 3 is used to perform consistency testing on the source test cases and the reverse output information to obtain the test results of the deep learning model.
[0097] Furthermore, it is worth noting that the working process of the testing device for bidirectional deep learning models provided in this embodiment is the same as that of the testing method for bidirectional deep learning models described above. For details, please refer to the working process of the testing method for bidirectional deep learning models, which will not be repeated here.
[0098] Based on the above-described testing method for bidirectional deep learning models, this embodiment provides a computer-readable storage medium storing one or more programs that can be executed by one or more processors to implement the steps in the testing method for bidirectional deep learning models as described in the above embodiment.
[0099] like Figure 2 As shown, based on the above-described testing method for bidirectional deep learning models, this application also provides a terminal device, which includes at least one processor 20; a display screen 21; and a memory 22, and may further include a communications interface 23 and a bus 24. The processor 20, display screen 21, memory 22, and communications interface 23 can communicate with each other via the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setup mode. The communications interface 23 can transmit information. The processor 20 can call logical instructions in the memory 22 to execute the methods described in the above embodiments.
[0100] Furthermore, the logical instructions in the aforementioned memory 22 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0101] The memory 22, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of this disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions, or modules stored in the memory 22, thereby implementing the methods in the above embodiments.
[0102] The memory 22 may include a program storage area and a data storage area. The program storage area may store the operating system and application programs required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 22 may include high-speed random access memory (RAM) and non-volatile memory. Examples include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, as well as transient storage media.
[0103] Compared to existing technologies, the testing method for bidirectional deep learning models of the present invention includes: inputting source test cases forward into the deep learning model for calculation to obtain forward output information; inputting the forward output information backward into the deep learning model for calculation to obtain backward output information; performing consistency testing on the source test cases and the backward output information to obtain the test result of the deep learning model; the present invention, by adopting the above method, can be applied to and used to test bidirectional models, can simultaneously and correctly compare the output results in both directions of the model, has high testing accuracy, can measure the overall performance of bidirectional models, and further improves testing accuracy through multi-stage backward testing.
[0104] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
[0105] Of course, the above description of the embodiments of the present invention is quite detailed, but it should not be construed as a limitation on the scope of protection of the present invention. The present invention may have many other implementations. Based on this implementation, other implementations obtained by those skilled in the art without any creative effort are all within the scope of protection of the present invention. The scope of protection of the present invention is determined by the appended claims.
Claims
1. A testing method for bidirectional deep learning models, characterized in that, include: The source test cases are input into the deep learning model for calculation, and positive output information is obtained. The positive output information is then fed back into the deep learning model for calculation to obtain the reverse output information. The consistency test is performed on the source test cases and the reverse output information to obtain the test results of the deep learning model; The step of inputting the source test cases into the deep learning model for calculation and obtaining positive output information includes: Construct a test set related to the reverse functionality of the deep learning model, and use the test set as the source test cases; The source test cases are input forward into the deep learning model, and the deep learning model executes the forward program to obtain first-order forward output information. The step of inputting the positive output information back into the deep learning model for calculation to obtain the reverse output information includes: The first-order positive output information is input into the deep learning model in reverse, and the deep learning model executes the reverse procedure to obtain the first-order reverse output information. The process of performing consistency testing on the source test cases and the reverse output information to obtain the test results of the deep learning model includes: Perform consistency testing on the source test cases and the first-order reverse output information to determine the consistency between the source test cases and the first-order reverse output information; If the source test case and the first-order back-end output information are consistent, then the deep learning model is determined to have passed the first-order back-end test, and the conclusion that the first-order back-end test has passed is obtained. If the source test case and the first-order back-end output information are inconsistent, it is determined that the deep learning model has failed the first-order back-end test, and the conclusion that the first-order back-end test has failed is obtained. After inputting the positive output information back into the deep learning model for calculation to obtain the reverse output information, the process further includes: The first-order inverse output information is input forward into the deep learning model for calculation to obtain the second-order forward output information; A consistency test is performed on the second-order positive output information and the first-order positive output information to obtain the second-order backtest result of the deep learning model. The step of inputting the first-order inverse output information forward into the deep learning model for calculation to obtain the second-order forward output information includes: The first-order inverse output information is input forward into the deep learning model, and the deep learning model executes the inverse procedure to obtain the second-order forward output information.
2. The testing method for a bidirectional deep learning model according to claim 1, characterized in that, The consistency test between the second-order forward output information and the first-order forward output information, to obtain the second-order backtest result of the deep learning model, includes: A consistency test is performed on the second-order positive output information and the first-order positive output information to determine their consistency. If the second-order forward output information is consistent with the first-order forward output information, then the deep learning model is determined to have passed the second-order backtest, and the conclusion that the second-order backtest has passed is obtained. If the second-order forward output information is inconsistent with the first-order forward output information, then the deep learning model is determined to have failed the second-order backtest, and the conclusion that the second-order backtest has failed is obtained.
3. A testing apparatus for a bidirectional deep learning model, used to implement the steps in the testing method for a bidirectional deep learning model as described in any one of claims 1-2, characterized in that, include: The forward output module is used to input the source test cases into the deep learning model for calculation and obtain the forward output information. The reverse output module is used to input the forward output information back into the deep learning model for calculation to obtain the reverse output information; The consistency judgment module is used to perform consistency tests on the source test cases and the reverse output information to obtain the test results of the deep learning model.
4. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs, which can be executed by one or more processors to implement the steps in the testing method for a bidirectional deep learning model as described in any one of claims 1-2.
5. A terminal device, characterized in that, include: Processor, memory, and communication bus; The memory stores a computer-readable program that can be executed by the processor; The communication bus enables communication between the processor and the memory; When the processor executes the computer-readable program, it implements the steps in the testing method for a bidirectional deep learning model as described in any one of claims 1-2.