<story><title>Building Safe AI: A Tutorial on Homomorphically Encrypted Deep Learning</title><url>https://iamtrask.github.io/2017/03/17/safe-ai/</url></story><parent_chain></parent_chain><comment><author>Animats</author><text>This is basically DRM for deep learning. While that may be useful, it&amp;#x27;s not about safety.&lt;p&gt;The big problems involved in building safe AI are about predicting consequences of actions. (The deep learning automatic driving systems which go directly from vision to steering commands don&amp;#x27;t do that at all. They&amp;#x27;re just mimicking a human driver. There&amp;#x27;s no explicit world model. That&amp;#x27;s scary.)</text></comment>
<story><title>Building Safe AI: A Tutorial on Homomorphically Encrypted Deep Learning</title><url>https://iamtrask.github.io/2017/03/17/safe-ai/</url></story><parent_chain></parent_chain><comment><author>antognini</author><text>I&amp;#x27;ve wondered before about whether Taylor series can allow one to impose the non-linearities of a NN on homomorphically encrypted data, but I&amp;#x27;ve never been quite convinced.  I work with deep learning, but I&amp;#x27;m certainly no expert on homomorphic encryption, so hopefully someone here who knows more can tell me whether this is valid or not.&lt;p&gt;The reason the Taylor series argument makes me uncomfortable is that pretty much any function can be written as a Taylor series.  But my understanding is that homomorphic encryption only works for a very specific set of functions.&lt;p&gt;In a little more detail, if you&amp;#x27;re computing tanh(x), the unencrypted number needs only the first few terms of the Taylor series.  But I could imagine that to get the decrypted number back, you actually need many terms of the Taylor series, because if you&amp;#x27;re off by even a little bit, you could end up with a very different answer after decryption.&lt;p&gt;To put it a little more formally, if we have that y = encrypt(x)&lt;p&gt;tanh(x) \approx x - x^3 &amp;#x2F; 3 + 2 x^5 &amp;#x2F; 15,&lt;p&gt;tanh(y) \approx y - y^3 &amp;#x2F; 3 + 2 y^5 &amp;#x2F; 15,&lt;p&gt;and&lt;p&gt;tanh(x) = decrypt(tanh(y)),&lt;p&gt;but it doesn&amp;#x27;t necessarily follow to me that&lt;p&gt;tanh(x) \approx decrypt(y - y^3 + 2 y^5 &amp;#x2F; 15)&lt;p&gt;Is this worry unfounded?  I suppose if you have a limited number of decimal places and you can guarantee that your Taylor approximation is valid to that precision then this wouldn&amp;#x27;t be a problem.</text></comment>