FHERMA
L4 · APPLICATIONMEASURED

Encrypted Text Classification

encrypted-text-classification · spec v0.1.0 · 0 implementations · 6 runners

Create implementationSpecification

DESCRIPTION

Assigns a class to an encrypted piece of text.

Text brings a problem images do not: the input is variable in length and discrete, so something has to turn it into numbers before encryption. Where that boundary is placed decides what is actually private. If the client tokenizes and embeds, the server sees only vectors but the vocabulary is fixed in advance; if the server does it, the text was never private in the first place.

The kernel therefore treats the encrypted representation as its input and requires the boundary to be stated, because two implementations that place it differently are not solving the same problem.

INTERFACE

encrypted_text_classification(
  in  ct     : Ciphertext  // the encrypted representation of the text
  out ct     : Ciphertext  // the encrypted class label, or scores per class
  ...               // anything else the realization needs — keys, context, encoding — is its own concern
)

PARAMETER SCHEMA

NAMETYPERANGE
sequence_lengthinteger1 – 2^16
embedding_dimensionsinteger1 – 2^12
classesinteger2 – 2^12
target_accuracynumber0.5 – 1

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

CORRECTNESS

01Accuracy is measured over a fixed evaluation set.
02The point at which text becomes an encrypted representation is stated, since it determines what stays private.
03Inputs shorter than the declared sequence length are handled without changing the answer for the tokens present.

SECURITY PROPERTIES

The text representation and the label stay encrypted. Padding and length must not reveal the length of the original text where that is part of the claim.

ASSUMPTIONS

Tokenization and embedding happen client-side, before encryption, against a public vocabulary.

REFERENCES

Encrypted Text Classification · FHERMA