Logistic Function In Homomorphic Encryption — A Base for Privacy-Aware Machine Learning

Prof Bill Buchanan OBE FRSE
4 min readAug 5, 2024

We live in a world where AI can harvest citizen data. But can we find a way that we can learn on encrypted data? Well, with homomorphic encryption we can use encrypted data for our processing. So:

Enc(a operator b) = Enc(a) operator Enc(b)

and where operator could be any mathematical operation. While LLMs are a kinda false type of learning, the usage of artificial neural networks (ANN) allows us the opportunity to learn from data in the same way that our brain works. At the core of this is the logistic function (also known as the sigmoid function):

Ref: [Wikipedia]

Mathematically, this is defined as:

For example, if we have x=0.5, then, in Python, we get:

>>> import math
>>> x=0.5
>>> y=1/(1+math.exp(-x))
>>> print (y)
0.6224593312018546
>>> x=6
>>> print (y)
0.9975273768433653

An artificial neural network is created with weighted summation and a sigmoid function:

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.

No responses yet

What are your thoughts?