S&P2025
FairZK: A Scalable System to Prove Machine Learning Fairness in Zero-Knowledge
Tianyu Zhang, Shen Dong, Oyku Deniz Kose, Yanning Shen, Yupeng Zhang
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 zeroknowledge 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 zeroknowledge, 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 zeroknowledge inferences as a subroutine. The prover time is improved by 3.1×-1789× 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. * Equal contribution. The work was partially done while the first two authors were undergraduate research assistants at UIUC.