Multiple clients

Hi,
I am currently wondering whether your library supports the set-up of multi-key HE.
So, there exist several clients which need to do inference on the same centralized ML model by sending encrypted data to it.

Greetings

HI @ViZei,

Currently Concrete ML does not support multi-key HE.

So, there exist several clients which need to do inference on the same centralized ML model by sending encrypted data to it.

Multiple client can query the same model but using different private keys. You don’t need multi-key for that however.

Unless you want to combine the data somehow?

Hi @jfrery , thanks for your fast response.
How would it work ‘querying the same model with different private keys’?
I would create for each client a private-public key pair. Then each client encrypts its data with its own private key with the same encryption schema and sends its to the server-side ‘homomorphically compiled’ model for inference. Since the homomorphic encryption property holds for inherently for any key, one can do the inference.
So, in the code line below: the variable serialized_evaluation_keys needs to be set depending on the concrete client since every client has a different private-public key pair?
if client_id ==0:
encrypted_result = server.run(encrypted_data, serialized_evaluation_keys_client_0)
elif client_id ==1:
encrypted_result = server.run(encrypted_data, serialized_evaluation_keys_client_1)
and so on…?
How would it work for training the model based on encrypted data from different clients?

Yes each client will get a different evaluation key. Your example makes sense.

How would it work for training the model based on encrypted data from different clients?

Well that’s when it gets tricky. Training the model with different users means combining their data eventually since you want the model to be updated globally and not per user.

Training a model in FHE with multiple users would make sense if:

  1. you are ok releasing the model updates (the results of the FHE evaluation)
  2. have multi key FHE (but you pay a huge performance cost here)
  3. you use public key encryption and threshold decryption.

2 and 3 are not supported in Concrete ML yet.

1 Like