Overview

Tensorlock is a method for encrypting data so that neural networks can be trained, and used, on the encrypted data directly. The data is never decrypted for training or inference, and existing network architectures work on it with little modification. The method is covered by US Patent 12,731,025 B2, granted September 8, 2026.

Drop in validation accuracy versus plaintext
0.0002–0.0227
Training time on encrypted data
+1.6%

Figures based on benchmarks across MNIST, Fashion-MNIST, CIFAR-10, EMNIST Digits and EMNIST Letters.

Attackers are better off guessing.

Original

Encrypted

0.241 MAE

Attacker's
reconstruction

0.173 MAE

Blank
guess

Rebuilding the data from similar data of their own, an attacker's error averages 0.241, worse than just guessing a blank image (0.173)!

Mean absolute error (MAE) is the average difference in brightness between each pixel of the reconstruction and the original image. Lower means a closer copy.

The problem

Most of the world's high-value data is never used to train models. Medical records and images, financial and business data, and other private datasets are held back because their owners need to protect privacy, the commercial value of the data, and the intellectual property it contains.

At the same time, the models that would benefit most are reaching the limits of publicly available data.

Who it is for

Data owners
Hospitals, financial institutions, governments and companies whose data is valuable because it is private. They need to keep it private while it is used, and maintain its value.
AI companies
Model developers who need high-quality data beyond what is publicly available.

What Tensorlock does

The data owner encrypts their data with a secret key and shares only the encrypted version. A model is trained directly on the encrypted data. Once trained, it makes predictions on new examples encrypted the same way. The plaintext and the key stay with the owner throughout.

Data owner AI company Training data New example Encryption Key stays here Encrypted Encrypted Training Model Prediction
Top: training. Bottom: using the trained model. Plaintext data and the key never leave the data owner.

How it works 

Each example is first written as a vector of numbers, for an image its pixel values. Then:

  1. Original
  2. Padded
  3. Perturbed
  4. Shuffled
  5. Encrypted
1. Padding
Extra values are added, hiding how many dimensions the original data had. Padding coordinates can be outside or interlaced inside the original vector coordinates.
2. Perturbation
Every value is shifted by a small random amount, within a set bound.
3. Shuffle
The values are reordered by a secret permutation.
4. Orthogonal transformation
The vector is rotated into a secret coordinate system.

The same secret steps are applied to training, test and inference data.

Why a network can still learn 

A network learns from how examples relate to one another: which are close together, which point in similar directions, and where one class gives way to another. The shuffle and the orthogonal transformation keep those relationships exactly. Padding and perturbation are the only steps that change them, by amounts set in configuration.

What is hidden is the coordinate system: which value came from where. To reverse the encryption, an attacker would have to find the right change of coordinates among infinitely many, and work out which coordinates held padding, without knowing how many dimensions the data started with.

Coordinates of the circled point
(−0.69, 0.83)
Distance between the two groups
2.61
An illustration: two groups of points, rotated together. Every coordinate changes, but the distances between points and the line separating the groups are unchanged.

Results 

In tests on MNIST, Fashion-MNIST, CIFAR-10, EMNIST Digits and EMNIST Letters, validation accuracy on encrypted data was 0.0002 to 0.0227 lower than on plaintext, and training took 1.6% longer. The networks were standard fully connected architectures, largely unchanged rather than designed for encrypted data.

Advantages

  • Neural networks train directly on encrypted data.
  • Existing network architectures need little or no change.
  • Little loss of predictive accuracy.
  • Training time close to that of plaintext training.
  • Security settings can be configured.
  • The same encryption covers training, test and inference data.

Security 

The analysis assumes an attacker who holds the encrypted training data and its labels, and can submit their own examples to an “inference oracle” and receive only predicted labels in return. They never see the original data, or the encrypted versions of their own queries.

Within that model, meaningful recovery of the data was not possible without exact or near-exact knowledge of the source data's covariance structure, and became harder as padding, perturbation and dimension increased.

Compared with other approaches 

Federated learning
Keeps data with its owners and shares model updates instead. Tensorlock lets the data itself be shared and trained on, in encrypted form.
Homomorphic encryption
Computes on encrypted data with cryptographic guarantees, at a very large computational cost. Training on Tensorlock data takes about as long as ordinary training.
Secure enclaves
Protect data inside trusted hardware while it is processed. Tensorlock needs no special hardware.
Differential privacy
Limits what a trained model reveals about individual examples. Tensorlock protects the training data itself from whoever trains the model.

Applications 

Healthcare
Medical images and patient records.
Finance and business
Transactions, customer data and business intelligence.
Frontier models
Private datasets for training large models.
Government
Personal records, imagery and other sensitive data.

Tensorlock IP 

The suite of IP underpinning Tensorlock includes:

U.S. Patent US 12,731,025 B2
Machine learning applications
U.S. Patent US 12,190,240 B2
Search and data storage applications
U.S. Patent Pending Application 17/652,743
Additional machine learning applications
U.S. Trademark Pending 99931353
TENSORLOCK