Method and apparatus for verifying trustworthy capability of machine learning model

By using zero-knowledge proofs and blockchain technology, a verification dataset and proof data for the computation results of machine learning models are generated and verified, which solves the problem that the verifier cannot confirm the authenticity of the results and improves the credibility of trustworthiness verification.

CN119830354BActive Publication Date: 2026-06-05ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
Filing Date
2024-12-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In the existing technology, during the verification of the credibility of machine learning models, the verifier cannot confirm whether the verification results provided by the prover are performed on the actual dataset, which poses a risk of falsifying calculation results and results in low credibility.

Method used

By employing a zero-knowledge proof scheme and blockchain technology, the prover generates and stores proof data for verifying the dataset and computation results. The verifier verifies the validity of the proof data through a zero-knowledge proof algorithm, thereby confirming the authenticity of the computation results and obtaining data indicators of trustworthiness.

Benefits of technology

This improves the credibility of machine learning model credibility verification, ensuring that verification results are obtained on real datasets and avoiding the problem of falsified results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830354B_ABST
    Figure CN119830354B_ABST
Patent Text Reader

Abstract

The one or more embodiments of the application provide a method and device for verifying the trusted ability of a machine learning model, applied to a prover, the method comprising: obtaining a first verification data set; inputting the first verification data set into the machine learning model, performing inference calculation on the first verification data set by the machine learning model to obtain a first calculation result; generating first proof data for proving that the first calculation result is the calculation result of the machine learning model for the first verification data set based on a proof generation algorithm in a zero-knowledge proof scheme; and sending the first proof data to a verifier, so that the verifier performs zero-knowledge verification on the first proof data based on a proof verification algorithm in the zero-knowledge proof scheme, and when the zero-knowledge verification is passed, it is determined that the first calculation result is the calculation result of the machine learning model for the first verification data set, and data indicators for indicating the trusted ability of the machine learning model obtained by performing data analysis on the first calculation result are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this application relate to the field of artificial intelligence technology, and in particular to a method and apparatus for verifying the credibility of a machine learning model. Background Technology

[0002] The trustworthiness of machine learning models typically refers to factors such as reliability, interpretability, fairness, and security. With the widespread application of machine learning across various fields, ensuring the trustworthiness of machine learning models has become increasingly important. Therefore, validating the trustworthiness of machine learning models is crucial. Validating the trustworthiness of machine learning models can not only improve the quality and user experience of products based on these models, but also help organizations mitigate potential legal risks, ethical controversies, and business losses. Summary of the Invention

[0003] One or more embodiments of this application provide the following technical solutions:

[0004] This application provides a method for verifying the credibility of a machine learning model, applied to the prover, the method comprising:

[0005] Obtain the first validation dataset for model validation;

[0006] The first verification dataset is input into the machine learning model to be verified, and the machine learning model performs inference calculations on the first verification dataset to obtain a first calculation result corresponding to the first verification dataset.

[0007] Based on the proof generation algorithm in the preset zero-knowledge proof scheme, first proof data corresponding to the first calculation result is generated; wherein, the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset;

[0008] The first proof data is sent to the verifier so that the verifier performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification passes, the verifier determines that the first calculation result is the calculation result obtained by the machine learning model for inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis on the first calculation result.

[0009] This application also provides a method for verifying the credibility of a machine learning model, applied to a verification party, the method comprising:

[0010] Obtain first proof data; wherein, the first proof data is proof data corresponding to the first calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the first calculation result is the calculation result corresponding to the first verification dataset obtained by the prover through reasoning calculation on the first verification dataset using the machine learning model to be verified; the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through reasoning calculation on the first verification dataset;

[0011] Based on the proof verification algorithm in the zero-knowledge proof scheme, zero-knowledge verification is performed on the first proof data;

[0012] When zero-knowledge verification passes, the first calculation result is determined to be the calculation result obtained by the machine learning model through inference calculation on the first verification dataset, and data indicators used to indicate the credibility of the machine learning model are obtained by data analysis on the first calculation result.

[0013] This application also provides a credibility verification device for a machine learning model, applied to the proving party, the device comprising:

[0014] The module retrieves the first validation dataset for model validation.

[0015] The calculation module inputs the first verification dataset into the machine learning model to be verified, and the machine learning model performs inference calculations on the first verification dataset to obtain a first calculation result corresponding to the first verification dataset.

[0016] The generation module generates first proof data corresponding to the first calculation result based on the proof generation algorithm in the preset zero-knowledge proof scheme; wherein, the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset;

[0017] The verification module sends the first proof data to the verifier, so that the verifier performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification passes, the module determines that the first calculation result is the calculation result obtained by the machine learning model inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result.

[0018] This application also provides a trustworthiness verification device for a machine learning model, applied to a verification party, the device comprising:

[0019] The acquisition module acquires first proof data; wherein, the first proof data is proof data corresponding to the first calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the first calculation result is the calculation result corresponding to the first verification dataset obtained by the prover through reasoning calculation on the first verification dataset using the machine learning model to be verified; the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through reasoning calculation on the first verification dataset.

[0020] The verification module performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme.

[0021] The determination module, upon passing zero-knowledge verification, determines that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by performing data analysis on the first calculation result.

[0022] This application also provides an electronic device, including:

[0023] processor;

[0024] Memory used to store processor-executable instructions;

[0025] The processor executes the executable instructions to implement the steps of the method as described in any of the preceding descriptions.

[0026] This application also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method as described in any of the preceding claims.

[0027] In the above technical solution, the proving party can perform inference calculations on the verification dataset used for model verification based on the machine learning model to be verified, obtain the calculation result corresponding to the verification dataset, and generate proof data to prove that the calculation result is the calculation result obtained by the machine learning model through inference calculation on the verification dataset based on the proof generation algorithm in the preset zero-knowledge proof scheme. The verifying party can then perform zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme. If the zero-knowledge verification passes, it can be determined that the calculation result is indeed the calculation result obtained by the machine learning model through inference calculation on the verification dataset, and obtain data indicators to indicate the credibility of the machine learning model by data analysis of the calculation result.

[0028] By adopting the above method, since the verification results, such as data indicators used by the verifier to indicate the credibility of the machine learning model, are based on the calculation results of the verified machine learning model on the verification dataset, the verifier can confirm that the obtained verification results are obtained by verifying the machine learning model to be verified, and can confirm that these verification results are obtained by verifying the machine learning model on the actual dataset. This avoids the problem that the prover may falsify the calculation results of the machine learning model on the verification dataset to make the verification results of the machine learning model look more in line with expectations, thereby improving the credibility of the verification of the credibility of the machine learning model. Attached Figure Description

[0029] The accompanying drawings used in the description of the exemplary embodiments will now be explained, wherein:

[0030] Figure 1 This is a flowchart illustrating an exemplary embodiment of the present application of a method for verifying the credibility of a machine learning model;

[0031] Figure 2 This is a flowchart illustrating an exemplary embodiment of the present application of another method for verifying the credibility of a machine learning model;

[0032] Figure 3 This is a flowchart illustrating an exemplary embodiment of the present application of another method for verifying the credibility of a machine learning model;

[0033] Figure 4 This is a flowchart illustrating an exemplary embodiment of the present application of another method for verifying the credibility of a machine learning model;

[0034] Figure 5 This is a schematic diagram of the structure of a device shown in an exemplary embodiment of this application;

[0035] Figure 6 This is a block diagram illustrating an exemplary embodiment of this application of a machine learning model credibility verification device;

[0036] Figure 7 This is a block diagram of an exemplary embodiment of the present application illustrating a trustworthiness verification device for another machine learning model. Detailed Implementation

[0037] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this application. Rather, they are merely examples consistent with some aspects of one or more embodiments of this application.

[0038] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this application in other embodiments. In some other embodiments, the methods may include more or fewer steps than those described in this application. Furthermore, a single step described in this application may be broken down into multiple steps in other embodiments; and multiple steps described in this application may be combined into a single step in other embodiments.

[0039] The reliability of a machine learning model can typically include the following aspects: reliability, interpretability, fairness, security, generalization, sustainability, and compliance.

[0040] Reliability can be further divided into stability and robustness. Stability refers to the model's consistent performance across different datasets, while robustness means the model is insensitive to small changes in input data and can handle noise and outliers. Interpretability refers to understanding how the model makes decisions, and the model should be as simple as possible, easy to understand and validate. Fairness means the model should not discriminate against specific groups, and should produce similar results for similar situations. Security can be further included defense against adversarial attacks and privacy protection. Defense against adversarial attacks means the model needs to resist deliberate designs to mislead its input, while privacy protection means protecting user privacy when processing data. Generalization ability refers to the model's ability to avoid overfitting and underfitting, requiring the model to be neither too complex nor too simple to ensure good performance on new data. Sustainability can be further included resource efficiency and maintenance and updates. Resource efficiency means minimizing the computational resources and energy consumed during model training and runtime, while maintenance and updates mean the model needs to be updated regularly to adapt to new data and environmental changes. Compliance refers to ensuring that the model's use complies with relevant regulatory requirements and follows industry- and societal ethical guidelines.

[0041] Building a reliable machine learning model typically requires comprehensive consideration of all the above aspects and continuous iterative optimization in practice. For example, this includes conducting thorough testing before deploying the model, using techniques such as ensemble learning or rule extraction to improve the model's interpretability, and employing methods like differential privacy to protect the model's privacy. Furthermore, it involves verifying the reliability of the deployed machine learning model, especially its robustness, to demonstrate its dependability.

[0042] In practical applications, the party that performs specific verification tasks on the machine learning model can be called the proving party, and the party that understands the reliability of the machine learning model through the verification results can be called the verifying party.

