Model testing method and device, computer device and storage medium
By iteratively updating the multidimensional mathematical model and the security capability representation, the problem of inaccurate security evaluation of generative artificial intelligence models in the case of small question banks is solved, and more accurate security evaluation results are achieved.
Patent Information
- Application Number
- CN202611101164.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-11-27
AI Technical Summary
Existing security assessment methods for generative AI models are inaccurate when the question bank is small, and traditional static question bank testing schemes cannot accurately assess the security risks of the model.
The current security capability representation of the model under test is represented by a multidimensional mathematical model. By inputting a test question, the probability value of a secure response is calculated. The security capability representation is iteratively updated based on the actual test results and probability values to dynamically quantify the security capability of the model and determine the final test result.
It improves the accuracy of model security evaluation results, eliminates the reliance on large-scale fixed question banks, and achieves higher precision and more comprehensive security evaluation.
Smart Images

Figure CN123178249A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, specifically to a model testing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Currently, the mainstream approach in the industry for security evaluation of generative AI models is to use a static question bank testing scheme. This scheme pre-builds a fixed test question bank of thousands to tens of thousands of questions, covering various security risk scenarios such as political sensitivity, illegal and irregular activities, and discriminatory speech. During the evaluation, the questions from the question bank are input into the model to be tested in batches, and the output content of the model is verified by manual or automated judgment methods. Finally, a test report is generated based on the overall security pass rate.
[0003] However, this traditional model testing method can only determine whether there are security risks in the model output results. When the question bank is small, the test results are inaccurate. Summary of the Invention
[0004] Therefore, it is necessary to provide a model testing method, apparatus, computer equipment, and storage medium to improve the comprehensiveness of model testing and the accuracy of test results in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a model testing method, which includes:
[0006] Each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0007] Based on the current security capability representation of the multidimensional mathematical model and the model under test, determine the security response probability value of the model under test for each first test question;
[0008] Based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation.
[0009] The test results of the model under test are determined based on the updated security capability representation.
[0010] In one embodiment, the current security capability representation includes the current security capability value of at least one risk dimension; each first test question has corresponding parameter information; the parameter information includes guessing parameters, as well as discrimination parameters and difficulty parameters corresponding to each risk dimension;
[0011] Based on the multidimensional mathematical model and the current security capability representation of the model under test, determine the security response probability values of the model under test for each first test question, including:
[0012] For each first test question, the probability value of the model under test to respond to the first test question is determined based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation.
[0013] In one embodiment, the current security capability representation is updated based on the actual test results and security response probability values for each first test question, resulting in an updated security capability representation, including:
[0014] Substituting the actual test results and safe response probability values of each first test question into the log-likelihood function, we obtain the log-likelihood function representation;
[0015] Based on the log-likelihood function representation and the current security capability representation, the current security capability representation is updated to obtain the updated security capability representation.
[0016] In one embodiment, the test result of the model under test is determined based on the updated security capability representation, including:
[0017] Determine the test termination status;
[0018] If the test is terminated, the test results of the model under test are determined based on the updated security capability representation.
[0019] In one embodiment, determining the test termination condition includes:
[0020] Determine the covariance matrix of the updated security capability representation;
[0021] Based on the covariance matrix, determine the standard error of each risk dimension associated with the updated security capability representation;
[0022] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation.
[0023] In one embodiment, the test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation, including:
[0024] After updating the current security capability representation, the current test round is updated to obtain the updated test round;
[0025] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds.
[0026] In one embodiment, the test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test round, including:
[0027] Obtain the updated security capability representation and the classification decision confidence of each associated risk dimension;
[0028] The test termination condition is determined based on at least one of the following: the classification decision confidence of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test rounds.
[0029] In one embodiment, the method further includes:
[0030] If the test is terminated without termination, the priority score of each risk dimension is determined based on the security capability value and standard error of each risk dimension associated with the current security capability representation.
[0031] Based on the priority scores of each risk dimension, the target dimension is determined from each risk dimension;
[0032] Based on the target dimension, determine each second test question and treat each second test question as a new first question. Return to execute the operation of inputting each first test question into the model under test to obtain the actual test results of the model under test for each first test question.
[0033] Secondly, this application provides a model testing apparatus, which includes:
[0034] The input module is used to input each first test question into the model under test and obtain the actual test results of the model under test for each first test question.
[0035] The first determining module is used to determine the security response probability value of the model under test for each first test question based on the multidimensional mathematical model and the current security capability representation of the model under test.
[0036] The update module is used to update the current security capability representation based on the actual test results and security response probability values of each first test question, so as to obtain the updated security capability representation.
[0037] The second determination module is used to determine the test results of the model under test based on the updated security capability representation.
[0038] Thirdly, this application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0039] Each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0040] Based on the current security capability representation of the multidimensional mathematical model and the model under test, determine the security response probability value of the model under test for each first test question;
[0041] Based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation.
[0042] The test results of the model under test are determined based on the updated security capability representation.
[0043] Fourthly, this application also provides a computer-readable storage medium on which a computer program is stored, and which, when executed by a processor, performs the following steps:
[0044] Each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0045] Based on the current security capability representation of the multidimensional mathematical model and the model under test, determine the security response probability value of the model under test for each first test question;
[0046] Based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation.
[0047] The test results of the model under test are determined based on the updated security capability representation.
[0048] Fifthly, this application also provides a computer program product comprising a computer program that, when executed by a processor, performs the following steps:
[0049] Each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0050] Based on the current security capability representation of the multidimensional mathematical model and the model under test, determine the security response probability value of the model under test for each first test question;
[0051] Based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation.
[0052] The test results of the model under test are determined based on the updated security capability representation.
[0053] The aforementioned model testing method, apparatus, computer equipment, and storage medium input each first test question into the model under test, obtaining the actual test results of the model under test for each first test question. Based on the multidimensional mathematical model and the current security capability representation of the model under test, the security response probability value of the model under test for each first test question is determined; wherein, the multidimensional data model is associated with the current security capability representation of the model under test. Based on the actual test results and security response probability values for each first test question, the current security capability representation is updated, obtaining the updated security capability representation. Based on the updated security capability representation, the test results of the model under test are determined. This application collects the actual test results of the model under test on the first test question, calculates the security response probability value corresponding to each test question using a multi-dimensional mathematical model that relates the current security capability representation of the model under test, iteratively updates the security capability representation by combining the actual test results and the security response probability values, and determines the overall test result of the model under test based on the updated security capability representation. This effectively solves the technical problem that traditional static evaluation methods can only simply determine whether there is a security risk and the test results are inaccurate when the question bank is small. At the same time, it can dynamically quantify and iteratively correct the security capability representation of the model under test, and output the model test results based on the updated security capability representation, thus getting rid of the dependence on a large-scale fixed question bank and significantly improving the accuracy of the model security evaluation results. Attached Figure Description
[0054] Figure 1 This is an application environment diagram of a model testing method provided in this embodiment;
[0055] Figure 2 This is a flowchart illustrating the first model testing method provided in this embodiment;
[0056] Figure 3 This is a flowchart illustrating the process of determining the probability value of a safe response to the first test question by the model under test, as provided in this embodiment.
[0057] Figure 4 This is a flowchart illustrating the representation of the determined security capabilities provided in this embodiment.
[0058] Figure 5 This is a flowchart illustrating the process of determining the test results of the model under test in this embodiment.
[0059] Figure 6 This is a flowchart illustrating the second model testing method provided in this embodiment;
[0060] Figure 7 This is a structural block diagram of a model testing device provided in this embodiment;
[0061] Figure 8 This is an internal structural diagram of the computer device provided in this embodiment. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0063] The model testing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, a user, having a security testing requirement for the model under test, sends a model test request to the testing device. The testing device selects a first test question and inputs each of the first test questions into the model under test, obtaining the actual test results of the model under test for each first test question. Furthermore, based on the multidimensional mathematical model and the current security capability representation of the model under test, the testing device determines the security response probability value of the model under test for each first test question; wherein the multidimensional data model is associated with the current security capability representation of the model under test. Then, the testing device updates the current security capability representation based on the actual test results and security response probability values for each first test question, obtaining an updated security capability representation, and then determines the test result of the model under test based on the updated security capability representation.
[0064] The testing equipment refers to the equipment capable of performing security performance evaluations on the model under test. The testing equipment can be a server or other testing host. The server can be a standalone server or a server cluster.
[0065] A terminal refers to a user-side terminal device, such as a mobile phone, a computer, or a smart wearable device such as a smartwatch or smart bracelet.
[0066] In one embodiment, Figure 2 This is a flowchart illustrating a model testing method provided in an embodiment of this application, which is applied to... Figure 1 Taking the test equipment in the example, the method includes the following steps:
[0067] S201, input each of the first test questions into the model under test, and obtain the actual test results of the model under test for each of the first test questions.
[0068] The first test question refers to the question selected for this security test on the model under test, which the model under test must answer. The model under test refers to the model that needs to be tested in this security test.
[0069] In this embodiment, one possible implementation for determining the first test question is to select a test question from the question bank based on a random selection rule, and use it as the first test question.
[0070] Another optional implementation method for determining the first test question in this embodiment is to divide security risks into five risk dimensions based on security service requirement information (e.g., "Basic Requirements for Security of Generative Artificial Intelligence Services"). For each risk dimension, the risk dimension is further divided into multiple difficulty levels (e.g., beginner, intermediate, and advanced). For each difficulty level, multiple seed questions are pre-configured. In use, seed questions can be selected first, and then for each seed question, an automated prompt word generation engine is used to generate a test question. Specifically, the seed questions are subjected to feature extraction to obtain test prompt words. Linguistic variation techniques and adversarial generation techniques are used to update the test prompt words by changing sentence structure, replacing synonyms, and adding character suffixes, thereby obtaining the test question. Optionally, in this embodiment, an alternative implementation method for selecting seed questions is to select at least one seed question for each risk dimension and the corresponding difficulty level during the first round of testing. During subsequent rounds of testing, seed questions are selected from the set of seed questions for the difficulty level associated with the target dimension (e.g., the highest-risk dimension) determined in the previous round. It should be noted that the specific method for determining the target dimension is described in detail in subsequent embodiments, and will not be described here.
[0071] Optionally, the risk dimensions in this embodiment include, but are not limited to, content compliance, data security, service reliability, anti-discrimination, and prevention and control of illegal and irregular activities.
[0072] One optional implementation involves inputting each first test question into the model under test, obtaining a first response corresponding to each first test question output by the model under test; wherein each first test question has a corresponding first response. For each first response, semantic analysis is performed on the first response to obtain the actual test result corresponding to the first response, i.e., the actual test result corresponding to the first test question.
[0073] Another optional implementation involves inputting each first test question into the model under test, obtaining the first response corresponding to each first test question output by the model under test; wherein each first test question has a corresponding first response. Based on the analysis model, each first response is analyzed to determine whether each response contains a security risk, and the actual test result corresponding to that first response is generated, i.e., the actual test result corresponding to the first test question.
[0074] Optionally, in this embodiment, the actual test result refers to the test result of whether the model provides a safe response. For example, it can be represented by "0" or "1", where "0" represents an unsafe response and "1" represents a safe response. The actual test result of each first test question can be represented in vector form, for example, by a response pattern vector, and the expression can be: U = Where U represents the response pattern vector; U1 represents the actual test result of the first test question; U2 represents the actual test result of the second test question; U n This represents the actual test result of the nth first test question.
[0075] S202, Based on the multidimensional mathematical model and the current security capability representation of the model under test, determine the security response probability value of the model under test for each first test question.
[0076] The multidimensional data model is associated with the current security capability representation of the model under test. The current security capability representation refers to the security capability estimation vector of the model under test across multiple risk dimensions. The security response probability value refers to the probability value of a secure response predicted by the model under test based on the multidimensional mathematical model; that is, the probability value that the response is secure.
[0077] Optionally, in this embodiment, the security response probability value for each first test question is determined based on the question information of each first test question and the multidimensional data model. Specifically, for each first test question, the question information of the first test question is formatted, and target information is determined. The target information is input into the multidimensional data model to obtain the security response probability value for that first test question.
[0078] S203, based on the actual test results and security response probability values of each first test question, update the current security capability representation to obtain the updated security capability representation.
[0079] Optionally, in this embodiment, the actual test results and security response probability values of each first test question are input into the intelligent analysis model, and the intelligent analysis model updates the current security capability representation to obtain the updated security capability representation.
[0080] S204, Determine the test results of the model under test based on the updated security capability representation.
[0081] Optionally, in this embodiment, the updated security capability representation includes security capability values for each risk dimension. The test results of the model under test are determined based on the security capability values for each risk dimension. One possible implementation of determining the test results of the model under test based on the security capability values for each risk dimension in this embodiment is to use the security capability values for each risk dimension as the test results of the model under test. Another possible implementation is to determine the security level of each risk dimension based on the security capability values for each risk dimension, and use the security level of each risk dimension as the test results of the model under test. Yet another possible implementation is to pre-configure the priority of each risk dimension. The weight of each risk dimension is determined based on its priority. The security capability values of each risk dimension are weighted and summed according to their weights to obtain a total capability value. This total capability value is used as the test results of the model under test. In this embodiment, the test results of the model under test include the security capabilities of the model under test in each risk dimension. Compared to existing test results that only reflect security or insecurity, this application not only has higher testing accuracy but is also more comprehensive.
[0082] The aforementioned model testing method inputs each first test question into the model under test, obtaining the actual test results of the model for each first test question. Based on the multidimensional mathematical model and the current security capability representation of the model under test, the probability value of a secure response to each first test question is determined; wherein, the multidimensional data model is associated with the current security capability representation of the model under test. Based on the actual test results and the probability value of a secure response to each first test question, the current security capability representation is updated, resulting in an updated security capability representation. Based on the updated security capability representation, the test results of the model under test are determined. This application collects the actual test results of the model under test on the first test question, calculates the security response probability value corresponding to each test question using a multi-dimensional mathematical model that relates the current security capability representation of the model under test, iteratively updates the security capability representation by combining the actual test results and the security response probability values, and determines the overall test result of the model under test based on the updated security capability representation. This effectively solves the technical problem that traditional static evaluation methods can only simply determine whether there is a security risk and the test results are inaccurate when the question bank is small. At the same time, it can dynamically quantify and iteratively correct the security capability representation of the model under test, and output the model test results based on the updated security capability representation, thus getting rid of the dependence on a large-scale fixed question bank and significantly improving the accuracy of the model security evaluation results.
[0083] Based on the above embodiments, in order to more accurately determine the security response probability value of the model under test for each first test question, the current security capability representation in this embodiment includes the current security capability value of at least one risk dimension; each first test question has corresponding parameter information; the parameter information includes guessing parameters, as well as the discrimination parameter and difficulty parameter corresponding to each risk dimension. Specifically, the current security capability representation includes at least 5 risk dimensions, namely content compliance, data security, service reliability, anti-discrimination, and illegal and irregular prevention. Each risk dimension has a corresponding security capability value, namely content compliance capability value, data security capability value, service reliability capability value, anti-discrimination capability value, and illegal and irregular prevention capability value. The current security capability representation can be represented by a vector, and the initial security capability representation is θ0 = (0,0,0,0,0), that is, the security capability representation when the model under test has not yet been tested, and the security capability value of each risk dimension is the initial value 0. The parameter information of the first test question is pre-configured and can be the parameter information of the seed question associated with the first test question (detailed in the above embodiments, each seed question has corresponding parameter information in this application). Based on this, as Figure 3 As shown, based on the multidimensional mathematical model and the current security capability representation of the model under test, the optional implementation methods for determining the security response probability values of the model under test for each first test question include:
[0084] S301, for each first test question, based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation, determine the security response probability value of the model under test for the first test question.
[0085] Optionally, in this embodiment, the probability value of the model under test's security response to the first test question can be determined using the model expression associated with the multidimensional data model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation. In this embodiment, the model expression associated with the multidimensional model is:
[0086]
[0087] Among them, P i (θ) represents the probability value of the model under test correctly answering (i.e., safely answering) the i-th first test question under the current security capability representation θ; a ik Let represent the discrimination parameter of the i-th first test question on the k-th risk dimension, with a value range of [0.5, 2.5]; b ik c represents the difficulty parameter of the i-th first test question on the k-th risk dimension, with a value range of [-3, 3]; iis the guess parameter for the i-th first test question, and its value range is [0, 0.3].
[0088] In this embodiment, the security capability of the model under test is decomposed into the current security capability value corresponding to each risk dimension. Each first test question is configured with parameter information including guessing parameters, discrimination parameters for each risk dimension, and difficulty parameters. A multi-dimensional mathematical model is used to integrate the parameter information of each first test question with the multi-dimensional security capability value to calculate the probability value of a safe response. This allows for a refined distinction between the parameter information of each first test question and the true security level of each risk dimension of the model under test. It accurately establishes a quantitative correlation between the parameter information of the test questions and the multi-dimensional security capability of the model under test. Based on this, the security capability representation is iteratively updated using actual test results. This solves the problems of traditional static question bank schemes that only roughly identify and output risks and distort test results when the question bank is insufficient. Furthermore, it eliminates the need to rely on a massive number of fixed test questions to complete high-precision calculations, reducing redundant testing and simultaneously improving evaluation accuracy and efficiency.
[0089] Based on the above embodiments, in order to achieve rapid and accurate updates to the security capability representation, such as Figure 4 As shown, based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation. An optional implementation of this method includes:
[0090] S401, Substitute the actual test results and safe response probability values of each first test question into the log-likelihood function to obtain the log-likelihood function representation.
[0091] The log-likelihood function is a mathematical function used to measure the degree to which the current security capability representation matches the actual test results of all first test questions of the model under test.
[0092] Optionally, in this embodiment, the expression for the log-likelihood function is:
[0093]
[0094] Among them, u i P represents the actual test result for the i-th first test question; i (θ) represents the probability value of the model under test correctly answering (i.e., safely answering) the i-th first test question under the current security capability representation θ; Represent the log-likelihood function;
[0095] S402, based on the log-likelihood function representation and the current security capability representation, update the current security capability representation to obtain the updated security capability representation.
[0096] Optionally, in this embodiment, the current security capability representation can be updated using the following formula, combining the log-likelihood function representation and the current security capability representation, to obtain the updated security capability representation:
[0097]
[0098] in, Let represent the security capability in round t; α is the learning rate, typically set to 0.1-0.3. For log-likelihood representation in The gradient vector at that point; This represents the security capability in round t+1.
[0099] The maximum likelihood estimation is solved using the gradient descent method, that is, the security capability representation that maximizes the log-likelihood function is found, which is then used as the updated security capability representation.
[0100] In this embodiment, the actual test results of each first test question and the security response probability value calculated based on the multidimensional mathematical model are substituted into the log-likelihood function to obtain the log-likelihood function representation. Based on this function representation and combined with the current security capability representation, the security capability representation is iteratively updated. This can accurately correct the security capability values of each risk dimension, solve the problem of distorted evaluation results when traditional static question bank evaluation simply judges the output risk and the question bank size is insufficient. This improves the testing efficiency, model testing accuracy, and comprehensiveness of subsequent model testing.
[0101] Based on the above embodiments, in order to further improve the accuracy of the test results, such as Figure 5 As shown, based on the updated security capability representation, the optional implementation methods for determining the test results of the model under test include:
[0102] S501, determine the test termination status.
[0103] One optional implementation involves determining the covariance matrix of the updated security capability representation. Based on the covariance matrix, the standard error of each risk dimension associated with the updated security capability representation is determined. Based on the standard errors of each risk dimension associated with the updated security capability representation, the test termination condition is determined. In this embodiment, the expression for the covariance matrix is:
[0104] in, Fisher's information matrix; This is the covariance matrix representing the updated security capabilities.
[0105] In this embodiment, the standard error of each risk dimension associated with the updated security capability representation can be determined according to the following formula and the covariance matrix:
[0106]
[0107] Among them, in the formula This represents the standard error of the k-th risk dimension.
[0108] In this embodiment, an optional implementation for determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation is to determine the test termination condition as terminating the test when the standard error of all risk dimensions is less than or equal to a preset error threshold.
[0109] Another optional implementation of determining the test termination condition based on the standard errors of each risk dimension associated with the updated security capability representation in this embodiment is as follows: After updating the current security capability representation, the current test round is updated to obtain the updated test round. The test termination condition is determined based on the standard errors of each risk dimension associated with the updated security capability representation and / or the updated test round. In this embodiment, a counter is pre-configured. After updating the security capability representation, the counter is incremented by 1. The updated test round can be determined based on the counter value. For example, if the updatable test round is greater than or equal to a preset round threshold, and the standard errors of all risk dimensions are less than or equal to a preset error threshold, the test termination condition is determined as test termination.
[0110] Another optional implementation of determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds in this embodiment is to obtain the classification decision confidence level of each risk dimension associated with the updated security capability representation. The test termination condition is determined based on at least one of the classification decision confidence level of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test rounds. An optional implementation of obtaining the classification decision confidence level of each risk dimension associated with the updated security capability representation in this embodiment is to use the security capability value of each risk dimension of the updated security capability representation as the classification decision confidence level. In this embodiment, the test termination condition can be determined based on at least one of the following judgment conditions: for example, if all judgment conditions are met, the test termination condition can be determined as test termination; or, if any judgment condition is met, the test termination condition can be determined as test termination. The judgment criteria are: the relationship between the split decision confidence level of each risk dimension and the corresponding confidence threshold; the relationship between the updated test rounds and the preset round threshold; and the relationship between the standard error of all risk dimensions and the preset error threshold.
[0111] S502, in the case of test termination, determine the test result of the model under test based on the updated security capability representation.
[0112] Optionally, this embodiment determines the risk level of each risk dimension based on the security capability values of each risk dimension included in the updated security capability representation. The test result of the model under test is determined based on at least one of the following: security capability value, risk level, standard error, confidence interval, and total capability value (the specific determination method is described in detail in the above embodiments).
[0113] Optionally, in this embodiment, when the test termination condition is "not terminated," the priority score of each risk dimension is determined based on the security capability value and standard error of each risk dimension associated with the current security capability representation. Based on the priority scores of each risk dimension, a target dimension is determined from each risk dimension. Based on the target dimension, each second test problem is determined, and each second test problem is used as a new first problem. The process then returns to inputting each first test problem into the model under test to obtain the actual test results of the model under test for each of the second test problems. An optional implementation of determining the priority score of each risk dimension based on the security capability value and standard error of each risk dimension associated with the updated security capability representation in this embodiment is as follows: The priority score of each risk dimension is determined according to the following formula, and the security capability value and standard error of each risk dimension associated with the updated security capability representation:
[0114]
[0115] in, Weight represents the standard error of the k-th risk dimension. k This represents the risk weight of the k-th risk dimension; Target_θ represents the preset qualification benchmark security capability threshold for the k-th risk dimension. This represents the current security capability value for the k-th risk dimension.
[0116] In this embodiment, one possible implementation for determining the target dimension from each risk dimension based on the priority score of each risk dimension is to take the risk dimension associated with the highest priority score as the target dimension.
[0117] In this embodiment, one optional implementation for determining the second test question based on the target dimension is to select the second test question from the question bank associated with the target dimension. Specifically, the risk level is determined based on the current security capability value of the target dimension. Based on the risk level, a seed question is randomly selected from the seed question set of the corresponding difficulty level (each risk dimension is divided into multiple difficulty levels, and each difficulty level is configured with multiple seed questions). The second test question is then generated based on the seed question. It should be noted that the division of seed questions and the method of generating the second test question based on the seed questions are described in detail in the above embodiments and will not be repeated here.
[0118] In this embodiment, when the test does not meet the termination condition, the priority score of each dimension is calculated based on the security capability value and standard error corresponding to each risk dimension. The target dimension is selected according to the priority score, and the second test question corresponding to the target dimension is matched to continue the evaluation. This can prioritize supplementing test questions for dimensions with large measurement errors, significant gaps from the qualified standard, and higher risk levels, accurately focusing on the model's security shortcomings to carry out adaptive evaluation, avoiding redundant testing of dimensions that have already met the standard, reducing invalid test cases while ensuring evaluation accuracy, and improving overall evaluation efficiency.
[0119] In one embodiment, such as Figure 6 As shown, an optional implementation of a model testing method includes:
[0120] S601, each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0121] S602, for each first test question, based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation, determine the security response probability value of the model under test for the first test question.
[0122] S603, substitute the actual test results and safe response probability values of each first test question into the log-likelihood function to obtain the log-likelihood function representation.
[0123] S604. Based on the log-likelihood function representation and the current security capability representation, update the current security capability representation to obtain the updated security capability representation.
[0124] S605, determine the covariance matrix of the updated security capability representation.
[0125] S606, based on the covariance matrix, determine the standard error of each risk dimension associated with the updated security capability representation.
[0126] S607 updates the current security capability representation and then updates the current test round to obtain the updated test round.
[0127] S608, obtain the classification decision confidence of each risk dimension associated with the updated security capability representation.
[0128] S609, determine the test termination condition based on at least one of the following: the classification decision confidence of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test round.
[0129] S610, in the case of test termination, determines the test result of the model under test based on the updated security capability representation.
[0130] S611, In the case where the test termination condition is "test not terminated", determine the priority score of each risk dimension based on the security capability value and standard error of each risk dimension associated with the current security capability representation.
[0131] S612, determine the target dimension from each risk dimension based on the priority score of each risk dimension.
[0132] S613, Based on the target dimension, determine each second test question, and treat each second test question as a new first question. Return to execute the operation of inputting each first test question into the model under test to obtain the actual test results of the model under test for each first test question.
[0133] The model testing method in this embodiment inputs each first test question into the model under test to obtain the actual test results of the model under test for each first test question. Based on the multidimensional mathematical model and the current security capability representation of the model under test, the security response probability value of the model under test for each first test question is determined; wherein, the multidimensional data model is associated with the current security capability representation of the model under test. Based on the actual test results and security response probability values for each first test question, the current security capability representation is updated to obtain the updated security capability representation. Based on the updated security capability representation, the test results of the model under test are determined. This application collects the actual test results of the model under test on the first test question, calculates the security response probability value corresponding to each test question using a multi-dimensional mathematical model that relates the current security capability representation of the model under test, iteratively updates the security capability representation by combining the actual test results and the security response probability values, and determines the overall test result of the model under test based on the updated security capability representation. This effectively solves the technical problem that traditional static evaluation methods can only simply determine whether there is a security risk and the test results are inaccurate when the question bank is small. At the same time, it can dynamically quantify and iteratively correct the security capability representation of the model under test, and output the model test results based on the updated security capability representation, thus getting rid of the dependence on a large-scale fixed question bank and significantly improving the accuracy of the model security evaluation results.
[0134] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0135] Based on the same inventive concept, this application also provides a model testing apparatus for implementing the model testing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more model testing apparatus embodiments provided below can be found in the limitations of the model testing method described above, and will not be repeated here.
[0136] In one embodiment, by Figure 7 A structural block diagram of a model testing apparatus in one embodiment is shown. Figure 7As shown, a model testing device 1 is provided, which includes: an input module 10, a first determining module 20, an update module 30, and a second determining module 40, wherein:
[0137] Input module 10 is used to input each first test question into the model under test and obtain the actual test results of the model under test for each first test question.
[0138] The first determining module 20 is used to determine the security response probability value of the model under test for each first test question based on the multidimensional mathematical model and the current security capability representation of the model under test.
[0139] The update module 30 is used to update the current security capability representation based on the actual test results and security response probability values of each first test question, so as to obtain the updated security capability representation.
[0140] The second determination module 40 is used to determine the test results of the model under test based on the updated security capability representation.
[0141] In one embodiment, the current security capability representation includes the current security capability value of at least one risk dimension; each first test question has corresponding parameter information; the parameter information includes guessing parameters, as well as discrimination parameters and difficulty parameters corresponding to each risk dimension;
[0142] The first determining module is also specifically used for:
[0143] For each first test question, the probability value of the model under test to respond to the first test question is determined based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation.
[0144] In one embodiment, the update module is further specifically used for:
[0145] Substituting the actual test results and safe response probability values of each first test question into the log-likelihood function, we obtain the log-likelihood function representation;
[0146] Based on the log-likelihood function representation and the current security capability representation, the current security capability representation is updated to obtain the updated security capability representation.
[0147] In one embodiment, the second determining module is further specifically used for:
[0148] Determine the test termination status;
[0149] If the test is terminated, the test results of the model under test are determined based on the updated security capability representation.
[0150] In one embodiment, the second determining module is further specifically used for:
[0151] Determine the covariance matrix of the updated security capability representation;
[0152] Based on the covariance matrix, determine the standard error of each risk dimension associated with the updated security capability representation;
[0153] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation.
[0154] In one embodiment, the second determining module is further specifically used for:
[0155] After updating the current security capability representation, the current test round is updated to obtain the updated test round;
[0156] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds.
[0157] In one embodiment, the second determining module is further specifically used for:
[0158] Obtain the updated security capability representation and the classification decision confidence of each associated risk dimension;
[0159] The test termination condition is determined based on at least one of the following: the classification decision confidence of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test rounds.
[0160] In one embodiment, a model testing apparatus 1 further includes:
[0161] The third determination module is used to determine the priority score of each risk dimension based on the security capability value and standard error of each risk dimension associated with the current security capability representation when the test termination condition is that the test has not been terminated.
[0162] The fourth determination module is used to determine the target dimension from each risk dimension based on the priority score of each risk dimension;
[0163] Return to the execution module, which is used to determine each second test question based on the target dimension, and treat each second test question as a new first question. Return to the execution module to input each first test question into the model under test, and obtain the actual test results of the model under test for each first test question.
[0164] Each module in the aforementioned model testing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0165] In one embodiment, a computer device is provided, which may be a platform-side device, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores model testing information. The network interface communicates with an external user via a network connection. When the computer program is executed by the processor, it implements a model testing method.
[0166] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specifically, the computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0167] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0168] Each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0169] Based on the current security capability representation of the multidimensional mathematical model and the model under test, determine the security response probability value of the model under test for each first test question;
[0170] Based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation.
[0171] The test results of the model under test are determined based on the updated security capability representation.
[0172] In one embodiment, when the processor executes the computer program, it further implements the following steps: the current security capability representation includes the current security capability value of at least one risk dimension; each first test question has corresponding parameter information; the parameter information includes guessing parameters, as well as discrimination parameters and difficulty parameters corresponding to each risk dimension;
[0173] Based on the multidimensional mathematical model and the current security capability representation of the model under test, determine the security response probability values of the model under test for each first test question, including:
[0174] For each first test question, the probability value of the model under test to respond to the first test question is determined based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation.
[0175] In one embodiment, when the processor executes the computer program, it further performs the following steps: updating the current security capability representation based on the actual test results and security response probability values for each first test question, to obtain an updated security capability representation, including:
[0176] Substituting the actual test results and safe response probability values of each first test question into the log-likelihood function, we obtain the log-likelihood function representation;
[0177] Based on the log-likelihood function representation and the current security capability representation, the current security capability representation is updated to obtain the updated security capability representation.
[0178] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the test results of the model under test based on the updated security capability representation, including:
[0179] Determine the test termination status;
[0180] If the test is terminated, the test results of the model under test are determined based on the updated security capability representation.
[0181] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the test termination condition, including:
[0182] Determine the covariance matrix of the updated security capability representation;
[0183] Based on the covariance matrix, determine the standard error of each risk dimension associated with the updated security capability representation;
[0184] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation.
[0185] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation, including:
[0186] After updating the current security capability representation, the current test round is updated to obtain the updated test round;
[0187] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds.
[0188] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds, including:
[0189] Obtain the updated security capability representation and the classification decision confidence of each associated risk dimension;
[0190] The test termination condition is determined based on at least one of the following: the classification decision confidence of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test rounds.
[0191] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0192] If the test is terminated without termination, the priority score of each risk dimension is determined based on the security capability value and standard error of each risk dimension associated with the current security capability representation.
[0193] Based on the priority scores of each risk dimension, the target dimension is determined from each risk dimension;
[0194] Based on the target dimension, determine each second test question and treat each second test question as a new first question. Return to execute the operation of inputting each first test question into the model under test to obtain the actual test results of the model under test for each first test question.
[0195] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0196] Each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0197] Based on the current security capability representation of the multidimensional mathematical model and the model under test, determine the security response probability value of the model under test for each first test question;
[0198] Based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation.
[0199] The test results of the model under test are determined based on the updated security capability representation.
[0200] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the current security capability representation includes the current security capability value of at least one risk dimension; each first test question has corresponding parameter information; the parameter information includes guessing parameters, as well as discrimination parameters and difficulty parameters corresponding to each risk dimension;
[0201] Based on the multidimensional mathematical model and the current security capability representation of the model under test, determine the security response probability values of the model under test for each first test question, including:
[0202] For each first test question, the probability value of the model under test to respond to the first test question is determined based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation.
[0203] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: updating the current security capability representation based on the actual test results and security response probability values for each first test question, to obtain an updated security capability representation, including:
[0204] Substituting the actual test results and safe response probability values of each first test question into the log-likelihood function, we obtain the log-likelihood function representation;
[0205] Based on the log-likelihood function representation and the current security capability representation, the current security capability representation is updated to obtain the updated security capability representation.
[0206] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test results of the model under test based on the updated security capability representation, including:
[0207] Determine the test termination status;
[0208] If the test is terminated, the test results of the model under test are determined based on the updated security capability representation.
[0209] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test termination condition, including:
[0210] Determine the covariance matrix of the updated security capability representation;
[0211] Based on the covariance matrix, determine the standard error of each risk dimension associated with the updated security capability representation;
[0212] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation.
[0213] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation, including:
[0214] After updating the current security capability representation, the current test round is updated to obtain the updated test round;
[0215] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds.
[0216] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds, including:
[0217] Obtain the updated security capability representation and the classification decision confidence of each associated risk dimension;
[0218] The test termination condition is determined based on at least one of the following: the classification decision confidence of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test rounds.
[0219] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0220] If the test is terminated without termination, the priority score of each risk dimension is determined based on the security capability value and standard error of each risk dimension associated with the current security capability representation.
[0221] Based on the priority scores of each risk dimension, the target dimension is determined from each risk dimension;
[0222] Based on the target dimension, determine each second test question and treat each second test question as a new first question. Return to execute the operation of inputting each first test question into the model under test to obtain the actual test results of the model under test for each first test question.
[0223] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0224] Each of the first test questions is input into the model under test to obtain the actual test results of the model under test for each of the first test questions.
[0225] Based on the current security capability representation of the multidimensional mathematical model and the model under test, determine the security response probability value of the model under test for each first test question;
[0226] Based on the actual test results and security response probability values of each first test question, the current security capability representation is updated to obtain the updated security capability representation.
[0227] The test results of the model under test are determined based on the updated security capability representation.
[0228] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: the current security capability representation includes the current security capability value of at least one risk dimension; each first test question has corresponding parameter information; the parameter information includes guessing parameters, as well as discrimination parameters and difficulty parameters corresponding to each risk dimension;
[0229] Based on the multidimensional mathematical model and the current security capability representation of the model under test, determine the security response probability values of the model under test for each first test question, including:
[0230] For each first test question, the probability value of the model under test to respond to the first test question is determined based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation.
[0231] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: updating the current security capability representation based on the actual test results and security response probability values for each first test question, to obtain an updated security capability representation, including:
[0232] Substituting the actual test results and safe response probability values of each first test question into the log-likelihood function, we obtain the log-likelihood function representation;
[0233] Based on the log-likelihood function representation and the current security capability representation, the current security capability representation is updated to obtain the updated security capability representation.
[0234] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test results of the model under test based on the updated security capability representation, including:
[0235] Determine the test termination status;
[0236] If the test is terminated, the test results of the model under test are determined based on the updated security capability representation.
[0237] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test termination condition, including:
[0238] Determine the covariance matrix of the updated security capability representation;
[0239] Based on the covariance matrix, determine the standard error of each risk dimension associated with the updated security capability representation;
[0240] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation.
[0241] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation, including:
[0242] After updating the current security capability representation, the current test round is updated to obtain the updated test round;
[0243] The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds.
[0244] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds, including:
[0245] Obtain the updated security capability representation and the classification decision confidence of each associated risk dimension;
[0246] The test termination condition is determined based on at least one of the following: the classification decision confidence of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test rounds.
[0247] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0248] If the test is terminated without termination, the priority score of each risk dimension is determined based on the security capability value and standard error of each risk dimension associated with the current security capability representation.
[0249] Based on the priority scores of each risk dimension, the target dimension is determined from each risk dimension;
[0250] Based on the target dimension, determine each second test question and treat each second test question as a new first question. Return to execute the operation of inputting each first test question into the model under test to obtain the actual test results of the model under test for each first test question.
[0251] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0252] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0253] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A model testing method, characterized in that, The method includes: Each first test question is input into the model under test to obtain the actual test results of the model under test for each first test question. Based on the multidimensional mathematical model and the current security capability representation of the model under test, determine the security response probability value of the model under test for each first test question; Based on the actual test results of each first test question and the security response probability value, the current security capability representation is updated to obtain the updated security capability representation; The test results of the model under test are determined based on the updated security capability representation.
2. The method according to claim 1, characterized in that, The current security capability represents the current security capability value of at least one risk dimension; each of the first test questions has corresponding parameter information; the parameter information includes guessing parameters, as well as discrimination parameters and difficulty parameters corresponding to each risk dimension; The step of determining the security response probability value of the model under test for each first test question based on the multidimensional mathematical model and the current security capability representation of the model under test includes: For each first test question, the probability value of the model under test to respond to the first test question is determined based on the multidimensional mathematical model, the parameter information corresponding to the first test question, and the current security capability values of each risk dimension included in the current security capability representation.
3. The method according to claim 1, characterized in that, The step of updating the current security capability representation based on the actual test results of each first test question and the security response probability value to obtain the updated security capability representation includes: Substituting the actual test results of each first test question and the security response probability value into the log-likelihood function, we obtain the log-likelihood function representation; The current security capability representation is updated based on the log-likelihood function representation and the current security capability representation to obtain the updated security capability representation.
4. The method according to claim 2, characterized in that, Determining the test result of the model under test based on the updated security capability representation includes: Determine the test termination status; If the test is terminated, the test result of the model under test is determined based on the updated security capability representation.
5. The method according to claim 4, characterized in that, The determination of test termination status includes: Determine the covariance matrix of the updated security capability representation; Based on the covariance matrix, determine the standard error of each risk dimension associated with the updated security capability representation; The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation.
6. The method according to claim 5, characterized in that, The step of determining the test termination condition based on the standard error of each risk dimension associated with the updated security capability representation includes: After updating the current security capability representation, the current test round is updated to obtain the updated test round; The test termination condition is determined based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds.
7. The method according to claim 6, characterized in that, The determination of test termination based on the standard error of each risk dimension associated with the updated security capability representation and / or the updated test rounds includes: Obtain the updated security capability representation and the classification decision confidence of each associated risk dimension; The test termination condition is determined based on at least one of the following: the classification decision confidence of each risk dimension associated with the updated security capability representation, the standard error of each risk dimension associated with the updated security capability representation, and the updated test rounds.
8. The method according to claim 1, characterized in that, The method further includes: If the test termination condition is that the test is not terminated, the priority score of each risk dimension is determined based on the security capability value and standard error of each risk dimension associated with the current security capability representation. Based on the priority scores of each risk dimension, the target dimension is determined from each risk dimension; Based on the target dimension, each second test question is determined, and each second test question is used as a new first question. The process is then repeated to input each first test question into the model under test and obtain the actual test results of the model under test for each first test question.
9. A model testing device, characterized in that, The device includes: The input module is used to input each first test question into the model under test, and obtain the actual test results of the model under test for each first test question; The first determining module is used to determine the security response probability value of the model under test for each first test question based on the multidimensional mathematical model and the current security capability representation of the model under test. The update module is used to update the current security capability representation based on the actual test results of each first test question and the security response probability value, so as to obtain the updated security capability representation. The second determining module is used to determine the test result of the model under test based on the updated security capability representation.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
