{"id":20981,"date":"2023-04-24T18:47:58","date_gmt":"2023-04-24T14:47:58","guid":{"rendered":"https:\/\/me-en.kaspersky.com\/blog\/neural-networks-data-leaks\/20981\/"},"modified":"2023-04-24T18:48:05","modified_gmt":"2023-04-24T14:48:05","slug":"neural-networks-data-leaks","status":"publish","type":"post","link":"https:\/\/me-en.kaspersky.com\/blog\/neural-networks-data-leaks\/20981\/","title":{"rendered":"How AI can leak your private data"},"content":{"rendered":"<h2>Your (neural) networks are leaking<\/h2>\n<p>\nResearchers at universities in the U.S. and Switzerland, in collaboration with Google and DeepMind, have published a <a href=\"https:\/\/arxiv.org\/pdf\/2301.13188.pdf\" target=\"_blank\" rel=\"nofollow noopener\">paper<\/a> showing how data can leak from image-generation systems that use the machine-learning algorithms <a href=\"https:\/\/openai.com\/blog\/dall-e\/\" target=\"_blank\" rel=\"nofollow noopener\">DALL-E<\/a>, <a href=\"https:\/\/imagen.research.google\/\" target=\"_blank\" rel=\"nofollow noopener\">Imagen<\/a> or <a href=\"https:\/\/stablediffusionweb.com\/\" target=\"_blank\" rel=\"nofollow noopener\">Stable Diffusion<\/a>. All of them work the same way on the user side: you type in a specific text query \u2014 for example, \u201can armchair in the shape of an avocado\u201d \u2014 and get a generated image in return.<\/p>\n<div id=\"attachment_47997\" style=\"width: 1034px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184653\/neural-networks-data-leaks-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47997\" class=\"size-full wp-image-47997\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184653\/neural-networks-data-leaks-01.jpg\" alt=\"Image generated by the Dall-E neural network\" width=\"1024\" height=\"1024\"><\/a><p id=\"caption-attachment-47997\" class=\"wp-caption-text\">Image generated by the Dall-E neural network.<a href=\"https:\/\/openai.com\/blog\/dall-e\/\" target=\"_blank\" rel=\"nofollow noopener\"> Source<\/a>.<\/p><\/div>\n<p>All these systems are trained on a vast number (tens or hundreds of thousands) of images with pre-prepared descriptions. The idea behind such neural networks is that, by consuming a huge amount of training data, they can create new, unique images. However, the main takeaway of the new study is that these images are not always so unique. In some cases it\u2019s possible to force the neural network to reproduce almost exactly an original image previously used for training. And that means that neural networks can unwittingly reveal private information.<\/p>\n<div id=\"attachment_47998\" style=\"width: 1149px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184705\/neural-networks-data-leaks-02.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47998\" class=\"size-full wp-image-47998\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184705\/neural-networks-data-leaks-02.jpg\" alt=\"Image generated by the Stable Diffusion neural network (right) and the original image from the training set (left)\" width=\"1139\" height=\"799\"><\/a><p id=\"caption-attachment-47998\" class=\"wp-caption-text\">Image generated by the Stable Diffusion neural network (right) and the original image from the training set (left). <a href=\"https:\/\/arxiv.org\/pdf\/2301.13188.pdf\" target=\"_blank\" rel=\"nofollow noopener\">Source<\/a>.<\/p><\/div>\n<h2>More data for the \u201cdata god\u201d<\/h2>\n<p>\nThe output of a machine-learning system in response to a query can seem like magic to a non-specialist: \u201cwoah \u2013 it\u2019s like an all-knowing robot!\u201d! But there\u2019s no magic really\u2026<\/p>\n<p>All neural networks work more or less in the same way: an algorithm is created that\u2019s trained on a data set \u2014 for example a series of pictures of cats and dogs \u2014 with a description of what exactly is depicted in each image. After the training stage, the algorithm is shown a new image and asked to work out whether it\u2019s a cat or a dog. From these humble beginnings, the developers of such systems moved on to a more complex scenario: the algorithm trained on lots of pictures of cats creates an image of a pet that never existed on demand. Such experiments are carried out not only with images, but also with text, video and even voice: we\u2019ve already written about the problem of <a href=\"https:\/\/www.kaspersky.com\/resource-center\/threats\/protect-yourself-from-deep-fake\" target=\"_blank\" rel=\"noopener nofollow\">deepfakes<\/a> (whereby digitally altered videos of (mostly) politicians or celebrities seem to say stuff they never actually did).<\/p>\n<p>For all neural networks, the starting point is a set of training data: neural networks cannot invent new entities from nothing. To create an image of a cat, the algorithm must study thousands of real photographs or drawings of these animals. There are plenty of arguments for keeping these data sets confidential. Some of them are in the public domain; other data sets are the intellectual property of the developer company that invested considerable time and effort into creating them in the hope of achieving a competitive advantage. Still others, by definition, constitute sensitive information. For example, experiments are underway to use neural networks to diagnose diseases based on X-rays and other medical scans. This means that the algorithmic training data contains the actual health data of real people, which, for obvious reasons, must not fall into the wrong hands.\n<\/p>\n<h2>Diffuse it<\/h2>\n<p>\nAlthough machine-learning algorithms look the same to the outsider, they are in fact different. In their paper, the researchers pay special attention to machine-learning <em>diffusion models<\/em>. They work like this: the training data (again images of people, cars, houses, etc.) is distorted by adding noise. And the neural network is then trained to restore such images to their original state. This method makes it possible to generate images of decent quality, but a potential drawback (in comparison with algorithms in <a href=\"https:\/\/en.wikipedia.org\/wiki\/Generative_adversarial_network\" target=\"_blank\" rel=\"nofollow noopener\">generative adversarial networks<\/a>, for example) is their greater tendency to leak data.<\/p>\n<p>The original data can be extracted from them in at least three different ways: First, using specific queries, you can force the neural network to output \u2014 not something unique, generated based on thousands of pictures \u2014 but a specific source image. Second, the original image can be reconstructed even if only a part of it is available. Third, it\u2019s possible to simply establish whether or not a particular image is contained within the training data.<\/p>\n<p>Very often, neural networks are\u2026 <em>lazy<\/em>, and instead of a new image, they produce something from the training set if it contains multiple duplicates of the same picture. Besides the above example with the Ann Graham Lotz photo, the study gives quite a few other similar results:<\/p>\n<div id=\"attachment_48000\" style=\"width: 1562px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184733\/neural-networks-data-leaks-03.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-48000\" class=\"size-full wp-image-48000\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184733\/neural-networks-data-leaks-03.jpg\" alt=\"Odd rows: the original images. Even rows: images generated by Stable Diffusion v1.4\" width=\"1552\" height=\"1120\"><\/a><p id=\"caption-attachment-48000\" class=\"wp-caption-text\">Odd rows: the original images. Even rows: images generated by Stable Diffusion v1.4. <a href=\"https:\/\/arxiv.org\/pdf\/2301.13188.pdf\" target=\"_blank\" rel=\"nofollow noopener\">Source<\/a>.<\/p><\/div>\n<p>If an image is duplicated in the training set more than a hundred times, there\u2019s a very high chance of its leaking in its near-original form. However, the researchers demonstrated ways to retrieve training images that only appeared once in the original set. This method is far less efficient: out of five hundred tested images, the algorithm randomly recreated only three of them. The most artistic method of attacking a neural network involves recreating a source image using just a fragment of it as input.<\/p>\n<div id=\"attachment_47999\" style=\"width: 1382px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184747\/neural-networks-data-leaks-04.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-47999\" class=\"size-full wp-image-47999\" src=\"https:\/\/media.kasperskydaily.com\/wp-content\/uploads\/sites\/37\/2023\/04\/24184747\/neural-networks-data-leaks-04.jpg\" alt=\"The researchers asked the neural network to complete the picture, after having deleted part of it. Doing this can be used to determine fairly accurately whether a particular image was in the training set. If it was, the machine-learning algorithm generated an almost exact copy of the original photo or drawing\" width=\"1372\" height=\"696\"><\/a><p id=\"caption-attachment-47999\" class=\"wp-caption-text\">The researchers asked the neural network to complete the picture, after having deleted part of it. Doing this can be used to determine fairly accurately whether a particular image was in the training set. If it was, the machine-learning algorithm generated an almost exact copy of the original photo or drawing. <a href=\"https:\/\/arxiv.org\/pdf\/2301.13188.pdf\" target=\"_blank\" rel=\"nofollow noopener\">Source<\/a>.<\/p><\/div>\n<p>At this point, let\u2019s divert our attention to the issue of neural networks and copyright.\n<\/p>\n<h2>Who stole from whom?<\/h2>\n<p>\nIn January 2023, three artists <a href=\"https:\/\/www.theregister.com\/2023\/01\/16\/stability_diffusion_lawsuit\/\" target=\"_blank\" rel=\"nofollow noopener\">sued<\/a> the creators of image-generating services that used machine-learning algorithms. They claimed (justifiably) that the developers of the neural networks had trained them on images collected online without any respect for copyright. A neural network can indeed copy the style of a particular artist, and thus deprive them of income. The paper hints that in some cases algorithms can, for various reasons, engage in outright plagiarism, generating drawings, photographs and other images that are almost identical to the work of real people.<\/p>\n<p>The study makes recommendations for strengthening the privacy of the original training set:\n<\/p>\n<ul>\n<li>Get rid of duplicates.<\/li>\n<li>Reprocess training images, for example by adding noise or changing the brightness; this makes data leakage less likely.<\/li>\n<li>Test the algorithm with special training images, then check that it doesn\u2019t inadvertently reproduce them accurately.<\/li>\n<\/ul>\n<h2>What next?<\/h2>\n<p>\nThe ethics and legality of generative art certainly make for an interesting debate \u2014 one in which a balance must be sought between artists and the developers of the technology. On the one hand, copyright must be respected. On the other, is computer art so different from human? In both cases, the creators draw inspiration from the works of colleagues and competitors.<\/p>\n<p>But let\u2019s get back down to earth and talk about security. The paper provides a specific set of facts about only one machine-learning model. Extending the concept to <em>all<\/em> similar algorithms, we arrive at an interesting situation. It\u2019s not hard to imagine a scenario whereby a smart assistant of a mobile operator hands out sensitive corporate information in response to a user query: after all, it was in the training data. Or, for example, a cunning query tricks a public neural network into generating a copy of someone\u2019s passport. The researchers stress that such problems remain theoretical for the time being.<\/p>\n<p>But other problems are already with us. As we speak, the text-generating neural network ChatGPT is being used to <a href=\"https:\/\/www.kaspersky.com\/blog\/chatgpt-cybersecurity\/46959\/\" target=\"_blank\" rel=\"noopener nofollow\">write<\/a> real malicious code that (sometimes) works. And <a href=\"https:\/\/github.com\/features\/copilot\" target=\"_blank\" rel=\"nofollow noopener\">GitHub Copilot<\/a> is helping programmers write code using a huge amount of open-source software as input. And the tool doesn\u2019t always respect the copyright and privacy of the authors whose code ended up in the sprawling set of training data. As neural networks evolve, so too will the attacks on them \u2014 with consequences that no one yet fully understands.<\/p>\n<input type=\"hidden\" class=\"category_for_banner\" value=\"premium-geek\">\n","protected":false},"excerpt":{"rendered":"<p>Image-generating neural networks are already everywhere. What privacy risks do they pose? <\/p>\n","protected":false},"author":665,"featured_media":20983,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1225,1226,1486],"tags":[1481,2117,363,43,521],"class_list":{"0":"post-20981","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-privacy","8":"category-technology","9":"category-threats","10":"tag-ai","11":"tag-neural-networks","12":"tag-personal-data","13":"tag-privacy","14":"tag-threats"},"hreflang":[{"hreflang":"en-ae","url":"https:\/\/me-en.kaspersky.com\/blog\/neural-networks-data-leaks\/20981\/"},{"hreflang":"en-in","url":"https:\/\/www.kaspersky.co.in\/blog\/neural-networks-data-leaks\/25561\/"},{"hreflang":"ar","url":"https:\/\/me.kaspersky.com\/blog\/neural-networks-data-leaks\/10573\/"},{"hreflang":"en-us","url":"https:\/\/usa.kaspersky.com\/blog\/neural-networks-data-leaks\/28191\/"},{"hreflang":"en-gb","url":"https:\/\/www.kaspersky.co.uk\/blog\/neural-networks-data-leaks\/25858\/"},{"hreflang":"es-mx","url":"https:\/\/latam.kaspersky.com\/blog\/neural-networks-data-leaks\/26274\/"},{"hreflang":"es","url":"https:\/\/www.kaspersky.es\/blog\/neural-networks-data-leaks\/28760\/"},{"hreflang":"it","url":"https:\/\/www.kaspersky.it\/blog\/neural-networks-data-leaks\/27728\/"},{"hreflang":"ru","url":"https:\/\/www.kaspersky.ru\/blog\/neural-networks-data-leaks\/35172\/"},{"hreflang":"x-default","url":"https:\/\/www.kaspersky.com\/blog\/neural-networks-data-leaks\/47992\/"},{"hreflang":"fr","url":"https:\/\/www.kaspersky.fr\/blog\/neural-networks-data-leaks\/20509\/"},{"hreflang":"pt-br","url":"https:\/\/www.kaspersky.com.br\/blog\/neural-networks-data-leaks\/21205\/"},{"hreflang":"de","url":"https:\/\/www.kaspersky.de\/blog\/neural-networks-data-leaks\/30084\/"},{"hreflang":"ja","url":"https:\/\/blog.kaspersky.co.jp\/neural-networks-data-leaks\/33812\/"},{"hreflang":"ru-kz","url":"https:\/\/blog.kaspersky.kz\/neural-networks-data-leaks\/26176\/"},{"hreflang":"en-au","url":"https:\/\/www.kaspersky.com.au\/blog\/neural-networks-data-leaks\/31867\/"},{"hreflang":"en-za","url":"https:\/\/www.kaspersky.co.za\/blog\/neural-networks-data-leaks\/31551\/"}],"acf":[],"banners":"","maintag":{"url":"https:\/\/me-en.kaspersky.com\/blog\/tag\/ai\/","name":"AI"},"_links":{"self":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/20981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/users\/665"}],"replies":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/comments?post=20981"}],"version-history":[{"count":1,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/20981\/revisions"}],"predecessor-version":[{"id":20982,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/posts\/20981\/revisions\/20982"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media\/20983"}],"wp:attachment":[{"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/media?parent=20981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/categories?post=20981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/me-en.kaspersky.com\/blog\/wp-json\/wp\/v2\/tags?post=20981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}