{"id":13398593,"url":"https://github.com/NervanaSystems/he-transformer","last_synced_at":"2025-03-14T02:31:28.939Z","repository":{"id":86030056,"uuid":"128814779","full_name":"NervanaSystems/he-transformer","owner":"NervanaSystems","description":"nGraph-HE: Deep learning with Homomorphic Encryption (HE) through Intel nGraph","archived":true,"fork":false,"pushed_at":"2023-01-03T22:54:12.000Z","size":96551,"stargazers_count":222,"open_issues_count":5,"forks_count":39,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-07-30T19:16:27.578Z","etag":null,"topics":["compiler","deep-learning","homomorphic-encryption","ngraph","privacy-preserving","seal","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NervanaSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-09T18:14:49.000Z","updated_at":"2024-07-16T17:54:25.000Z","dependencies_parsed_at":"2023-03-07T02:00:45.004Z","dependency_job_id":null,"html_url":"https://github.com/NervanaSystems/he-transformer","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NervanaSystems%2Fhe-transformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NervanaSystems%2Fhe-transformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NervanaSystems%2Fhe-transformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NervanaSystems%2Fhe-transformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NervanaSystems","download_url":"https://codeload.github.com/NervanaSystems/he-transformer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243511660,"owners_count":20302595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","deep-learning","homomorphic-encryption","ngraph","privacy-preserving","seal","tensorflow"],"created_at":"2024-07-30T19:00:29.025Z","updated_at":"2025-03-14T02:31:28.921Z","avatar_url":"https://github.com/NervanaSystems.png","language":"C++","funding_links":[],"categories":["Software","C++","Privacy Preserving Machine Learning","Privacy and Security"],"sub_categories":[],"readme":"# DISCONTINUATION OF PROJECT #\nThis project will no longer be maintained by Intel.\nIntel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.\nIntel no longer accepts patches to this project.\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/nGraph_mask_1-1.png\" width=\"200\"\u003e\n\u003c/p\u003e\n\n# HE Transformer for nGraph\n\n# This project has moved to https://github.com/IntelAI/he-transformer\n\nThe **Intel® HE transformer for nGraph™** is a Homomorphic Encryption (HE) backend to the [**Intel® nGraph Compiler**](https://github.com/NervanaSystems/ngraph), Intel's graph compiler for Artificial Neural Networks.\n\nHomomorphic encryption is a form of encryption that allows computation on encrypted data, and is an attractive remedy to increasing concerns about data privacy in the field of machine learning. For more information, see our [original paper](https://arxiv.org/pdf/1810.10121.pdf). Our [updated paper](https://arxiv.org/pdf/1908.04172.pdf) showcases many of the recent advances in he-transformer.\n\nThis project is meant as a proof-of-concept to demonstrate the feasibility of HE  on local machines. The goal is to measure performance of various HE schemes for deep learning. This is  **not** intended to be a production-ready product, but rather a research tool.\n\nCurrently, we support the [CKKS](https://eprint.iacr.org/2018/931.pdf) encryption scheme, implemented by the [Simple Encrypted Arithmetic Library (SEAL)](https://github.com/Microsoft/SEAL) from Microsoft Research.\n\nAdditionally, we integrate with the [**Intel® nGraph™ Compiler and runtime engine for TensorFlow**](https://github.com/tensorflow/ngraph-bridge) to allow users to run inference on trained neural networks through Tensorflow.\n\n## Examples\nThe [examples](https://github.com/NervanaSystems/he-transformer/tree/master/examples) folder contains a deep learning example which depends on the [**Intel® nGraph™ Compiler and runtime engine for TensorFlow**](https://github.com/tensorflow/ngraph-bridge).\n\n## Building HE Transformer\n\n### Dependencies\n- Operating system: Ubuntu 16.04, Ubuntu 18.04.\n- CMake \u003e= 3.12\n- Compiler: g++ version \u003e= 6.0, clang \u003e= 5.0\n- OpenMP is strongly suggested, though not strictly necessary. You may experience slow runtimes without OpenMP\n- python3 and pip3\n- virtualenv v16.1.0\n- bazel v0.25.2\n\nFor a full list of dependencies, see the [docker containers](https://github.com/NervanaSystems/he-transformer/tree/master/contrib/docker), which build he-transformer on a reference OS.\n\n#### The following dependencies are built automatically\n- [nGraph](https://github.com/NervanaSystems/ngraph) - v0.27.0-rc.0\n- [nGraph-tf](https://github.com/tensorflow/ngraph-bridge) - v0.21.0-rc0\n- [SEAL](https://github.com/Microsoft/SEAL) - v3.4.2\n- [TensorFlow](https://github.com/tensorflow/tensorflow) - v1.14.0\n- [Boost](https://github.com/boostorg) v1.69\n- [Google protobuf](https://github.com/protocolbuffers/protobuf) v3.10.1\n\n### To install bazel\n```bash\n    wget https://github.com/bazelbuild/bazel/releases/download/0.25.2/bazel-0.25.2-installer-linux-x86_64.sh\n    bash bazel-0.25.2-installer-linux-x86_64.sh --user\n ```\n Add and source the bin path to your `~/.bashrc` file to call bazel\n```bash\n export PATH=$PATH:~/bin\n source ~/.bashrc\n```\n\n### 1. Build HE-Transformer\nBefore building, make sure you deactivate any active virtual environments (i.e. run `deactivate`)\n```bash\ngit clone https://github.com/NervanaSystems/he-transformer.git\ncd he-transformer\nexport HE_TRANSFORMER=$(pwd)\nmkdir build\ncd $HE_TRANSFORMER/build\ncmake .. -DCMAKE_CXX_COMPILER=clang++-6.0\nmake install\nsource external/venv-tf-py3/bin/activate\n```\n\nNote, you may need sudo permissions to install he_seal_backend to the default location. To set a custom installation prefix, add the `-DCMAKE_INSTALL_PREFIX=~/my_install_prefix` flag to the cmake command.\n\n\n#### 1a. To build documentation\nFirst install doxygen, i.e.\n```bash\nsudo apt-get install doxygen\n```\nThen add the following CMake flag\n```bash\ncmake .. -DNGRAPH_HE_DOC_BUILD_ENABLE=ON\n```\nand call\n```bash\nmake docs\n```\nto create doxygen documentation in `$HE_TRANSFORMER/build/doc/doxygen`.\n\n#### 1b. Python bindings for client\nTo build a client-server model with python bindings (recommended for running neural networks through TensorFlow):\n```bash\ncd $HE_TRANSFORMER/build\nsource external/venv-tf-py3/bin/activate\nmake install python_client\n```\nThis will create `python/dist/pyhe_client-*.whl`. Install it using\n```bash\npip install python/dist/pyhe_client-*.whl\n```\nTo check the installation worked correctly, run\n```bash\npython3 -c \"import pyhe_client\"\n```\nThis should run without errors.\n\n### 2. Run C++ unit-tests\n```bash\ncd $HE_TRANSFORMER/build\n# To run single HE_SEAL unit-test\n./test/unit-test --gtest_filter=\"HE_SEAL.add_2_3_cipher_plain_real_unpacked_unpacked\"\n# To run all C++ unit-tests\n./test/unit-test\n```\n\n### 3. Run python examples\nSee [examples/README.md](https://github.com/NervanaSystems/he-transformer/tree/master/examples/README.md) for examples of running he-transformer for deep learning inference on encrypted data.\n\n## Code formatting\nPlease run `maint/apply-code-format.sh` before submitting a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNervanaSystems%2Fhe-transformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNervanaSystems%2Fhe-transformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNervanaSystems%2Fhe-transformer/lists"}