A Cryptographic Proof Framework for Tamper-Evident Pneumonia Diagnosis on Blockchain
Abstract
To deploy deep learning-based diagnostic systems in a clinical setting, they need to have not only a high degree of predictive accuracy, but also an unbroken cryptographic chain to prove that the model parameters have not been changed from one inference to the next. This incompatibility arises because softmax, GELU activation, and layer normalization involve transcendental operations to produce the final output. Transcendental operations cannot be represented over the prime finite fields that are necessary when utilizing Rank-1 Constraint Systems (R1CS). The work here provides a mathematically sound approach to resolving the incompatibility by providing three formally defined polynomial approximations: a degree-3 Taylor series softmax approximation (ε ≤ 2.47E-03 per weight); a degree-5 composite polynomial GELU (ε ≤ 1.80E-03); and a squared witness hint reformulation of layer normalization that results in exact constraint satisfaction. The accumulating polynomial approximation errors across 12 transformer encoder blocks have a total approximation error defined as (ε total ≤ 0.0512) and results in a loss of less than one-fifth of a percent in accuracy (94.1% vs. 94.3%) on the RSNA Pneumonia Detection benchmark. The entire ViT-B/16 inference model was compiled into an R1CS form of approximately 2.3×10⁸ R1CS constraints and instantiated as a Groth 16 zk-SNARK. The integrity of the model is confirmed by hashing the parameters using SHA-256 onto an immutable Polygon zkEVM smart contract, allowing for on-chain verification of inference without revealing any of the proprietary model weights. Additionally, this system produces an area under the receiver operating characteristic curve (AUC-ROC) of 0.961, a mean latency for proof generation of 2.84 seconds, an end-to-end verification time of 5.07 seconds, and an average cost for on-chain verification of 0.012ETH, all within the operational constraints of typical radiology workflows.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.