Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member
Home/OSS Directory/Concrete ML

Concrete ML

Privacy-preserving computation

Privacy-preserving machine learning framework that converts scikit-learn, PyTorch and ONNX models to run inference on fully homomorphically encrypted data, so models can serve users without seeing their inputs. Named in the taxonomy.

homomorphic encryptionfheprivate inference

How it Works

Concrete ML is a privacy-preserving machine learning framework designed to enable inference on fully homomorphically encrypted data. It achieves this by converting models from popular libraries such as scikit-learn, PyTorch, and ONNX into formats compatible with fully homomorphic encryption (FHE). This allows models to process encrypted inputs without decrypting them, ensuring that sensitive data remains protected throughout the computation process.

The framework operates by transforming machine learning models into FHE-compatible versions. This involves converting the model architecture and parameters into a form that can execute computations directly on encrypted data. The process ensures that the server performing the inference never accesses the raw, unencrypted inputs, addressing critical privacy concerns in machine learning deployments.

Concrete ML simplifies the integration of FHE into machine learning workflows by providing a developer-friendly API. Users can install the library via standard Python package managers and follow step-by-step guides to set up and deploy models. The documentation includes tutorials on cryptographic concepts, core features, and deployment strategies, making it accessible even to those without prior expertise in cryptography.

The library supports a modular approach to model conversion and execution.

For instance, in a sentiment analysis use case, the framework processes transformer-based representations of text, encrypts these representations, and executes inference on encrypted data. The server receives encrypted inputs, performs computations using the FHE-enabled model, and returns encrypted predictions, which the client decrypts locally. This end-to-end encryption ensures privacy without sacrificing functionality.

The deployment process in Concrete ML involves generating client and server components. The client handles data encryption and decryption, while the server executes the FHE model. This separation of concerns allows for scalable and secure deployments, where clients can interact with servers without exposing their data. The framework supports integration with web applications, such as those built using FastAPI and Gradio, to create user-friendly interfaces for encrypted inference.

Use Cases

One of the primary applications of Concrete ML is enabling privacy-preserving sentiment analysis. In a demonstration using the Hugging Face Transformers library, a sentiment analysis model was trained on encrypted text representations derived from a BERT transformer. The model achieved an accuracy of 85% on encrypted data, outperforming the standalone transformer’s accuracy of 80%. This use case highlights how Concrete ML can be applied to natural language processing tasks while preserving data privacy.

The sentiment analysis workflow begins with tokenizing and transforming raw text into hidden representations using a pre-trained transformer model. These representations are then encrypted and fed into an XGBoost classifier, which is converted to run under FHE. The encrypted predictions are returned to the client, who decrypts them to obtain the final sentiment classification. This approach ensures that the raw text never leaves the client’s device, addressing privacy risks associated with cloud-based sentiment analysis.

Concrete ML is not limited to sentiment analysis. Its capabilities extend to other machine learning tasks where data privacy is a concern, such as medical diagnosis, financial forecasting, and personalized recommendations.

The framework’s support for multiple model formats—including scikit-learn, PyTorch, and ONNX—expands its applicability across industries. Researchers and developers can convert existing models into FHE-compatible versions with minimal effort, enabling them to deploy privacy-preserving solutions without rebuilding their models from scratch.

For instance, a retail company could allow third-party analysts to run predictive models on encrypted customer purchase data without revealing individual transaction details. The framework’s deployment API simplifies the setup of such secure collaborations, providing tools to generate client-server pairs and manage encrypted communications efficiently.

Key Features & Capabilities

Concrete ML’s core feature is its ability to convert machine learning models into FHE-compatible versions, enabling inference on encrypted data. The framework abstracts the complexities of homomorphic encryption, allowing developers to focus on model performance and privacy rather than cryptographic implementation details. This abstraction is achieved through a Python-based API that integrates seamlessly with existing machine learning workflows.

The library provides tools for model conversion, execution, and deployment. Users can convert scikit-learn, PyTorch, and ONNX models into FHE-compatible formats using high-level functions.

For example, in the sentiment analysis use case, the FHE inference time per example was measured at 4.4 seconds on a 16-core CPU, demonstrating practical feasibility for real-world applications.

The deployment API in Concrete ML streamlines the process of setting up secure inference pipelines. Users can generate client and server components tailored to their specific use case, including custom encryption parameters and model configurations. The server component can be deployed using frameworks like FastAPI, while the client component can integrate with web interfaces like Gradio.

Concrete ML’s documentation and community resources play a significant role in its adoption. The framework provides comprehensive guides covering installation, cryptographic concepts, and deployment strategies. Users can access tutorials, API references, and architecture overviews to accelerate their learning curve. Additionally, the Zama community offers technical support, with experts typically responding to inquiries within 24 hours during working days, fostering collaboration and innovation in the FHE space.

The library’s permissive BSD 3-Clause license encourages open-source contributions and integration into proprietary systems. Developers can incorporate Concrete ML into their projects without legal restrictions, provided they adhere to the license terms.

Users are encouraged to share feedback, contribute to documentation, and participate in discussions to enhance the library’s features and usability.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.