Table of Contents
Fetching ...

FairZK: A Scalable System to Prove Machine Learning Fairness in Zero-Knowledge

Tianyu Zhang, Shen Dong, O. Deniz Kose, Yanning Shen, Yupeng Zhang

TL;DR

FairZK introduces a scalable system for proving ML fairness in zero-knowledge by decoupling fairness verification from dataset inferences and using aggregated input statistics. The approach derives new, tighter fairness bounds for logistic regression and deep neural networks that depend on model parameters and aggregated information, and develops efficient zkSNARK gadgets (notably for spectral norm, fixed-point arithmetic, and lookups) to enable practical proofs. Across LR and DNN experiments on standard fairness benchmarks, FairZK achieves 3.1×–1789× speedups over baselines and scales to 47 million parameters with a 343-second proof, addressing a major bottleneck in privacy-preserving model fairness verification. This work enables public verification of model fairness without exposing proprietary models or sensitive data, with significant implications for audits, compliance, and privacy-preserving accountability in real-world deployments.

Abstract

With the rise of machine learning techniques, ensuring the fairness of decisions made by machine learning algorithms has become of great importance in critical applications. However, measuring fairness often requires full access to the model parameters, which compromises the confidentiality of the models. In this paper, we propose a solution using zero-knowledge proofs, which allows the model owner to convince the public that a machine learning model is fair while preserving the secrecy of the model. To circumvent the efficiency barrier of naively proving machine learning inferences in zero-knowledge, our key innovation is a new approach to measure fairness only with model parameters and some aggregated information of the input, but not on any specific dataset. To achieve this goal, we derive new bounds for the fairness of logistic regression and deep neural network models that are tighter and better reflecting the fairness compared to prior work. Moreover, we develop efficient zero-knowledge proof protocols for common computations involved in measuring fairness, including the spectral norm of matrices, maximum, absolute value, and fixed-point arithmetic. We have fully implemented our system, FairZK, that proves machine learning fairness in zero-knowledge. Experimental results show that FairZK is significantly faster than the naive approach and an existing scheme that use zero-knowledge inferences as a subroutine. The prover time is improved by 3.1x--1789x depending on the size of the model and the dataset. FairZK can scale to a large model with 47 million parameters for the first time, and generates a proof for its fairness in 343 seconds. This is estimated to be 4 orders of magnitude faster than existing schemes, which only scale to small models with hundreds to thousands of parameters.

FairZK: A Scalable System to Prove Machine Learning Fairness in Zero-Knowledge

TL;DR

FairZK introduces a scalable system for proving ML fairness in zero-knowledge by decoupling fairness verification from dataset inferences and using aggregated input statistics. The approach derives new, tighter fairness bounds for logistic regression and deep neural networks that depend on model parameters and aggregated information, and develops efficient zkSNARK gadgets (notably for spectral norm, fixed-point arithmetic, and lookups) to enable practical proofs. Across LR and DNN experiments on standard fairness benchmarks, FairZK achieves 3.1×–1789× speedups over baselines and scales to 47 million parameters with a 343-second proof, addressing a major bottleneck in privacy-preserving model fairness verification. This work enables public verification of model fairness without exposing proprietary models or sensitive data, with significant implications for audits, compliance, and privacy-preserving accountability in real-world deployments.

Abstract

With the rise of machine learning techniques, ensuring the fairness of decisions made by machine learning algorithms has become of great importance in critical applications. However, measuring fairness often requires full access to the model parameters, which compromises the confidentiality of the models. In this paper, we propose a solution using zero-knowledge proofs, which allows the model owner to convince the public that a machine learning model is fair while preserving the secrecy of the model. To circumvent the efficiency barrier of naively proving machine learning inferences in zero-knowledge, our key innovation is a new approach to measure fairness only with model parameters and some aggregated information of the input, but not on any specific dataset. To achieve this goal, we derive new bounds for the fairness of logistic regression and deep neural network models that are tighter and better reflecting the fairness compared to prior work. Moreover, we develop efficient zero-knowledge proof protocols for common computations involved in measuring fairness, including the spectral norm of matrices, maximum, absolute value, and fixed-point arithmetic. We have fully implemented our system, FairZK, that proves machine learning fairness in zero-knowledge. Experimental results show that FairZK is significantly faster than the naive approach and an existing scheme that use zero-knowledge inferences as a subroutine. The prover time is improved by 3.1x--1789x depending on the size of the model and the dataset. FairZK can scale to a large model with 47 million parameters for the first time, and generates a proof for its fairness in 343 seconds. This is estimated to be 4 orders of magnitude faster than existing schemes, which only scale to small models with hundreds to thousands of parameters.
Paper Structure (72 sections, 9 theorems, 39 equations, 6 figures, 6 tables, 4 algorithms)

This paper contains 72 sections, 9 theorems, 39 equations, 6 figures, 6 tables, 4 algorithms.

Key Result

Lemma 1

where $L$ is the Lipschitz constant of the sigmoid function, and $\bar{z}^{(0)} = \operatorname{mean}(z_j|s_j=0)$, $\bar{z}^{(1)} = \operatorname{mean}(z_j|s_j=1)$.

Figures (6)

  • Figure 1: Design of our ZKP of ML fairness.
  • Figure 2: Protocol for proving the spectral norm of a matrix $\mathbf{W}$.
  • Figure 3: zkSNARK for proving the fairness of a logistic regression model.
  • Figure 4: zkSNARK for proving the fairness of a DNN model.
  • Figure 5: Prover time of spectral norm in FairZK and a generic zkSNARK.
  • ...and 1 more figures

Theorems & Definitions (18)

  • Definition 1
  • Definition 2: Multi-linear Extension
  • Definition 3: Bounded values
  • Definition 4: Disparity
  • Lemma 1
  • proof
  • Lemma 2
  • proof
  • Lemma 3
  • proof
  • ...and 8 more