FHERMA
L4 · APPLICATIONMEASURED

Encrypted Regression

encrypted-regression · spec v0.1.0 · 0 implementations · 6 runners

Create implementationSpecification

DESCRIPTION

Predicts a continuous value from an encrypted feature vector.

Regression is the friendliest machine learning task for encrypted arithmetic, since a linear model is a dot product and nothing more. The difficulty appears as soon as the model stops being linear: normalization, splines and the activations of a small network all need functions that encrypted arithmetic only approximates.

Correctness is an error against known values rather than a match against a reference ciphertext, so the error measure is part of the case. The cookbook records a Kolmogorov-Arnold network as one realization.

INTERFACE

encrypted_regression(
  in  ct     : Ciphertext  // the encrypted feature vector
  out ct     : Ciphertext  // the encrypted predicted value
  ...               // anything else the realization needs — keys, context, encoding — is its own concern
)

PARAMETER SCHEMA

NAMETYPERANGE
featuresinteger1 – 2^12
batch_sizeinteger1 – 2^16
target_errornumber0 – 1000000
model_publicbooleantrue, false

The schema belongs to the kernel. Each implementation declares which part of it it supports.

CORRECTNESS

01Predictions fall within the declared error of the known values, measured over the whole evaluation set.
02The error measure is stated with the result; mean absolute and mean squared error are not interchangeable.
03Predictions are stable across runs on identical input.

SECURITY PROPERTIES

Features and prediction stay encrypted. Where the model is private, repeated queries must not let it be reconstructed.

ASSUMPTIONS

Feature scaling agreed with the model happens before encryption.

REFERENCES

Encrypted Regression · FHERMA