Lightweight zero-knowledge proof method and system for longitudinal federal decision logic
By constructing a lightweight zero-knowledge proof method, the auditing problems of high concurrency, low latency, and model non-disclosure in vertical federated learning are solved, realizing result fidelity verification and model privacy protection, and reducing system operation and maintenance costs.
Patent Information
- Application Number
- CN202611393807.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies cannot meet the audit requirements of high concurrency, low latency, and no model leakage in vertical federated learning. Furthermore, full zero-knowledge machine learning solutions pose a risk of model privacy leakage, and existing verifiable federated learning solutions do not cover the audit requirements of the inference and decision-making stage.
A lightweight zero-knowledge proof method for vertical federated decision-making logic is designed. By constructing a binary classification threshold comparison arithmetic circuit, a fixed-size proof file is generated using the Groth16 protocol to ensure that the model privacy is not leaked. The verification operation is performed offline locally on the verifier to avoid real-time interaction.
It enables the fidelity verification of results without disclosing plaintext scores, reduces audit overhead and model complexity, prevents model information leakage, supports high-concurrency batch historical auditing, and reduces system operation and maintenance costs.
Smart Images

Figure CN123184852A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of privacy computing and zero-knowledge proof technology, specifically involving a lightweight zero-knowledge proof method and system for vertical federated decision-making logic. Background Technology
[0002] In the decentralized two-party architecture of Vertical Federated Learning (VFL), joint inference is typically initiated by the host party with business needs, while the guest party provides feature data and receives compensation accordingly. The prediction results are generated based on the host party's business needs and, according to the collaboration agreement, are only output to the host party in plaintext; the guest party is not within the scope of receiving the plaintext results. This arrangement allows the host party to monopolize the plaintext results and decision-making power, thus creating an incentive to tamper with the final decision (such as concealing high-value conversions to avoid paying commission to the guest party). Since the guest party has no way of knowing the plaintext results, its verification of the results declared by the host party must be completed under the condition of "not knowing the results themselves"—this constraint dictates that such audits must utilize zero-knowledge proofs, a technology that can verify without disclosure, rather than using a method where the host party presents the plaintext for the guest party to verify. Accordingly, existing technologies mainly conduct computational integrity audits from two directions: Zero-Knowledge Machine Learning (zkML) and Verifiable Federated Learning. Existing technical solutions have significant limitations in terms of applicability, performance, and privacy: the full zkML solution is unsuitable for high-concurrency real-time business scenarios due to the high coupling between proof overhead and model complexity, and it also poses a risk of model privacy leakage; the provable federated learning solution does not yet cover the auditing requirements of the inference and decision-making stage. Neither of these solutions can meet the actual auditing requirements of high concurrency, low latency, and no model leakage in the VFL inference stage. Summary of the Invention
[0003] The aforementioned performance bottleneck stems from the full-scale solution's technical architecture, which tightly couples "secure computation" and "audit verification." Therefore, a lightweight verification method that decouples audit overhead from model complexity is urgently needed. Furthermore, the full-scale solution requires embedding the complete hierarchical structure of the model into the circuit during construction, leading to the secondary risk of model privacy leakage. This invention addresses the aforementioned performance coupling problem while simultaneously eliminating this secondary risk. The technical solution is as follows:
[0004] A lightweight zero-knowledge proof method for vertical federated decision-making logic, applied to the prover, includes the following steps:
[0005] S1. Receive the front-end prediction score and hash anchor, and establish consistency between the quantization caliber and the computation domain;
[0006] The system receives the predicted score and the corresponding cryptographic hash anchor point from the front end, which is the hash value calculated and public before the plaintext recovery of the inference result. The system uses the fixed-point integer form of the predicted score, i.e., the quantized score score_q, as the private input, and the quantized threshold threshold_q, which is obtained by quantizing the business decision threshold agreed upon by both parties, as the public input. The quantization caliber of the quantized score is consistent with that used in the hash anchor point generation stage.
[0007] S2. Construct a binary classification threshold comparison arithmetic circuit;
[0008] The circuit uses the quantization score_q described in step S1 as a private input, visible only to the prover and not disclosed to the verifier; it uses the hash anchor, the quantization threshold_q, and the business decision result Result as public inputs, which are publicly declared by the prover; the circuit does not contain signals and constraints representing the layer structure, weight dimensions, or nodes of the inference model.
[0009] The commitment operation Commit(·) used in the circuit is the same function used in the hash anchor generation stage, and it is defined in the same finite field with the same instantiation parameters;
[0010] S3. Generate zero-knowledge proof files;
[0011] The proving party's program runs the proof engine, generates a proof file, and pushes it to the verifying party. The proof file is used by the verifying party to load the verification key and the public input set to perform verification operations.
[0012] Preferably, before the system is officially launched and put into production, both parties collaboratively perform a one-time trusted setup ceremony based on a common reference string to generate a set of cryptographic parameters for the arithmetic circuit in step S2, specifically including the following steps:
[0013] S01. The participating party compiles the arithmetic circuit designed in step S2 to generate the description file and witness generator corresponding to the circuit.
[0014] S02. Based on the common reference string of the Groth16 protocol, both parties perform power-law trust setting calculations to generate circuit-specific proof keys and verification keys, with the following relationship:
[0015] ;
[0016] Wherein, R1CS is the first-order constraint system description corresponding to the arithmetic circuit, τ is the random secret parameter generated in the trusted setting ceremony, which must be securely destroyed after the calculation is completed; pk is handed over to the prover for safekeeping and is used for proof generation in step S3; vk is publicly released and stored by the verifier for offline verification by the verifier.
[0017] The proof engine uses the Groth16 proof system, and the proof file is a constant byte size independent of the size of the arithmetic circuit; the trust setting can be reused for underlying inference models of arbitrary complexity without needing to be re-executed as the underlying inference model changes.
[0018] Preferably, step S1 involves obtaining the quantization score and the quantization threshold, including:
[0019] The first approach is to use the quantized score score_q in the form of a fixed-point integer as the private input. Considering that the hash anchor is calculated from a certain fixed-point integer during the generation stage, the quantized score of the fixed-point integer is directly received as the private input, and the floating-point score is no longer re-quantized locally.
[0020] The second method: When the system only outputs floating-point prediction scores, the system's built-in data adapter performs fixed-point quantization on the floating-point score based on a preset amplification factor.
[0021] ;
[0022] Logit is the floating-point prediction score output by the inference model at the end of the binary classification decision task. Scale is the preset amplification factor. The value of the amplification factor, the rounding rules, and the precision of the floating-point binary representation must be strictly consistent with those used in the hash anchor generation stage.
[0023] The business decision threshold is a publicly disclosed parameter agreed upon in advance and jointly held by both parties to the contract. The system performs fixed-point quantification using the same amplification factor as the score.
[0024] ;
[0025] Where Threshold is the publicly agreed-upon threshold for business decisions; Scale is a preset integer amplification factor and takes the value of 100%. ; ⌊·⌋ represents the floor operation; threshold_q is the quantization threshold that is publicly known to both parties; the quantization threshold is a publicly agreed-upon parameter held by each party, and the verifier uses its own threshold as the public input when performing the verification operation, and does not accept the threshold value provided by the proviser.
[0026] Preferably, the commitment operation Commit(·) is implemented using a multi-party computation-friendly hash function, which is the Poseidon hash function, and the same finite field is the scalar field of the elliptic curve used by the proof engine;
[0027] A first constraint and a second constraint are applied inside the circuit:
[0028] The first constraint is a consistency constraint, that is, the value obtained by performing the commitment operation on the quantized score is equal to the hash anchor, Commit(score_q)=Commitment;
[0029] The second constraint is a fidelity constraint, which means that the comparison result between the quantified score and the quantified threshold is equal to the business decision result. Compare(score_q,threshold_q)=Result, where Compare(score_q,threshold_q) takes the value of 1 when score_q>threshold_q, and takes the value of 0 otherwise.
[0030] Preferably, when the hash anchor introduces a random salt value r during the generation phase, i.e., Commitment = Commit(score_q, r), this random salt value r is also used as a private input of the circuit, and the first constraint is correspondingly expressed as:
[0031] Salting consistency constraint:
[0032] ;
[0033] The parallel arrangement of the two inputs in the formula indicates that they both participate in the commitment operation. At this time, the random salt value must be restored to the prover during the plaintext recovery stage of the reasoning result, so that the prover can construct the witness. Since the salt value only participates in the circuit operation as a private input and is never disclosed to the verifier, its zero-knowledge property is not affected, and the party holding the public hash anchor cannot exhaustively deduce the quantization score.
[0034] Preferably, a comparator component is connected, which performs a size comparison operation on score_q and threshold_q within a finite field to obtain the comparison result in the second constraint; the comparator component is implemented using a range proof mechanism based on bit decomposition, specifically:
[0035] Construction and bit decomposition of offset difference: Using a preset bit width n as a parameter, construct the offset difference d as shown in the following formula, and perform binary bit decomposition on it in bits (n+1 bits):
[0036] ;
[0037] Decompose d into n+1 binary bits. , ... And apply Boolean constraints to each bit;
[0038] ;
[0039] simultaneously applying a weighted summation equality constraint:
[0040] ;
[0041] the bit width n must satisfy and be strictly greater than the maximum possible value of the absolute value of the difference between score_q and threshold_q, i.e., the absolute value of this difference does not exceed at most −1, and the offset difference must fall within the interval [0, −1] representable by n+1 bits, such that when the offset difference exceeds this interval, the bit decomposition constraint becomes unsatisfiable and generation of the proof file is rejected;
[0042] determining the ordering relationship based on the most significant bit:
[0043] when threshold_q ≥ score_q ≤ d ≤ −1, its n-th bit is 1; when threshold_q < score_q, 0 ≤ d < , its n-th bit is 0, so taking the logical negation of this most significant bit yields the determination result of strictly greater than:
[0044] ;
[0045] thereby reliably restoring the strictly greater-than ordering relationship within the finite field: the expression takes the value 1 if and only if score_q > threshold_q, and takes the value 0 when score_q = threshold_q or score_q < threshold_q; the preset bit width n is set to 32.
[0046] Preferably, before performing the size comparison, the same common offset OFFSET is added to score_q and threshold_q respectively to obtain score_shifted = score_q + OFFSET and threshold_shifted = threshold_q + OFFSET, and these two values are used to replace score_q and threshold_q in the size comparison; the common offset is set to a value greater than the maximum possible absolute value of both score_q and threshold_q, such that when score_q is a negative integer, both values participating in the comparison are also non-negative integers, falling within the non-negative integer input range applicable to the comparator component; since the same constant is added to both values and their difference remains unchanged, the ordering relationship is strictly consistent with the original values; the common offset is set to .
[0047] Preferably, step S3 generates a zero-knowledge proof file, including:
[0048] S31. The system substitutes the private input and public input sets into the arithmetic circuit generated in step S2 to complete the construction and assignment of the witness;
[0049] S32. The system runs the proof engine, performs multinomial commitment calculations using the pre-generated proof key, and outputs a proof file (Proof) of fixed byte size; the proof key is generated during the trusted setup phase.
[0050] S33. The proof generation task is executed asynchronously by the system background thread, and the main business process does not wait for the proof to be completed. After the proof is generated, the system pushes the {RID, Result, Proof} data packet to the receiving port of the verifier through the network interface for subsequent offline verification. The request identifier carried in the data packet is used by the verifier to detect the corresponding hash anchor, so that the anchor, the decision result and the proof document correspond one-to-one. RID is the request identifier and Result is the business decision result.
[0051] Preferably, it includes the following steps:
[0052] Verifier: Receives the business decision result and proof document pushed by the prover; the proof document is a zero-knowledge proof generated by an arithmetic circuit. This arithmetic circuit is only for threshold comparison decision logic, with the quantized score score_q as private input and the hash anchor, quantized threshold threshold_q and the business decision result Result as public input. It imposes a consistency constraint Commit(score_q)=Commitment and a fidelity constraint Compare(score_q,threshold_q)=Result on itself. The arithmetic circuit does not contain signals and constraints that represent the layer structure, weight dimension or nodes of the reasoning model.
[0053] S41. Collection of Public Inputs: The verifier collects the set of public inputs required to perform the verification operation, wherein the hash anchor is independently obtained by the verifier from the public channel of the pre-commitment mechanism; the quantization threshold_q is a public parameter agreed upon by both parties and held by each party; the decision result Result comes from the {RID,Result,Proof} data packet pushed by the prover; neither the hash anchor nor the quantization threshold accepts the values provided by the prover.
[0054] The independent acquisition of the aforementioned anchor points is achieved by using the request identifier as an index: when this inference request is initiated, the business system assigns a globally unique request identifier, which is jointly held by both parties. The pre-commitment mechanism binds the hash anchor point to this identifier when it is publicized, and the audit data packet pushed by the proving party also carries this identifier. The verifying party uses this identifier as an index to retrieve the corresponding hash anchor point from the publicized channel, thereby ensuring a one-to-one correspondence between the anchor point, the current decision result, and the current proof document, avoiding record mismatches during batch auditing.
[0055] S42. Offline verification operation: The verifier initiates an offline verifier locally, inputs the verification key (VerificationKey, vk) generated during the trusted setup phase, the above-mentioned public input set, and the proof file Proof, and performs bilinear pairing calculation; the verification operation is performed offline locally by the verifier and does not interact with the proof in real time.
[0056] S43. Output and handling of verification results: If all constraints pass verification, output True to confirm that the decision result is faithful to the locked calculation result and enter the normal settlement process; otherwise, output False to trigger a fraud alarm and start the arbitration and accountability process; if the certifying party fails to submit any valid supporting documents within the agreed period, the verifying party may also determine that the decision is suspected of fraud and start the same accountability process.
[0057] A lightweight zero-knowledge proof system for vertical federated decision-making logic includes a proof device deployed on the proving side and a verification device deployed on the verifying side.
[0058] The proof device includes:
[0059] The fixed-point quantization module is used to obtain the quantization score in the form of a fixed-point integer as private input, and to receive the cryptographic hash anchor corresponding to the quantization score and obtain the quantization threshold agreed upon by both parties as public input. The quantization caliber of the quantization score is consistent with that used in the hash anchor generation stage.
[0060] The circuit construction module is used to construct a binary classification threshold comparison arithmetic circuit and apply consistency constraints and fidelity constraints inside the circuit. The consistency constraint is that the value obtained by performing a cryptographic commitment operation on the quantized score is equal to the hash anchor point. The fidelity constraint is that the comparison result between the quantized score and the quantized threshold is equal to the business decision result. The circuit does not contain signals and constraints that represent the layer structure, weight dimension or node of the inference model.
[0061] The proof generation module is used to substitute the private input and the public input set into the arithmetic circuit to complete the witness construction, and run the proof engine to generate the proof file;
[0062] The verification device includes:
[0063] The offline verification module is used to independently obtain the hash anchor point from the self-commitment disclosure channel, and use the quantitative threshold held by the verifier itself together with the business decision result to form public input. The verification key, the public input set and the proof document are loaded locally by the verifier to perform verification operation and output the verification result.
[0064] Compared with existing technologies, the beneficial effects are as follows:
[0065] (1) Verifying the fidelity of results without disclosing plaintext scores: In this scenario, the prediction results are generated based on the client's business needs and are only output to the client in plaintext according to the collaboration agreement. The client is not within the scope of receiving plaintext results. If the client presents the plaintext scores for the client to verify themselves, the agreed-upon scope of result output is violated. This solution uses the quantified scores as the private input of the arithmetic circuit and the hash anchor and business results as the public input, enabling the client to obtain cryptographic confidence in the proposition that "the business results are faithful to the locked scores" without the client presenting the plaintext scores. Thus, verifiability is achieved without changing the existing collaboration model, which is the fundamental effect that distinguishes this solution from plaintext verification solutions.
[0066] To ensure the scope of this effect is described rigorously, its boundaries are clarified here: First, the zero-knowledge nature of zero-knowledge proofs guarantees that the proof document itself does not reveal private inputs, meaning the client cannot deduce the quantization score from the Proof. Second, the public input of this scheme includes the decision result Result, which is based on the comparison between the score and the threshold. Therefore, the client inevitably obtains the bit information of "which side of the threshold the score is on"—this is necessary for the auditing purpose of this scheme (the audit object is precisely the authenticity of this result), and does not constitute additional disclosure. Third, in the basic implementation without introducing a random salt value, since the quantization score takes values from the finite integer space limited by the amplification factor, the party holding the public hash anchor can exhaustively recalculate and compare this space to deduce the plaintext score. Therefore, this implementation does not provide confidentiality for the plaintext score. Thus, the effect of "the client not knowing the plaintext score" requires the preferred implementation with the introduction of a random salt value as a prerequisite. Under this prerequisite, based on the one-wayness of the commitment function and the confidentiality of the salt value, the public hash anchor does not reveal useful information about the score. The basic implementation provides the aforementioned effect of "verifying the fidelity of the result without presenting the plaintext", and the confidentiality strength of the plaintext depends on whether salting is added, depending on the scenario.
[0067] (2) Decoupling audit overhead from model complexity to constant level (O(1)): The circuit size and proof generation overhead of the existing full zkML scheme grow linearly or even superlinearly with the model complexity (O(N) complexity). According to its published literature, generating a reasoning proof for a medium-sized model takes several seconds or even minutes, and continues to deteriorate with model iteration and upgrade. This scheme fixes the circuit size to a lightweight structure containing only a few hundred constraints (step S2, approximately 453 constraints in this embodiment), so that the number of circuit constraints, proof generation overhead (in the hundreds of milliseconds) and the scale of trusted settings do not change with the number of layers, number of parameters, or tree size of the underlying model. Under the experimental condition of a 37.5-fold increase in model complexity, the audit circuit structure remains unchanged and the coefficient of variation of verification time CV < 9%. Compared with the full scheme (whose scale varies from thousands of constraints to millions of operations, depending on the model complexity), the audit size and proof time of this scheme are reduced by about one to three orders of magnitude. It should be defined that: firstly, this scheme does not advocate accelerating proof generation to the millisecond level, and its availability in real-time scenarios is provided by the asynchronous execution arrangement of step S33; secondly, the constant time consumption of Groth16 verification is an inherent property of this proof system, and the core contribution of this scheme is to reduce the proof generation overhead and the trusted setup scale to the constant level in sync through circuit decoupling.
[0068] (3) Avoiding model information leakage due to circuit size: Existing full zkML schemes require embedding the complete hierarchical structure of the model into the arithmetic circuit. The verifier can indirectly infer the hierarchical size and computational complexity of the prover's model from the publicly available circuit description (such as the number of constraints and the depth of the circuit hierarchy), resulting in information leakage regarding model privacy. The arithmetic circuit of this scheme only encodes the "threshold comparison" logic of the final decision and does not contain any model hierarchical structure, weight dimension, or parameter dimension information. Therefore, the circuit description itself does not carry any information about the model, thus avoiding this leakage path, which is consistent with the security assumption that each participant in federated learning independently protects its local model. It should be noted that the exact scope of this effect is: This effect targets the specific path of "leaking model information through circuit size and structure"; as for model inference that may be carried out through the statistical correlation of a large number of decision results and thresholds, it belongs to another type of attack surface and is not within the scope of this effect.
[0069] (4) Zero-blocking of main business processes: In this solution, the generation task of zero-knowledge proof is executed asynchronously by the system background thread (step S33). The main business processes (such as returning attribution or risk control decisions to users in real time) do not wait for the proof to be completed. Therefore, the audit behavior is not included in the system response latency perceived by the user. It should be clarified that the effect of this item does not come from accelerating the proof generation itself to the millisecond level (its time is on the order of hundreds of milliseconds), but from moving it out of the synchronous response path of the main business. This arrangement allows this audit mechanism to be carried by online business systems that are sensitive to response latency, without sacrificing the real-time performance of the business.
[0070] (5) Anti-forgery cryptographic blocking mechanism: This scheme constructs a dual-constraint lockout (consistency constraint and fidelity constraint) within the arithmetic circuit. Under the standard cryptographic assumption that the commitment function adopted has collision resistance and second preimage resistance, if the prover attempts to substitute a forged score (to match the false result), the first constraint is not satisfied; if the prover retains the real score and falsely reports the result, the second constraint is not satisfied; both cause the circuit to trigger assertion failure during the witness construction stage, forcibly blocking the generation of false proof documents from a cryptographic perspective, rather than relying on post-event detection or manual review. This "blocking before output" characteristic is what distinguishes this scheme from post-event detection-based audit schemes.
[0071] To avoid misrepresentation, the level of effect of this measure needs to be accurately defined: the aforementioned blocking effect acts on the two constraints within the circuit, constraining the relationship between the score of the private input and the declared result. As for whether the public input itself is a value agreed upon by both parties (e.g., if the prover uses a modified threshold to participate in proof generation, the two constraints can still be satisfied simultaneously, and the proof document can still be generated), this is not blocked by the constraints within the circuit, but rather guaranteed by the verifyer using its own agreed threshold and an anchor point independently obtained from the public channel to constitute the public input—in this case, if the public input does not match, the verification operation will deterministically output False. Therefore, the complete guarantee of this scheme is: the constraints within the circuit block the forgery of the score and result before the proof is generated; the self-holding of the public input on the verification side ensures that any modification at the public input level will inevitably be exposed during verification; the combination of these two constitutes coverage of all cheating paths. It should be noted that this scheme does not improve the commitment function itself; its reliability is reduced to the reliability of the existing cryptographic assumptions and the zero-knowledge proof system used. In addition, this scheme guarantees that "the decision result of any verified proof is faithful," and the passive inaction of the proving party in refusing to submit proof is dealt with by making the objective fact that it cannot provide a valid proof a basis for liability.
[0072] (6) Verifier's offline independent auditing as needed: The verification process of this scheme is carried out entirely offline on the verifier's (second participant / customer) local machine (step S42). The verifier only needs to hold the public verification key (vk, which can be obtained from the public channel) to verify the historical records at any time without real-time interaction with the prover. It does not occupy the system's online communication bandwidth and supports high-concurrency batch historical auditing scenarios (such as end-of-month reconciliation). Moreover, since the hash anchor is obtained independently by the verifier from the public channel rather than provided by the prover, the verification process does not rely on any trust in the prover.
[0073] (7) Trust settings are reused globally in one go: The arithmetic circuits in this scheme do not encode any structural information of any specific model and have a fixed size. Therefore, the trust settings are set globally in one go and can be reused for underlying inference models of any complexity and structure (step S0). Compared with the existing full zkML scheme, which requires "re-execution of trust settings for new and larger circuits once the underlying model is replaced or upgraded", this scheme eliminates the cost of repeated trust settings caused by model iteration and significantly reduces the maintenance burden of the system in the scenario of continuous model evolution. Attached Figure Description
[0074] Figure 1 This is a flowchart of the application process;
[0075] Figure 2 A flowchart for generating ZKP arithmetic circuit constraint structure and proof is provided.
[0076] Figure 3 System module composition box. Detailed Implementation
[0077] To make the technical solution of the present invention clearer, the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0078] A lightweight zero-knowledge proof method for vertical federated decision-making logic includes the following steps:
[0079] Step S0: System Initialization and Trust Configuration
[0080] Implementation method: Before the system is officially launched and put into production, both parties will collaboratively perform a one-time Trusted Setup Ceremony based on the Common Reference String (CRS) to generate a set of cryptographic parameters for the arithmetic circuit in step S2, specifically including the following sub-steps:
[0081] S01. The participants (or multiple independent third parties may be invited to join the ceremony to enhance credibility) compile the arithmetic circuit (R1CS, Rank-1 Constraint System) designed in step S2 to generate the circuit description file (R1CS file) and the witness generator.
[0082] S02. Based on the common reference string of the Groth16 protocol, both parties perform PowersofTau trusted setup calculations to generate circuit-specific ProvingKey (pk) and VerificationKey (vk), with the following relationship:
[0083] ;
[0084] Wherein, τ is a random secret parameter (poisoning parameter, ToxicWaste) generated in the trusted setup ceremony, which must be safely destroyed after calculation; pk is handed over to the prover (first participant / host) for proof generation in step S3; vk is publicly released and stored by the verifier (second participant / guest) (or can be solidified on the blockchain) for offline verification in step S42.
[0085] Principle and Effect: The security of the Groth16 protocol is based on the trusted setting assumption, which is executed by a multi-party Powers of Tauce remony. As long as at least one of the parties participating in the ceremony honestly destroys its own random secret share τ, the attacker cannot reconstruct τ, and the system is unforgeable without relying on any single trusted third party. In this embodiment, vk is publicly on the chain, and any third party can independently verify it, ensuring that the source of the verification key is transparent and trustworthy. More importantly, since the arithmetic circuit designed in step S2 has a fixed size and does not encode any specific model's structural information (see step S2 for details), this trusted setting is a one-time global setting that can be reused for underlying inference models of arbitrary complexity and structure without needing to be re-executed when the underlying model is changed or upgraded. This is fundamentally different from the existing full zkML scheme, which requires "re-setting the trusted settings according to the new, larger-scale circuit" once the model is changed. This is a direct manifestation of the O(1) constant-level overhead achieved by this scheme in the trusted setting dimension. This step is only executed once during system initialization and does not affect the real-time performance of subsequent high-frequency business paths.
[0086] Step S1: Receive the front-end quantization score and hash anchor, and establish consistency between the quantization caliber and the computation domain:
[0087] Implementation: The system receives the prediction score and the corresponding cryptographic hash anchor (Commitment, i.e., the hash value collaboratively calculated and publicized by the commitment generation module before the plaintext recovery of the inference result; this anchor can be generated by a multi-party secure computation protocol or other cryptographic commitment schemes, and can also be obtained by the proving party from the commitment publicity channel) transmitted from the front end of the inference system. The term "hash anchor" used in this paper is the same as "hash commitment (Commitment) / commitment value" in the art, and the English notation is uniformly "Commitment". The reason for using the term "anchor" in this paper is simply because its position in this scheme is "an existing comparison benchmark as a public input of the circuit," which is different from the perspective of its generation process, but the technical objects referred to are exactly the same. It should be noted that this step only consumes the hash anchor as a public input of the subsequent circuit, without limiting, involving, or depending on the specific generation method and publicity solidification process of the anchor; regardless of the commitment scheme by which the anchor is generated, as long as it meets the following two conditions of "quantization caliber consistency" and "operation domain consistency", it can be used as a valid input of this scheme.
[0088] Obtaining the quantized score. The private input of this scheme is the quantized score_q in the form of a fixed-point integer. As a preferred implementation, considering that the hash anchor is calculated from a certain fixed-point integer during the generation stage, this step directly receives the fixed-point integer quantized score as the private input, and no longer re-quantizes the floating-point score locally.
[0089] As an alternative implementation, when the inference system only outputs floating-point prediction scores (Logit) to this scheme, the system's built-in data adapter calculates the result based on a preset scaling factor (Scale, e.g., ...). ) Perform fixed-point quantization on the floating-point score (the term "fixed-point quantization" in this article is the same operation as "fixed-point number encoding" in the field, and "fixed-point quantization" will be used throughout the article):
[0090] ;
[0091] The amplification factor value, rounding rule (rounding down in this embodiment), and floating-point binary representation precision used at this time must be strictly consistent with those used in the hash anchor generation stage; otherwise, the integer obtained by local quantization will deviate from the integer bound to the anchor (for example, floating-point 0.8 may be represented as 0.7999999999999993 in double-precision binary; if the rounding time points of the two stages are different, 800000 and 799999 can be obtained respectively), which will inevitably lead to the failure to satisfy the first constraint and the inability to generate a valid proof.
[0092] Obtaining the quantification threshold. The business decision threshold is a publicly disclosed parameter agreed upon and jointly held by both parties to the contract. The system performs fixed-point quantification using the same amplification factor as the score.
[0093] ;
[0094] Where Threshold is the publicly agreed business decision threshold (e.g., 0.5) between the two parties; Scale is a preset integer amplification factor (in this embodiment, Scale = ...). ); ⌊⌋ represents the floor function; score_q is the quantized score (an integer, known only to the proving party) as private input; threshold_q is the quantized threshold (an integer, known to both parties) as public input. The quantized threshold is a publicly agreed-upon parameter held by each party, and the verifying party uses its own threshold as public input when performing verification operations, not accepting the threshold value provided by the proving party. This arrangement has adversarial implications rather than being merely an engineering convention: since the threshold is a public input of the circuit rather than a private input, if the proving party is allowed to select its own threshold when generating the proof and have the verifying party accept it, the proving party can retain the true score (thus satisfying constraint ①) and substitute a tampered threshold to make the comparison result match its intended claim (thus satisfying constraint ②), thereby producing a proof document that satisfies both constraints. However, under the arrangement of this application, the verifying party participates in the pairing operation with its own agreed-upon threshold. If the threshold used by the proving party is inconsistent with the threshold used by the proving party, the public input will not match, and the verification will inevitably fail; therefore, this path is blocked. As a further preferred implementation, the threshold and hash anchor can also be publicly disclosed and solidified in the commitment disclosure channel, so that the threshold values held by both parties cannot be disputed afterward.
[0095] Consistency requirements for the computational domain. The commitment operation used by the hash anchor in the generation phase must be defined in the same finite field as the commitment operation used in the circuit in step S2, and its instantiation parameters (including round constant, linear mixing matrix, S-box exponentiation, and number of rounds, etc.) must be completely consistent. As a preferred embodiment, both adopt the Poseidon hash function on the elliptic curve scalar field (BN128 curve scalar field in this embodiment) used by the zero-knowledge proof system, and the multi-party secure computation in the commitment generation phase must be configured to be performed on the same prime number field.
[0096] Principle and Effect: The underlying cryptographic system of zero-knowledge proofs (such as the BN128 curve scalar field) only supports integer operations within a finite field. Directly inputting floating-point numbers (such as 0.8) will cause the circuit to malfunction or lose precision. Fixed-point quantization (e.g., converting 0.8 × ...) is then used to address this issue. =800000, 0.5× =500000), while eliminating differences in algebraic structures, it retains complete decision-making accuracy, enabling subsequent arithmetic circuits to perform accurate logical reasoning on the machine learning output values. The requirement for consistency of the computational domain is a necessary prerequisite for the first constraint to hold: commitment operations must be performed on different algebraic structures (e.g., the commitment generation side operates on an integer ring). The circuit operates in the prime number domain. If the same input is not used, the hash values obtained on both sides will be systematically unequal, the first constraint will never be satisfied, and the solution will be impossible to implement. Therefore, this step must explicitly unify the computation domains and instantiation parameters on both sides, which is a key engineering condition for the feasibility of this solution.
[0097] S14 Regarding the meaning of the prediction score Logit: In this paper, Logit refers to the unified notation of the floating-point prediction score that the inference model outputs at the end of the binary classification decision task, representing the prediction confidence. In this embodiment, it is the transformed probability (e.g., 0.8) that takes a value in the interval [0,1] after mapping. It is not limited to the original log-odds value. When the inference system outputs the original log-odds value, it can be converted into a probability score in the interval [0,1] by monotonic mapping such as Sigmoid before fixed-point quantization is performed.
[0098] Based on this, this scheme does not limit the sign of the quantization score_q to accommodate different upstream value calibers: when the upstream first performs a monotonic mapping to the [0,1] interval before quantization according to the above preferred caliber, score_q is a non-negative integer taking the value [0,Scale]; when the upstream directly performs quantization on the original log-probability value without mapping, score_q can be a negative integer, and its absolute value can also exceed Scale. The comparator component in step S2 is applicable to both of the above cases, and its processing method is detailed in this step.
[0099] Step S2: Construct a binary classification threshold comparison arithmetic circuit
[0100] Implementation: A lightweight arithmetic circuit is built locally on the proving side (first participant / principal / host). This circuit abandons the full model verification approach and only encodes the decision logic at the end of the inference process, specifically including the following sub-steps:
[0101] Circuit input structure definition: The system declares the set of input variables for the circuit, divided into two categories: private inputs and public inputs. Private inputs are the quantization score `score_q` obtained in step S1 (visible only to the prover, not disclosed to the verifier); public inputs are the hash anchor `Commitment` (the public result from the pre-commitment mechanism), the public quantization threshold `threshold_q`, and the business decision result `Result` (publicly declared by the prover, visible to the verifier). When a random salt value is introduced into the hash anchor during the generation phase, this random salt value is also used as a private input of the circuit.
[0102] Connect the commitment consistency verification component and construct a consistency constraint gate: The system calls the circuit component corresponding to the same cryptographic commitment / hash function used in the anchor generation phase, performs finite field operations on the private input score_q, and applies the following equality constraint inside the circuit:
[0103] Constraint ① (Consistency Constraint):
[0104] ;
[0105] Here, Commit(·) is the same cryptographic commitment / hash function used in the Commit generation phase as the hash anchor (it must be a multi-party computationally friendly function defined on a finite field of zero-knowledge proof and whose instantiation parameters are completely consistent with those in the generation phase; in this embodiment, Poseidon hashing on the BN128 scalar field is used, i.e., Poseidon(score_q) = Commitment). If the prover attempts to input a forged score_q' (score_q' ≠ score_q), then Commit(score_q') ≠ Commitment, the constraint is not satisfied, the circuit refuses to generate a valid proof, and cryptographically blocks the forgery of the result.
[0106] As a preferred implementation to enhance privacy, when the hash anchor introduces a random salt value r (i.e., Commitment = Commit(score_q, r)) during the generation phase, this step uses the random salt value r as a private input to the circuit, and the first constraint is correspondingly expressed as follows:
[0107] Constraint ①' (Salted Consistency Constraint):
[0108] ;
[0109] The parallel arrangement of the two inputs in the formula indicates that they both participate in the commitment operation, and their specific filling positions in the commitment function permutation state do not constitute a limitation on this scheme. At this time, the random salt value must be restored to the prover during the plaintext recovery stage of the reasoning result, so that the prover can witness based on its construction; since the salt value only participates in the circuit operation as a private input and is never disclosed to the verifier, its zero-knowledge nature is not affected.
[0110] The technical necessity of introducing random salt values lies in the fact that the quantization score, score_q, takes values from a finite integer space limited by the amplification factor (in this embodiment, its absolute value does not exceed approximately...). If the commitment operation does not introduce a random salt, then theoretically any party holding the public hash anchor Commitment (including the verifier) can exhaustively search the finite space, recalculate the commitment operation results, and compare them to deduce the plaintext value of score_q. This weakens the privacy goal of this scheme, which is that "the plaintext score is only visible to the prover," in the actual value space. By introducing a salt over a sufficiently large random field, the input space of the commitment operation is significantly expanded, making the above exhaustive deduction computationally infeasible.
[0111] It should be noted that whether or not to introduce a random salt value depends on the specific scenario's requirements for the plaintext confidentiality of the score; the two implementation methods differ only in the circuit structure of the salt value input and the input width of the commitment component, and neither changes the core feature of this scheme that "the number of circuit constraints is independent of the complexity of the underlying model".
[0112] By integrating the Comparator comparison component, a fidelity constraint gate is constructed: the system calls the GreaterThanComparator component to perform a size comparison operation between score_q and threshold_q within a finite field, and applies the following equality constraint internally to the circuit:
[0113] Constraint ② (Loyalty Constraint): ;
[0114] The `Compare(score_q,threshold_q)` function returns 1 if `score_q > threshold_q`, and 0 otherwise. If the prover falsely reports `Result = 0` (invalid attribution) while the actual `score_q > threshold_q`, then `Compare(score_q,threshold_q) = 1 ≠ 0`, the constraint is not satisfied, and the circuit will also refuse to generate a valid proof.
[0115] Furthermore, when the size comparison is implemented within the finite field of zero-knowledge proofs, a technical obstacle must be addressed: this finite field is a modulo prime field, whose elements do not have a natural size order relationship, and there is no directly applicable "greater than" operation between two field elements. To this end, the comparator component is implemented using a bit decomposition-based RangeProof mechanism, as detailed below (it should also be noted that when the upstream directly quantifies the raw log-odds value without mapping the predicted score to the [0,1] interval, the quantized score can be a negative integer, which appears in the prime field as a congruence representation modulo p; the impact of this scenario on the following comparison mechanism and its handling are detailed in item ④ of this step):
[0116] ① Construction and bit decomposition of the offset difference: taking the preset bit width n as a parameter, construct the offset difference shown in the following formula, and perform binary bit decomposition on it with n+1 bits:
[0117] ;
[0118] Decompose d into n+1 binary bits , , ..., , and impose a Boolean constraint on each bit:
[0119] ;
[0120] (this constraint ensures that each bit must take a value of 0 or 1), and simultaneously impose a weighted sum equality constraint:
[0121] ;
[0122] (this constraint ensures that this set of bits is indeed the binary representation of d; the left side of the above formula is the sum of i from 0 to n, i.e., ). The role of the introduced constant in the formula is to ensure that d is always non-negative within the legal input range, so that it can be represented by binary bit decomposition.
[0123] ② Determine the order relationship based on the most significant bit: on the premise that the bit width condition described in item ③ below is satisfied (i.e., d falls within the [0, −1] interval), it can be seen from the above formula that when threshold_q ≥ score_q ≤ d ≤ −1, its nth bit is 1; when threshold_q < score_q (i.e., score_q > threshold_q), 0 ≤ d < , its nth bit is 0. Therefore, taking the logical negation of this most significant bit yields the strict greater-than determination result:
[0124] ;
[0125] thereby reliably restoring the strict greater-than ordering within a finite field: the expression evaluates to 1 if and only if score_q > threshold_q, and evaluates to 0 when score_q = threshold_q or score_q < threshold_q, which is consistent with the semantics defined by Constraint ②.
[0126] where d is the difference after introducing the offset constant; n is the preset bit width; is the i-th binary bit of d (taking a value of 0 or 1); is the n-th bit thereof, i.e., the most significant bit; is an offset constant that ensures d is always non-negative within the legal input range. The aforementioned comparison logic can be directly implemented by reusing audited standard comparator components (such as the GreaterThan component) from mature cryptographic circuit component libraries, which are adopted in this embodiment. The components internally implement the strict greater-than determination in the aforementioned manner, so the solution does not require constructing the comparison logic independently.
[0127] ③ Selection of the bit width n and its reliability implications: the bit width n must satisfy the maximum possible value of the absolute difference between score_q and threshold_q, i.e., the absolute value of this difference does not exceed −1. This boundary should not be written as "not less than": because the offset difference d must fall within the [0, −1] interval representable by n+1 bits, substituting into the above formula yields that the difference range corresponding to this interval is −( −1) ≤ score_q − threshold_q ≤ , so when the difference on the threshold_q side exactly reaches , d will equal and fall outside the representable interval; thus, "greater than" must be used to cover the boundary cases on both sides. This requirement has soundness implications rather than merely being an engineering margin. As can be derived from the two constraints in step ①, d must be representable as a weighted sum of n+1 bits, i.e., d must fall within the [0, −1] interval. When the difference between the two values exceeds the range corresponding to this interval, d will fall outside the interval, the bit decomposition constraint will be unsatisfiable, and the circuit will trigger an assertion failure (AssertFailed) during the witness construction phase, making it impossible to generate any proof file.
[0128] Therefore, the consequence of insufficient bit width is that even an honest prover cannot generate proofs for valid scores that are out of range (i.e., usability is compromised), while a valid proof can still be generated even after the comparison result is silently altered (i.e., reliability is not compromised). In other words, this set of bit decomposition constraints itself constitutes a mandatory guarantee of the correctness of the comparison result: an attacker cannot deceive the circuit by providing out-of-range inputs to cause the circuit to output incorrect order relation determinations, because out-of-range inputs simply cannot pass the constraints. This is the basis for the reliability of the second constraint in this scheme.
[0129] In this embodiment, the absolute value of the quantization score and the quantization threshold does not exceed approximately The magnitudes are such that the absolute value of the difference between the two does not exceed approximately 2 × Take n=32 (i.e. ≈4.29× After that, there is still a margin of about three orders of magnitude, which can reserve sufficient space for the expansion of the score range caused by the growth of the underlying model size.
[0130] ④ Regarding the handling of negative inputs (this is a feasibility condition): As described in S14, when the upstream directly performs quantization on the original logarithmic probability value without mapping to [0,1], the quantization score_q can be a negative integer. In this case, the negative integer appears in the prime field in its congruent representation modulo p, appearing as a large integer close to the prime order p. The scope of influence of this situation must be accurately defined: As shown in the above equation, the value of the offset difference d depends only on the signed difference between the two compared quantities, i.e., d and... Subtracting the signed difference from the congruence modulo p, we know that as long as the signed difference satisfies the boundary of the above term ③, the canonical representation of d is still equal to... Subtracting this difference and falling within the range that can be represented by n+1 bits, the nth bit obtained from the bit decomposition still accurately reflects the order relationship, and the judgment result is still correct. In other words, the negative value of the quantization score does not invalidate the above bit decomposition comparison. The bit width condition in item ③ only applies to the sign difference, that is, it already covers the negative value case.
[0131] The real issue to address is another condition: when the quantization score is negative, its field element representation is no longer a non-negative integer of no more than n bits. Audited standard comparator components in mature cryptographic circuit component libraries typically use "both inputs are non-negative integers of no more than n bits" as their publicly stated applicable premise and reliability scope. Therefore, directly calling such standard components with negative field elements would exceed their stated scope of application, and their behavior would not be guaranteed by the component's existing security conclusions. Accordingly, in implementation scenarios where the quantization score might be negative, it is advisable to first perform the following common offset transformation to map both compared quantities to non-negative integers, ensuring they fall back within the input premise stated by the selected component, before performing the bit decomposition comparison. When the upstream uses a preferred approach (first monotonically transforming to the [0,1] interval before quantization, where score_q is a non-negative integer of [0,Scale]), this condition does not exist, and the above bit decomposition comparison can be performed directly.
[0132] As an optional implementation (preferred when the quantization score may be negative, for reasons explained in item ④ above), when the selected comparator component uses the non-negative integer as a prerequisite for its application, the same common offset OFFSET can be added to the quantization score and quantization threshold respectively before performing the above comparison, resulting in score_shifted = score_q + OFFSET and threshold_shifted = threshold_q + OFFSET. The value of the common offset is greater than the maximum possible value of the absolute values of the quantization score and quantization threshold, thereby ensuring that the two values after the offset are always non-negative integers and fall within the input range recorded by the component. Since the difference between the two is unchanged when the same constant is added, the order relationship is strictly consistent with the original value, that is, score_q > threshold_q if and only if score_shifted > threshold_shifted. In this embodiment, OFFSET = It should be noted that this offset is to ensure that the input falls within the applicable range specified by the selected component, and does not change the basis for selecting the bit width n mentioned above—because bit decomposition acts on the difference between the two, and the difference is not changed by adding the same offset.
[0133] Principle and Effect: The verification scope is drastically narrowed down to the final decision-making stage – the "last mile." The number of circuit constraints is fixed (approximately 453 constraints in this embodiment, including 249 nonlinear constraints and 204 linear constraints; this set of values corresponds to a bit width of n=32, using the aforementioned common offset and without introducing random salt values), and does not change with the number of layers, parameters, or tree size of the underlying model, completely severing the coupling between circuit size and the complexity of the underlying model. It should be noted that the specific number of constraints mentioned above fluctuates within the same order of magnitude depending on the implementation details, and their absolute values do not constitute a limitation on this solution. The applicant performed circuit compilation for each implementation method, and the measured values of the number of constraints are shown in the table below:
[0134] The values in each group of the table above are measured values obtained by compiling the corresponding circuit configurations using the Circom compiler. The differences between the groups also correspond one-to-one with the circuit structures, which serves as evidence: when the bit width n increases from 25 to 32, the number of bits required for bit decomposition increases by 7 bits, and each bit corresponds to a Boolean constraint. ×( -1)=0, therefore the number of nonlinear constraints increases by 7 (242→249) while the number of linear constraints remains unchanged; when the common offset is not used, the assignment of the two offset paths, score_shifted and threshold_shifted, is omitted, so the number of linear constraints decreases by 2 (204→202) while the number of nonlinear constraints remains unchanged; when random salt values are used, the input width of the commitment component increases from one path to two paths, and its permutation state width increases from binary to ternary, so the number of nonlinear constraints increases to 276 and the total number of constraints increases to more than 500. Although the number of constraints in the above implementation methods differs, they are all fixed constants that are independent of the complexity of the underlying model and are all in the hundreds—this is the core feature of this scheme: the number of constraints depends on the implementation choices of the selected components and parameters, which are determined once they are determined and will not change, and does not depend on the number of layers, the number of parameters, or the tree size of the underlying inference model. Since the proof generation cost and trusted setup size of zero-knowledge proofs both monotonically increase with the number of circuit constraints, while the number of circuit constraints in this scheme does not contain any components that change with the model, the proof generation cost and trusted setup size do not change with the model complexity. That is, they are constant level (O(1)) in the dimension of "relationship with model complexity". This fundamentally breaks through the bottleneck of the proof cost in the existing full zkML schemes which increases linearly or even superlinearly with the model size (O(N)). At the same time, since no model layer structure information is encoded in the circuit, the risk of model privacy leakage of the full scheme is also fundamentally avoided.
[0135] Step S3: Generate zero-knowledge proof files
[0136] Implementation: The proving party (first participant / master / host) runs the Groth16 proof engine, generates a proof file, and asynchronously pushes it to the verifying party. This includes the following sub-steps:
[0137] S31. The system substitutes the private input (quantized score score_q, and random salt value r when using the salted implementation method) and the public input set (Commitment, Result, threshold_q) into the arithmetic circuit (R1CS, first-order constraint system) generated in step S2 to complete the construction and assignment of the Witness.
[0138] S32. The system runs the proof engine (Prover) based on the Groth16 zero-knowledge proof algorithm, and performs multinomial commitment calculations in conjunction with the pre-generated proof key (ProvingKey, generated during the trusted setup phase), outputting a proof file of fixed byte size (Proof, approximately 128 bytes in Groth16 binary format, and approximately 800 bytes in its JSON text serialization). In the prototype system of this embodiment, the end-to-end walltime for proof generation is on the order of hundreds of milliseconds (the average of 5 repeated measurements, excluding the first warm-up round, is approximately 370 milliseconds, including approximately 250 milliseconds for the toolchain interpreter process cold start); in the long-process reuse mode of the production environment (the toolchain process is resident in memory and does not require repeated cold starts), the proof generation calculation time after deducting the above process startup overhead is approximately 120 milliseconds. The above two values cannot be used interchangeably; the applicable value must be explicitly stated when citing them. It should be noted that the "hundreds of milliseconds" in the beneficial effects of this solution refers to the latter caliber (approximately 120 milliseconds). Although this value is on the order of hundreds of milliseconds, its constancy (i.e., it does not change with the complexity of the underlying model) is the technical contribution of this solution. Its absolute value itself does not constitute a limitation of this solution and varies with hardware performance and toolchain implementation.
[0139] S33. The proof generation task is executed asynchronously by a background thread of the system. The main business process (such as returning the attribution decision to the user) does not wait for the proof to be completed. After the proof is generated, the system pushes the {RID, Result, Proof} data packet to the receiving port of the verifier (second participant / guest) through the network interface for subsequent offline verification. The request identifier carried in the packet is used by the verifier to detect the corresponding hash anchor (see S41 for details), so that the anchor, the decision result and the proof document correspond one-to-one. Wherever this audit data packet is mentioned in this document, it contains the three fields {RID, Result, Proof}, where RID is the request identifier.
[0140] Principle and Effect: The proof generation action is decoupled from the main business process and executed asynchronously. As described in step S32, the proof generation itself is on the order of hundreds of milliseconds, not milliseconds. If placed in the synchronous path of the main business, it would still constitute a perceptible delay. After moving it out of this path in this step, the audit overhead is no longer included in the business response delay, thus enabling business systems sensitive to response delays, such as internet advertising settlement and online risk control, to bear this audit mechanism. The feasibility of this asynchronous arrangement lies in the fact that the purpose of auditing is to allow for post-event accountability, not real-time blocking; therefore, the output of the proof does not need to be completed synchronously with the business decision.
[0141] (5) Step S4: On-demand offline constant-level verification
[0142] Implementation: The verifier (second participant / guest) locally invokes an offline verifier, loads the verification key and public input set, and performs verification operations on the proof file pushed by the prover. This includes the following sub-steps:
[0143] S41. Collection of public inputs: The verifier collects the set of public inputs required to perform the verification operation. The hash anchor Commitment is obtained independently by the verifier from the public channel of the pre-commitment mechanism (in this embodiment, it is a consortium blockchain). The quantization threshold threshold_q is a public parameter agreed upon by both parties and held by each party. The decision result Result comes from the {RID,Result,Proof} data packet pushed by the prover, where RID is the request identifier.
[0144] The independent acquisition of the aforementioned anchor points is achieved using the request identifier as an index: When this inference request is initiated, the business system assigns a globally unique request identifier (RID), which is jointly held by both parties. The pre-commitment mechanism binds the hash anchor point to this identifier when it is publicized, and the identifier is also carried in the audit data packet pushed by the proving party. The verifying party uses this identifier as an index to retrieve the corresponding hash anchor point from the publicized channel, thus establishing a one-to-one correspondence between the on-chain anchor point, the current decision result, and the current proof document, avoiding record mismatches during batch audits (such as month-end reconciliation involving a large number of decision records). It should be noted that this identifier is only used for indexing and positioning and does not participate in any constraint operations within the circuit; therefore, it is not used as an input signal for the circuit. Its specific form and allocation method do not constitute a limitation on this scheme.
[0145] S42. Offline verification operation: The verifier invokes the offline verifier locally, inputs the verification key (VerificationKey, vk) generated in the trusted setup phase, the above-mentioned public input set, and the proof file Proof, and performs bilinear pairing calculation.
[0146] S43. Output and Handling of Verification Results: If all constraints pass verification, output True (verification successful), confirming that the decision result is faithful to the locked calculation result and proceeding to the normal settlement process; otherwise, output False, triggering a fraud alarm and initiating the arbitration and accountability process. Furthermore, if the proving party fails to submit any valid supporting documents within the agreed timeframe, the verifying party may also determine that the decision is suspected of fraud and initiate the same accountability process.
[0147] In the above sub-steps, since the hash anchor is obtained independently by the verifier from the public channel rather than provided by the prover, the prover cannot pass the verification by providing a forged anchor. Therefore, the verification process does not rely on any trust in the prover.
[0148] Principles and Effects: Thanks to the constant design of the circuit scale, the credibility setup and proof generation overhead of this scheme are independent of the model complexity. On the verification side, the Groth16 algorithm's verification process only requires executing a fixed number of elliptic curve bilinear pairing operations. The pure pairing computation takes less than 3 milliseconds, enabling the verifier to complete the verification with extremely low overhead. The verification process is entirely performed offline locally, without requiring real-time interaction with the prover, and does not consume system online communication bandwidth. Combined with the asynchronous decoupling of proof generation and main business logic, it achieves true "on-demand auditing." It should be noted that the constant nature of the Groth16 verification time is an inherent property of this proof system. The core innovation of this scheme lies in reducing the proof generation overhead and credibility setup scale to a constant level through circuit decoupling, rather than relying on the verification time itself.
[0149] To verify the beneficial effect of the proposed scheme's O(1) constant-level complexity, a horizontal comparison was made between this scheme and the existing full zkML scheme in terms of the number of circuit constraints and the time required to generate proofs. Both schemes directly reflect the coupling relationship between proof overhead and model complexity. The comparison data is shown in the table below:
[0150] As can be seen from the table above, the number of circuit constraints and proof generation time of the existing full zkML scheme increase linearly or even superlinearly with the model size, while the number of audit circuit constraints of this scheme remains constant in the hundreds and the proof generation time remains constant in the hundreds of milliseconds. Both are reduced by about one to three orders of magnitude compared with the full scheme (the comparison objects range from small-scale models with thousands of constraints to convolutional networks with millions of operations) and do not increase with the model size, which directly reflects the decoupling of proof overhead and model complexity.
[0151] Two clarifications are needed regarding the measurement methods in the table above: First, different proof systems use different measurement methods for "computational scale"—R1CS / Groth16-based schemes use the number of constraints, while zkCNN and other schemes based on interactive proofs / sumchecks use the scale of their hierarchical operations. The table uses the scale magnitude of each system for comparison to reflect the growth trend of scale with model complexity, rather than aligning them to the same unit of measurement. Second, the numerical values of the compared schemes in the table are based on the scale references in their published literature, not on actual measurements under the same hardware environment, and are therefore only used for order-of-magnitude reference.
[0152] It should be noted that the "number of circuit constraints" and "proof generation time" compared in the table above are both technical achievements of this scheme that directly reduce them to the constant level; while the constantness of the Groth16 bilinear pairing time in the verification stage is an inherent mathematical property of the proof system and is not the invention point of this scheme. The core innovation of this scheme lies in the circuit decoupling design of "only encoding threshold comparison logic", which enables the trusted setting scale and proof generation overhead to be reduced to the constant level that is independent of the model complexity, thereby achieving end-to-end O(1) audit overhead together with the inherent constantness of the verification side.
[0153] Furthermore, to verify the constancy of the audit overhead of this solution under the same underlying framework and with varying model complexity, tests were conducted using decision models of different complexities. The underlying MPC inference time increases approximately linearly with the number of nodes within the model (serving as an indirect representation of "model complexity"), while the number of audit circuit constraints in this solution remains constant, and the audit time remains stable. Experimental data are shown in the table below:
[0154] Data Scope: The last column of the table above represents the end-to-end walltime for the verification phase, with an average of approximately 365 milliseconds. This value can be broken down into three levels: First, the end-to-end walltime of approximately 365 milliseconds includes approximately 250 milliseconds for the toolchain interpreter process cold start; second, the verification-side computation time after deducting the aforementioned process cold start is approximately 115 milliseconds, which mainly consists of local input / output processing such as loading and deserializing the verification key (vk), parsing and format conversion of public inputs; third, within the aforementioned 115 milliseconds, the pure cryptographic computation time for actually performing Groth16 bilinear pairing operations is less than 3 milliseconds. These three levels should not be used interchangeably; the specific level must be clearly indicated when citing them. The phrase "pure pairing computation time less than 3 milliseconds" mentioned in the beneficial effects section of this scheme specifically refers to the third level.
[0155] Values of the constraint sequence: The same audit circuit is used in all levels of this experiment (since this circuit is independent of the model, it does not need to be recompiled with the model), so "constant" is filled in for this column instead of repeating specific values. The specific constraint number of this circuit depends on the selected bit width and other implementation parameters. Its value range and the corresponding values for each implementation method are shown in the last part of step S2. The key technical point here is that this value has not changed throughout this experiment, rather than its absolute size.
[0156] The object of proof and the boundary of inference in this table: The object directly measured in this table is the constancy of the verification time with the model complexity - when the complexity of the underlying model (number of internal nodes) increases by 37.5 times (6→225), the coefficient of variation (CV) of the verification time is less than 9%, which is statistically unrelated to the model complexity; while the constancy of the number of circuit constraints is not obtained from the actual measurement in this table. It is true because the circuit structure of this scheme itself does not contain any components that change with the model (see step S2), which is a structural necessity and does not need to be measured step by step. Regarding the constancy of proof generation overhead, this table does not provide direct experimental testing. The technical basis is that the proof generation overhead of Groth16 is determined by the number of circuit constraints (monotonically increasing with the number of constraints) and not by the source of the proposition being proven. Furthermore, its main operations are fixed-scale multiscalar multiplication and fast number theory transformations, without conditional branches dependent on input values. Therefore, the computational cost of generating proofs on the same circuit does not change with the specific values of the test case substituted, nor does it change with the underlying model. In this scheme, the same circuit is used throughout all experiments, thus the proof generation overhead remains constant. This inference does not depend on the specific functional form between overhead and the number of constraints (whether linear or logarithmically factored), but only on the fact that "the proof generation overhead of the same circuit is independent of the underlying model."
[0157] Limitations of the measurement environment: The data in the table above is taken from a single-machine simulation environment (two participating processes running on the same host and communicating via a local loopback network), and was not measured under a real cross-organizational wide area network deployment. In a real network environment, the absolute time consumption of the underlying MPC inference will increase significantly due to network round-trip latency. However, the audit-side overhead of this solution is local computation and does not include interactive communication between participating parties, so it is not affected by network conditions. Changes in network conditions will only further reduce the "audit overhead ratio" shown in this table, and will not affect the validity of the conclusion that "audit overhead is unrelated to model complexity".
[0158] Data shows that when the complexity of the underlying model increases by 37.5 times, the audit time of this solution remains stable and the size of the audit circuit remains unchanged, thus achieving decoupling between audit overhead and model complexity.
[0159] Specific application scenarios of this solution
[0160] This solution is applied to a scenario of joint attribution and deduction in internet advertising between advertising media platforms (second participant / client / verifier) and e-commerce advertisers (first participant / owner / provider). Both parties agree to jointly predict the user's ad conversion probability using vertical federated learning. When the prediction score is strictly greater than a threshold of 0.5, the conversion is determined to be attributable to media traffic (Result=1), and the advertiser pays the media a commission based on the number of conversions (Cost Per Action, CPA). When the score is equal to or lower than the threshold, it is determined to be an organic traffic conversion (Result=0), and the media receives no commission (consistent with the "strictly greater than" semantic used in constraint ② of step S2, i.e., when the score is exactly equal to the threshold, it is determined to be Result=0). Because advertisers exclusively control the final prediction plaintext and attribution decision-making power, there is a motivation to falsely report high-value conversions contributed by the media as organic traffic to evade commission payments—a long-standing and difficult-to-eradicate settlement fraud problem in the internet advertising industry.
[0161] (1) Scenario Phase 1: Quantitative Scoring and Anchor Point Reception (corresponding to steps S0-S1)
[0162] After a user clicks on a product advertisement placed on a media platform, they are redirected to the e-commerce advertiser's online store, triggering a joint conversion prediction. After the joint inference is completed, the advertiser's system obtains the user's conversion prediction score (in scale). The integer form after fixed-point quantization (in this example, score_q=800000, corresponding to a conversion probability of 0.8) is received simultaneously with the publicly available hash anchor point Commitment generated by the commitment module before plaintext recovery (this anchor point has been solidified through the commitment disclosure channel and cannot be tampered with). The system uses this quantized integer as the private input of the circuit; the publicly available business threshold of 0.5 (i.e., the attribution threshold in this scenario) is quantized to threshold_q=500000 using the same amplification factor as the public input. The 800000 in this scenario and the 200000 mentioned later are exemplary values selected for the purpose of illustrating the technical solution and do not specifically refer to the measured output of a prototype system on a real sample.
[0163] (2) Scenario Phase Two: ZKP Proof Generation and Asynchronous Distribution (corresponding to steps S2-S3)
[0164] The advertiser's program determines that 800000 > 500000, attributing it to media traffic, generates a public result Result=1, and confirms the conversion validity by shipping the product to the user. Simultaneously, the system's background thread asynchronously calls the arithmetic circuit in step S2 and the Groth16 proof engine in step S3. Using score_q=800000 as private input, combined with the publicly available inputs Commitment, threshold_q=500000, and Result=1, it generates a Proof file of approximately 128 bytes (binary format), which, along with Result=1, is pushed to the media platform. The comparison operation within the circuit is performed as in step S2: constructing an offset difference d=500000+ with a bit width n=32. -800000=4294667296, this value is less than Therefore, it is the 32nd position. If the result is 0, its logical NOT is taken, and the comparison result is 1, which is consistent with the declared Result=1, thus constraint ② is satisfied. (If the optional implementation method with a common offset described in S2 is adopted, then 10800000 and 10500000 are used instead of the above two values for comparison, and the difference between the two remains unchanged, and the judgment result is 1 for both.)
[0165] (3) Scenario Phase 3: Verification party conducts offline audit as needed (corresponding steps S41-S43)
[0166] At the end of the month, the media platform summarizes all attribution records for the month. For this conversion (request identifier "AD-2026-58731"), the media platform independently obtains the corresponding Commitment from the public channel using this identifier as an index in step S41. Then, in step S42, the local offline validator loads the public verification key (vk), the aforementioned Commitment, the threshold_q=500000 agreed by both parties, and {Result=1,Proof} sent by the advertiser, and performs bilinear pairing calculation (pure pairing calculation takes less than 3 milliseconds, end-to-end walltime including toolchain process startup is about 365 milliseconds, see note 1 in the principle and effect section of step S4). If the verification is successful (output True), it is confirmed that the attribution decision is faithful to the locked secret state calculation result, and both parties settle the CPA commission as agreed.
[0167] (4) Scenario Phase 4: Data Deduction Attack Scenario and Detection
[0168] Suppose an advertiser attempts to commit fraud by deducting conversions: After obtaining a genuine conversion score of 800,000, the advertiser, knowing that the conversion originated from media traffic, falsely claims that Result=0 (organic traffic, no commission) to avoid commissions. In this case, the advertiser could potentially use four fraudulent paths, all of which are blocked:
[0169] Path 1 (Fake Score, i.e., "Switching"): The advertiser inputs a fake quantified score, score_q'=200000 (corresponding to the falsely claimed score of 0.2), into the circuit to make the comparison result 0, thus matching the falsely claimed Result=0. However, the consistency constraint gate in step S2 calculates Commit(200000), whose value does not match the published and solidified Commitment. Constraint ① is not satisfied, the circuit triggers an assertion failure (AssertFailed), and the testimonial construction phase cannot be completed, so the proof document cannot be generated at all.
[0170] Path 2 (Retaining the true score while falsely reporting the result, i.e., "false reporting"): The advertiser truthfully inputs score_q=800000 to pass constraint ①, but declares Result=0. At this time, the loyalty constraint gate calculation comparison result in step S2 is 1 (as shown in scenario stage 2), which does not match the declared Result=0, constraint ② is not satisfied, and the circuit also triggers assertion failure.
[0171] Path 3 (Constructing a Hash Collision): The advertiser attempts to find another quantized score, score_q'' (satisfying score_q'' ≤ threshold_q so that the comparison result is 0), whose commitment value is exactly equal to the published Commitment, thus passing both constraints simultaneously. The feasibility of this path depends on the collision resistance and second preimage resistance of the chosen commitment function: in the Poseidon hash of this embodiment (output located in the BN128 scalar field, approximately...) Given that finding the second preimage is computationally infeasible, this path is computationally excluded. It should be noted that the reliability of this scheme rests on this standard cryptographic assumption—this scheme does not advocate improvements to the commitment function itself, but rather uses its collision resistance as an existing premise; if other commitment schemes are adopted, they must also satisfy the same collision resistance and second preimage resistance strength.
[0172] Path 4 (Tampering with the public threshold, i.e., "moving the goal"): The advertiser truthfully inputs score_q=800000 to pass constraint ①, while simultaneously substituting a tampered quantization threshold_q'=900000 into constraint ②, making the comparison result 0, thus matching their false claim of Result=0—at this point, both circuit constraints are satisfied, and the proof document can indeed be generated. This path is due to the threshold being a public input rather than a private input, therefore it is not blocked by the circuit constraints, but by the public input collection method in step S41: when the media platform performs verification, it uses its own agreed-upon threshold threshold_q=500000 as the public input, and does not accept the threshold value provided by the advertiser; since the verification operation of Groth16 requires the same set of public inputs used when the proof is generated to pass, the public input does not match when the proof generated by the advertiser with 900000 is verified by the media platform with 500000, the bilinear pairing equation is not valid, and the verification output is False. This is the counter-argument to the arrangement in this scheme that "the threshold must be held by the verifier rather than provided by the certifier." If the preferred implementation method of solidifying the threshold is adopted, this path is further excluded.
[0173] In summary, assuming the commitment function is collision-resistant and the verifier performs verification using its own agreed-upon threshold, advertisers can only input their true quantitative score and truthfully declare Result=1; otherwise, a valid Proof file cannot be generated. During month-end reconciliation, the lack of valid proof will lead the media platform to mark the advertiser as suspected of deducting points according to step S43, initiating a breach of contract accountability process. It is important to note that the blocking of paths one and two occurs before proof generation, not after verification. This means that for these two most direct cheating paths, fraudsters don't even have the opportunity to generate a false proof to submit, a fundamental difference from auditing schemes that rely on post-event detection. Path three is computationally excluded by the cryptographic assumptions of the commitment function; path four fails deterministically during the verification stage due to public input mismatch (not probabilistic detection), resulting in fraudulent behavior being detected rather than being allowed to pass.
[0174] It is necessary to clarify an inherent boundary of this solution in this scenario to ensure the rigor of the description of the scope of protection and technical effect: This solution can guarantee that "the decision result of all submitted proofs that pass verification will be faithful to the locked score," but it cannot technically force the proving party to submit proof. Therefore, in the case of the proving party's passive inaction in refusing to submit proof, this solution handles the situation by making the fact that the party cannot provide legal proof itself an objective basis for liability (step S43), and then holding both parties accountable according to the contract or industry arbitration mechanism, rather than preventing such inaction at the technical level. This boundary is common to all audit solutions based on proof submission and does not affect the validity of the technical effect of this solution.
[0175] Appendix Figure 1 The diagram illustrates the end-to-end timeline logic where, after receiving the inference result, the proving party (first participant) asynchronously generates a zero-knowledge proof and pushes it to the verifying party (second participant) for on-demand offline verification. Each step's number corresponds one-to-one with steps S1-S4 in the main text, emphasizing the asynchronous architecture design that decouples proof generation from the main business logic. In addition to the two main parties, the diagram also shows the "upstream inference system / pre-commitment mechanism" and the "commitment disclosure channel." These two only serve as external input sources for this solution: the quantization score (score_q) comes from the former, and the hash anchor (Commitment) is disclosed by the latter and provided to both the proving party and the verifying party respectively (the independent acquisition by the verifying party is shown in S41). The trusted setting S0 is a one-time system initialization and is not reflected in the business timeline of this diagram. This solution does not limit the specific generation method and disclosure process of the aforementioned anchors, only requiring them to meet the conditions of quantization consistency and computational domain consistency. Two points should be noted: First, the Result in the diagram is a value determined and declared externally by the main business system, not calculated by this solution, and its authenticity is enforced by constraint ②; Second, to make the diagram clear, this diagram only indicates the actions of each step and the applied equation constraints, and the meaning and value range of each parameter (such as the scaling factor Scale, which is taken in this embodiment) are not specified. The selection criteria for bit width n and the number of constraints, as well as other implementation details, shall be based on the corresponding steps recorded in the main text.
[0176] Appendix Figure 2This section demonstrates the constraint structure of the lightweight arithmetic circuit in step S2 and its connection to the subsequent proof generation process. The circuit receives one private input (score_q, which also includes a random salt value r in the salted implementation) and three public inputs (Commitment, threshold_q, Result). Two sets of equality constraints are simultaneously applied within the circuit: constraint ① (consistency constraint, preventing data tampering) and constraint ② (fidelity constraint, preventing false alarms). Both constraints must be met simultaneously to generate a proof document. The number of circuit constraints is fixed in the hundreds (approximately 453 constraints in this embodiment, corresponding to a bit width of n=32, using a common offset, and without introducing a random salt value; the corresponding values and their origins for each implementation are explained at the end of step S2), and is completely independent of the complexity of the underlying model. In the diagram, steps S31 and S32 belong to the proof generation action of step S3, and are drawn together to illustrate their connection with the circuit constraints. The notation of constraint ② in the diagram is consistent with that in the main text S2, i.e., Compare(score_q,threshold_q)=Result, where the comparison function is implemented by the bit decomposition range proof and takes the logical NOT of the nth bit of the offset difference d. The meaning of each parameter is given in S2. It should be noted that the implementation shown in this diagram is the basic implementation without adding a common offset, so score_q and threshold_q are directly used in the bit decomposition comparison in the diagram. The method of adding the same common offset OFFSET to the two in S2 is an optional implementation (preferred implementation when the quantization score may take a negative value). Because it only makes the two quantities involved in the comparison synchronously shift without changing their difference or the constraint structure of this diagram, it is not drawn separately in this diagram. When using this method, the two quantities involved in the comparison in the diagram are replaced with score_q+OFFSET and threshold_q+OFFSET respectively, and the offset difference d and the judgment result remain unchanged. It should also be noted that constraint ① and constraint ② are static equality constraints that coexist within the circuit, rather than runtime decision branches executed in sequence. Arithmetic circuits do not contain data-related condition branches. The decision boxes in the figure are only used to express the semantics that "the witness must satisfy both sets of constraint equations simultaneously to complete the construction".
[0177] Appendix Figure 3The diagram illustrates the modular composition and data flow of the system, supporting the functional modules described in the system claims. The correspondence between each module and the steps in the main text is marked in the diagram. The system consists of two parts: a proof device deployed on the proving party (first participant) and a verification device deployed on the verifying party (second participant). The proof device contains a fixed-point quantization module (S1), a circuit construction module (S2), and a proof generation module (S3), which are connected in series in the order of "acquiring input—constructing the circuit and applying double constraints—generating proof." The verification device contains an offline verification module (S4). The diagram also shows a parameter management module (S0) that performs one-time trusted setup. This module distributes the proof key pk to the proof generation module and the verification key vk to the offline verification module. This module is executed only once during the system initialization phase and does not participate in the business path of single-transaction auditing. Three points not marked in the diagram should be noted, and the text shall prevail: First, the number of constraints of the circuit constructed by the circuit construction module is a fixed constant that is independent of the complexity of the underlying model; Second, the hash anchor point Commitment is obtained independently by the prover and the verifier from their respective commitment disclosure channels. The anchor point used by the verifier is not provided by the prover. This is the key to the verification not relying on trust in the prover (see S41 for details); Third, the quantization threshold threshold_q used by the verifier when performing verification is a value agreed upon by both parties and is not accepted by the prover. This input path is not drawn separately in the diagram to avoid line intersections.
[0178] A lightweight zero-knowledge proof system for vertical federated decision-making logic includes a proof device deployed on the proving side and a verification device deployed on the verifying side.
[0179] The proof device includes:
[0180] The fixed-point quantization module is used to obtain the quantization score in the form of a fixed-point integer as private input, and to receive the cryptographic hash anchor corresponding to the quantization score and obtain the quantization threshold agreed upon by both parties as public input. The quantization caliber of the quantization score is consistent with that used in the hash anchor generation stage.
[0181] The circuit construction module is used to construct a binary classification threshold comparison arithmetic circuit and apply consistency constraints and fidelity constraints inside the circuit. The consistency constraint is that the value obtained by performing a cryptographic commitment operation on the quantized score is equal to the hash anchor point. The fidelity constraint is that the comparison result between the quantized score and the quantized threshold is equal to the business decision result. The circuit does not contain signals and constraints that represent the layer structure, weight dimension or node of the inference model.
[0182] The proof generation module is used to substitute the private input and the public input set into the arithmetic circuit to complete the witness construction, and run the proof engine to generate the proof file;
[0183] The verification device includes:
[0184] The offline verification module is used to independently obtain the hash anchor point from the self-commitment disclosure channel, and use the quantitative threshold held by the verifier itself together with the business decision result to form public input. The verification key, the public input set and the proof document are loaded locally by the verifier to perform verification operation and output the verification result.
Claims
1. A lightweight zero-knowledge proof method for vertical federated decision-making logic, characterized in that, Includes the following steps: S1. Receive the front-end prediction score and hash anchor, and establish consistency between the quantization caliber and the computation domain; The system receives the predicted score and its corresponding cryptographic hash anchor from the front end, which is the hash value calculated and publicized before the plaintext of the inference result is recovered; the predicted score is then quantized as a fixed-point integer. As a private input, the quantified threshold is obtained by quantifying the business decision threshold agreed upon by both parties through fixed-point quantification. As a public input, the quantization method of the quantization score is consistent with that used in the hash anchor generation stage; S2. Construct a binary classification threshold comparison arithmetic circuit; The circuit uses the quantization score described in step S1. The input is private, visible only to the prover and not disclosed to the verifier; using the hash anchor and the quantization threshold. and business decision results As public input, the business decision results are publicly declared by the proving party; the circuit does not contain signals and constraints representing the layer structure, weight dimensions, or nodes of the inference model. Commitment operations used within the circuit It uses the same function as the hash anchor generation stage, and is defined in the same finite field with the same instantiation parameters; S3. Generate zero-knowledge proof files; The proving party's program runs the proof engine, generates a proof file, and pushes it to the verifying party. The proof file is used by the verifying party to load the verification key and the public input set to perform verification operations.
2. The lightweight zero-knowledge proof method for vertical federated decision-making logic according to claim 1, characterized in that, Before the system is officially launched and put into production, both parties will collaboratively perform a one-time trusted setup ceremony based on a common reference string to generate a set of cryptographic parameters for the arithmetic circuit in step S2, specifically including the following steps: S01. The participating party compiles the arithmetic circuit designed in step S2 to generate the description file and witness generator corresponding to the circuit. S02. Based on the common reference string of the Groth16 protocol, both parties perform power-law trust setting calculations to generate circuit-specific proof keys and verification keys, with the following relationship: ; Wherein, R1CS is the description of the first-order constraint system corresponding to the arithmetic circuit. The random secret parameters generated during the trust setting ceremony must be securely destroyed after the calculation is completed; pk is handed over to the prover for use in the proof generation in step S3; vk is publicly released and stored by the verifier for the verifier's offline verification. The proof engine uses the Groth16 proof system, and the proof file is a constant byte size independent of the size of the arithmetic circuit; the trust setting can be reused for underlying inference models of arbitrary complexity without needing to be re-executed as the underlying inference model changes.
3. The lightweight zero-knowledge proof method for vertical federated decision-making logic according to claim 1, characterized in that, Step S1 involves obtaining the quantization score and quantization threshold, including: The first method: Quantized scores with private input in the form of fixed-point integers. Considering that the hash anchor is calculated from a certain fixed-point integer during the generation stage, the quantized score of the fixed-point integer is directly received as private input, and the floating-point score is no longer re-quantized locally; The second method: When the system only outputs floating-point prediction scores, the system's built-in data adapter performs fixed-point quantization on the floating-point score based on a preset amplification factor. ; Logit is the floating-point prediction score output by the inference model at the end of the binary classification decision task. Scale is the preset amplification factor. The value of the amplification factor, the rounding rules, and the precision of the floating-point binary representation must be strictly consistent with those used in the hash anchor generation stage. The business decision threshold is a publicly disclosed parameter agreed upon in advance and jointly held by both parties to the contract. The system performs fixed-point quantification using the same amplification factor as the score. ; Where Threshold is the publicly agreed business decision threshold; Scale is a preset integer amplification factor. This is a floor function; The quantization threshold, which serves as a public input, is known to both parties; the quantization threshold is a public parameter agreed upon by both parties and is held by each party respectively, and the verifier uses its own threshold as the public input when performing the verification operation, and does not accept the threshold value provided by the proviser.
4. The lightweight zero-knowledge proof method for vertical federated decision-making logic according to claim 1, characterized in that, The commitment operation It is implemented using a multi-party computation-friendly hash function, which is the Poseidon hash function, and the same finite field is the scalar field of the elliptic curve used by the proof engine; A first constraint and a second constraint are applied inside the circuit: The first constraint is a consistency constraint, meaning that the value obtained by performing the commitment operation on the quantized score is equal to the hash anchor. ; The second constraint is a fidelity constraint, meaning that the comparison between the quantified score and the quantified threshold equals the business decision result. ,in ,when The value is 1 if the condition is met, and 0 otherwise.
5. The lightweight zero-knowledge proof method for vertical federated decision-making logic according to claim 1, characterized in that, When the hash anchor introduces a random salt value r during the generation phase, i.e. When this random salt value r is used as a private input of the circuit, the first constraint is correspondingly expressed as: Salting consistency constraint: ; The parallel arrangement of the two inputs in the formula indicates that they both participate in the commitment operation. At this time, the random salt value must be restored to the prover during the plaintext recovery stage of the reasoning result, so that the prover can construct the witness. Since the salt value only participates in the circuit operation as a private input and is never disclosed to the verifier, its zero-knowledge property is not affected, and the party holding the public hash anchor cannot exhaustively deduce the quantization score.
6. The lightweight zero-knowledge proof method for vertical federated decision-making logic according to claim 1, characterized in that, Access the comparator component, which then performs comparator operations within a finite field. A size comparison operation is performed with threshold_q to obtain the comparison result in the second constraint; the comparator component is implemented using a range proof mechanism based on bit decomposition, specifically: Construction and bit decomposition of offset difference: Using a preset bit width n as a parameter, construct the offset difference d as shown in the following formula, and perform binary bit decomposition on it in bits (n+1 bits): ; Decompose d into n+1 binary bits. And apply Boolean constraints to each bit; ; Simultaneously apply weighted summation equality constraints: ; The bit width n must satisfy... Strictly greater than and The maximum possible value of the absolute value of the difference, that is, the absolute value of the difference does not exceed... offset difference It must fall within n+1 bits that can be represented The interval is defined such that when the offset difference exceeds the interval, the bit decomposition constraint becomes unsolvable and the proof document is rejected. Based on the highest bit determination order: when hour its nth position =1; when hour its nth position Since the value is 0, taking the logical NOT of the highest bit yields the result of a strict greater than condition: ; Thus, the order relation of strictly greater than can be reliably reconstructed within a finite field: if and only if When the value of this expression is 1, or The average value is 0.
7. The lightweight zero-knowledge proof method for vertical federated decision-making logic according to claim 6, characterized in that, Before performing the size comparison, and Add the same common offset OFFSET to each to obtain and And replace them with the two. and Participating in the size comparison; the common offset value is greater than and The maximum possible value of their absolute values, thus in When the value is a negative integer, both values involved in the comparison are also non-negative integers and fall within the non-negative integer input range applicable to the comparator component; since the difference between the two values remains unchanged when the same constant is added, the order relationship is strictly consistent with the original value.
8. The lightweight zero-knowledge proof method for vertical federated decision-making logic according to claim 1, characterized in that, Step S3 generates a zero-knowledge proof file, including: S31. The system substitutes the private input and public input sets into the arithmetic circuit generated in step S2 to complete the construction and assignment of the witness; S32. The system runs the proof engine, performs multinomial commitment calculations using the pre-generated proof key, and outputs a proof file (Proof) of fixed byte size; the proof key is generated during the trusted setup phase. S33. The proof generation task is executed asynchronously by the system background thread, and the main business process does not wait for the proof to be completed. After the proof is generated, the system pushes the {RID, Result, Proof} data packet to the receiving port of the verifier through the network interface for subsequent offline verification. The request identifier carried in the data packet is used by the verifier to detect the corresponding hash anchor, so that the anchor, the decision result and the proof document correspond one-to-one. RID is the request identifier and Result is the business decision result.
9. A lightweight zero-knowledge proof verification method for vertical federated decision-making logic, characterized in that, Verifier: The system receives business decision results and supporting documentation pushed by the certifier; the supporting documentation is a zero-knowledge proof generated by an arithmetic circuit, which is only for threshold comparison decision logic to quantify scores. For private input, using hash anchors and quantization thresholds The business decision result Result is a public input, and consistency constraints are imposed on it internally. With loyalty constraints Furthermore, the arithmetic circuit does not contain signals and constraints that characterize the layer structure, weight dimensions, or nodes of the reasoning model. S41. Collection of Public Inputs: The validator collects the set of public inputs required to perform the verification operation, wherein the hash anchor is independently obtained by the validator from the public channel of the prior commitment mechanism; quantization threshold. These are publicly available parameters agreed upon and held by both parties; the decision result Result comes from the {RID,Result,Proof} data packet pushed by the proving party; the hash anchor and the quantization threshold do not accept values provided by the proving party. The independent acquisition of the aforementioned anchor points is achieved by using the request identifier as an index: when this inference request is initiated, the business system assigns a globally unique request identifier, which is jointly held by both parties. The pre-commitment mechanism binds the hash anchor point to this identifier when it is publicized, and the audit data packet pushed by the proving party also carries this identifier. The verifying party uses this identifier as an index to retrieve the corresponding hash anchor point from the publicized channel, thereby ensuring a one-to-one correspondence between the anchor point, the current decision result, and the current proof document, avoiding record mismatches during batch auditing. S42. Offline verification operation: The verifier initiates an offline verifier locally, inputs the verification key (VerificationKey, vk) generated during the trusted setup phase, the above-mentioned public input set, and the proof file Proof, and performs bilinear pairing calculation; the verification operation is performed offline locally by the verifier and does not interact with the proof in real time. S43. Output and handling of verification results: If all constraints pass verification, output True to confirm that the decision result is faithful to the locked calculation result and enter the normal settlement process; otherwise, output False to trigger a fraud alarm and start the arbitration and accountability process. If the certifying party fails to submit any valid supporting documents within the agreed period, the verifying party may also determine that the decision is suspected of fraud and initiate the same accountability process.
10. A lightweight zero-knowledge proof system for vertical federated decision-making logic, employing the method described in any one of claims 1-9, characterized in that, This includes a proof device deployed on the proving party and a verification device deployed on the verifying party; The proof device includes: The fixed-point quantization module is used to obtain the quantization score in the form of a fixed-point integer as private input, and to receive the cryptographic hash anchor corresponding to the quantization score and obtain the quantization threshold agreed upon by both parties as public input. The quantization caliber of the quantization score is consistent with that used in the hash anchor generation stage. The circuit construction module is used to construct a binary classification threshold comparison arithmetic circuit and apply consistency constraints and fidelity constraints inside the circuit. The consistency constraint is that the value obtained by performing a cryptographic commitment operation on the quantized score is equal to the hash anchor point. The fidelity constraint is that the comparison result between the quantized score and the quantized threshold is equal to the business decision result. The circuit does not contain signals and constraints that represent the layer structure, weight dimension or node of the inference model. The proof generation module is used to substitute the private input and the public input set into the arithmetic circuit to complete the witness construction, and run the proof engine to generate the proof file; The verification device includes: The offline verification module is used to independently obtain the hash anchor point from the self-commitment disclosure channel, and use the quantitative threshold held by the verifier itself together with the business decision result to form public input. The verification key, the public input set and the proof document are loaded locally by the verifier to perform verification operation and output the verification result.