[0043] In related technologies, one method for verifying the credibility of a machine learning model involves the proving party setting up a verification dataset and testing the machine learning model on that dataset. This involves the machine learning model performing inference calculations on the verification dataset to obtain calculation results corresponding to the dataset. Subsequently, the proving party can issue a model verification report based on the calculation results corresponding to the verification dataset, and declare the verification results of the machine learning model's performance, stability, and robustness in the report. This allows the verifying party to understand the credibility of the machine learning model through the model verification report issued by the proving party.

[0044] In practical applications, the evaluation results of machine learning models can be presented using metrics such as KS (Kolmogorov-Smirnov) or PSI (Population Stability Index). The KS statistic is a statistic used to evaluate the discriminative power of a classification model; it measures the maximum difference in the cumulative distribution functions between positive and negative samples. A higher KS statistic indicates a stronger ability to distinguish between positive and negative samples. The PSI statistic is used to evaluate model stability; it measures the degree of change in the target population (usually new or future data) relative to the original population (baseline data) used in model construction. The closer the PSI value is to 0, the more similar the distributions of the new and original data are, and the more stable the model.

[0045] Another way to verify the credibility of a machine learning model is for the verifier to provide a verification dataset to the prover. The prover then tests the machine learning model to be verified on the verification dataset and returns the calculation results corresponding to the verification dataset to the verifier. The verifier then calculates indicators such as KS or PSI based on the calculation results corresponding to the verification dataset to understand the credibility of the machine learning model.

[0046] However, in the first method described above, the verifier can only see the model verification report issued by the prover, which makes it impossible for the verifier to confirm whether the verification results of the machine learning model's performance, stability, and robustness as stated in the model verification report were obtained by verifying the machine learning model to be verified on an actual dataset.

[0047] In the second approach described above, although the verifier can confirm that the test results for the model performance, stability, and robustness of the machine learning model were obtained by testing on the actual dataset, it still cannot confirm that these test results were obtained by testing the machine learning model that needs to be verified.

[0048] Therefore, in both of the above methods, there is a problem that the prover may forge the calculation results calculated by the machine learning model corresponding to the verification dataset, making the verification results of the machine learning model look more in line with expectations, thereby resulting in a lower credibility of the verification of the machine learning model's credibility capability.

[0049] This application provides one or more embodiments of a technical solution for verifying the credibility of a machine learning model. In this technical solution, the proving party can perform inference calculations on a verification dataset for model verification based on the machine learning model to be verified, obtain calculation results corresponding to the verification dataset, and generate proof data to prove that the calculation result is a calculation result obtained by the machine learning model through inference calculations on the verification dataset based on a preset zero-knowledge proof scheme. The verifying party can then perform zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme. If the zero-knowledge verification passes, it can be determined that the calculation result is indeed a calculation result obtained by the machine learning model through inference calculations on the verification dataset, and obtain data indicators for indicating the credibility of the machine learning model obtained by data analysis on the calculation result.

[0050] By adopting the above method, since the verification results, such as the data indicators used by the verifier to indicate the credibility of the machine learning model, are based on the calculation results of the verified machine learning model on the verification dataset, the verifier can confirm that the obtained verification results are obtained by verifying the machine learning model to be verified, and can confirm that these verification results are obtained by verifying the machine learning model on the actual dataset. This avoids the problem that the prover may falsify the calculation results of the machine learning model on the verification dataset to make the verification results of the machine learning model look more in line with expectations, thereby improving the credibility of the verification of the credibility of the machine learning model.

[0051] To facilitate understanding, the zero-knowledge proof scheme and blockchain technology involved in the technical solution provided in this application will be briefly explained below.

[0052] (1) Zero-knowledge proof scheme

[0053] Zero-Knowledge Proof (ZKP) is a cryptographic technique that allows one party (called the "Prover") to prove to another party (called the "Verifier") that a statement is true without revealing any information about the statement other than the truth of the statement itself.

[0054] Zero-knowledge proof schemes are typically divided into proof generation algorithms and proof verification algorithms. These two algorithms together constitute the core of a zero-knowledge proof system. The proof generation algorithm, executed by the prover, aims to generate a proof to demonstrate the truth of a statement. It typically includes the following steps: converting the statement to be proven into a mathematical form suitable for the zero-knowledge proof protocol, such as a Boolean circuit or arithmetic circuit; performing calculations based on the statement and evidence to generate the proof, which may involve polynomial calculations, elliptic curve operations, etc.; and finally generating a proof that contains enough information to convince the verifier of the statement's truth without revealing any additional information. The proof verification algorithm, executed by the verifier, aims to verify the validity of the proof to confirm the statement's truth. It typically includes the following steps: performing a series of mathematical operations to verify the proof's validity; if verification is successful, the verifier accepts the proof; otherwise, the verifier rejects the proof.

[0055] (2) Blockchain technology

[0056] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus protocols, and cryptographic algorithms. In a blockchain system, data blocks are sequentially linked together to form a chain-like data structure, and a distributed ledger is cryptographically guaranteed to be immutable and unforgeable. Due to its decentralized, immutable, and autonomous characteristics, blockchain is becoming increasingly widely used.

[0057] Blockchain is generally classified into three types: public blockchain, private blockchain, and consortium blockchain. Furthermore, combinations of these types are possible, such as a combination of private and consortium blockchains, or a combination of consortium and public blockchains.

[0058] Of the three types of blockchains mentioned above, public blockchains offer the highest degree of decentralization. Participants in a public blockchain (also known as nodes in the blockchain) can read data records on the chain, participate in transactions, and compete for the right to record new blocks. Moreover, nodes can freely join or leave the network and perform related operations.

[0059] In contrast, private blockchains have write permissions controlled by a specific organization or institution, and data read permissions are governed by the organization's regulations. That is, a private blockchain can be viewed as a weakly centralized system, with strict restrictions on the number of nodes and a relatively small number of nodes. This type of blockchain is more suitable for use within specific organizations.

[0060] Consortium blockchains fall between public and private blockchains, enabling "partial decentralization." Each node in a consortium blockchain typically has a corresponding entity or organization; nodes join the network through authorization and form a consortium of stakeholders to jointly maintain the operation of the blockchain.

[0061] Based on the fundamental characteristics of blockchain, a blockchain is typically composed of several blocks. Each of these blocks records a timestamp corresponding to the time of its creation. All blocks strictly follow the timestamps recorded in the blocks, forming a time-ordered data chain.

[0062] For data generated outside the blockchain, this data can be constructed into a standard transaction format supported by the blockchain, and then published to the blockchain. The nodes participating in the consensus in the blockchain system will reach a consensus on this transaction, and execute the transaction after the consensus is completed. In this way, the transaction and the execution result can be persistently stored in the blockchain.

[0063] In a blockchain system, different participants can establish a distributed blockchain network through their deployed nodes. The decentralized (or multi-centralized) distributed ledger, constructed using a chain-like block structure, is stored on each node (or a majority of nodes, such as consensus nodes) in the distributed blockchain network. This type of blockchain system needs to address the consistency and correctness of the ledger data across multiple decentralized (or multi-centralized) nodes. Each node in the blockchain system runs a blockchain program. With certain fault tolerance requirements, a consensus protocol ensures that all loyal nodes have the same transactions, thereby guaranteeing consistent execution results for the same transactions across all loyal nodes. The transactions and execution results are then packaged into blocks.

[0064] Specifically, all consensus nodes in a blockchain system can reach a consensus on the transactions contained in a new block to be connected to the chained block structure, based on a consensus protocol. This ensures that all consensus nodes agree on the content and order of the transactions contained in the block. After consensus is reached, each consensus node can execute the transactions contained in the block in sequence, and the block is finalized when the execution results of all consensus nodes are confirmed to be consistent. Finalization means that the transactions contained in the block have been executed and the execution results are accepted by all consensus nodes (or a certain number of consensus nodes, such as two-thirds of the consensus nodes).

[0065] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating an exemplary embodiment of the present application of a method for verifying the credibility of a machine learning model.

[0066] As mentioned earlier, in the process of verifying the credibility of a machine learning model, the party that performs specific verification tasks on the machine learning model can be called the proving party, and the party that understands the credibility of the machine learning model through the verification results can be called the verifying party.

[0067] The credibility verification method of the above machine learning model can be applied to the above proof; such as Figure 1 As shown, the method may include the following steps:

[0068] Step 102: Obtain the first validation dataset for model validation.

[0069] In this embodiment, the proving party can first obtain a validation dataset (which may be referred to as the first validation dataset) for model validation, and then use the first validation dataset to verify the credibility of the machine learning model to be validated.

[0070] It should be noted that the first verification dataset mentioned above can be a verification dataset set by the proving party itself, or a verification dataset provided by the proving party to the proving party. This application does not impose any special restrictions on this.

[0071] In some embodiments, to ensure the data security and reliability of the first verification dataset, the immutability, transparency, and security characteristics of blockchain can be utilized. The proving party can publish the first verification dataset to a pre-built blockchain for storage. In this case, when the proving party subsequently needs to use the first verification dataset to verify the trustworthiness of the machine learning model to be verified, it can obtain the first verification dataset from this blockchain.

[0072] Step 104: Input the first verification dataset into the machine learning model to be verified, and the machine learning model performs inference calculations on the first verification dataset to obtain the first calculation result corresponding to the first verification dataset.

[0073] In this embodiment, the proving party can perform inference calculations on the first verification dataset based on the machine learning model to be verified. That is, the first verification dataset can be input into the machine learning model to be verified, and the machine learning model can perform inference calculations on the first verification dataset. In this case, the inference calculation result of the machine learning model on the first verification dataset can be used as the calculation result corresponding to the first verification dataset (which can be referred to as the first calculation result).

[0074] For example, assuming the machine learning model to be validated is a classification model, the machine learning model performs inference calculations on the first validation dataset mentioned above, that is, the machine learning model predicts the category to which each validation data in the first validation dataset belongs. The category to which each validation data in the first validation dataset belongs, predicted by the machine learning model, is the first calculation result corresponding to each validation data in the first validation dataset.

