Homomorphic & Functional encryption: Mapping unencrypted outputs to encrypted outputs using existing data Let's assume I have datapiece A which, after being put through a model or neural network, has a known output X in the unencrypted space. When I move datapiece A into an encrypted space, and put it through an encrypted model, it becomes datapiece e-A. Now, it has output e-X. In this way, I am using a known (unencrypted) data to map X into the encrypted space (e-X).

The model in the unencrypted space has only two possible outputs: X and Y. When I encrypt this model, I'd like there to still be only two possible outputs: e-X and e-Y.

When someone else sends me an encrypted input data, datapiece e-Unknown, I plug it into the function, and I also get output e-X. Since datapiece e-unknown produces e-X in the encrypted space, can it be assumed that datapiece-Unknown also produces output X in the unencrypted space? In other words, does the map from the first paragraph enable deciphering outputs for the anonymized input datapiece-Unknown? Assume datapiece unknown and datapiece A are different (i.e. not exactly the same).

Eval(Enc(f),Enc(dA))=Eval(Enc(f),Enc(dU))⇒f(dA)=f(dU)


where Eval(f,c) stands to "apply f homomorphically to the ciphertext c" .... "f" is the model, "dA" is datapiece-A, "dU" is datapiece-unknown. 

If this can be done without encrypting the model, that would also work.

Eval(f,Enc(dA))=Eval(f,Enc(dU))⇒f(dA)=f(dU)




For an unusual use case, I want this to be true. How can I make it work?

Does this hold true for homomorphic encryption? Since h.e. is probabilistic, are there any tricks to make it hold true for homomorphic encryption (e.g. re-seeding with each new input)? If not, why? I am asking specifically about H.E. because a number of libraries already exist that make it easy to use. 

Does this hold true for functional encryption? I have heard it does, but there are not many libraries available for functional encryption.
Actually, what you asked is not unusual, even more, it is always true.

Since $Eval(f, Enc(dA)) = Enc(f(dA))$ and $Eval(f, Enc(dU)) = Enc(f(dU))$, if $Eval(f, Enc(dA)) = Eval(f, Enc(dU))$, then $ Enc(f(dA)) =  Enc(f(dU))$.

Now, if you use the decryption algorithm in both sides, you get $f(dA) = f(dU)$.

The same argument applies if we use $Enc(f)$ instead of $f$.

The point now is whether this information is useful or not, because the probability that $Eval(f, Enc(dA)) = Eval(f, Enc(dU))$ is very small: even if $dA = dU$, you are supposed to have $Enc(dA) \not = Enc(dU)$, therefore, the evaluation algorithm is likely to give you different outputs.

So, you would probably never see this event and, consequently, you would not be able to use the conclusion (the right side of the implication).