Concrete ML: Privacy Preserving ML framework using Fully Homomorphic Encryption (FHE), built on top of Concrete, with bindings to traditional ML frameworks.
Concrete ML: Privacy Preserving ML framework using Fully Homomorphic Encryption (FHE), built on top of Concrete, with bindings to traditional ML frameworks.
Documentation | Community support | FHE resources by Zama
Concrete ML is a Privacy-Preserving Machine Learning (PPML) open-source set of tools built on top of Concrete by Zama.
It simplifies the use of fully homomorphic encryption (FHE) for data scientists so that they can automatically turn machine learning models into their homomorphic equivalents, and use them without knowledge of cryptography.
Concrete ML is designed with ease of use in mind. Data scientists can use models with APIs that are close to the frameworks they already know well, while additional options to those models allow them to run inference or training on encrypted data with FHE. The Concrete ML model classes are similar to those in scikit-learn and it is also possible to convert PyTorch models to FHE.
Learn more about Concrete ML features in the documentation.
By leveraging FHE, Concrete ML can unlock a myriad of new use cases for machine learning, such as enabling secure and private data collaboration, protecting sensitive data while still allowing for analysis, and facilitating machine learning on data-sets that are subject to strict data privacy regulations, for instance
See more use cases in the list of demos.
Depending on your OS, Concrete ML may be installed with Docker or with pip:
| OS / HW | Available on Docker | Available on pip |
|---|---|---|
| Linux | Yes | Yes |
| Windows | Yes | No |
| Windows Subsystem for Linux | Yes | Yes |
| macOS 11+ (Intel) | Yes | Yes |
| macOS 11+ (Apple Silicon: M1, M2, etc.) | Coming soon | Yes |
Note: Concrete ML only supports Python 3.8, 3.9, 3.10, 3.11 and 3.12.
Concrete ML can be installed on Kaggle (see this question on the community for more details) and on Google Colab.
To install with Docker, pull the concrete-ml image as follows:
docker pull zamafhe/concrete-ml:latest
To install Concrete ML from PyPi, run the following:
pip install -U pip wheel setuptools
pip install concrete-mlFind more detailed installation instructions in this part of the documentation
Here is a simple example which is very close to scikit-learn for a logistic regression :
…
It is also possible to call encryption, model prediction, and decryption functions separately as follows.
Executing these steps separately is equivalent to calling predict_proba on the model instance.
…This example is explained in more detail in the linear model documentation.
Concrete ML built-in models have APIs that are almost identical to their scikit-learn counterparts. It is also possible to convert PyTorch networks to FHE with the Concrete ML conversion APIs. Please refer to the linear models, tree-based models and neural networks documentation for more examples, showing the scikit-learn-like API of the built-in models.
If you have built awesome projects using Concrete ML, please let us know and we will be happy to showcase them here!
Explore more useful resources in Awesome Zama repo
Full, comprehensive documentation is available here: https://docs.zama.ai/concrete-ml.
To cite Concrete ML in academic papers, please use the following entry:
@Misc{ConcreteML,
title={Concrete {ML}: a Privacy-Preserving Machine Learning Library using Fully Homomorphic Encryption for Data Scientists},
author={Zama},
year={2022},
note={\\url{https://github.com/zama-ai/concrete-ml}},
}To contribute to Concrete ML, please refer to this section of the documentation.
This software is distributed under the BSD-3-Clause-Clear license. Read this for more details.
Is Zama’s technology free to use?
Zama’s libraries are free to use under the BSD 3-Clause Clear license only for development, research, prototyping, and experimentation purposes. However, for any commercial use of Zama's open source code, companies must purchase Zama’s commercial patent license.
All our work is open source and we strive for full transparency about Zama's IP strategy. To know more about what this means for Zama product users, read about how we monetize our open source products in this blog post.
What do I need to do if I want to use Zama’s technology for commercial purposes?
To commercially use Zama’s technology you need to be granted Zama’s patent license. Please
No open issues yet, or sync has not completed.