News for hackers. Stuff that matters.
Re:Copilot under fire as dev claims it emits 'large chunks o... by naillo on Thursday October 20, 2022 @07:46AM (#33273222)
> Not so, says Alex Graveley, principal engineer at GitHub and the inventor of Copilot, who responded that “the code in question is different from the example given. Similar, but different.”

Oh ok so if I come upon a piece of copyrighted microsoft code all I have to do is rename the variables and modify some whitespace and it's no longer owned by them. Lol.

Re:Copilot under fire as dev claims it emits 'large chunks o... by agilob on Thursday October 20, 2022 @08:19AM (#33273521)
It's not the first time microsoft steals code, renames variables and pretends we're all cool and <3 opensource http://techrights.org/2020/03/25/no-new-microsoft/
Re:Copilot under fire as dev claims it emits 'large chunks o... by tebbers on Thursday October 20, 2022 @07:49AM (#33273244)
It's a tricky question surely, akin to the Ship of Theseus? At what point is the code sufficiently different? Is there legal precedent for this?
Re:Copilot under fire as dev claims it emits 'large chunks o... by naillo on Thursday October 20, 2022 @08:05AM (#33273389)
I agree it's tricky. I think it should be put to the same standards as we would if e.g. some game source code was leaked onto github and some guy decided to just rename all the variables changed the whitespace. If that guy did it most people and the courts would probably agree that he can't just sell that modified piece of code as 'halo leaked edition'. But currently if copilot performs the same action it seems the authors are arguing he should.
Re:Copilot under fire as dev claims it emits 'large chunks o... by alexcosan on Thursday October 20, 2022 @08:20AM (#33273527)
I believe that's a bit of a strawman comparison. Not taking any sides, but in your example, the resulting system would be the same - artwork aside - you would end up with the same set of algorithms put together to create the exact same game.

Copilot, as far as I know, tend to be used to generate snippets and small algorithms that, by themselves, are not a full system/product/game.

There still may be some merit to your argument, but I believe the opposite side should be a bit steelman'ed beforehand.

Re:Copilot under fire as dev claims it emits 'large chunks o... by xbfjvusb6 on Thursday October 20, 2022 @08:34AM (#33273662)
My license isn't "you can take a bit but not the whole bit".
Re:Copilot under fire as dev claims it emits 'large chunks o... by alexcosan on Thursday October 20, 2022 @08:51AM (#33273901)
I did not argue against that, I was talking about the argument. I don't think it's a straight comparison or even one that holds water. I don't think the parent comment mentioned licenses at all. I clearly mentioned that you can make an argument claiming that it's not ok to copy a snippet - I just don't think the argument to absurdity I replied to, in this case, is the best or most appropriate one.
Re:Copilot under fire as dev claims it emits 'large chunks o... by xbfjvusb6 on Thursday October 20, 2022 @09:34AM (#33274467)
You're right. It's a few orders of magnitude worse than that.

It's not just one snippet, it's thousands of them, every day being slurped up and copied across code bases everywhere license free.

If the pirate bay can get jail time for facilitating mass copyright infringement, maybe Microsoft needs a little jail time too.

It's been said in this thread already:

Either licenses matter or they don't. Pick one.

Re:Copilot under fire as dev claims it emits 'large chunks o... by alexcosan on Thursday October 20, 2022 @12:48PM (#33277373)
For some reason, you keep presenting arguments as if I have taken any sides. I don't agree with arguments even if I would agree with the end result.

I disagree that comparing Copilot with Pirate Bay is a good argument to make your case (maybe Dall-e is a closer comparison if resulting artwork could contain licensed artwork from the training set). You'd probably have other fronts to use and present a stronger argument.

And let me remind you that I have not argumented on behalf of any side, so I do not think this thread requires arguments against arguments I have never brought forward (it feels a bit more emotional than constructive).

Re:Copilot under fire as dev claims it emits 'large chunks o... by jimbokun on Thursday October 20, 2022 @08:47AM (#33273824)
There are a lot of existing legal precedents about what constitutes fair use vs infringement. This isn’t a new question.
Re:Copilot under fire as dev claims it emits 'large chunks o... by chii on Thursday October 20, 2022 @09:57AM (#33274769)
https://www.alrc.gov.au/publication/copyright-and-the-digita...

