Live data from Hacker News

All public GitHub code was used in training Copilot

twitter.com

511–520 of 734 posts

Re: All public GitHub code was used in training Copilot

#511

I am really confused by HN's response to copilot. It seems like before the twitter thread on it went viral, the only people who cared about programmers copying (verbatim!) short snippets of code like this would be lawyers and executives. Suddenly everyone is coming out of the woodworks as copyright maximalists? I know HN loves a good "well actually" and Microsoft is always suspect, but let's leave the idea of code la…

Perhaps people on HN start sensing that successors of Github Copilot will take their programming job. Rightly so. Personally, I think that in the age of AI programming any notions of code licensing should be abolished. There is no copyright for genes in nature or memes in culture; similarly, these shouldn't be copyright for code.

> Perhaps people on HN start sensing that successors of Github Copilot will take their programming job. Rightly so.

I still think we're a long way from that. Copilot will help write code quicker, but it's not doing anything you couldn't do with a Google search and copy/paste. Once developers move beyond the jr. level, writing code tends to become the least of their worries.

Writing the code is easy, understanding how that code will affect the rest of the system is hard.

Re: All public GitHub code was used in training Copilot

#512
post #201

Earlier quoted context omitted.

No, see Authors Guild v. Google. Even without a license or permission, fair use permits the mass scanning of books, the storage of the content of those books, and rendering verbatim snippets of those books. The Google Books site is not a derivative work of the millions of authors they copied from, and if they did copy any coincidentally GPL, AGPL, or creative commons copyleft work, the fair use exception applies befo…

> No, see Authors Guild v. Google. That case required that the output be transformative, in that "words in books are being used in a way they have not been used before". Copilot only fits the transformative aspect if it is not directly reciting code, that already exists in the form that it is redistributing. So long as it does so, it fails to meet the criteria.

[deleted]

Re: All public GitHub code was used in training Copilot

#513

Earlier quoted context omitted.

> Why not Copilot? Because the sources used for input do not belong to the person operating the tool. If you say that doesn't matter, then you are saying open source licenses don't matter because the same thing applies - I could just run a tool (compiler) on someone else's code, and ignore the terms of their license when I redistribute the binary.

I think you have what I am saying backwards. I am saying that the licenses should apply to the output of Copilot, like they apply to the output of compilers.

Oh sorry, my mistake! Thank you.

Re: All public GitHub code was used in training Copilot

#514

Earlier quoted context omitted.

> However - Copilot directly recites code. You make that statement as an absolute, but in the interests of clarity, all evidence so far shows that it directly recites code very rarely indeed. Even the Quake example had to be prompted by the specific variable names used in the original code. In practice, the output code is heavily influenced by your own context — the comments you include, the variable names you use, e…

So if a foreign company pilfers the source code to Windows, can they add it to a training set and then 'prompt' the machine learning algorithm to spit out a new 'copyright free' Windows, just by transforming the variable names?

I think that's my question regarding this whole thing:

If it's so fair use, why not train it on all Microsoft code, regardless of license (in addition to GitHub.com) ? Would Microsoft employees be fine with Copilot re-creating "from memory" portions of Windows to use in WINE ?

Re: All public GitHub code was used in training Copilot

#515
post #185

If the training set contains verbatim (A)GPL code does this mean that Copilot also should be distributed by Microsoft under GPL? Because without it Copilot (as it is distributed by Microsoft) couldn't be built, wouldn't it make it a derivative work of GPL'd code (and obviously every other license)? I see a lot of people comparing human learning to machine learning in the comments, but there is a huge difference - we…

No, see Authors Guild v. Google. Even without a license or permission, fair use permits the mass scanning of books, the storage of the content of those books, and rendering verbatim snippets of those books. The Google Books site is not a derivative work of the millions of authors they copied from, and if they did copy any coincidentally GPL, AGPL, or creative commons copyleft work, the fair use exception applies befo…

For any discussion on copyright and fair use, we should distinguish between the implications to Copilot the software itself and the implications to users of Copilot.

For Copilot itself, I do see the case for fair use, though it gets fuzzy should Microsoft ever start commercializing the feature. Nevertheless it remains to be seen whether ML training fits the same public policy benefits public libraries and free debate leverages to enable the fair use defense.

For Copilot users, I don't see an easy defense. In your hypothetical, this would be akin to me going on Google books and copying snippets of copyrighted works for my own book. In the case of Google books, they explicitly call out the limits on how the material they publish can be used. I'm contrast, Copilot seems to be designed to encourage such copying, making it more worry some in comparison.

Re: All public GitHub code was used in training Copilot