[0075] In some embodiments, to ensure the data security and reliability of the first calculation result, the immutability, transparency, and security characteristics of blockchain can be utilized, allowing the proving party to publish the first calculation result to a pre-built blockchain for storage. In this case, when the verifying party subsequently needs to use the first calculation result to verify the trustworthiness of the machine learning model to be verified, it can obtain the first calculation result from the blockchain.

[0076] Step 106: Based on the proof generation algorithm in the preset zero-knowledge proof scheme, generate first proof data corresponding to the first calculation result; wherein, the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset.

[0077] In this embodiment, zero-knowledge proof technology can be used to verify the credibility of the above machine learning model.

[0078] It's important to note that in zero-knowledge proof techniques, the statement to be proven refers to a claim or assertion that needs to be verified using zero-knowledge proof technology. When using zero-knowledge proof techniques to verify machine learning models, the statement to be proven can specifically be a description of a property or behavior of the machine learning model. For example, this statement can be used to prove: the model's accuracy on a given dataset reaches a certain threshold; the model's prediction results for a specific input; the model was trained on a given dataset and followed a certain training process; the model's decision-making process is fair and does not bias against any particular group; the model's training and prediction processes do not leak the data used in training; some parameters of the model are within a certain range; the model's complexity (e.g., number of layers, number of neurons) does not exceed a certain upper limit; multiple models give consistent outputs under the same input; and so on.

[0079] For the aforementioned machine learning model, a true statement (which may be called the first statement) that needs to be proven can be prepared for the machine learning model. In this case, the content of the first statement may specifically be the calculation result obtained by the aforementioned machine learning model through inference calculation on the aforementioned first verification dataset.

[0080] In this case, the aforementioned prover can generate proof data (i.e., Proof, which can be called first proof data) corresponding to the aforementioned first calculation result based on the proof generation algorithm in the pre-set zero-knowledge proof scheme; for example, the first proof data can be generated based on the aforementioned first verification dataset, the aforementioned first calculation result, and the intermediate data generated during the inference calculation process.

[0081] In practical applications, to enhance the correlation between the aforementioned first proof data and the aforementioned machine learning model, first proof data can be generated based on the aforementioned first verification dataset, the aforementioned first calculation result, and the aforementioned machine learning model's model data. The machine learning model's model data can be the machine learning model's own code data, or data representing the machine learning model's computational logic and parameters, etc.

[0082] Furthermore, to ensure the data security, integrity, and non-repudiation of the model data of the aforementioned machine learning model when generating the first proof data, commitment data corresponding to the model data of the machine learning model can be generated based on a preset commitment scheme. Then, based on the aforementioned first verification dataset, the aforementioned first calculation result, and the commitment data, the first proof data can be generated. Specifically, the commitment data corresponding to the model data of the machine learning model can be generated by calculating the hash value of the machine learning model; for example, the hash value of the machine learning model can be directly used as the commitment data corresponding to the model data of the machine learning model.

[0083] A commitment scheme is a technique that allows one party (the committing party) to lock in a value and reveal it at some future time without it being tampered with. This process ensures that even before the value is revealed, a third party cannot change it, thus guaranteeing data integrity and non-repudiation. Furthermore, the verifying party cannot deduce the original data from the committed data, thereby ensuring data security.

[0084] For example, let A represent the first verification dataset, R represent the first calculation result, model represent the commitment data corresponding to the model data of the machine learning model, and P(x) represent the proof generation algorithm in the zero-knowledge proof scheme. Then the first proof data can be represented as P = P(A, R, model).

[0085] In some embodiments, to ensure the security and reliability of the first proof data, the immutability, transparency, and security characteristics of blockchain can be utilized, allowing the proving party to publish the first proof data to a pre-built blockchain for storage. In this case, when the verifying party subsequently needs to use the first proof data to verify the trustworthiness of the machine learning model to be verified, it can obtain the first proof data from this blockchain.

[0086] Similarly, the proving party can also publish the commitment data corresponding to the model data of the aforementioned machine learning model to the aforementioned blockchain for storage. In this case, when the verifying party subsequently needs to use the commitment data to verify the trustworthiness of the machine learning model, it can retrieve the commitment data from the blockchain.

[0087] Step 108: Send the first proof data to the verifier so that the verifier can perform zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification is successful, determine that the first calculation result is the calculation result obtained by the machine learning model for inference calculation on the first verification dataset, and obtain data indicators for indicating the credibility of the machine learning model by data analysis on the first calculation result.

[0088] In this embodiment, in order for the verifier to perform credibility verification on the machine learning model, the prover can send the first proof data to the verifier.

[0089] Having obtained the first proof data, the verifier can perform zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme, that is, verify the validity of the first proof data in a zero-knowledge manner. For example, it can perform zero-knowledge verification on the first proof data based on the first verification dataset, the first calculation result, and the first proof data itself. If the zero-knowledge verification passes, it indicates that the first proof data is valid, allowing the verifier to determine that the first calculation result was indeed obtained by the machine learning model through inference calculation on the first verification dataset. Furthermore, the verifier can obtain data indicators indicating the credibility of the machine learning model (e.g., model performance) obtained through data analysis of the first calculation result, and can confirm that these data indicators were obtained by testing the machine learning model on an actual dataset, therefore the credibility of the machine learning model indicated by these data indicators is real.

[0090] For example, if the proof verification algorithm in the above zero-knowledge proof scheme is represented by the function V(x), then it is necessary to verify V(A,R,P)? = True, that is, to verify whether the above first verification dataset, the above first calculation result and the above first proof data satisfy the mathematical relationship described by the function V(x).

[0091] It should be noted that in zero-knowledge proof technology, a circuit can be used to describe the computational process to be proven (in this application, this computational process is the inference computation process of the machine learning model to be verified). This circuit is then converted into a constraint system (CS) to generate the proof. Specifically, the computational logic to be proven can first be represented as a circuit; a circuit is a network of logic gates (such as AND, OR, etc.), i.e., a logic gate circuit, which can represent any complex computational process. Then, this circuit is converted into a constraint system; the constraint system is typically a set of mathematical equations that describe the relationships between the nodes in the circuit, ensuring the correct execution of the circuit; the constraint system can be a Boolean constraint system or an arithmetic constraint system. Finally, the constraint system can be further converted into polynomials. By committing to these polynomials, a concise proof can be generated. In implementation, the prover can use these polynomial commitments to construct the proof, which contains information that the prover knows how to correctly execute the circuit, but does not reveal the actual input or other sensitive information. Correspondingly, the verifier can verify the validity of the proof; the verifier does not need to know the prover's input or intermediate computational steps, only whether the proof is valid.

[0092] In some embodiments, when generating the first proof data based on the proof generation algorithm in the zero-knowledge proof scheme, the size of the logic gate circuit can be preset. Subsequently, based on the circuit generation algorithm in the zero-knowledge proof scheme, the reasoning logic of the machine learning model can be represented as a logic gate circuit, the size of which is the preset size. Based on the proof generation algorithm in the zero-knowledge proof scheme, the logic gate circuit is converted into a constraint system. The mathematical equations contained in the constraint system can then be used as proof functions. Thus, the first verification dataset and the first calculation result can be used as input parameters of the proof function and substituted into the proof function for calculation to generate the first proof data.

[0093] In the proof verification algorithm based on the aforementioned zero-knowledge proof scheme, when performing zero-knowledge verification on the first proof data, the first verification dataset and the first calculation result can be used as input parameters to the verification function included in the proof verification algorithm. These parameters are then substituted into the verification function for calculation to perform zero-knowledge verification on the first proof data. In this case, the calculation result of the verification function can be used to determine whether the zero-knowledge verification on the first proof data has passed.

[0094] In practical applications, the above constraint system can be R1CS (Rank-1 Constraint System).

[0095] The size of a logic gate circuit refers to its scale, which can include the following aspects: the number of gates, the number of signal lines, depth, and width. The number of gates refers to the number of basic logic units that make up the circuit; each gate typically represents an arithmetic operation, such as addition or multiplication; the more gates a circuit has, the larger it is. Signal lines connect the various gates in the circuit, and the number of signal lines can also be used as an indicator of circuit size. Depth refers to the number of gates traversed along the longest path from input to output; depth reflects the complexity of the computation. Width refers to the maximum fan-out (i.e., the maximum number of signal lines participating in the operation simultaneously) or the number of gates in the largest layer.

[0096] In some embodiments, the machine learning model described above can be a tree model. In this case, the size of the logic gate circuit (in this application, the size of the logic gate circuit can be the number of gates in the logic gate circuit) is related to the model size of the tree model; for example, the number of trees, the number of samples, the number of attributes of the samples, the depth of the tree, the maximum number of nodes in the tree, etc.

[0097] Order 2 k (k is a natural number) represents the size of the logic gate circuit, num treenum represents the number of trees in the machine learning model. depth The max represents the depth of the tree in the machine learning model. node num represents the maximum number of nodes in the tree of the machine learning model. sample num represents the number of samples required for the machine learning model to perform inference computation. attr Given the number of attributes of the samples used by the machine learning model to perform inference calculations, the size of the aforementioned logic gate circuit should generally satisfy the following three conditions:

[0098] num tree *num sample *num dept h≤2 k -10

[0099] num sample *num attr ≤2 k -10

[0100] max node ≤(2 k -10) / 130

[0101] In some embodiments, the value of k can be the minimum value that satisfies the above three conditions. Making the value of k as small as possible while satisfying these three inequalities can improve the computational efficiency of generating the proof and reduce the data size of the generated proof.

[0102] and Figure 1 Accordingly, please refer to Figure 2 , Figure 2 This is a flowchart illustrating an exemplary embodiment of the present application of another method for verifying the credibility of a machine learning model.

