Safe AI workloads utilizing totally homomorphic encrypted knowledge – IBM Developer


For many years, the business has benefitted from trendy cryptography to guard delicate knowledge in transit and at relaxation. Nonetheless, it has been unimaginable to maintain the information protected whereas it’s being processed. IBM Analysis is closing this hole with the discharge of HElayers, a software program growth package (SDK) for the sensible and environment friendly execution of safe AI workloads utilizing totally homomorphic encrypted (FHE) knowledge.

HElayers guarantees to deal with a main concern in computing safety, enabling the power to make use of knowledge safely with out exposing any delicate info, a key enabler for migrating compute to the cloud. HElayers supplies encryption schemes and strategies that enable particular operations to be carried out on encrypted knowledge with out decrypting that knowledge and any intermediate values computed, permitting for optimum utility of the information whereas preserving privateness and safety. Foundational areas for making use of FHE embrace:

Use case examples

Extremely regulated industries can now reap the advantages of outsourcing storage and computation even to unsecured cloud environments with out compromising privateness or safety. The know-how will revolutionize the best way customers, knowledge scientists, and analytics achieve entry and share knowledge units which can be typically tightly managed. FHE know-how will decrease knowledge governance prices and promote a wider use of essential knowledge to create elevated insights, drive data-driven worth creation, and allow less complicated deployment strategies.


HElayers is written in C++ and features a Python API that allows utility builders and knowledge scientists to make use of the facility of FHE by supporting a big selection of analytics resembling linear regression, logistic regression, and neural networks. HElayers has been designed with a layered set of capabilities which can be coupled with acceptable APIs in order that customers can totally make the most of the providers supplied by the SDK. HElayers is delivered as an open platform that’s able to utilizing the newest FHE implementations for a given use case. It’s enabled with patented optimization and performance-boosting innovation for computation, AI innovation, and use case necessities that facilitate the sensible use of all kinds of AI workloads over FHE knowledge.

HELayers SDK architecture

Tutorials and Jupyter Notebooks

HElayers ships with a wealthy set of pattern functions and tutorials by Jupyter Notebooks that spotlight find out how to use this know-how in helpful methods. These examples embrace:

  • Hebase tutorials: Fundamental layer 1 (hebase – the “Wrappers” layer) tutorial. It demonstrates HElayer’s low-level API for manipulating ciphertexts immediately.
  • Neural community tutorials: Step-by-step tutorials on find out how to use the C++ or Python APIs for neural community inference. The tutorials embrace demonstrations with the MNIST knowledge set, bank card fraud detection, coronary heart illness detection, 20 newsgroup textual content classification, and large-scale, 50K RBG encrypted picture classification utilizing AlexNet.
  • Linear regression: Compute linear regression utilizing an encrypted mannequin and knowledge.
  • Logistic regression inference on a bank card fraud detection knowledge set: Construct a logistic regression mannequin encrypted underneath HE and run inference of encrypted samples from an information set of bank card transactions.
  • Nearest neighbor: Encrypt a set of centroids and discover the closest neighbor underneath homomorphic encryption. Given an encrypted pattern, we compute the gap between every pattern and every centroid underneath encryption. On the shopper facet, the outcomes are decrypted and mechanically post-processed to acquire the closest neighbor.
  • Bitwise tutorial: Tutorial explaining the bitwise API (carried out with the BGV scheme).
  • Determination tree inference: Determination tree inference for bank card fraud detection.
  • Tile tensor demo: Demo of the “Computation” layer. It demonstrates a simple and environment friendly API for working with tensors, over which many new AI functions may be constructed.
  • BGV world nation db lookup: Encrypted question over an encrypted database. This makes use of the BGV scheme and Fermat’s little theorem to compute equality over the modular arithmetic provided by the scheme.
  • Extensions for simple integration: A latest extension to the Python API permits for simple integration with scikit-learn/Keras libraries. An everyday scitkit-learn- or Keras-based Python script may be transformed to FHE utilizing a single import instruction.

To obtain the HElayers Group Version Docker Container, together with pattern functions, tutorials in Jupyter Notebooks, and documentation for Home windows, Linux®, macOS, and Linux on IBM Z mainframes, use the next hyperlinks.

Python kits for x86 and s390x architectures, respectively:

C++ kits for x86 and s390x architectures, respectively:

Detailed documentation of the HElayers APIs is accessible contained in the picture.

We’re desirous about your potential use instances and the broader components driving exploration of FHE. The next survey is accessible for describing these pursuits:

You’ll find extra info on HElayers or FHE usually at:

HElayers – Premium Version

Prospects who need to work immediately with IBM Analysis, entry superior options, and plan for commercial-grade deployment utilizing HElayers can interact by the Premium Version Program.

For extra info on this program, HElayers, or FHE total, please contact us at

Analysis publications


Leave a Reply

Your email address will not be published. Required fields are marked *