so if your work is transformative, it can be exempt as fair use. But i'm not sure what degree counts as transformative - i do think that training an AI model with millions of repos worth of code is transformative.

Re:Copilot under fire as dev claims it emits 'large chunks o... by saghm on Thursday October 20, 2022 @08:19AM (#33273522)
The legality doesn't have to be based solely on the end result; the process used to create the code can make a difference. If you literally copied the code and then changed things, that's potentially going to affect whether it's allowed even if none of the original code is left over. (Of course, proving that the code was copied is another matter, and IANAL and all that)
Re:Copilot under fire as dev claims it emits 'large chunks o... by mdasen on Thursday October 20, 2022 @01:18PM (#33277797)
This feels like the right answer to me. One of the things that is done is clean-room design (https://en.wikipedia.org/wiki/Clean_room_design). You don't want to take code and then just start renaming variables.

For example, when Google reimplemented Java for Android, they didn't copy the OpenJDK code. They just wrote their own code that fulfilled what the methods did. If they'd taken the OpenJDK code and just renamed a variable or two in each method, I think Oracle would have had a very strong case.

With Copilot, if it's generating code that is a near-identical copy, that's kinda just copy-paste with extra steps. Let's say that I create a dumb copilot. This will just look at a method signature and fill out the body if it finds an exact match in its database - there's no AI/ML involved. I "train" it on the OpenJDK source - meaning I create a hash of method signature -> method body. I then start writing Java method signatures and it fills in the bodies with the body it "learned" would be good for that method signature.

I think one of the things to always think about is "if the AI were dumber, would it just be copy-pasting?" If the stable diffusion were just taking a copyrighted photo and applying an instagram filter to it, that would be copyright infringement. If I ask for "Robert Downey Jr in a suit" and it gives me back a Getty Images photo run through a filter, that doesn't seem ok to use. If it is truly generating something new and unique from its training dataset, that does seem ok (to me, IANAL).

The problem is that Github Copilot seems to be generating things that are almost identical. In some ways, it seems like they should modify Copilot to catch things that are substantially the same as their training dataset, but that might be difficult.

But I think the process used to create it makes a difference. Copyright doesn't protect against independent creation. If two people independently write the same code, that's ok. However, Copilot isn't independently creating code if it's recreating code that's in its training set.

Re:Copilot under fire as dev claims it emits 'large chunks o... by saghm on Thursday October 20, 2022 @05:55PM (#33281343)
> For example, when Google reimplemented Java for Android, they didn't copy the OpenJDK code. They just wrote their own code that fulfilled what the methods did. If they'd taken the OpenJDK code and just renamed a variable or two in each method, I think Oracle would have had a very strong case.

One of the things I remember reading about that trial was that one of the Oracle lawyers was adamant that a method called "rangeCheck" had been copied and that it was proof that Google was able to get Android out into the market faster than if they hadn't copied code. The method was used inside the standard library (but not exported as part of the API) to check if the index of an array was out of bounds and throw the proper exception (so basically, if index < 0 throw one thing, if index >= length throw a different one, otherwise do nothing). The judge who heard the original case (and the second one at that level after the appeals court sent it back down to judge whether it was fair-use) had programmed in other languages in the past and decided to learn Java before the trial, so he was able to tell that this was such a trivial bit of code that it wasn't at all surprising that the code was the same and that even if it were copied, it would not expedite Android's appearance in the market in any noticeable way, leading to this amazing quote:

"I have done, and still do, a significant amount of programming in other languages. I've written blocks of code like rangeCheck a hundred times before. I could do it, you could do it. The idea that someone would copy that when they could do it themselves just as fast, it was an accident. There's no way you could say that was speeding them along to the marketplace. You're one of the best lawyers in America --how could you even make that kind of argument?"

Obviously most judges won't have this level of technical experience (I remember reading about a different case where a judge upheld an objection to the prosecution zooming into a photo on an iPad due to worrying that it might manipulate the image inaccurately, but then didn't have a problem with them wheeling in a giant TV instead of displaying the imaged scaled up on that), but I think the law has a capacity for nuance about these sort of technical issues that might surprise some programmers, especially with regards to the fact that intent and context can sometimes matter as much or even more than the end of result of something.

