Production-level Open Source Privacy Preserving Inference in Medical Imaging

Arjun Soin, Pratik Bhatu, Rohit Takhar, Nishanth Chandran, Divya Gupta, Javier Alvarez-Valle, Rahul Sharma, Vidur Mahajan, Matthew P. LungrenarXiv 2021

Abstract

Adoption of artificial intelligence medical imaging applications is often impeded by barriers between healthcare systems and algorithm developers given that access to both private patient data and commercial model IP is important to perform pre-deployment evaluation. This work investigates a framework for secure, privacy-preserving and AI-enabled medical imaging inference using CrypTFlow2, a state-of-the-art end-to-end compiler allowing cryptographically secure 2-party Computation (2PC) protocols between the machine learning model vendor and target patient data owner. A common DenseNet-121 chest x-ray diagnosis model was evaluated on multi-institutional chest radiographic imaging datasets both with and without CrypTFlow2 on two test sets spanning seven sites across the US and India, and comprising 1,149 chest x-ray images. We measure comparative AUROC performance between secure and insecure inference in multiple pathology classification tasks, and explore model output distributional shifts and resource constraints introduced by secure model inference. Secure inference with CrypTFlow2 demonstrated no significant difference in AUROC for all diagnoses, and model outputs from secure and insecure inference methods were distributionally equivalent. The use of CrypTFlow2 may allow off-the-shelf secure 2PC between healthcare systems and AI model vendors for medical imaging, without changes in performance, and can facilitate scalable pre-deployment infrastructure for real-world secure model evaluation without exposure to patient data or model IP.

The Trust Bottleneck in Healthcare AI

The healthcare AI industry currently faces a significant "low trust" bottleneck. Before a hospital can deploy a commercial medical imaging model, it must validate the model's performance on its own patient population to ensure generalizability. However, strict privacy regulations like HIPAA prevent hospitals from easily sharing protected health information (PHI). Simultaneously, AI vendors are reluctant to share proprietary model weights, which represent their core intellectual property (IP).

Traditionally, this standoff is resolved through months of legal negotiations or complex on-premise deployments. This research explores a cryptographic solution: how can a hospital evaluate a vendor's model on real patient data without either party exposing their sensitive assets to the other?

Methodology: Secure 2-Party Computation

The study utilizes Secure 2-Party Computation (2PC), a cryptographic technique allowing two mutually distrustful parties to jointly compute a function over their inputs while keeping those inputs private. The authors employed CrypTFlow2, a state-of-the-art, open-source compiler.

The workflow operates as follows:

  1. The vendor's PyTorch model (a 121-layer DenseNet) is converted to an ONNX format and compiled into a 2PC executable.
  2. The hospital runs a corresponding executable with their patient X-ray data.
  3. Through a cryptographic protocol over a network connection, the two virtual machines compute the inference.
  4. The hospital learns only the final prediction, and the vendor learns nothing about the image.

This approach represents a significant step forward, as prior privacy-preserving machine learning (PPML) methods often relied on weaker security assumptions or struggled with the high-resolution models required for medical imaging.

Datasets and Evaluation

The models were evaluated on two robust, multi-institutional chest radiographic datasets comprising 1,149 images across seven sites in the US and India:

  • CheXpert Test Set: 668 images; ground truth established by a majority vote of five board-certified radiologists.
  • CARING500 Test Set: 481 images from six sites; ground truth established by a consensus of three radiologists.

Key Results: Performance Parity

The most crucial finding is that cryptographic inference does not degrade model quality. The secure 2PC outputs were statistically and distributionally equivalent to standard, insecure inference.

ROC curves for CheXpert test set comparing insecure and secure inference.

On the CheXpert test set, both secure and insecure methods achieved an average AUROC of 0.89. Similarly, on the CARING500 dataset, both achieved an average AUROC of 0.90.

ROC curves for CARING500 dataset comparing insecure and secure inference.

Beyond AUROC, Brier scores (measuring prediction confidence accuracy) were identical across all tested pathologies. Kolmogorov-Smirnov (K-S) tests further confirmed no statistically significant difference between the output distributions of the secure and insecure models.

Computational Trade-offs

While performance is maintained, secure inference introduces significant computational overhead. A single secure inference took approximately 900 seconds (15 minutes) and required 60 GB of data transfer, compared to sub-second times and negligible bandwidth for standard inference. However, the authors argue that a 15-minute compute time is practically much faster than the months typically required to sign data-sharing legal agreements. Furthermore, because each image's secure inference is independent, the overhead can be mitigated by parallelizing the process across multiple virtual machines.

Limitations and Future Outlook

The study focused on 2D chest X-rays. Extending this to large, multi-slice 3D datasets like CT or MRI would exponentially increase computational costs. Additionally, while these retrospective results are promising, prospective real-world deployment is necessary to prove operational feasibility. Future work could involve integrating CrypTFlow2 directly into clinical ML platforms to allow hospitals to seamlessly and securely benchmark multiple vendor models off-the-shelf.

Summary updated

BibTeX
@misc{soin2021production,
  author = {Arjun Soin and Pratik Bhatu and Rohit Takhar and Nishanth Chandran and Divya Gupta and Javier Alvarez-Valle and Rahul Sharma and Vidur Mahajan and Matthew P. Lungren},
  title = {{Production-level Open Source Privacy Preserving Inference in Medical Imaging}},
  year = {2021},
  eprint = {2107.10230},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.10230},
}
Figure