[0103] The credibility verification method of the above machine learning model can be applied to the above verification method; such as Figure 2 As shown, the method may include the following steps:

[0104] Step 202: Obtain first proof data; wherein, the first proof data is proof data corresponding to the first calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the first calculation result is the calculation result corresponding to the first verification dataset obtained by the prover through the machine learning model to be verified for inference calculation on the first verification dataset; the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model for inference calculation on the first verification dataset.

[0105] Step 204: Perform zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme.

[0106] Step 206: When the zero-knowledge verification passes, determine that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset, and obtain data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result.

[0107] The specific implementation of steps 202 to 206 above can be referred to as follows: Figure 1 The embodiments shown are not described in detail here.

[0108] In the above technical solution, the proving party can perform inference calculations on the verification dataset used for model verification based on the machine learning model to be verified, obtain the calculation result corresponding to the verification dataset, and generate proof data to prove that the calculation result is the calculation result obtained by the machine learning model through inference calculation on the verification dataset based on the proof generation algorithm in the preset zero-knowledge proof scheme. The verifying party can then perform zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme. If the zero-knowledge verification passes, it can be determined that the calculation result is indeed the calculation result obtained by the machine learning model through inference calculation on the verification dataset, and obtain data indicators to indicate the credibility of the machine learning model by data analysis of the calculation result.

[0109] By adopting the above method, since the verification results, such as the data indicators used by the verifier to indicate the credibility of the machine learning model, are based on the calculation results of the verified machine learning model on the verification dataset, the verifier can confirm that the obtained verification results are obtained by verifying the machine learning model to be verified, and can confirm that these verification results are obtained by verifying the machine learning model on the actual dataset. This avoids the problem that the prover may falsify the calculation results of the machine learning model on the verification dataset to make the verification results of the machine learning model look more in line with expectations, thereby improving the credibility of the verification of the credibility of the machine learning model.

[0110] To enable the verification party to further understand the stability and robustness of the machine learning model, specific data processing can be performed on the first verification dataset. Based on the machine learning model, inference calculations can be performed on the processed verification dataset to obtain the calculation results corresponding to the processed verification dataset. By comparing and analyzing the changes between the first calculation results and the calculation results corresponding to the processed verification dataset, the stability and robustness of the machine learning model can be determined.

[0111] exist Figure 1 Based on this, please refer to Figure 3 , Figure 3 This is a flowchart illustrating an exemplary embodiment of the present application of another method for verifying the credibility of a machine learning model.

[0112] and Figure 1 Similarly, the credibility verification method of the above machine learning model can be applied to the above proof; such as Figure 3 As shown, the method may include the following steps:

[0113] Step 302: Obtain the first validation dataset for model validation.

[0114] The specific implementation of step 302 above can be referred to as follows: Figure 1 The embodiments shown are not described in detail here.

[0115] Step 304: Perform sample perturbation processing on the first verification dataset to obtain the second verification dataset.

[0116] In this embodiment, the first verification dataset can be subjected to sample perturbation processing, and the resulting processed verification dataset can be referred to as the second verification dataset.

[0117] Sample perturbation is a technique used in machine learning and data analysis to study the stability and robustness of models by making small changes or adding noise to the original data samples. In practical applications, sample perturbation methods and their application scenarios can include: Adding noise, which involves adding random noise, such as Gaussian noise or uniform noise, to the feature values ​​in the sample. This method is often used for data augmentation, feature importance assessment, and the generation of adversarial attacks. Feature scaling involves changing the scale of a feature, such as multiplying a feature by a coefficient less than 1 or adding a decimal. This method can be used to evaluate the model's sensitivity to data at different scales. Feature occlusion involves temporarily replacing or masking certain feature values ​​and observing changes in the model's prediction results. This can be used to determine which features are most important to the model's decision. Feature shuffling involves randomly shuffling the feature values ​​in the sample to assess whether the model is overfitting to a specific data arrangement. Data interpolation involves generating new samples by interpolating between two or more samples. This method can be used to create more diverse and realistic training data. Geometric transformation... Transformations, specifically in image processing, involve generating new samples through geometric transformations such as rotation, scaling, and translation. This method is particularly suitable for tasks requiring augmentation of image datasets. Time-series perturbations, for time-series data, can create new samples using methods such as sliding windows, filling missing values, and time shifting. Text perturbations, specifically in natural language processing, can generate new text samples through synonym replacement, sentence insertion, or deletion. Adversarial perturbations involve adding small perturbations to mislead the model, causing it to make incorrect predictions; this method is often used to test the robustness of models. And so on.

[0118] In some embodiments, to ensure the data security and reliability of the second verification dataset, the immutability, transparency, and security characteristics of blockchain can be utilized. The proving party can publish the second verification dataset to a pre-built blockchain for storage. In this case, when the proving party subsequently needs to use the second verification dataset to verify the trustworthiness of the machine learning model to be verified, it can obtain the second verification dataset from this blockchain.

[0119] Step 306: Input the first verification dataset and the second verification dataset into the machine learning model, and have the machine learning model perform inference calculations on the first verification dataset and the second verification dataset respectively to obtain a first calculation result corresponding to the first verification dataset and a second calculation result corresponding to the second verification dataset.

[0120] In this embodiment, on the one hand, the proving party can input the first verification dataset into the machine learning model to be verified, and the machine learning model can perform inference calculations on the first verification dataset to obtain the first calculation result corresponding to the first verification dataset.

[0121] On the other hand, the aforementioned proof can perform inference calculations on the second verification dataset based on the machine learning model to be verified. That is, the second verification dataset can be input into the machine learning model to be verified, and the machine learning model can perform inference calculations on the second verification dataset. In this case, the inference calculation result of the machine learning model on the second verification dataset can be used as the calculation result corresponding to the second verification dataset (which can be called the second calculation result).

[0122] In some embodiments, to ensure the data security and reliability of the first and second calculation results, the immutability, transparency, and security characteristics of blockchain can be utilized. The proving party can publish the first and second calculation results to a pre-built blockchain for storage. In this case, when the verifying party subsequently needs to use the first and second calculation results to verify the trustworthiness of the machine learning model to be verified, it can obtain the first and second calculation results from the blockchain.

[0123] Step 308: Based on the proof generation algorithm in the preset zero-knowledge proof scheme, generate first proof data corresponding to the first calculation result and second proof data corresponding to the second calculation result; wherein, the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset; the second proof data is used to prove that the second calculation result is the calculation result obtained by the machine learning model through inference calculation on the second verification dataset.

[0124] In this embodiment, zero-knowledge proof technology can be used to verify the credibility of the aforementioned machine learning model. For the aforementioned machine learning model, the first statement can be prepared for the machine learning model, and another true statement (which can be called the second statement) that needs to be proved can be prepared. In this case, the content of the second statement can specifically be the calculation result obtained by the aforementioned machine learning model through inference calculation on the aforementioned second verification dataset.

[0125] In this case, the aforementioned proof party can generate first proof data corresponding to the first calculation result based on the proof generation algorithm in the pre-set zero-knowledge proof scheme, and generate proof data (i.e., Proof, which can be called second proof data) corresponding to the second calculation result; for example, the second proof data can be generated based on the second verification dataset, the second calculation result, and the intermediate data generated during the inference calculation process.

[0126] Similar to step 106 above, in order to enhance the correlation between the second proof data and the machine learning model, second proof data can be generated based on the second verification dataset, the second calculation result, and the model data of the machine learning model.

[0127] Furthermore, to ensure the data security, integrity, and non-repudiation of the machine learning model when generating the second proof data, commitment data corresponding to the model data of the machine learning model can be generated based on a preset commitment scheme. Then, based on the second verification dataset, the second calculation result, and the commitment data, the second proof data can be generated. Specifically, the commitment data corresponding to the model data of the machine learning model can be generated by calculating its hash value; for example, the hash value of the machine learning model can be directly used as the commitment data corresponding to its model data.

[0128] For example, let A represent the first verification dataset, R represent the first calculation result, A' represent the second verification set, R' represent the second calculation result, model represent the commitment data corresponding to the model data of the machine learning model, and P(x) represent the proof generation algorithm in the zero-knowledge proof scheme. Then, the first proof data can be represented as P(A,R,model), and the second proof data can be represented as P'(A',R',model).

[0129] In some embodiments, to ensure the security and reliability of the first and second proof data, the immutability, transparency, and security characteristics of blockchain can be utilized. The proving party can publish the first and second proof data to a pre-built blockchain for storage. In this case, when the verifying party subsequently needs to use the first and second proof data to verify the trustworthiness of the machine learning model to be verified, it can obtain the first and second proof data from this blockchain.

[0130] Step 310: Send the first proof data and the second proof data to the verifier, so that the verifier can perform zero-knowledge verification on the first proof data and the second proof data respectively based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification is passed, determine that the first calculation result is the calculation result obtained by the machine learning model for inference calculation on the first verification dataset, and the second calculation result is the calculation result obtained by the machine learning model for inference calculation on the second verification dataset. Obtain data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result and the second calculation result.

[0131] In this embodiment, in order for the verifier to perform trustworthiness verification on the machine learning model, the prover can send the first proof data and the second proof data to the verifier.

[0132] Having obtained the first proof data and the second proof data, the verifier can, on the one hand, perform zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme, that is, verify the validity of the first proof data in a zero-knowledge manner; for example, the validity of the first proof data can be verified based on the first verification dataset, the first calculation result, and the first proof data itself. If the zero-knowledge verification passes, it indicates that the first proof data is valid, enabling the verifier to determine that the first calculation result is indeed the result obtained by the machine learning model through inference calculation on the first verification dataset.

