News for hackers. Stuff that matters.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by andybak on Friday July 09, 2021 @09:46AM (#27783592)
Am I the only person who feels that it's copyright that's the issue rather than machine learning training sets?

Consider a new additional feature added on to Copilot - a language aware rewriting tool that transforms the initial generated code into a new form with equivalent functionality.

It would be nearly impossible to trace the original code or make a copyright claim.

However - you could use this same trick directly on copyrighted code. Now things are even murkier...

But I would argue that this is essentially what our brains are doing. I've read code, got the gist of it and written my own version. Technically it's not a clean-room reimplementation but an average coder wouldn't realistically expect to get sued for copyright for doing this.

Maybe they should but if you're an open source advocate and you've reached this position then there's something very weird going on.

I always thought the idea of open source was to use copyright against itself because we believed in openness. Not embracing it and just throwing out one small aspect of it.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by NmAmDa on Friday July 09, 2021 @09:50AM (#27783629)
There is equivalent thing in academia to what you describe which is "paraphrasing" which is you read the source, grasp it and then rephrase it in your own words. Still though you have to cite the ideas and this is actually essential because you can't keep quoting in your paper/thesis. But can this solve the problem with code license? I am not sure.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by basch on Friday July 09, 2021 @10:15AM (#27783871)
>Still though you have to cite the ideas

That's not because of copyright though, that is due to academic standards. Legally you can paraphrase without citing a source.

And from a legal perspective, an entire book of nothing but unsourced quotes from many works would probably end up being both transformative and using a minimal percent of each source.

That said, an argument for citing: if copilot was using public code, and not keeping a record of its sources, it might put someone in a spot where they dont know what risk they are exposed to. A citation log would both let you know what your sources are, and as a defense if accused of using something. The question becomes, going back to copyright, what if copilot learns a language, and then produces identical code to someone else, because that line of code is the most efficient obvious way to do something.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by alok-g on Friday July 09, 2021 @11:45AM (#27784885)
Copyrights protect expression of ideas, not the ideas themselves. The ideas themselves could be a subject matter of patents. This addresses a few of your comments.

>> It would be nearly impossible to trace the original code or make a copyright claim.

The difficulty in proving infringement is a different aspect than an infringement happening.

>> I always thought the idea of open source was to use copyright against itself because we believed in openness.

That's exactly the point. The open concern being discussed with using Copilot is that one may incorporate parts of the code under the "openness" license into an application which is not under a compatible "openness" license.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by king_magic on Friday July 09, 2021 @09:48AM (#27783618)

  but an average coder wouldn't realistically expect to get sued for copyright for doing this
Yeah, but they absolutely could if they copied code verbatim, which is what Copilot is often doing.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by the8472 on Friday July 09, 2021 @09:50AM (#27783634)
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by Zababa on Friday July 09, 2021 @10:17AM (#27783898)
You're citing a study done by Github on their own product, on something that has generated lots of backlash over the last week. I would take it seriously if it was an independant study, but right now it's hard to believe it.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by the8472 on Friday July 09, 2021 @10:29AM (#27784013)
Github's study predates any negative press, so that would not have be the reason for them to manipulate the study. And the examples that are making the rounds combine two aspects a) prompt-engineering b) famous code samples. That's hardly representative of normal use.

So while independent testing would be welcome I don't consider backlash observational evidence. What we're seeing is in line with prior experience with GPT.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by Zababa on Friday July 09, 2021 @10:43AM (#27784181)
> Github's study predates any negative press, so that would not have be the reason for them to manipulate the study.

I seriously doubt that no one raised the concerns that are raised today during the development of Copilot.

> And the examples that are making the rounds combine two aspects a) prompt-engineering b) famous code samples. That's hardly representative of normal use.

That's true, however the way they advertise Copilot is to prompt it with comments, which might push it to regurgitate code more often.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by Houshalter on Friday July 09, 2021 @05:13PM (#27788586)
>I seriously doubt that no one raised the concerns that are raised today during the development of Copilot.

I would be shocked if they did. The common wisdom in the ML community is that training data is fair use. GPT has been operating for 2-3 years now with no legal issues, and this is just a different fine tune of GPT3.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by bluefirebrand on Friday July 09, 2021 @10:00AM (#27783745)
Which means that if every one of us was using it, many of us would be using copyrighted code by the end of a single day.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by andybak on Friday July 09, 2021 @09:52AM (#27783652)
Yes. That part was implicit in my post. I'm trying to follow the logic a bit further to see where it goes.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by barkingcat on Friday July 09, 2021 @09:51AM (#27783640)
isn't the issue that github's particular implementation of the idea is braindead - as in it copy-pastes directly verbatim.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by drath on Friday July 09, 2021 @10:26AM (#27783984)
More like braindead because it was trained on an unfiltered set of data without checking licenses. In effect, they've created a code pirating tool.
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by andybak on Friday July 09, 2021 @09:57AM (#27783713)
Slight exaggeration but even given that aspect, I'm uncomfortable with the community's reaction
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by onli on Friday July 09, 2021 @10:11AM (#27783839)
I am too. It's so weird to see free software proponents argue for what is in effect a big extension of what should be protected under copyright. Not only using it, not only distributing it, but even learning from it - and the line there between learning from it as an AI and learning as a human is fluid. This copyright maximization could have a similar effect as software patents - making it more difficult to write software, because there will be an increased danger of being sued for infringement ("you learnt how to do that if from my GPL code, but you used MIT!").

1:1 copies are a different question (a "it depends" on how much gets copied and whether the code is protected, as in not obvious, in the first place), but those are not the main thing that gets focused on in that strange twittersphere (which the article is referencing).

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by louthy on Friday July 09, 2021 @10:47AM (#27784230)
> It's so weird to see free software proponents argue for what is in effect a big extension of what should be protected under copyright.

I don't believe that's what they're arguing. They're arguing that they're putting themselves (or their employer's) products at risk by having unattributed copyright protected code in their products. It doesn't matter how much any of us would hope that copyright didn't exist, the fact is, it does.

There are other issues with Copilot, but by far the biggest is the licensing risks for those using it in a professional software engineering environment.

I'm a FOSS advocate and all my FOSS projects are MIT licensed. Anyone can use my code to do anything they like, but my day-to-day professional software engineering life needs to know where the code comes from and what its license is.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by onli on Friday July 09, 2021 @11:00AM (#27784365)
Did you see https://twitter.com/NoraDotCodes/status/1412741339771461635, discussed at https://news.ycombinator.com/item?id=27769440 ?

> it's official, obeying copyright is only for the plebs and proles, rich people and big companies can do whatever they want

> Wow. It's amazing that nobody has brought up the point that the result of ML is a derivative work from the input dataset. If the dataset has a restrictive license, like the GPL, it is a clear cut case of violating the terms of the GPL because it is not being released in the open

There are other reactions of course, I'm handpicking here, as those are the reactions I was referencing above.

> my day-to-day professional software engineering life needs to know where the code comes from and what its license is.

I understand, I agree with it. But that doesn't mean that code produced by an AI that did learn from GPL code has to be licensed under GPL. Verbatim copies of sufficient high originality, so that copyright applies: Sure. And that's where there is some risk of Copilot going wrong. But that's not the primary output of Copilot nor its goal.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by louthy on Friday July 09, 2021 @11:08AM (#27784455)
> And that's where there is some risk of Copilot going wrong. But that's not the primary output of Copilot nor its goal.

It took no more than 24 hours for the verbatim code to appear in the wild. It's irrelevant if it's the primary goal or not, if it can happen once then it can happen again; therefore (I believe) it's an existential risk to any organisation that uses it for their own products.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by stefan_ on Friday July 09, 2021 @10:56AM (#27784331)
This is a clown take that was planted in you by the GitHub comments on this issue. Nobody cares particularly if you feed data into an algorithm of your choice. I can feed data into a hash algorithm all day and that won't come back to bite me.

This particular algorithm isn't learning anything, it's a big pattern matching/information retrieval system. It wasn't fed tokens, AST, constructs, type information, it was fed pure source code hoping the oblique magic in between would make it develop understanding. Nothing of the sort happened and it is instead regurgitating input data verbatim, which is the obvious copyright issue at hand.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by onli on Friday July 09, 2021 @11:07AM (#27784451)
You are making it sound as if the system only copies full functions verbatim, but that's not the case. See https://docs.github.com/en/github/copilot/research-recitatio... (as linked in a different comment thread here).

And btw, clowns take? That's no way to enter into a productive discussion.

> Nobody cares particularly if you feed data into an algorithm of your choice. I can feed data into a hash algorithm all day and that won't come back to bite me.

I showed examples to the contrary in my other comment.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by louthy on Friday July 09, 2021 @11:16AM (#27784538)
> You are making it sound as if the system only copies full functions verbatim

It doesn't only do that, but it does do that [1]. And that is the issue. It doesn't matter if it only does this 1% of the time, it's enough to be high risk.

[1] https://twitter.com/mitsuhiko/status/1410886329924194309

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by k__ on Friday July 09, 2021 @10:10AM (#27783828)
I used it and I had the impression that it understood my code, sometimes at least.

It once wrote an API client for a rather idiosyncratic interface I just implemented.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by cmpb on Friday July 09, 2021 @10:00AM (#27783753)
Has that been proven? It's possible it's only doing that due to a small training set
Re:GitHub’s AI Copilot Might Get You Sued If You Use It by qayxc on Friday July 09, 2021 @10:12AM (#27783847)
On top of that, I get the feeling that way too many programmers have a poor understanding of the actual value of their work.

A single function, even if particularly clever, elegant, or performant, doesn't have much value on its own. Sure, you might have thought about it for hours and struggled hard to get it just right, but that doesn't imply it's particularly valuable on its own.

A particular inverse square root function has no use outside a complete library or program. It's that added value (embedding it as part of something much bigger or complex) together with unrelated work (e.g. API calls, artwork, game design, etc.) that generates a product with actual value.

There are people who unironically try to argue that choosing variable names and expressing trivial mathematical relations in a particular way holds intellectual value worth protecting; even if it's just a single line of code.

Interestingly people cheered when Google won against Oracle and APIs remained "free". It'd be so interesting to take a peek into an alternate reality where CoPilot has been released by Google or Tesla(!) instead of Microsoft. My gut feeling is that the reaction would've been very different depending on the company that released the tool.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by bhaak on Friday July 09, 2021 @10:56AM (#27784335)
If I write a poem by variable names, don’t you think that would fall under copyright?

The hurdle for getting copyright are pretty low (of course that also means any compensation by a court would be low).

Anything that is not technical ly required (or deviates from some generic standard) but involves some aesthetic considerations is a already potentially copyrightable.

Because the boundaries are so fuzzy no sane company lawyer would allow the use of CoPilot . Why take a risk for some glorified text snippets?

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by qayxc on Friday July 09, 2021 @11:38AM (#27784785)
Copyright is different from licensing and is far more complicated that most people think.

> Why take a risk for some glorified text snippets?

Name an example where that was actually an issue. And I'm talking explicitly about single functions and even single lines of code.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by bhaak on Thursday July 15, 2021 @04:01PM (#27849406)
That's not how lawyers think.

Microsoft's programmers were (are?) not allowed to read GPL code to rule out any doubt that they might be copy GPL code into the codebase, even if only unconsciously.

Lawyers are not just for suing they are also for covering your ass so there is no way you could lose if you are getting sued.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by thayne on Friday July 09, 2021 @10:46AM (#27784217)
> It'd be so interesting to take a peek into an alternate reality where CoPilot has been released by Google or Tesla(!) instead of Microsoft. My gut feeling is that the reaction would've been very different depending on the company that released the tool.

I really doubt that. I do think the reaction would be more favorable if the project was itself open source.

Re:GitHub’s AI Copilot Might Get You Sued If You Use It by qayxc on Friday July 09, 2021 @11:58AM (#27785049)
Well, GTP-3 isn't open source, yet the Twitter-sphere was ecstatic about its code generation features.

It isn't even new at all [0], [1], [2] - it's just getting exposure because people start actually using it.

GPT-3 still forms the basis of Codex, which is the basis of CoPilot. None of these are Open Source and even if they were - what exactly do you think that would change? The models are black boxes, they are too big to even run on consumer level hardware, let alone train or finetune and the code of CoPilot is most likely just API calls, glue code, some post-processing and integration into VS Code.

In short, no I don't agree that an open source product would've helped with people's opinion and it would've been irrational even, because there'd still be no difference in the core functionality and what people are complaining about.

[0] https://sourceai.dev

[1] https://gpt3demo.com/category/code-generation

[2] https://www.datacamp.com/community/blog/gpt3