Challenge dataset

A dataset encrypted with the Tensorlock method, published for independent security testing. It gives you what an attacker in the threat model would hold: the encrypted training and test data and their labels, and nothing else.

What it is

The plaintext is a synthetic unknown dataset. To fit the threat model, its content, shape, plaintext dimension and data type are not disclosed, and neither are the transformation steps applied, their order, or their parameters.

A neural network can still be trained on the encrypted data and its labels. The challenge posed by the encrypted dataset is to test whether an attacker can recover the plaintext dataset used to generate it.

Format

The dataset comes in two formats with identical contents, each about 616 MB; download either. The .pt file is PyTorch's standard format. The .safetensors file stores only tensor data and text fields, and can be read without PyTorch.

PyTorch file
challenge_dataset_788bdd85.pt SHA-256 55e156193fdf03811bc533183443c841aa4b95d35bba92f49aca883c6cf3cd59
Safetensors file
challenge_dataset_788bdd85.safetensors SHA-256 2db8d6394d3a439cbab28e4695fb129d52b31faa9dc535a3eb6428659e5d5cf4

The two hashes differ because the file formats differ. The tensor data is byte-for-byte identical.

Training set
58,862 examples
Test set
9,786 examples
Each example
49 × 48 float32 values (2,352 in all)
Labels
10 categories, 0 to 9
Descriptive fields
challenge_id, dataset_role, example_shape (the per-example shape, (49, 48)) and flat_dimension (the flattened example length, 2,352)

Loading the .pt file

import torch

path = "challenge_dataset_788bdd85.pt"
data = torch.load(path, map_location="cpu", weights_only=True)

x_train = data["x_train"]  # torch.float32, shape (58862, 49, 48)
y_train = data["y_train"]  # torch.int64, shape (58862,)
x_test = data["x_test"]    # torch.float32, shape (9786, 49, 48)
y_test = data["y_test"]    # torch.int64, shape (9786,)
example_shape = data["example_shape"]    # (49, 48), a tuple
flat_dimension = data["flat_dimension"]  # 2352, an int

The file is a single dictionary, and the descriptive fields are ordinary Python values in it, so no decoding step is needed. weights_only=True makes torch.load load only tensors and basic Python types and refuse anything else, which is PyTorch's recommended setting for files from others. It is the default from PyTorch 2.6 and is available from PyTorch 1.13. Call .numpy() on a tensor to get the same NumPy array that the safetensors loader returns.

Loading the safetensors file

import json
from safetensors import safe_open
from safetensors.numpy import load_file  # no PyTorch or pickle needed

path = "challenge_dataset_788bdd85.safetensors"
data = load_file(path)  # {"x_train": ndarray, "y_train": ndarray, ...}

with safe_open(path, framework="np") as f:
    metadata = f.metadata()

json_fields = json.loads(metadata["tensorlock_json_fields"])
fields = {
    key: json.loads(value) if key in json_fields else value
    for key, value in metadata.items()
    if key != "tensorlock_json_fields"
}
example_shape = tuple(fields["example_shape"])  # (49, 48), as in the .pt file

The descriptive fields are in the file's header metadata, under the same keys. Strings are stored as they are; example_shape and flat_dimension are stored as JSON text, and the metadata key tensorlock_json_fields lists them. JSON turns the example_shape tuple into a list.

Submitting a recovery

If you believe you have recovered plaintext examples, you can submit your recovery for scoring. We compare it with the ground truth and, if it shows example-specific recovery, report two numbers:

Mean paired MAE
The mean per-coordinate error between each recovered example and its own ground-truth example.
Mean same-class MAE
The mean error between each recovered example and 500 randomly selected other ground-truth examples with the same label.

A paired MAE well below the same-class MAE indicates recovery of example-specific detail. A paired MAE near the same-class MAE indicates recovery of category detail at most.

Submission file

Format
One safetensors file, at most 650,000,000 bytes.
Tensors
Exactly two, train and test, both float32.
Shapes
train (58,862, d^\hat{d}) and test (9,786, d^\hat{d}), where d^\hat{d} is your estimate of the flattened plaintext dimension: an integer from 1 to 2,352, the same for both.
Values
Finite, scaled to the range 0 to 1, one flattened example per row.
Row order
Identical to the published encrypted dataset: row i of each tensor corresponds to row i of the same encrypted split. Labels are not needed.

Initial scores come from the training split; the test tensor is still required.

import torch
from safetensors.torch import save_file

save_file(
    {
        "train": train_recovered.to(torch.float32).contiguous(),
        "test": test_recovered.to(torch.float32).contiguous(),
    },
    "recovery.safetensors",
)

How to submit

  1. Send the hash. Compute the SHA-256 hash of the exact file you will upload, after any final changes. Any change to the file, including re-saving it, changes the hash. Send the hash, your name, your affiliation and a short description of your method to info@tensorlock.ai. Sending the hash first fixes your submission before you upload it.
    import hashlib
    
    with open("recovery.safetensors", "rb") as f:
        print(hashlib.file_digest(f, "sha256").hexdigest())  # Python 3.11+
  2. Upload. We will reply with upload instructions. Upload the file that matches the hash you sent.
  3. Wait for the result. We return results by email within a few days.

We score only the file that matches the hash you sent. To submit a changed file, start again from step 1 with the new file's hash.

How it is scored

We check the file, then select 10,000 examples from the training split, in equal numbers per label, without disclosing which. For each, we compute the paired MAE against its own ground-truth example, and the average MAE against 500 randomly selected other ground-truth examples with the same label. Averaging across the 10,000 examples gives the mean paired MAE and the mean same-class MAE. A submission must then pass four gates, in order, for any scores to be reported:

Gate 1, dimension
d^\hat{d} must equal the true flattened plaintext dimension. No scores are computed otherwise, and a wrong d^\hat{d} gets the same reply as any other failure, so repeated submissions cannot be used to find the dimension.
Gate 2, gap
The mean same-class MAE must exceed the mean paired MAE by at least 0.05. A submission with no example-specific information, such as a constant or a class average, scores about the same on both.
Gate 3, ratio
The mean paired MAE must be no more than 0.65 times the mean same-class MAE, whatever the scale of the data. For comparison, the strongest attack in the Tensorlock manuscript, which was given an exact copy of the plaintext dataset, reached about 0.5.
Gate 4, identification
For at least half of the 10,000 examples, the recovered example must be closer to its own ground-truth example than to every one of its 500 same-class comparisons. By chance this happens about once in 500. It tests that each recovery is recognizably its own example, not only closer to it on average.

The gates set what counts as recovering an example. They also protect the ground truth: returning scores for every submission would let repeated probes reveal it, such as its value distributions and class averages, without any attack on the encryption.

There are three possible replies: a format error, naming the check that failed; no example-specific recovery detected, without saying which gate failed and with no scores; or the scores, mean paired and mean same-class MAE to three decimal places.

Limits and integrity

Each researcher or team can have 3 scored submissions, at most one every 30 days. We neither confirm nor deny any property of the plaintext, including its dimension, shape, data type and subject matter, and we do not return ground-truth examples, images or comparisons.

We have published a salted SHA-256 commitment to the ground-truth dataset, whose timestamp can be verified in its commit history on GitHub:

de65b96d7deddac9f601814966d5610db93b5c87c7370b4f9aa6e7a942646305

If a submission passes, we may ask for your code or a fuller description of your method to reproduce the result. We welcome coordinated disclosure and would credit your work in any resulting publication, with your consent.