[0133] On the other hand, the proof verification algorithm in the aforementioned zero-knowledge proof scheme can be used to perform zero-knowledge verification on the second proof data, that is, to verify the validity of the second proof data in a zero-knowledge manner. For example, the validity of the second proof data can be verified based on the aforementioned second verification dataset, the aforementioned second calculation result, and the second proof data itself. If the zero-knowledge verification passes, it indicates that the second proof data is valid, allowing the verifier to determine that the aforementioned second calculation result is indeed the result obtained by the aforementioned machine learning model through inference calculation on the aforementioned second verification dataset.

[0134] If the verification party confirms that the first calculation result was indeed obtained by the machine learning model through inference calculation on the first verification dataset, and that the second calculation result was indeed obtained by the machine learning model through inference calculation on the second verification dataset, then data indicators indicating the reliability of the machine learning model can be obtained through data analysis of the first and second calculation results. At this point, not only can data indicators indicating the model performance of the machine learning model be obtained through data analysis of the first calculation result, but also data indicators indicating the model performance of the machine learning model can be obtained through data analysis of the second calculation result. Furthermore, data indicators indicating the robustness and stability of the machine learning model can be obtained through data analysis of the first and second calculation results. Moreover, it can be confirmed that these data indicators were obtained by testing the machine learning model on actual datasets; therefore, the reliability of the machine learning model indicated by these data indicators is genuine.

