News for hackers. Stuff that matters.
Re:Copilot under fire as dev claims it emits 'large chunks o... by koyanisqatsi on Thursday October 20, 2022 @10:17AM (#33275000)
If information wants to be free then information belongs to the commons and not corporate entities that obfuscate the real source of value so that they can profit from it. Making code more accessible is great, profiting from it and not giving back to all the folks that made it possible is not.

I tried co-pilot and understand why statistical auto-completion based on the efforts of large groups of open source volunteers is useful but if Microsoft wants to charge a fee for the service then they need to respect the licensing terms of the code they are using because without the data set provided by all those volunteers co-pilot (and statistical auto-completion in general) would be impossible.

Re:Copilot under fire as dev claims it emits 'large chunks o... by gjsman-1000 on Thursday October 20, 2022 @10:33AM (#33275288)
> need to respect the licensing terms of the code they are using because without the data set provided by all those volunteers co-pilot (and statistical auto-completion in general) would be impossible.

You assume that is even possible. I do not believe that would be possible, at all, at least completely impractical. Copilot would not exist. Also, remember Copilot is from the United States, where we have a thing called "fair use."

If a court finds that Copilot is "fair use," copyright and license are completely irrelevant. Cry me a river, it doesn't matter. We already know many things in tech are fair use:

- Google v Oracle showed copying API titles was fair use. Even if you copied tens of thousands of them, for the near entirety of Java. Also see ReactOS, which clones the Windows API; and Linux, which cloned the UNIX API. Imagine how Microsoft and the UNIX vendors felt - but it did not matter.

