TenSEAL: A Library for Encrypted Tensor Operations Using Homomorphic Encryption¶
Authors: Ayoub Benaissa; Bilal Retiat; Bogdan Cebere; Alaa Eddine Belfedhal
Year: 2021
Venue: arXiv 2021
type: library collection: catalogue status: auto
Links: arXiv:2104.03152
Summary¶
Auto-extracted summary (unreviewed)
TenSEAL is an open-source C++/Python library (OpenMined) that exposes encrypted tensor operations on top of the CKKS implementation in Microsoft SEAL, converting tensors from PyTorch or TensorFlow into encrypted vectors and handling context, keys and client-server serialization via Protocol Buffers. Evaluating a small CNN (one 7x7 convolution, two linear layers, square activations) on encrypted MNIST images takes 887 ms on a 16-vCPU AWS instance with 427 KB of communication and 97.4% accuracy versus 97.7% in the clear.
Abstract¶
Machine learning algorithms have achieved remarkable results and are widely applied in a variety of domains. These algorithms often rely on sensitive and private data such as medical and financial records. Therefore, it is vital to draw further attention regarding privacy threats and corresponding defensive techniques applied to machine learning models. In this paper, we present TenSEAL, an open-source library for Privacy-Preserving Machine Learning using Homomorphic Encryption that can be easily integrated within popular machine learning frameworks. We benchmark our implementation using MNIST and show that an encrypted convolutional neural network can be evaluated in less than a second, using less than half a megabyte of communication.
Source: arxiv
Extracted details¶
| Field | Value | Source | Confidence |
|---|---|---|---|
| contribution | open-source library for encrypted tensor computation using CKKS in Microsoft SEAL | llm | 0.90 |
| contribution | direct conversion of PyTorch / TensorFlow tensors to encrypted tensors | llm | 0.90 |
| contribution | context, plain-tensor and encrypted-tensor API with Protocol Buffers client-server exchange | llm | 0.90 |
| contribution | im2col convolution and dot-product algorithms for encrypted CNN evaluation | llm | 0.90 |
| contribution | sub-second encrypted MNIST CNN inference with under half a megabyte of communication | llm | 0.90 |
| schemes | CKKS | llm | 0.90 |
| libraries | TenSEAL | llm | 0.90 |
| libraries | SEAL | llm | 0.90 |
| libraries | PyTorch | llm | 0.90 |
| libraries | TensorFlow | llm | 0.90 |
| models | CNN (1 conv layer + 2 linear layers, square activation) | llm | 0.90 |
| datasets | MNIST | llm | 0.90 |
| tasks | encrypted tensor operations | llm | 0.90 |
| tasks | private CNN inference | llm | 0.90 |
| tasks | image classification | llm | 0.90 |
| hardware | AWS c4.2xlarge (8 vCPUs, 15 GiB) | llm | 0.90 |
| hardware | AWS c4.4xlarge (16 vCPUs, 30 GiB) | llm | 0.90 |
| security level | 128-bit | llm | 0.90 |
| threat model | client-server MLaaS; server evaluates on encrypted input and never sees input or output | llm | 0.90 |
| interaction | non-interactive FHE | llm | 0.90 |
| code url | https://github.com/Microsoft/SEAL (URL found in the full text) | regex | 0.50 |
| code url | https://github.com/protocolbuffers/protobuf (URL found in the full text) | regex | 0.50 |
| code url | https://github.com/OpenMined/TenSEAL (URL found in the full text) | regex | 0.50 |
| code url | https://github.com/OpenMined/TenSEAL | llm | 0.90 |
| llm relevance | medium | llm | 0.90 |
| key result | full forward latency: 887.06 ms (encrypted MNIST CNN, AWS c4.4xlarge 16 vCPUs) | llm | 0.90 |
| key result | full forward latency: 1456.29 ms (encrypted MNIST CNN, AWS c4.2xlarge 8 vCPUs) | llm | 0.90 |
| key result | accuracy: 97.4% encrypted vs 97.7% plaintext (MNIST test set) | llm | 0.90 |
| key result | communication: 427 KB (send encrypted input and receive encrypted output) | llm | 0.90 |
| key result | parameters: N=8192, 206-bit coefficient modulus, 21-bit scale (CKKS, 6 multiplications, 128-bit security) | llm | 0.90 |
System card: TenSEAL¶
| Group | 7. FHE libraries, GPU back-ends and compilers |
| Family | CKKS, BFV (SEAL) |
| Arithmetic | Python |
| Interaction | ML-on-HE toolkit |
| Model scale | - |
| Status | Niche |
| Relation to the SoK | Easy Python tensor API over SEAL. |
| Note | Good for teaching and prototypes. No bootstrapping. |
| Code | https://github.com/OpenMined/TenSEAL |
| Systems page | TenSEAL |
Keyword mentions¶
Counts of vocabulary terms in the full text (first page of occurrence in brackets).
- scheme: CKKS 12 [p.2], Leveled / somewhat HE 2 [p.3]
- library: TenSEAL 12 [p.1], Microsoft SEAL 4 [p.2], PyTorch 2 [p.2]
- model: CNN 4 [p.2], MobileNet 1 [p.4]
- dataset: MNIST 6 [p.1]
- hardware: GPU 2 [p.4], Intel Xeon 1 [p.12]
- technique: Convolution 22 [p.2], Matrix multiplication 7 [p.3], Rotations 5 [p.2], Relinearization 3 [p.2]
- topic: Homomorphic encryption 16 [p.1], Benchmark 6 [p.1], Open source 5 [p.1], Privacy-preserving machine learning 3 [p.1]
Files¶
| Path (under papers/) | Collection | Pages | Size | SHA-256 | Note |
|---|---|---|---|---|---|
references/catalogue/7-109_tenseal-a-library-for-encrypted-tensor-operations-using-homo.pdf |
catalogue | 12 | 375.7 KB | 45ed2a786abb |
Database key: tenseal-a-library-for-encrypted-tensor-operations-using-homomorphic · created 2026-11-05 · updated 2026-11-05 · edit with python3 tools/paperdb.py set tenseal-a-library-for-encrypted-tensor-operations-using-homomorphic COLUMN VALUE