<blockquote>
  <p>Does a machine learning algorithm copy the data it learns from?</p>
</blockquote>

<p>There are many different machine learning algorithms. If you are talking about <a href="https://en.wikipedia.org/wiki/K-nearest_neighbors_algorithm" rel="nofollow noreferrer">k nearest neighbor</a> (k-NN) then the answer is simply <strong>yes</strong>.</p>

<p>However, k-NN is rarely used. Most (all?) other models are not that simple. Usually, a machine learning developer wants the training data to be compressed (a lot, lossy) by the model for several reasons: (1) The amount of training data is large (many GB), (2) Generalization might be better if the training data is compressed (3) inference of new examples might take really long if the data is not compressed. (By "compress", I mean that the relevant information for the task is extracted and irrelevant data is removed. Not compression in the usual sense.)</p>

<p>For other models than k-NN, the answer is more complicated. <strong>It depends</strong> on what you consider a "copy". For example, from artificial neural networks (especially the sub-type of <a href="https://en.wikipedia.org/wiki/Convolutional_neural_network" rel="nofollow noreferrer">convolutional neural networks</a>, short: CNNs) the training data can partially be restored. Those models ware state of the art for many (all?) computer vision tasks.</p>

<p>I could not find papers which show that you can (partially) restore / extract training data from CNNs with the focus on possible privacy / copyright problems, but I'm ~70% certain I have read an abstract about this problem. I think I've also heard a talk where a researcher said this was a problem when building a detector for child pornography. However, I don't think that was recorded or anything published about this.</p>

<p>Here are two papers which indicate that restoring training data from CNNs might be possible:</p>

<ul>
<li><a href="https://arxiv.org/abs/1611.03530" rel="nofollow noreferrer">Understanding deep learning requires rethinking generalization</a></li>
<li><a href="https://arxiv.org/abs/1512.02017" rel="nofollow noreferrer">Visualizing Deep Convolutional Neural Networks Using Natural Pre-Images</a> and the <a href="https://arxiv.org/abs/1311.2901" rel="nofollow noreferrer">Zeiler &amp; Fergus paper</a></li>
</ul>
Does a machine learning algorithm copy the data it learns from?
<p>I am not a programmer, rather a law student, but I am currently researching for a project involving artificial intelligence and copyright law. I am currently looking at whether the learning process of a machine learning algorithm may be copyright infringement if a protected work is used by the algorithm. However, this relies on whether or not the algorithm copies the work or does something else.</p>

<p>Can anyone tell me whether machine learning algorithms typically copy the data (picture/text/video/etc.) they are analysing (even if only briefly) or if they are able to obtain the required information from the data through other methods that do not require copying (akin to a human looking at a stop sign and recognising it as a stop sign without necessarily copying the image).</p>

<p>Apologies for my lack of knowledge and I'm sorry if any of my explanation flies in the face of any established machine learning knowledge. As I said, I am merely a lowly law student.</p>

<p>Thanks in advance!</p>