[0135] For example, if the proof verification algorithm in the above zero-knowledge proof scheme is represented by the function V(x), then on the one hand, it can verify that V(A,R,P)? = True, that is, verify whether the above first verification dataset, the above first calculation result and the above first proof data satisfy the mathematical relationship described by the function V(x); on the other hand, it can verify that V(A',R',P')? = True, that is, verify whether the above second verification dataset, the above second calculation result and the above second proof data satisfy the mathematical relationship described by the function V(x).

[0136] and Figure 3 Accordingly, please refer to Figure 4 , Figure 4 This is a flowchart illustrating an exemplary embodiment of the present application of another method for verifying the credibility of a machine learning model.

[0137] The credibility verification method of the above machine learning model can be applied to the above verification method; such as Figure 4 As shown, the method may include the following steps:

[0138] Step 402: Obtain first proof data and second proof data; wherein, the first proof data is proof data corresponding to the first calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the first calculation result is the calculation result corresponding to the first verification dataset obtained by the prover through reasoning calculation on the first verification dataset using the machine learning model to be verified; the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through reasoning calculation on the first verification dataset; the second proof data is proof data corresponding to the second calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the second calculation result is the calculation result corresponding to the second verification dataset obtained by the prover through reasoning calculation on the second verification dataset using the machine learning model to be verified; the second proof data is used to prove that the second calculation result is the calculation result obtained by the machine learning model through reasoning calculation on the second verification dataset; the second verification dataset is a verification dataset obtained by perturbating the first verification dataset.

[0139] Step 404: Based on the proof verification algorithm in the zero-knowledge proof scheme, perform zero-knowledge verification on the first proof data and the second proof data respectively.

[0140] Step 406: When zero-knowledge verification passes, determine that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset, and the second calculation result is the calculation result obtained by the machine learning model through inference calculation on the second verification dataset. Then, obtain data indicators for indicating the credibility of the machine learning model by performing data analysis on the first calculation result and the second calculation result.

[0141] The specific implementation of steps 402 to 406 above can be referred to as follows: Figure 3 The embodiments shown are not described in detail here.

[0142] It's worth noting that in zero-knowledge proof technology, a proof key can be used to generate the proof, and a verification key can be used to verify its validity. The existence of these two sets of keys ensures that only those with specific knowledge can generate a valid proof, while also preventing others from forging it. Furthermore, the design of the proof and verification keys allows for a very compact proof and a highly efficient verification process. With these two sets of keys, no further interaction is needed between the prover and the verifier; the proof can be generated and submitted to the verifier independently.

[0143] The proof key is a set of parameters used to help the prover construct a zero-knowledge proof. The proof key is typically generated through a trusted setup process involving random numbers and other secret values, which are destroyed after the proof key is generated. The proof key itself does not contain any secret information, but it contains enough information for the prover to create a valid proof.

[0144] The verification key is another set of parameters generated by the trusted setup process, used by the verifier to check the validity of the proof. The verification key also does not contain any secret information, but it contains all the information the verifier needs to determine whether a proof is a valid proof for a given statement.

[0145] Trusted setup refers to an initialization phase in which circuits or circuit-defined constraint systems are used to generate proof and verification keys. During this phase, the secret values ​​required to generate the proof and verification keys are generated collaboratively by multiple parties or in a unilateral process, and these secret values ​​must then be securely destroyed. This is to prevent the misuse of these secret values ​​to forge proofs. If the secret values ​​are not destroyed, or if the trusted setup is compromised, the system's security may be compromised.

[0146] Based on this, in some embodiments, the verifier can represent the reasoning logic of the machine learning model as a logic gate circuit based on the circuit representation algorithm in the zero-knowledge proof scheme, and generate a proof key corresponding to the proof generation algorithm and a verification key corresponding to the proof verification algorithm in the zero-knowledge proof scheme based on the logic gate circuit.

[0147] In order for the aforementioned proving party to obtain the aforementioned proof key and use the proof key to generate proof data, the aforementioned verifying party may send the proof key to the proving party.

[0148] Upon obtaining the aforementioned proof key, the proving party can, on the one hand, input the proof key, the aforementioned first verification dataset, the aforementioned first calculation result, and the model data of the aforementioned machine learning model into the proof function obtained by the aforementioned logic gate circuit for calculation, thereby generating the aforementioned first proof data corresponding to the first calculation result. In practical applications, the proving party can obtain the logic gate circuit from the aforementioned verifying party and convert the logic gate circuit into the proof function based on the proof generation algorithm in the aforementioned zero-knowledge proof scheme; alternatively, the proving party can obtain the proof function converted by the aforementioned verifying party from the logic gate circuit based on the proof generation algorithm in the aforementioned zero-knowledge proof scheme; this application does not impose any special restrictions on this.

[0149] On the other hand, the aforementioned proof key, the aforementioned second verification dataset, the aforementioned second calculation result, and the aforementioned machine learning model data can be input into the aforementioned proof function for calculation to generate the aforementioned second proof data corresponding to the second calculation result.

[0150] For example, let A represent the first verification dataset, R represent the first calculation result, A' represent the second verification set, R' represent the second calculation result, model represent the commitment data corresponding to the model data of the machine learning model, pk represent the proof key, and P(x) represent the proof generation algorithm in the zero-knowledge proof scheme. Then, the first proof data can be represented as P(pk,A,R,model), and the second proof data can be represented as P'(pk,A',R',model).

[0151] To enable the verifier to verify the trustworthiness of the machine learning model, the prover can send the first verification dataset, the first calculation result, and the first proof data to the verifier. Upon receiving the first verification data, the first calculation result, and the first proof data, the verifier can perform zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. Specifically, the verifier can input the verification key, the first verification dataset, the first calculation result, and the first proof data into a verification function included in the proof verification algorithm for calculation, thereby performing zero-knowledge verification on the first proof data. In this case, the verifier can determine whether the zero-knowledge verification of the first proof data has passed based on the calculation result of the verification function.

[0152] On the other hand, the aforementioned certificate can send the second verification dataset, the second calculation result, and the second proof data to the aforementioned verifier. Upon receiving the second verification data, the second calculation result, and the second proof data, the verifier can perform zero-knowledge verification on the second proof data based on the proof verification algorithm in the aforementioned zero-knowledge proof scheme. Specifically, the verifier can input the aforementioned verification key, the second verification dataset, the second calculation result, and the second proof data into the verification function included in the proof verification algorithm for calculation, thereby performing zero-knowledge verification on the second proof data. In this case, the verifier can determine whether the zero-knowledge verification of the second proof data has passed based on the calculation result of the verification function.

[0153] For example, let vk represent the verification key and V(x) represent the proof verification algorithm in the zero-knowledge proof scheme. Then, on the one hand, we can verify that V(vk,A,R,P)? = True, that is, verify whether the first verification dataset, the first calculation result, and the first proof data satisfy the mathematical relationship described by the function V(x); on the other hand, we can verify that V(vk,A',R',P')? = True, that is, verify whether the second verification dataset, the second calculation result, and the second proof data satisfy the mathematical relationship described by the function V(x).

[0154] In some embodiments, to ensure the data security and reliability of the aforementioned proof key and verification key, the immutability, transparency, and security characteristics of blockchain can be utilized, allowing the verifier to publish the proof key and verification key to a pre-built blockchain for storage. In this case, when the verifier subsequently needs to use the proof key to generate proof data, it can retrieve the proof key from the blockchain. Similarly, to reduce the maintenance cost of the verification key and ensure its security and correctness, the verifier can also retrieve the verification key from the blockchain when it needs to use it to verify the trustworthiness of the machine learning model to be verified.

[0155] As described in step 308 above, commitment data corresponding to the model data of the aforementioned machine learning model can be generated based on a preset commitment scheme, and the aforementioned first proof data can be generated based on the aforementioned first verification dataset, the aforementioned first calculation result, and the commitment data; furthermore, the aforementioned second proof data can also be generated based on the aforementioned second verification dataset, the aforementioned second calculation result, and the commitment data.

[0156] In this scenario, to enable the verifier to verify the trustworthiness of the machine learning model, the prover can send the commitment data, the first verification dataset, the first calculation result, and the first proof data to the verifier. Upon receiving the commitment data, the first verification data, the first calculation result, and the first proof data, the verifier can perform zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. Specifically, the verifier can input the verification key, the commitment data, the first verification dataset, the first calculation result, and the first proof data into the verification function included in the proof verification algorithm for computation, thereby performing zero-knowledge verification on the first proof data.

[0157] In addition, the aforementioned certificate can also send the aforementioned second verification dataset, the aforementioned second calculation result, and the aforementioned second proof data to the aforementioned verifier. Upon receiving the aforementioned commitment data, second verification data, second calculation result, and second proof data, the verifier can perform zero-knowledge verification on the second proof data based on the proof verification algorithm in the aforementioned zero-knowledge proof scheme. Specifically, the verifier can input the aforementioned verification key, the commitment data, the second verification dataset, the second calculation result, and the second proof data into the verification function included in the proof verification algorithm for calculation, thereby performing zero-knowledge verification on the second proof data.

[0158] In some embodiments, since the proof key corresponding to the proof generation algorithm in the zero-knowledge proof scheme, the verification key corresponding to the proof verification algorithm in the zero-knowledge proof scheme, the commitment data corresponding to the model data of the machine learning model, the first verification dataset, the first calculation result, the first proof data, the first verification dataset, the first calculation result, and the first proof data can all be stored in a pre-built blockchain, in order to reduce the cumbersome operation of the verification policy in verifying the trustworthiness of the machine learning model, a smart contract for model verification can be deployed on the blockchain.

[0159] In this scenario, when verifying the validity of the proof data, the aforementioned verifier can specifically invoke the aforementioned smart contract to execute the computational logic related to model verification contained in the smart contract. This allows them to obtain the commitment data corresponding to the model data of the machine learning model, the verification dataset, the computational result, and the proof data from the aforementioned blockchain. The verification key, the commitment data, the verification dataset, the computational result, and the proof data are then input into the verification function contained in the proof verification algorithm for calculation, thereby performing zero-knowledge verification on the proof data.

[0160] In some embodiments, after obtaining the first and second calculation results, the proving party can generate a model validation report for the machine learning model based on the first and second calculation results. Specifically, the proving party can perform data analysis on the first calculation result to obtain data indicators that indicate the reliability (e.g., model performance) of the machine learning model. Similarly, the proving party can perform data analysis on the second calculation result to obtain data indicators that indicate the reliability (e.g., model performance) of the machine learning model. Furthermore, since the second validation dataset corresponding to the second calculation result is obtained by perturbing the first validation dataset corresponding to the first calculation result, the proving party can perform data analysis on the first and second calculation results, for example, by comparing and analyzing the changes between the first and second calculation results to obtain data indicators that indicate the reliability, such as the stability and robustness, of the machine learning model. Having obtained these data indicators, a model validation report containing the validation results of the machine learning model's performance, stability, and robustness can be further generated.

[0161] Once the proving party obtains the various data metrics of the aforementioned machine learning model (or a model verification report composed of these data metrics), it can publish these data metrics to a pre-built blockchain for storage. In this case, the verifying party can retrieve these data metrics from the blockchain and understand the trustworthiness of the machine learning model through them. Due to the immutability, transparency, and security characteristics of the blockchain, the data security and reliability of the model verification report stored on the blockchain can be ensured.

[0162] In some embodiments, if the verifier determines that the first calculation result is indeed obtained by the machine learning model through inference calculation on the first verification dataset, and the second calculation result is also obtained by the machine learning model through inference calculation on the second verification dataset, the verifier can generate a model validation report for the machine learning model based on the first and second calculation results. Specifically, the verifier can perform data analysis on the first calculation result to obtain data indicators that indicate the reliability (e.g., model performance) of the machine learning model. Similarly, the verifier can perform data analysis on the second calculation result to obtain data indicators that indicate the reliability (e.g., model performance) of the machine learning model. Furthermore, since the second verification dataset corresponding to the second calculation result is obtained by perturbing the first verification dataset corresponding to the first calculation result, the verifier can perform data analysis on the first and second calculation results, for example, by comparing and analyzing the changes between the first and second calculation results to obtain data indicators that indicate the reliability, such as the stability and robustness, of the machine learning model. Once these data metrics are obtained, a model validation report can be generated that includes test results on the model's performance, stability, and robustness.

[0163] Since the above test results were obtained by the verification party through its own analysis, the authenticity and reliability of the verification results of the machine learning model obtained by the verification party can be ensured.

[0164] Once the aforementioned validators have obtained the various data metrics of the machine learning model (or a model validation report composed of these data metrics), they can also publish these data metrics to a pre-built blockchain for storage. In this case, other validators can retrieve these data metrics from the blockchain and use them to understand the trustworthiness of the machine learning model. Due to the immutability, transparency, and security characteristics of the blockchain, the data security and reliability of the model validation report stored on the blockchain can be ensured.

[0165] For example, for the machine learning model described above, assuming that based on the first calculation result, the KS metric is determined to be 0.406, the "Top-10% Precision" (the precision of the top 10% of all calculation results) is 0.960, the "Top-10% Recall" (the recall of the top 10% of all calculation results) is 0.194, and the "Top-10% Improvement" (the improvement of the top 10% of all calculation results) is 1.921. Assuming that based on the second calculation result above, the KS index is determined to be 0.326, the "Top-10% Precision" (the precision of the top 10% of all calculation results) index is 0.881, the "Top-10% Recall" (the recall of the top 10% of all calculation results) index is 0.178, and the "Top-10% Lift" (the lift of the top 10% of all calculation results) index is 1.762, then the test results shown in the table below can be obtained:

[0166]

[0167] The degree of decline in model performance shown in the table above reflects the reliability of the machine learning models, such as their stability and robustness.

[0168] Corresponding to the embodiments of the aforementioned machine learning model credibility verification method, this application also provides embodiments of a machine learning model credibility verification device.

[0169] Please refer to Figure 5 , Figure 5 This is a schematic diagram illustrating the structure of a device according to an exemplary embodiment of this application. At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, memory 508, and non-volatile memory 510, and may also include other necessary hardware. One or more embodiments of this application can be implemented in software, for example, the processor 502 reads the corresponding computer program from the non-volatile memory 510 into memory 508 and then runs it. Of course, besides software implementation, one or more embodiments of this application do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic modules, but can also be hardware or logic devices.

[0170] Please refer to Figure 6 , Figure 6 This is a block diagram of a trustworthiness verification device for a machine learning model, as illustrated in an exemplary embodiment of this application.

[0171] The aforementioned machine learning model's credibility verification device can be applied to... Figure 5 The apparatus shown is used to implement the technical solution of this application. This apparatus can serve as a provider for performing specific verification tasks on a machine learning model. The credibility verification device for the machine learning model specifically may include:

[0172] Module 602 retrieves the first validation dataset for model validation.

[0173] The calculation module 604 inputs the first verification dataset into the machine learning model to be verified, and the machine learning model performs inference calculations on the first verification dataset to obtain a first calculation result corresponding to the first verification dataset.

[0174] The generation module 606 generates first proof data corresponding to the first calculation result based on the proof generation algorithm in the preset zero-knowledge proof scheme; wherein, the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset;

[0175] The verification module 608 sends the first proof data to the verifier so that the verifier performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification passes, the verifier determines that the first calculation result is the calculation result obtained by the machine learning model inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result.

[0176] In some embodiments, the apparatus further includes:

[0177] The processing module performs sample perturbation processing on the first verification dataset to obtain the second verification dataset;

[0178] The calculation module 604 is further configured to input the second verification dataset into the machine learning model, and the machine learning model performs inference calculations on the second verification dataset to obtain a second calculation result corresponding to the second verification dataset.

[0179] The generation module 606 is further configured to generate second proof data corresponding to the second calculation result based on the proof generation algorithm in the preset zero-knowledge proof scheme; wherein, the second proof data is used to prove that the second calculation result is a calculation result obtained by the machine learning model through inference calculation on the second verification dataset;

[0180] The verification module 608 is further configured to send the second proof data to the verifier, so that the verifier performs zero-knowledge verification on the second proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification passes, the verifier determines that the second calculation result is the calculation result obtained by the machine learning model for inference calculation on the second verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result and the second calculation result.

[0181] In some embodiments, proof data corresponding to the computation result is generated based on the proof generation algorithm in the zero-knowledge proof scheme, including:

[0182] Obtain the proof key; wherein, the proof key is a key generated by the verifier based on logic gate circuits and corresponding to the proof generation algorithm; the logic gate circuit is a logic gate circuit in which the verifier represents the reasoning logic of the machine learning model based on the circuit representation algorithm in the zero-knowledge proof scheme;

[0183] The proof key, verification dataset, calculation result, and model data of the machine learning model are input into the proof function for calculation to generate proof data corresponding to the calculation result; wherein, the proof function is a function that converts the logic gate circuit into a proof generation algorithm based on the zero-knowledge proof scheme.

[0184] In some embodiments, the proof data is sent to a verifier so that the verifier performs zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme, including:

[0185] The verification dataset, the calculation result, and the proof data are sent to the verifier, so that the verifier can input the verification key, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data; wherein, the verification key is a key generated by the verifier based on the logic gate circuit and corresponding to the proof verification algorithm.

[0186] In some embodiments, the apparatus further includes:

[0187] The commitment module generates commitment data corresponding to the model data of the machine learning model based on a preset commitment scheme.

[0188] The proof data is sent to the verifier, enabling the verifier to perform zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme, including:

[0189] The commitment data, the verification dataset, the calculation result, and the proof data are sent to the verifier, so that the verifier can input the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data; wherein, the verification key is a key generated by the verifier based on the logic gate circuit and corresponding to the proof verification algorithm.

[0190] In some embodiments, sending the commitment data, the verification dataset, the calculation result, and the proof data to the verifier, so that the verifier inputs the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, to perform zero-knowledge verification on the proof data, includes:

[0191] The commitment data, the verification dataset, the calculation result, and the proof data are published on the blockchain for storage, so that the verifier can obtain the commitment data, the verification dataset, the calculation result, and the proof data from the blockchain, and input the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data.

[0192] In some embodiments, the proof key is published by the verifier and stored on the blockchain;

[0193] The process of obtaining the proof key includes:

[0194] Obtain the proof key from the blockchain.

[0195] In some embodiments, the apparatus further includes:

[0196] The first reporting module performs data analysis on the first calculation result to obtain data indicators that indicate the credibility of the machine learning model; wherein, the credibility includes model performance; and publishes the data indicators to the blockchain for storage so that the verifier can obtain the data indicators from the blockchain.

[0197] In some embodiments, the apparatus further includes:

[0198] The second reporting module performs data analysis on the first calculation result and the second calculation result to obtain data indicators for indicating the credibility of the machine learning model; wherein, the credibility includes model performance, stability and / or robustness; and publishes the data indicators to the blockchain for storage so that the verifier can obtain the data indicators from the blockchain.

[0199] Please refer to Figure 7 , Figure 7 This is a block diagram of an exemplary embodiment of the present application illustrating a trustworthiness verification device for another machine learning model.

[0200] The aforementioned machine learning model's credibility verification device can be applied to... Figure 5 The device shown is used to implement the technical solution of this application. Specifically, this device can serve as a verifier for understanding the reliability of a machine learning model through its verification results. The reliability verification device for this machine learning model may include:

[0201] The acquisition module 702 acquires first proof data; wherein, the first proof data is proof data corresponding to the first calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the first calculation result is the calculation result corresponding to the first verification dataset obtained by the prover through reasoning calculation on the first verification dataset using the machine learning model to be verified; the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through reasoning calculation on the first verification dataset.

[0202] Verification module 704 performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme.

[0203] The determination module 706, when the zero-knowledge verification passes, determines that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result.

[0204] In some embodiments, the acquisition module 702 is further configured to acquire second proof data; wherein, the second proof data is proof data corresponding to the second calculation result generated by the prover based on the proof generation algorithm in a preset zero-knowledge proof scheme; the second calculation result is the calculation result corresponding to the second verification dataset obtained by the prover through inference calculation on the second verification dataset using the machine learning model; the second proof data is used to prove that the second calculation result is the calculation result obtained by the machine learning model through inference calculation on the second verification dataset; the second verification dataset is a verification dataset obtained by performing sample perturbation processing on the first verification dataset;

[0205] The verification module 704 is also used to perform zero-knowledge verification on the second proof data based on the proof verification algorithm in the zero-knowledge proof scheme.

[0206] The determining module 706 is further configured to, when the zero-knowledge verification passes, determine that the second calculation result is the calculation result obtained by the machine learning model through inference calculation on the second verification dataset, and obtain data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result and the second calculation result.

[0207] In some embodiments, the apparatus further includes:

[0208] The generation module, based on the circuit representation algorithm in the zero-knowledge proof scheme, represents the reasoning logic of the machine learning model as a logic gate circuit, and based on the logic gate circuit, generates a proof key corresponding to the proof generation algorithm and a verification key corresponding to the proof verification algorithm.

[0209] The interaction module sends the proof key to the proving party, so that the proving party inputs the proof key, the verification dataset, the calculation result, and the model data of the machine learning model into the proof function for calculation, so as to generate proof data corresponding to the calculation result; wherein, the proof function is a function that converts the logic gate circuit into a proof generation algorithm based on the zero-knowledge proof scheme.

[0210] In some embodiments, the machine learning model is a tree model; the size of the logic gate circuit satisfies the following conditions:

[0211] num tree *num sample *num depth ≤2 k -10;

[0212] num sample *num attr≤2 k -10;

[0213] max node ≤(2 k -10) / 130;

[0214] Among them, 2 k The size of the logic gate circuit is k, where k is a natural number and num is the number of gates. tree num represents the number of trees in the machine learning model. depth max is the depth of the tree in the machine learning model. node num represents the maximum number of nodes in the tree of the machine learning model. sample The number of samples required to perform inference computation for the machine learning model; num attr The number of attributes of the samples used when performing inference computation for the machine learning model.

[0215] In some embodiments, the value of k is the minimum value that satisfies the condition.

[0216] In some embodiments, obtaining proof data and performing zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme includes:

[0217] Obtain the verification dataset, the calculation result, and the proof data, and input the verification key, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data.

[0218] In some embodiments, obtaining proof data and performing zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme includes:

[0219] Obtain the commitment data corresponding to the model data of the machine learning model, the verification dataset, the calculation result, and the proof data, and input the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data; wherein, the commitment data is generated by the proving party based on a preset commitment scheme.

[0220] In some embodiments, the commitment data, the verification dataset, the calculation results, and the proof data are published to the blockchain by the proving party for storage;

[0221] The acquisition of the commitment data corresponding to the model data of the machine learning model, the verification dataset, the calculation results, and the proof data includes:

[0222] The commitment data, the verification dataset, the calculation results, and the proof data corresponding to the model data of the machine learning model are obtained from the blockchain.

[0223] In some embodiments, the commitment data, the verification dataset, the calculation results, and the proof data are published to the blockchain by the proving party for storage; a smart contract for model verification is deployed on the blockchain;

[0224] The process of acquiring commitment data corresponding to the model data of the machine learning model, the verification dataset, the calculation result, and the proof data, and inputting the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, to perform zero-knowledge verification on the proof data, includes:

[0225] The smart contract is invoked to obtain the commitment data, the verification dataset, the calculation result, and the proof data corresponding to the model data of the machine learning model from the blockchain. The verification key, the commitment data, the verification dataset, the calculation result, and the proof data are then input into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data.

[0226] In some embodiments, sending the proof key to the proving party, so that the proving party inputs the proof key, the verification dataset, the calculation result, and the model data of the machine learning model into the proof function for calculation to generate proof data corresponding to the calculation result, includes:

[0227] The proof key is published on the blockchain for storage, so that the proving party can obtain the proof key from the blockchain and input the proof key, the verification dataset, the calculation result and the model data of the machine learning model into the proof function for calculation to generate proof data corresponding to the calculation result.

[0228] In some embodiments, the data metrics are published to the blockchain and stored by the proving party;

[0229] Obtaining the data metrics includes:

[0230] The data metrics are obtained from the blockchain.

[0231] In some embodiments, obtaining data metrics for indicative of the reliability of the machine learning model, obtained through data analysis of the first calculation result, includes:

[0232] Data analysis is performed on the first calculation result to obtain data indicators that indicate the reliability of the machine learning model; wherein, the reliability includes model performance.

[0233] In some embodiments, obtaining data metrics for indicating the reliability of the machine learning model, obtained through data analysis of the first calculation result and the second calculation result, includes:

[0234] Data analysis is performed on the first calculation result and the second calculation result to obtain data indicators used to indicate the reliability of the machine learning model; wherein, the reliability includes model performance, stability and / or robustness.

[0235] For the device embodiments, they basically correspond to the method embodiments; therefore, relevant details can be found in the descriptions of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the technical solution of this application according to actual needs.

[0236] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or physical entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0237] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0238] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0239] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0240] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0241] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of this application. In some cases, the actions or steps described in this application may be performed in a different order than those shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0242] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. The term “and / or” refers to and includes any or all possible combinations of one or more associated listed items.