- Just because John Goodall had `AddTwoNumbers(int x, int y)` implemented as `return x + y;" back in 1981 doesn't mean you can't too. Even if you read his work. There is a degree of copying that is legal, despite copyright or potential infringement, that is decided in courts on a case-by-case basis when someone complains.

- And finally... even if it regurgitates proprietary code once in a while, that does not make a service de-facto illegal. See YouTube. Just because someone gets clearly copyrighted material (such as an entire movie) on there doesn't make YouTube illegal if YouTube takes it down and tries to prevent it from occurring. If GitHub argues the same, that they try to prevent large regurgitations in good faith, and remove complained-about regurgitations on request, the odds of the court shutting Copilot down approach 0%.

Re:Copilot under fire as dev claims it emits 'large chunks o... by koyanisqatsi on Thursday October 20, 2022 @10:38AM (#33275384)
I think you're misunderstanding the point here. The point is that co-pilot is not "fair use". Co-pilot can not exist without ingesting entire codebases to encode their aggregate statistics which Microsoft then uses to recommend auto-completions. So what you're arguing is untenable, co-pilot does not just ingest the header files for some C library and then somehow magically provide the function implementations, it literally copies and statistically obfuscates the entire codebase (headers and all). This is obviously not "fair use".

The equivalent argument here is homomorphically encrypting an entire codebase and searching through it for matching snippets. This is essentially what co-pilot is doing but using AI hype as a cover.

Re:Copilot under fire as dev claims it emits 'large chunks o... by gjsman-1000 on Thursday October 20, 2022 @10:41AM (#33275429)
It's not obvious to a court, at all. Two significant arguments against it being obvious:

1. What do our human brains do? How is that different from how a human brain may function? Our brains take large amounts of information, from all sorts of places, and boil it down just as Copilot tries to do.

2. According to courts, website scraping is completely legal and "fair use." Even if you scrape 200,000 profiles. How is this not different than website scraping, but with code? I expect that argument to also come up.

In a nutshell, legally, it is not obvious.

Re:Copilot under fire as dev claims it emits 'large chunks o... by koyanisqatsi on Thursday October 20, 2022 @10:47AM (#33275534)
I now see you're confused about how exactly co-pilot actually works. I recommend learning about statistical machine learning and not getting wrapped up in AI hype. Brains don't work like co-pilot and that argument won't work in court. Co-pilot is a statistical encryption scheme, nothing more. Carrying this argument to its natural conclusion means that homomorphic encryption makes all data fair use for profit with no need to respect the licensing terms of the original data set.
Re:Copilot under fire as dev claims it emits 'large chunks o... by hansvm on Thursday October 20, 2022 @10:48AM (#33275566)
1. Human brains aren't above the law here either. When producing code that is substantially the same (especially if it's a character for character match of large swathes of an existing work) it's presumed that you copied it unless you can prove one of a few exceptions like that the code itself wasn't copyrightable (moot point in context), or that you likely hadn't ever seen the original (which copilot explicitly has).

2. Scraping by itself is probably mostly legal. What you do with the scraped information is still subject to copyright and other laws.

Re:Copilot under fire as dev claims it emits 'large chunks o... by gjsman-1000 on Thursday October 20, 2022 @10:57AM (#33275726)
Or, that the work you have reproduced is sufficiently "transformative," which is an exception under "fair use" law. How different is the copy from the original? If I draw Elsa but with a green dress and a different hairstyle, I'm not under Disney's copyright even if my inspiration is clear.

Edit: Also, the degree to which it must be transformative is, I would argue, lesser for code. There's only so many ways to implement an algorithm - meaning that if it is slightly different, it may be transformative enough, whereas a more creative and less utility-based outlet like painting may require greater changes.

Re:Copilot under fire as dev claims it emits 'large chunks o... by AlexandrB on Thursday October 20, 2022 @10:49AM (#33275579)
> 1. What do our human brains do? How is that different from how a human brain may function? Our brains take large amounts of information, from all sorts of places, and boil it down just as Copilot tries to do.

I've posted this elsewhere, but it doesn't matter what our brains do and how similar that is to how AI operates. Humans have rights that machines do not. For example I can watch a movie and not be sued for infringement because I made a copy of the movie in my head.

Re:Copilot under fire as dev claims it emits 'large chunks o... by gjsman-1000 on Thursday October 20, 2022 @10:54AM (#33275670)
> I've posted this elsewhere, but it doesn't matter what our brains do and how similar that is to how AI operates. Humans have rights that machines do not. For example I can watch a movie and not be sued for infringement because I made a copy of the movie in my head.

No AI model works that way either though. Think Stability AI: It doesn't have a copy of every image that it was generated with, but has "distilled" the patterns out of images. It no longer has a copy of any specific image inside it, nor is there an ability to extract training data from it.

In which case, it does not have a copy of the movie in its head either - but it does, for example, recognize the Disney look.

Right now, GitHub Copilot's argument is that training AI models, on copyrighted material, is currently legal. This is also the position almost every AI startup also takes, and it is rooted in "fair use" taking the "transformative" qualities of a work into consideration. There is no doubt that AI-generated suggestions generally are "transformative," it is only about whether they are transformative enough.

Re:Copilot under fire as dev claims it emits 'large chunks o... by AlexandrB on Thursday October 20, 2022 @11:53AM (#33276564)
> No AI model works that way either though. Think Stability AI: It doesn't have a copy of every image that it was generated with, but has "distilled" the patterns out of images. It no longer has a copy of any specific image inside it, nor is there an ability to extract training data from it.

My point was that it doesn't matter whether AI works exactly like a human brain, humans have additional rights that an AI does not. This comment made my point better than I could: https://news.ycombinator.com/item?id=33273621

> There is no doubt that AI-generated suggestions generally are "transformative," it is only about whether they are transformative enough.

I don't think even Microsoft/Github actually believes this to be the case because they choose to train on public Github repos and did not include their own proprietary codebase.

Re:Copilot under fire as dev claims it emits 'large chunks o... by rented_mule on Thursday October 20, 2022 @02:32PM (#33278773)
> I don't think even Microsoft/Github actually believes this to be the case because they choose to train on public Github repos and did not include their own proprietary codebase.

There are good reasons they would not include proprietary codebases aside from this, so I don't see this as a smoking gun. Large codebases often involve elements that don't make sense outside of their immediate environment. Projects the size of Linux have this same issue, but large open source projects tend to have significant cross-pollination with the broader community so it's less of an issue.

For example, one large corporate codebase I worked in had a library of ~20, strangely named, short utility functions that were called from many thousands of places. People in the broader community would not find such ubiquitous use of these functions idiomatic at all, but it formed a "dialect" within the company that was often useful given that everyone knew it. These functions caused a lot of signatures/code to be structured in ways that assumed their existence - they were painful to extract when we open sourced internal things. There also tends to be a lot of business logic in corporate code (e.g., `max_space = 100 if has_excel_license else 10`) that would make zero sense in other codebases.

A real example in this case... I'd bet that many millions of lines of Microsoft's internal code still use Hungarian notation. Few users would want Copilot generating such names. I could see interest in a version of Copilot that augments the standard Copilot model with your own codebase if you have millions of lines of code in your GitHub Enterprise account.

Re:Copilot under fire as dev claims it emits 'large chunks o... by belorn on Thursday October 20, 2022 @11:08AM (#33275879)
> What do our human brains do?

It depend on the task. If we are to edit a movie then we cut and paste different parts from large amount of raw material until something new is created. If we do this too work we don't own we call it a remix.

Law is always about the context. Web scraping is OK. Scraping youtube is not. There is no technical explanation to distinguish the two.

I would very much like to see an AI that uses youtube videos as the training set. It could co-sing with people, co-edit movies and music videos, and even generate video game assets from just scraping videos of people playing video games. All very unlikely to ever occur.

Re:Copilot under fire as dev claims it emits 'large chunks o... by HillRat on Thursday October 20, 2022 @11:37AM (#33276345)
Trained AI models are arguably fair use under the "transformative" prong (which is itself a relatively new concept in copyright law), but they are also arguably derivative and thus infringing: there's a strong possibility that training generative AIs on copyrighted work will be found an infringement by the courts, whenever a case makes it to adjudication.

If Copilot emanates chunks of copyrighted code verbatim, that makes it harder to argue that it's a truly transformative use. An apposite ruling can be found in Warner Bros. v. RDR Books, 575 F.Supp.2d 513 (SDNY 2008), which found against the defendant due to the reproduction of extensive verbatim passages from the Harry Potter books in a reference book about the series; in this case, one could argue that Copilot fixes in a tangible medium (thus evading Galoob) verbatim copyrighted code without annotation or commentary; indeed, the entirety of the model is nothing more than copyrighted material. (The counterargument is that the text embeddings are fundamentally transformative and thus protected in the same way a third-party index or concordance would be.)

Google v. Oracle, meanwhile, distinguishes between an API signature, which "provides a way ... to access prewritten computer code" from "the code that actually instructs the computer to execute a task," noting that "Google did not copy the task-implementing programs ... from the Sun Java API." In addition, the decision in that case rested in part on the fact that Google only copied a small portion of the Java codebase, whereas in this case Microsoft used the entirety of the repos.

As for YouTube, that's a different matter -- DCMA doesn't apply here, because Copilot isn't a service provider, it's the alleged infringement itself.

To summarize, one argument against Microsoft is that:

1. Training an AI model on copyrighted work does not substantially "transform" the work, but merely fixes it in a different format and generates additional derivative works from the copyrighted material;

2. The code being used is not merely "descriptive" (as in API signatures) but is creative in nature;

3. The entirety of the work is being indiscriminately consumed in the process; and

4. By generating derivative works, Copilot reduces the value of software developers and undermines the market for further software creation.

While there are plenty of arguments in favor of Microsoft, I wouldn't assume that fair use is a slam dunk defense.