FHEON Studio

Use encrypted neural networks live through our FHEON Studio.

The pages are Workbench, Build and Runs.

Workbench

The Workbench runs a FHEON program on test images in five choices and a model:

  1. Task: inference or training.

  2. Primitives: standard or diagonal (Standard Primitives, Diagonal Primitives (FHEON-D)). Training uses the standard layout.

  3. Input: single input or batch (standard primitives).

  4. Dataset: MNIST, CIFAR-10 or CIFAR-100. Every model runs on the dataset it was trained on.

  5. Security: the performance-efficient parameters (not a standard level) or 128 / 192 / 256-bit security (-DSECURITY_LEVEL, one build folder each: build/, build/std128/, …). The batch programs and the LeNet-5 diagonal programs use every slot of the larger ring of a standard level (HEConfig.fillSlots): a batch then takes more images (32 instead of 16 at 128 bits for the 2^14-slot programs, see Batch Input Examples), and the run panel and the model details show the ring, slots and batch of the chosen level, and programs that only repeat another one at that level are not listed (see Security Levels, Ring Dimension and Packing). The keys of a standard level are kept in <program>-<mode>-std<level>-<digest>, the digest of the program’s CKKS settings, so keys of older parameters are never loaded.

The models are the programs of FHEON:

Programs

Execution

Folder

Standard, single input

sequential

HEStandardSingleModels/: MLP, LeNet-5, ResNet-20 (5 variants), ResNet-34 (2), VGG-11 (2), VGG-16 (2)

Diagonal, single input

sequential

HEDiagonalSingleModels/: MLP, LeNet-5, ResNet-20 (2), ResNet-34, VGG-11, VGG-16

Standard, batch

multithreaded

HEStandardBatchModels/: LeNet-5 and ResNet-20 / ResNet-34 with fixed batch sizes, and the pipelines with accumulators of ResNet-20, ResNet-34, VGG-11 and VGG-16

Training

multithreaded

HETrainingModels/: ResNet-20 fine-tuning in the standard layout (tuneResNet20)

Each program has one execution mode: the single-input programs run sequentially, the batch programs and the training multithreaded (with the program’s default number of workers, --threads). The model card shows the network, the CKKS parameters, reference timings and the build status; a program that is not built at the chosen security level is compiled first, as part of the run. Then pick the test images (any images for single-input programs; a ready-made window or a batch built image by image for batch programs), or upload images of your own in the format of the dataset, and run.

Build

Build compiles the targets of CMakeLists.txt with the chosen security level, build folder, build type, task, primitives, input, model and batch size, and shows the CMake commands it runs. Builds run one at a time and keep their log in frontend/builds/. Test runs run the first image (or batch) of any built program, and System shows the FHEON checkout, the build folders and the datasets the Studio uses.

Runs

The run page follows a run in the order the programs work: context and keys, weights, then read, normalize and encrypt, evaluate and decrypt for each image (once for a batch). It shows the progress of every layer, the latest operations, the decrypted scores of each image, the totals (time per image, bootstrapping time, peak memory), the CKKS parameters and the console. The Runs list keeps the history with accuracy, time per image, peak memory and total time; every run keeps console.log, fhepredictions.txt and job.json in frontend/runs/<id>/.

Configuration

frontend/backend/studio.config.json (from studio.config.example.json) or environment variables:

Variable

Default

Meaning

FHEON_ROOT

two folders above backend/

the FHEON checkout

FHEON_BUILDS

build,build/std128:128,build/std192:192,build/std256:256

build folders and their security level

FHEON_KEYS_DIR

AllHEKeys/studio

keys, one folder per program

FHEON_TRAINING_DATA_DIR

encrypted_training_data

parent of the training programs’ parameters

FHEON_MAX_JOBS

1

runs at the same time (encrypted runs are memory-bound)

The API is documented by the backend itself at /api/docs.