[0243] The terms "an embodiment," "some embodiments," "example," "specific example," or "one implementation," as used in one or more embodiments of this application, refer to specific features or characteristics described in connection with that embodiment, which are included in at least one embodiment of this application. Illustrative descriptions of these terms do not necessarily refer to the same embodiment. Furthermore, the described specific features or characteristics may be combined in a suitable manner in one or more embodiments of this application. In addition, different embodiments and specific features or characteristics from different embodiments may be combined without contradiction.

[0244] It should be understood that although the terms first, second, third, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of one or more embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0245] The above description is merely a preferred embodiment of one or more embodiments of this application and is not intended to limit the scope of one or more embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this application should be included within the scope of protection of one or more embodiments of this application.

[0246] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

Claims

1. A method for verifying the credibility of a machine learning model, applied to the proving side, the method comprising: Obtain the first validation dataset for model validation; The first verification dataset is input into the machine learning model to be verified, and the machine learning model performs inference calculations on the first verification dataset to obtain a first calculation result corresponding to the first verification dataset. Based on the proof generation algorithm in the preset zero-knowledge proof scheme, first proof data corresponding to the first calculation result is generated; wherein, the first proof data is used to prove that the first calculation result is a calculation result obtained by the machine learning model inference calculation on the first verification dataset; the first proof data is generated based on the first verification dataset, the first calculation result and the model data of the machine learning model; The first proof data is sent to the verifier so that the verifier performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification passes, the verifier determines that the first calculation result is the calculation result obtained by the machine learning model for inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis on the first calculation result.

2. The method according to claim 1, further comprising: The first validation dataset is subjected to sample perturbation processing to obtain the second validation dataset; The second verification dataset is input into the machine learning model, and the machine learning model performs inference calculations on the second verification dataset to obtain a second calculation result corresponding to the second verification dataset. Based on the proof generation algorithm in the preset zero-knowledge proof scheme, second proof data corresponding to the second calculation result is generated; wherein, the second proof data is used to prove that the second calculation result is the calculation result obtained by the machine learning model through inference calculation on the second verification dataset; The second proof data is sent to the verifier so that the verifier performs zero-knowledge verification on the second proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification passes, the verifier determines that the second calculation result is the calculation result obtained by the machine learning model for inference calculation on the second verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result and the second calculation result.

3. The method according to claim 2, based on the proof generation algorithm in the zero-knowledge proof scheme, generates proof data corresponding to the calculation result, including: Obtain the proof key; wherein, the proof key is a key generated by the verifier based on logic gate circuits and corresponding to the proof generation algorithm; the logic gate circuit is a logic gate circuit in which the verifier represents the reasoning logic of the machine learning model based on the circuit representation algorithm in the zero-knowledge proof scheme; The proof key, verification dataset, calculation result, and model data of the machine learning model are input into the proof function for calculation to generate proof data corresponding to the calculation result; wherein, the proof function is a function that converts the logic gate circuit into a proof generation algorithm based on the zero-knowledge proof scheme.

