News for hackers. Stuff that matters.
Re:Tool to convert copyrighted music into fair use by sellyme on Saturday July 10, 2021 @04:58PM (#27796429)
I've seen a lot of people ragging on Copilot for "copy+pasting" code - does anyone have links to cases where it has done this without the user intentionally trying to generate a specific (extremely famous) code snippet?

I've seen tons of comments here and on Reddit that talk about multiple instances of entire functions being copied verbatim, but the only thing even remotely close to that I've seen is the fast inverse square root, so I must have missed a few tweets or something.

Re:Tool to convert copyrighted music into fair use by tyingq on Saturday July 10, 2021 @07:24PM (#27797181)
Is it clear how many people have access? If access is fairly limited, I'm not surprised at the low number of examples.

Here's an example from their own docs:

Compare:

https://docs.github.com/assets/images/help/copilot/example_r...

To: https://github.com/nilavghosh/OMSCS/blob/master/AI4Robotics-...

Re:Tool to convert copyrighted music into fair use by sellyme on Saturday July 10, 2021 @07:41PM (#27797273)
> Is it clear how many people have access? If access is fairly limited, I'm not surprised at the low number of examples.

I wouldn't be too surprised either, what surprised me was the large number of people who explicitly said words like "many examples" and then couldn't link more than one.

> Here's an example from their own docs:

Thank you! This is definitely a much stronger example than the Quake one. Looking at the git repository it seems like this is generic startup code for a university assignment, so it probably shows up a significant number of times in the training data.

While it definitely makes sense to interpret a piece of code showing up several hundred times in the exact same format as being okay to straight-up copy+paste (e.g., imports, some boilerplate in more verbose languages, keyboard input switch statements), this does seem to highlight that Copilot can't distinguish between code snippets that are always identical because that's just the correct way to do it, and code snippets that are always identical because only one person did that thing, and it just happens to be in hundreds of repositories for one reason or another.

Re:Tool to convert copyrighted music into fair use by tyingq on Saturday July 10, 2021 @09:21PM (#27797762)
There's also the example of it spitting out valid sendgrid api keys, which wouldn't be a case of the code appearing in many places. https://news.ycombinator.com/item?id=27736460
Re:Tool to convert copyrighted music into fair use by geekraver on Sunday July 11, 2021 @11:51AM (#27801800)
I wonder how many of these verbatim examples are because the training data code itself occurs multiple times in GitHub because it in turn was copied from an upvoted answer in StackOverflow, LOL.
Re:Tool to convert copyrighted music into fair use by meibo on Saturday July 10, 2021 @05:10PM (#27796500)
It only seems to if you give it no or very little "source" input, like an empty file with a comment that says "// X algorithm".

There's been a lot of bikeshedding on this, but GitHub decidedly hasn't given enough information on how it works and what the training dataset is, and the fair use question definitely needs to be answered, maybe even in court - it's just a matter of time.

Re:Tool to convert copyrighted music into fair use by MadVikingGod on Saturday July 10, 2021 @07:37PM (#27797251)
What I think is interesting and not talked about in the copilot cases is there is actually two different copyright actions that come from using it.

The first is if GitHub had a license to distribute the code they have learned on. This is assuming that the code it produces is a derivative, which I don't think would be much of a stretch. For this I think most of the licenses that are used, GPL MIT etc, allow for someone to distribute in such a way.

The second is the user of copilot. They would be getting and distributing code where they wouldn't know the original license, but that wouldn't be a viable defense of infringement. To actually comply with most licenses they would have to follow the requirements.

In both cases I don't know if a fair use would really apply. Maybe GitHub could stretch the research aspect, but if you just use the code in your product there is no fair use.

Re:Tool to convert copyrighted music into fair use by wlesieutre on Saturday July 10, 2021 @07:56PM (#27797336)
> This is assuming that the code it produces is a derivative, which I don't think would be much of a stretch

I don't think that's easily settled. Is the code I write a derivative work of all prior code that I've learned from? The difference (IMO) is that Copilot has a much more precise memory than I do; I couldn't recall the exact text of a code example that I've encountered repeatedly even if I wanted to.

Re:Tool to convert copyrighted music into fair use by ric2b on Saturday July 17, 2021 @07:32PM (#27869642)
> I couldn't recall the exact text of a code example that I've encountered repeatedly even if I wanted to.

If you could it would be copyright infringement anyway.

Re:Tool to convert copyrighted music into fair use by orwin on Saturday July 10, 2021 @07:56PM (#27797338)
easy solution: license all the code you write with copilot under AGPL or GPLv3, and you're good.
Re:Tool to convert copyrighted music into fair use by martindevans on Saturday July 10, 2021 @11:33PM (#27798279)
Not at all, you'd still be violating all the non-gpl licenses. Just because GPL is more restrictive doesn't mean it somehow supercedes all other licenses!
Re:Tool to convert copyrighted music into fair use by cassonmars on Saturday July 10, 2021 @08:09PM (#27797398)
Not quite, there are far more aggressive licenses on repositories on GitHub, such as SSPL, which in theory by providing the SSPL licensed code, Co-Pilot should be open sourced under the same license to comply.
Re:Tool to convert copyrighted music into fair use by Hamuko on Sunday July 11, 2021 @10:48AM (#27801255)
Except you're not allowed to relicense proprietary code you found on GitHub under GPL.
Re:Tool to convert copyrighted music into fair use by Hamuko on Saturday July 10, 2021 @06:04PM (#27796791)
>what the training dataset is

All non-private repositories on GitHub.

Re:Tool to convert copyrighted music into fair use by brutal_chaos_ on Saturday July 10, 2021 @06:29PM (#27796931)
Is it though? I'd assume that too, but we don't really know, do we? I mean to ask, what have Microsoft stated that leads you to believe this? (Maybe there's a press release I missed?)
Re:Tool to convert copyrighted music into fair use by teraflop on Saturday July 10, 2021 @06:31PM (#27796942)
Re:Tool to convert copyrighted music into fair use by ben0x539 on Saturday July 10, 2021 @07:04PM (#27797098)
(this doesn't say they didn't use other sources too, though)
Re:Tool to convert copyrighted music into fair use by tyingq on Saturday July 10, 2021 @09:13PM (#27797736)
"source code from publicly available sources, including code in public repositories on GitHub." (from the copilot home page)

Pretty much says they did also use other sources.

Re:Tool to convert copyrighted music into fair use by uberswe on Saturday July 10, 2021 @08:19PM (#27797443)
I have access and hints for entire functions have only appeared from code already in the same file. It uses the file you are in for context.

It also says on their website that the AI may generate api keys that look real but it’s actually just a “fake” key that the AI generated as placeholder.

I have had access for one day, spent my entire Saturday playing with while working on an addon for a game. I find it useful and most of the hints come from other code I have in the same files which saves me time or let’s me know when I’m too repetitive :)

Re:Tool to convert copyrighted music into fair use by tyingq on Saturday July 10, 2021 @09:18PM (#27797751)
"It also says on their website that the AI may generate api keys that look real but it’s actually just a “fake” key that the AI generated as placeholder."

Maybe this is what you meant, but that's already been shown to be untrue. https://fossbytes.com/github-copilot-generating-functional-a...

Re:Tool to convert copyrighted music into fair use by uberswe on Sunday July 11, 2021 @06:03AM (#27799668)
So the article mentions an issue reported by dtjm annd the maintainer answers the issue explainig that the keys are fictional. I don't see any statement by the github CEO about this being an issue as the article says.

If you have access, link to the maintainers answer: https://github.com/github/copilot-preview/discussions/45#dis...

The answer references the FAQ which is what I referred to: http://copilot.github.com/#faq-does-github-copilot-ever-outp...

Re:Tool to convert copyrighted music into fair use by dogecoinbase on Saturday July 10, 2021 @06:30PM (#27796935)
It's happily spitting out licenses and copyright notices with other people's names on them, it's pretty clearly half-baked.
Re:Tool to convert copyrighted music into fair use by sellyme on Saturday July 10, 2021 @07:31PM (#27797219)
While that's obviously a UX flaw that definitely shouldn't have made it to release, I find it hard to envision it ever actually being a problem. If someone's accepting auto-generated copyright notices and licenses that don't actually apply, they can't really point the finger at Github - it's called "Copilot", not "Pilot".

The problem with full snippets of arbitrary obscure repositories being copy+pasted is that there's no realistic way for a user to know if that's happening without putting in more effort than just writing the code themselves, somewhat defeating the point. That's not really case when the first line of the file contains "(C) Someone Else 2003".

Re:Tool to convert copyrighted music into fair use by abrokenpipe on Saturday July 10, 2021 @10:29PM (#27798061)
Thats much more than just a UX flaw, it's clearly showing that copilot just regurgitates code snippets from other peoples opensource. Which draws back to the issue of "did copilot AI actually learn from other peoples code or is it just copy+pasting other peoples code?". I don't think people are concerned about copilot user's liability/productivity.
Re:Tool to convert copyrighted music into fair use by sellyme on Sunday July 11, 2021 @07:29PM (#27805388)
> it's clearly showing that copilot just regurgitates code snippets from other peoples opensource

You consider a license file to be code?

Re:Tool to convert copyrighted music into fair use by abrokenpipe on Sunday July 11, 2021 @07:41PM (#27805463)
That's irrelevant, if copilot is copy+pasting random licenses then it's definitely copy+pasting code as well, I don't see how this could be hard to believe.
Re:Tool to convert copyrighted music into fair use by sellyme on Sunday July 11, 2021 @10:13PM (#27806225)
> That's irrelevant

You said "copilot just regurgitates code snippets", and the example given wasn't a code snippet. Of course it's relevant.

> if copilot is copy+pasting random licenses then it's definitely copy+pasting code as well

Not at all. Copy+pasting licenses is intended behaviour. That's the entire point of having standard licenses. No-one would want Copilot to try to make its own entirely new licenses, therefore it's very trivial to imagine a piece of software designed to allow for licenses to be copied verbatim, but not allow that for any significant chunk of code.

Copilot does not appear to be designed like that, but that doesn't make the logic correct. We only know that it isn't designed like that because we looked for an example of it actually copying arbitrary code.

> I don't see how this could be hard to believe

I don't care about believing it, I care about whether or not it's true. If someone claims to have seen Copilot copy+pasting code, and when asked for evidence their only example is it copy+pasting some license boilerplate, they're just straight-up lying - and worse, potentially drowning out any real examples that exist.

Re:Tool to convert copyrighted music into fair use by dogecoinbase on Monday July 12, 2021 @07:34PM (#27816318)
Other people here and elsewhere have demonstrated direct code copying. It's not hard to find.

The license/copyright notice (and note that the copyright notice with the names of individuals easily invalidates your assertion regarding boilerplate) issue is that it's clear that no due diligence was done on this product. No one (at least no one with the authority to stop it) spent any time reviewing what this product could produce, because _producing a copyright notice with a random developer's name on it_ is so beyond the pale that even the most cursory review by someone who knew literally anything about the law or copyright would have stopped it in its tracks.

Re:Tool to convert copyrighted music into fair use by dwild on Saturday July 10, 2021 @09:26PM (#27797782)
> I've seen a lot of people ragging on Copilot for "copy+pasting" code - does anyone have links to cases where it has done this without the user intentionally trying to generate a specific (extremely famous) code snippet?

It's not important that the examples are really specific, the issue is that it does happens. This tool has the potential to infringe copyright (sure it does seems legal at some place, doesn't make it more right though).

Look at how EA reversed engineered the Genesis in the past [1]. They had 2 teams, one that did the reversing, and another that did the implementation. That made it safe to say that no infringing code was going through. Plenty of emulators developers try to avoid source code leaks for similar reason. Co-Pilot can't do that.

The fact that the copyright status of the code is hard to determine, doesn't means it's not copyrighted code nonetheless.

Personally I got nothing against this kind of technology, but I do have a pretty big issue with how it learn. Once people published their code on Github, they didn't know it could have been used to do machine learning and it's bad that it is. If Github asked for the copyright over the code to do Co-Pilot, I wouldn't mind.

[1] https://www.youtube.com/watch?v=x0qe1FNqtCo&t=280s

Re:Tool to convert copyrighted music into fair use by IshKebab on Saturday July 10, 2021 @05:32PM (#27796608)
Github did an analysis and found that it does do it, though very rarely, and usually when it has little context (e.g. at the start of a file). They're working on detecting those cases though so it doesn't happen accidentally, so it is unlikely to be a realistic problem.