Re:Copilot under fire as dev claims it emits 'large chunks o... by arrosenberg on Thursday October 20, 2022 @07:53AM (#33273282)
Google v Oracle
Re:Copilot under fire as dev claims it emits 'large chunks o... by escapecharacter on Thursday October 20, 2022 @08:00AM (#33273349)
I actually would have loved if there was a real greek legal case for this, like we could just say "Lycurgus vs. Theseus" and it actually meant something.
Re:Copilot under fire as dev claims it emits 'large chunks o... by simiones on Thursday October 20, 2022 @09:24AM (#33274336)
That's not what Google v Oracle was about. That case was about whether the API of a piece of code (in this case, the API of most of the Java standard library) is copyrightable as a whole, without the implementation; and subsequently, even if they are copyrightable, whether a new implementation of that API would be fair use.

In the end the conclusion from the SC was that Google's use was fair use regardless of the question of copyrightability, which they didn't decide on (the previous court, at Oracle's appeal, had found that APIs are in fact copyrightable and that Google's use did not fall under fair use of that copyrighted API as they weren't 100% compatible with other JVMs).

Re:Copilot under fire as dev claims it emits 'large chunks o... by beardyw on Thursday October 20, 2022 @10:04AM (#33274857)
IIRC Google were scrupulous about ensuring there was no possiblity that the implementation might be derived from the original.
Re:Copilot under fire as dev claims it emits 'large chunks o... by arrosenberg on Thursday October 20, 2022 @12:12PM (#33276855)
Is there a more relevant case you can cite? I’m fully aware of the differences, but its still relevant case law on how the US legal system would approach a case on this issue.
Re:Copilot under fire as dev claims it emits 'large chunks o... by gw99 on Thursday October 20, 2022 @07:58AM (#33273334)
That depends only on who has the most expensive lawyers.

One thing in life is never to get into a position where you need to defend yourself against this scenario which is why I would never even consider using the tool.

Re:Copilot under fire as dev claims it emits 'large chunks o... by mkr-hn on Thursday October 20, 2022 @08:32AM (#33273647)
I wonder what the discussions with the lawyers are like at companies who want to use it. Are they all advising to avoid it and let someone else be the test case?
Re:Copilot under fire as dev claims it emits 'large chunks o... by gw99 on Thursday October 20, 2022 @10:02AM (#33274829)
Well actually on that we asked. They advised us not to use it now or in the future regardless of any outcome because at any point of litigation it muddies the water on what is clean-room innovation and what is not. While a change might be defined by copilot, it is not possible or practical to record any causal data or attribution with the change. It's arguably better to have any plagiarism issues directly attributed to a corporeal engineer where the audit trail can be made and scope identified.

The outcome is that introducing the tool actually tangibly increases business risk in a changing climate.

Re:Copilot under fire as dev claims it emits 'large chunks o... by mathfailure on Thursday October 20, 2022 @08:19AM (#33273517)
Correct. You either have access to the code and thus own it, or you do not, the rest is bullshit (BUT MAH LYSENS FORBEEDS!).
Re:Copilot under fire as dev claims it emits 'large chunks o... by iostream25 on Thursday October 20, 2022 @09:36AM (#33274503)
you are either complying with a legally binding license, or you aren't.
Re:Copilot under fire as dev claims it emits 'large chunks o... by mathfailure on Friday October 28, 2022 @05:49PM (#33378391)
Clearly, I don't. Ever.
Re:Copilot under fire as dev claims it emits 'large chunks o... by pid-1 on Thursday October 20, 2022 @08:20AM (#33273536)
I wonder: if someone trains a model that takes leaked code as input (such as Windows), would MS claim the output code is legal?
Re:Copilot under fire as dev claims it emits 'large chunks o... by nazgulsenpai on Thursday October 20, 2022 @10:07AM (#33274882)
I wonder how many checks Microsoft has under the hood to prevent this from happening? We'll never know but would be pretty enlightening.
Re:Copilot under fire as dev claims it emits 'large chunks o... by williamcotton on Thursday October 20, 2022 @08:44AM (#33273771)
The courts have already ruled on this structural similarity:

https://en.wikipedia.org/wiki/Structure,_sequence_and_organi...