4. The method according to claim 3, wherein the proof data is sent to the verifier, so that the verifier performs zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme, comprising: The verification dataset, the calculation result, and the proof data are sent to the verifier, so that the verifier can input the verification key, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data; wherein, the verification key is a key generated by the verifier based on the logic gate circuit and corresponding to the proof verification algorithm.

5. The method according to claim 3, further comprising: Based on a preset commitment scheme, commitment data corresponding to the model data of the machine learning model is generated; The proof data is sent to the verifier, enabling the verifier to perform zero-knowledge verification on the proof data based on the proof verification algorithm in the zero-knowledge proof scheme, including: The commitment data, the verification dataset, the calculation result, and the proof data are sent to the verifier, so that the verifier can input the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data; wherein, the verification key is a key generated by the verifier based on the logic gate circuit and corresponding to the proof verification algorithm.

6. The method according to claim 5, wherein sending the commitment data, the verification dataset, the calculation result, and the proof data to the verifier, so that the verifier inputs the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, to perform zero-knowledge verification on the proof data, comprises: The commitment data, the verification dataset, the calculation result, and the proof data are published on the blockchain for storage, so that the verifier can obtain the commitment data, the verification dataset, the calculation result, and the proof data from the blockchain, and input the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data.

7. The method according to claim 3, wherein the proof key is published to the blockchain by the verifier for storage; The process of obtaining the proof key includes: Obtain the proof key from the blockchain.

8. The method according to claim 1, further comprising: Data analysis is performed on the first calculation result to obtain data indicators that indicate the reliability of the machine learning model; wherein, the reliability includes model performance; The data metrics are published to the blockchain for storage, so that the verifier can obtain the data metrics from the blockchain.

9. The method according to claim 2, further comprising: Data analysis is performed on the first calculation result and the second calculation result to obtain data indicators used to indicate the reliability of the machine learning model; wherein, the reliability includes model performance, stability and / or robustness; The data metrics are published to the blockchain for storage, so that the verifier can obtain the data metrics from the blockchain.

10. A method for verifying the credibility of a machine learning model, applied to a verifier, the method comprising: Obtain first proof data; wherein, the first proof data is proof data corresponding to the first calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the first calculation result is the calculation result corresponding to the first verification dataset obtained by the prover through inference calculation on the first verification dataset using the machine learning model to be verified; the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset; the first proof data is generated based on the first verification dataset, the first calculation result, and the model data of the machine learning model; Based on the proof verification algorithm in the zero-knowledge proof scheme, zero-knowledge verification is performed on the first proof data; When zero-knowledge verification passes, the first calculation result is determined to be the calculation result obtained by the machine learning model through inference calculation on the first verification dataset, and data indicators used to indicate the credibility of the machine learning model are obtained by data analysis on the first calculation result.

11. The method according to claim 10, further comprising: Obtain second proof data; wherein, the second proof data is proof data corresponding to the second calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the second calculation result is the calculation result corresponding to the second verification dataset obtained by the prover through the machine learning model performing inference calculation on the second verification dataset; the second proof data is used to prove that the second calculation result is the calculation result obtained by the machine learning model performing inference calculation on the second verification dataset; the second verification dataset is a verification dataset obtained by performing sample perturbation processing on the first verification dataset; Based on the proof verification algorithm in the zero-knowledge proof scheme, zero-knowledge verification is performed on the second proof data; When zero-knowledge verification passes, the second calculation result is determined to be the calculation result obtained by the machine learning model through inference calculation on the second verification dataset, and data indicators used to indicate the credibility of the machine learning model are obtained by data analysis of the first calculation result and the second calculation result.

12. The method according to claim 11, further comprising: Based on the circuit representation algorithm in the zero-knowledge proof scheme, the reasoning logic of the machine learning model is represented as a logic gate circuit, and based on the logic gate circuit, a proof key corresponding to the proof generation algorithm and a verification key corresponding to the proof verification algorithm are generated. The proof key is sent to the proving party, so that the proving party inputs the proof key, the verification dataset, the calculation result, and the model data of the machine learning model into the proof function for calculation to generate proof data corresponding to the calculation result; wherein, the proof function is a function that converts the logic gate circuit into a proof generation algorithm based on the zero-knowledge proof scheme.

13. The method according to claim 12, wherein the machine learning model is a tree model; and the size of the logic gate circuit satisfies the following conditions: ; ; ; in, The size of the logic gate circuit. For natural numbers, The number of trees in the machine learning model. The depth of the tree in the machine learning model. This represents the maximum number of nodes in the tree of the machine learning model. The number of samples required to perform inference computations for the machine learning model; The number of attributes of the samples used when performing inference computation for the machine learning model.

14. The method according to claim 13, wherein... The value of is the minimum value that satisfies the stated condition.

15. The method according to claim 12, wherein proving data is obtained, and zero-knowledge verification is performed on the proving data based on the proof verification algorithm in the zero-knowledge proof scheme, comprising: Obtain the verification dataset, the calculation result, and the proof data, and input the verification key, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data.

16. The method according to claim 12, wherein proving data is obtained, and zero-knowledge verification is performed on the proving data based on the proof verification algorithm in the zero-knowledge proof scheme, comprising: Obtain the commitment data corresponding to the model data of the machine learning model, the verification dataset, the calculation result, and the proof data, and input the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data; wherein, the commitment data is generated by the proving party based on a preset commitment scheme.

17. The method according to claim 16, wherein the commitment data, the verification dataset, the calculation result, and the proof data are published to the blockchain by the proving party for storage; The acquisition of the commitment data corresponding to the model data of the machine learning model, the verification dataset, the calculation results, and the proof data includes: The commitment data, the verification dataset, the calculation results, and the proof data corresponding to the model data of the machine learning model are obtained from the blockchain.

18. The method according to claim 16, wherein the commitment data, the verification dataset, the calculation result, and the proof data are published to the blockchain by the proving party for storage; and a smart contract for model verification is deployed on the blockchain; The process of acquiring commitment data corresponding to the model data of the machine learning model, the verification dataset, the calculation result, and the proof data, and inputting the verification key, the commitment data, the verification dataset, the calculation result, and the proof data into the verification function included in the proof verification algorithm for calculation, to perform zero-knowledge verification on the proof data, includes: The smart contract is invoked to obtain the commitment data, the verification dataset, the calculation result, and the proof data corresponding to the model data of the machine learning model from the blockchain. The verification key, the commitment data, the verification dataset, the calculation result, and the proof data are then input into the verification function included in the proof verification algorithm for calculation, so as to perform zero-knowledge verification on the proof data.

19. The method according to claim 17 or 18, wherein sending the proof key to the proving party, so that the proving party inputs the proof key, the verification dataset, the calculation result, and the model data of the machine learning model into the proof function for calculation to generate proof data corresponding to the calculation result, includes: The proof key is published on the blockchain for storage, so that the proving party can obtain the proof key from the blockchain and input the proof key, the verification dataset, the calculation result and the model data of the machine learning model into the proof function for calculation to generate proof data corresponding to the calculation result.

20. The method according to claim 10 or 11, wherein the data metrics are published to the blockchain by the proving party for storage; Obtaining the data metrics includes: The data metrics are obtained from the blockchain.

21. The method according to claim 10, wherein obtaining data indicators for indicating the reliability of the machine learning model obtained by data analysis of the first calculation result includes: Data analysis is performed on the first calculation result to obtain data indicators that indicate the reliability of the machine learning model; wherein, the reliability includes model performance.

22. The method according to claim 11, wherein obtaining data indicators for indicating the reliability of the machine learning model obtained by data analysis of the first calculation result and the second calculation result includes: Data analysis is performed on the first calculation result and the second calculation result to obtain data indicators used to indicate the reliability of the machine learning model; wherein, the reliability includes model performance, stability and / or robustness.

23. A device for verifying the credibility of a machine learning model, applied to the proving party, the device comprising: The module retrieves the first validation dataset for model validation. The calculation module inputs the first verification dataset into the machine learning model to be verified, and the machine learning model performs inference calculations on the first verification dataset to obtain a first calculation result corresponding to the first verification dataset. The generation module generates first proof data corresponding to the first calculation result based on the proof generation algorithm in the preset zero-knowledge proof scheme; wherein, the first proof data is used to prove that the first calculation result is a calculation result obtained by the machine learning model through inference calculation on the first verification dataset; the first proof data is generated based on the first verification dataset, the first calculation result, and the model data of the machine learning model; The verification module sends the first proof data to the verifier, so that the verifier performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. When the zero-knowledge verification passes, the module determines that the first calculation result is the calculation result obtained by the machine learning model inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by data analysis of the first calculation result.

24. A device for verifying the credibility of a machine learning model, applied to a verifier, the device comprising: The module acquires first proof data; wherein, the first proof data is proof data corresponding to the first calculation result generated by the prover based on the proof generation algorithm in the preset zero-knowledge proof scheme; the first calculation result is the calculation result corresponding to the first verification dataset obtained by the prover through inference calculation on the first verification dataset using the machine learning model to be verified; the first proof data is used to prove that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset; the first proof data is generated based on the first verification dataset, the first calculation result, and the model data of the machine learning model; The verification module performs zero-knowledge verification on the first proof data based on the proof verification algorithm in the zero-knowledge proof scheme. The determination module, upon successful zero-knowledge verification, determines that the first calculation result is the calculation result obtained by the machine learning model through inference calculation on the first verification dataset, and obtains data indicators for indicating the credibility of the machine learning model by performing data analysis on the first calculation result.

25. An electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor implements the method as described in any one of claims 1 to 22 by executing the executable instructions.

26. A computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 22.