Encrypted Image Classification

L5 · Privacy-Preserving Applications
image-classification · 1 specification · 0 implementations · no benchmarks yet
WHAT IT ISAssign an encrypted image to one of a fixed set of classes under CKKS.
CKKS
SIGNATURE
kernel classify<N: u32, C: u32>(
%image: secret<tensor<N x f64>>,
) -> %scores: secret<tensor<C x f64>>
Sizes and element types are left open here. A specification fixes them; an implementation says over which of them it works.
DESCRIPTION

Definition

Image classification is the task of assigning an image to one of a fixed set of classes. In the encrypted setting the image is secret and the model runs homomorphically: nothing is decrypted between the encrypted input and the encrypted output.

Given an encrypted image represented as a real vector xRNx \in \mathbb{R}^N, a fixed model ff is evaluated on the ciphertext to produce a score vector

s=f(x)RCs = f(x) \in \mathbb{R}^C

over CC classes. The predicted class is the slot of greatest score,

y^=argmax0j<Csj.\hat{y} = \arg\max_{0 \le j < C} s_j .

Context

The operation is defined over real-valued data encrypted under an approximate homomorphic scheme (CKKS). The model ff is a fixed function from an NN-dimensional image vector to a CC-dimensional score vector; it is applied to the ciphertext without access to the plaintext input. What varies between specifications is the scheme and its parameters, the image size and layout, the number of classes, the dataset, and the model itself.

The kernel states only the input/output contract and the classification semantics. It does not fix a model architecture, a preprocessing pipeline, an approximation strategy, or accuracy figures — those are properties of a specification and of the submitted solution.

Composition

This is an end-to-end application kernel (abstraction level "applications"), not a primitive. A solution is built by composing lower-level component kernels of the catalogue, for example:

  • matrix multiplication and linear maps for the dense and convolutional layers;
  • activation approximations — such as relu, sign, logistic, gelu — evaluated as polynomials on ciphertext;
  • reductions and score-producing steps such as softmax.

The application defines the outer contract (encrypted image in, encrypted class scores out); the component kernels supply the arithmetic underneath.

Parameters Defined by Specifications

A specification pins the general classification task down to a concrete problem by fixing:

  • the encryption scheme and its parameters (here CKKS);
  • the image representation and its length NN;
  • the number of classes CC;
  • the dataset and its labelling;
  • the correctness metric (classification accuracy against plaintext labels);
  • what is secret and what is fixed/public (the input versus the model).

Applications

Encrypted image classification supports private machine-learning inference: image-based diagnosis on confidential medical scans, classification of private photographs, and any setting where an image owner wants a prediction from a model without revealing the image and without the model holder learning the input or the result.

MAINTAINER
FM
fairmathreviews specifications · resolves disputes
USED BY · 0 KERNELS
Kernels above this one. If this kernel is wrong, or slow, they are wrong or slow with it.Nothing depends on this kernel yet.
BUILDS ON · 0 KERNELS
Kernels this one is stated in terms of. Not a call graph — a statement of dependence between problems.Nothing. This kernel sits at the bottom of the graph.
RECENT ACTIVITYNothing yet.