[Paper Review] Secure Medical Image Analysis with CrypTFlow
CrypTFlow is a system that compiles TensorFlow inference code into secure multi-party computation (MPC) protocols with a single command, enabling privacy-preserving medical image analysis. It introduces Athos, a compiler for fixed-point conversion preserving model accuracy, and Porthos, a high-performance semi-honest 3-party MPC protocol that reduces communication by up to two orders of magnitude, enabling the first secure inference of 3D-UNet for 3D medical image segmentation—previously infeasible due to computational demands.
We present CRYPTFLOW, a system that converts TensorFlow inference code into Secure Multi-party Computation (MPC) protocols at the push of a button. To do this, we build two components. Our first component is an end-to-end compiler from TensorFlow to a variety of MPC protocols. The second component is an improved semi-honest 3-party protocol that provides significant speedups for inference. We empirically demonstrate the power of our system by showing the secure inference of real-world neural networks such as DENSENET121 for detection of lung diseases from chest X-ray images and 3D-UNet for segmentation in radiotherapy planning using CT images. In particular, this paper provides the first evaluation of secure segmentation of 3D images, a task that requires much more powerful models than classification and is the largest secure inference task run till date.
Motivation & Objective
- Enable secure inference of large-scale deep neural networks (DNNs) in medical imaging without exposing private data.
- Lower the barrier for machine learning practitioners to adopt MPC by eliminating the need for cryptographic expertise.
- Scale secure inference to complex, real-world medical DNNs such as 3D-UNet, previously unachievable due to performance and communication bottlenecks.
- Achieve high efficiency and accuracy in secure inference by optimizing MPC protocols for practical deployment in medical settings.
Proposed method
- Compile TensorFlow inference code into secure computation protocols using Athos, a modular compiler that supports 2PC and 3PC backends.
- Convert floating-point operations to fixed-point arithmetic using a 64-bit integer representation with tunable scale factor to balance accuracy and overflow risk.
- Implement Porthos, a semi-honest 3-party MPC protocol that optimizes matrix multiplication and non-linear operations (e.g., ReLU, MaxPool) by reshaping data and reducing communication complexity.
- Reduce communication in convolutional layers by reorganizing Beaver triple generation, cutting it from ~2q²f² to ~2m² + 2f² + q² ring elements.
- Support 3D operations such as 3D transposed convolutions, enabling secure inference on 3D-UNet for volumetric medical image segmentation.
- Integrate with ONNX to support models originally in PyTorch, extending compatibility beyond TensorFlow.
Experimental results
Research questions
- RQ1Can a system be built that enables secure inference of large medical DNNs with minimal cryptographic expertise?
- RQ2Can fixed-point conversion in MPC preserve the accuracy of floating-point models in medical image analysis tasks?
- RQ3Can a new MPC protocol significantly reduce communication and execution time for large-scale DNNs compared to prior work?
- RQ4Is it feasible to perform cryptographically secure inference on 3D medical image segmentation models like 3D-UNet?
- RQ5Can the system scale to real-world medical datasets such as NIH chest X-ray and pelvic CT scans while maintaining acceptable latency?
Key findings
- CrypTFlow compiles TensorFlow models into MPC protocols with a 5-second compilation time for ResNet50, 35 seconds for DenseNet121, and 2 minutes for 3D-UNet.
- The fixed-point implementation using Athos preserves model accuracy, with ResNet50 achieving 76.45% top-1 accuracy (vs. 76.47% in floating-point) and DenseNet121 achieving 74.33% top-1 accuracy.
- Porthos reduces communication by 1.2x–1.5x and execution time by 1.4x–1.5x compared to SecureNN on ImageNet-scale models.
- Secure inference of 3D-UNet on pelvic CT scans takes 1 hour and 57 minutes with 557 GB of communication, marking the first evaluation of secure 3D image segmentation.
- The system supports previously unsupported operations like 3D transposed convolutions, which are critical for segmentation tasks.
- Latency of 1h57m for 3D-UNet is acceptable in clinical workflows, where manual segmentation takes days, making the system viable for real-world deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.