4 ms·
How do you guarantee it doesn't copy a GPL-ed function line-by-line?
by stefano 5y ago
How do you guarantee it doesn't copy a GPL-ed function line-by-line?
- king_magic 5y agoI truly don't think they can guarantee that. Which is a massive concern.
- ipsum2 5y agoYup, this isn't a theoretical concern, but a major practical one. GPT models are known for memorizing their training data: https://towardsdatascience.com/openai-gpt-leaking-your-data-2dfb9e22c1b2 https://towardsdatascience.com/openai-gpt-leaking-your-data-... Edit: Github mentions the issue here: https://docs.github.com/en/github/copilot/research-recitation https://docs.github.com/en/github/copilot/research-recitatio... and here: https://copilot.github.com/#faq-does-github-copilot-recite-code-from-the-training-set https://copilot.github.com/#faq-does-github-copilot-recite-c... though they neatly ignore the issue of licensing :)
- visarga 5y ago> GPT models are known for memorizing their training data Hash each function, store the hashes as a blacklist. Then you can ask the model to regenerate the function until it is copyright safe.
- ipsum2 5y agoWhat if it copies only a few lines, but not an entire function? Or the function name is different, but the code inside is the same?
- proteal 5y agoIf we could answer those questions definitively, we could also put lawyers out of a job. There’s always going to be a legal gray area around situations like this.
- ipsum2 5y agoMatching on the abstract syntax tree might be sufficient, but might be complex to implement.
- vlasev 5y agoYou can probably tokenize the names so they become irrelevant. You can ignore non-functional whitespace, so that code C remains. Maybe one can hash all the training data D such that hash(C) is in hash(D). Some sort of Bloom filter...
- bogwog 5y agoThat second link says the following: > We found that about 0.1% of the time, the suggestion may contain some snippets that are verbatim from the training set That's kind of a useless stat when you consider that the code it generates makes use of your existing variable/class/function names when adapting the code it finds. I'm not a lawyer, but I'm pretty sure I can't just bypass GPL by renaming some variables.
- kitsune_ 5y agoIt's not just about regurgitating training data during a beam search, it's also about being a derivative work, which it clearly is in my opinion.
- abraae 5y agoSurprised not to see more mention of this. It would make sense for an AI to "copy" existing solutions. In the real world, we use clean room to avoid this. In the AI world, unless all GPL (etc.) code is excluded from the training data, it's inevitable that some will be "copied" into other code. Where lawyers decide what "copy" means.
- kitsune_ 5y agoIt's not just about copying verbatim. They clearly use GPL code during training to create a derivative work. Then you have the issue of attribution with more permissive licenses.
- dkarras 5y agoHow do you know that when you write a simplish function for example, it is not identical to some GPL code somewhere? "Line by line" code does not exist anywhere in the neural network. It doesn't store or reference data in that way. Every character of code is in some sense "synthesized". If anything, this exposes the fragility of our concept of "copyright" in the realm of computer programs and source code. It has always been ridiculous. GPL is just another license that leverages the copyright framework (the enforcement of GPL cannot exist outside such a copyright framework after all) so in such weird "edge cases" GPL is bound to look stupid just like any other scheme. Remember that GPL also forbids "derivative" works to be relicensed (with a less "permissive" one). It is safe to say that you are writing code that is close enough to be considered "derivative" to some GPL code somewhere pretty much every day, and you can't possibly prove that you didn't cheat. So the whole framework collapses in the end anyways.
- krainboltgreene 5y ago> How do you know that when you write a simplish function for example, it is not identical to some GPL code somewhere? I don't, but then I didn't go first look at the GPL code, memorize it completely, do some brain math, and then write it out character by character.