#516
post #201

Earlier quoted context omitted.

No, see Authors Guild v. Google. Even without a license or permission, fair use permits the mass scanning of books, the storage of the content of those books, and rendering verbatim snippets of those books. The Google Books site is not a derivative work of the millions of authors they copied from, and if they did copy any coincidentally GPL, AGPL, or creative commons copyleft work, the fair use exception applies befo…

> No, see Authors Guild v. Google. That case required that the output be transformative, in that "words in books are being used in a way they have not been used before". Copilot only fits the transformative aspect if it is not directly reciting code, that already exists in the form that it is redistributing. So long as it does so, it fails to meet the criteria.

I think you might be considering two different acts here:

1. The act of training Copilot on public code

2. The resulting use of Copilot to generate presumably new code

#1 is arguably close to the Authors Guild v. Google case. You are literally transforming the input code into an entirely new thing: a series of statistical parameters determining what functioning code "looks like". You can use this information to generate a whole bunch of novel and useful code sequences, not just by feeding it parts of it's training data and acting shocked that it remembered what it saw. That smells like fair use to me.

#2 is where things get more dicey - just because it's legal to train an ML system on copyrighted data wouldn't mean that it's resulting output is non-infringing. The network itself is fair use, but the code it generates would be used in an ordinary commercial context, so you wouldn't be able to make a fair use argument here. This is the difference between scanning a bunch of books into a search engine, versus copying a paragraph out of the search engine and into your own work.

(More generally: Fair use is non-transitive. Each reuse triggers a new fair use analysis of every prior work in the chain, because each fair reuse creates a new copyright around what you added, but the original copyright also still remains.)

Re: All public GitHub code was used in training Copilot

#517

Earlier quoted context omitted.

No, see Authors Guild v. Google. Even without a license or permission, fair use permits the mass scanning of books, the storage of the content of those books, and rendering verbatim snippets of those books. The Google Books site is not a derivative work of the millions of authors they copied from, and if they did copy any coincidentally GPL, AGPL, or creative commons copyleft work, the fair use exception applies befo…

Thanks for this, but can you answer the question: Would it be 'fair use' for the devlopers to simply copy code from those repos - even just 10 lines, and claim 'fair use' - i.e. circumventing Copilot? Even if Copilot is 'fair use' ... does that mean the results are 'fair use' on the part of AutoPilot users? And a bigger question: is your interpretation of those statues and case law enough to make the answer unambiguo…

> Would it be 'fair use' for the devlopers to simply copy code from those repos - even just 10 lines, and claim 'fair use' - i.e. circumventing Copilot?

Only a lawyer (and truly, only a court) could answer that question.

If you copy 100 lines of code that amounts to no more than a trivial implementation in a popular language of how to invert a binary tree, it's likely fair use.

If you copy 10 lines of code that are highly novel, have never been written before, and solve a problem no one outside the authors have solved... It may not be fair use to copy that.

Other people who have replied have mentioned "the heart" of a work. The US Supreme Court has held that even de minimis - "minimal", to be brief - copying can sometimes be infringement if you copied the "heart" of a work.

Re: All public GitHub code was used in training Copilot

#518

So, when a human reads public code on the Internet (no matter the licence), and gains knowledge, learns (updates the synaptic weights of the brain), and then makes (indirectly) use of that gained knowledge for further work, how is this different to this case?

The difference is intent. When Github reads public code, their only intent is to profit from it. Depending on the license, that's a violation.

A human also often intends to make profit (by using the gained knowledge).

Re: All public GitHub code was used in training Copilot

#519

Earlier quoted context omitted.

Wouldn’t a more accurate metaphor be “let’s train a network on all music, to generate new music”, which includes Beatles, and may generate songs that contain the same chords as the Beatles used?

Yes, but may also use the same chord progressions, lyrics, or melodies. Could even say it contains snippits of the actual recordings, depending on how you look at it

Sure but then it’ll definitely be harder to prove it’s actual copyright infringement, especially when only a very small part of the song may have some snippets of the Beatles. Could it then, perhaps, be considered fair use?

Re: All public GitHub code was used in training Copilot

#520

Earlier quoted context omitted.

What about E = mc^2 ? Mathematics and physics equations are not copyrightable.

but those aren't only mathematics. There's the choice of variable names, the order in which things are called (maybe to optimize the performance on some CPU, we don't know), etc

Your original argument is based on the false premise that the amount of time or effort matters -- it doesn't. Not all human activity can or should be subject to copyright -- this the dangerous slippery slope of "intellectual property" -- and we are dangling by edge these days.
Post reply on HN