News for hackers. Stuff that matters.
Re:GitHub Copilot emits GPL code by jrockway on Friday April 21, 2023 @02:44PM (#35658177)
As long as the AI doesn't produce this function, you're fine:

     private static void rangeCheck(int arrayLen, int fromIndex, int toIndex {
       if (fromIndex > toIndex)
          throw new IllegalArgumentException("fromIndex(" + fromIndex +
               ") > toIndex(" + toIndex+")");
       if (fromIndex < 0) 
          throw new ArrayIndexOutOfBoundsException(fromIndex);
       if (toIndex > arrayLen) 
          throw new ArrayIndexOutOfBoundsException(toIndex);
    }
On a more serious note, I really wonder where the line is drawn for copyright. I see a lot of people claiming that AI is producing code they've written verbatim, but sometimes I wonder if everyone just writes certain things the same way. For the above rangeCheck function, there isn't much opportunity for the individual programmer to be creative. Perhaps there is a matter of taste on what exceptions you throw, or in what order. But the chosen ones are certainly what most people think of first, and the order to validate arguments, then check the low value, then check the high value, is pretty much what anyone would do. Perhaps you could format the error message differently. That's about it. So when someone "rips off" your code wholesale, it's could just be that everyone writing that function would have typed in the exact same bytes as you. You know your style guide is working when you look at code, think you wrote it, but actually you didn't!
Re:GitHub Copilot emits GPL code by humanistbot on Friday April 21, 2023 @03:03PM (#35658459)
That's why copyright holders for reference works have been using copyright traps for ages. That's where you include a fictional town in a map, a nonsense word in a dictionary, or a fake person in your phone book. If your competitors reproduce the trap, then that's clear evidence you can use in court.

https://en.wikipedia.org/wiki/Copyright_trap

Re:GitHub Copilot emits GPL code by iudqnolq on Friday April 21, 2023 @03:07PM (#35658515)
If you look at the Legal Action section of your link you'll see the line "However, the case was dismissed" quite a few times. That's because data isn't copyrightable.

Edit: As sroussey points out s/isn't copyrightable/isn't copyrightable in the USA

Re:GitHub Copilot emits GPL code by sroussey on Friday April 21, 2023 @03:27PM (#35658784)
Not in the USA, but it is in the EU and elsewhere.
Re:GitHub Copilot emits GPL code by whiplash451 on Friday April 21, 2023 @04:46PM (#35659849)
How do you define the geolocation of data?

If my website is hosted in EU but a company scans it from the internet in the US, how could they possibly know it is hosted in EU?

Re:GitHub Copilot emits GPL code by iudqnolq on Friday April 21, 2023 @05:10PM (#35660234)
Which country's laws apply and what remedies you can get if they were violated is far more complicated than geolocation of data.

But very broadly speaking you would need to sue in an EU court to enforce EU law. And you could sue a US company in specific EU country's court if the company had more than some minimum level of connection to the that country. The country the data is hosted in isn't key.

Re:GitHub Copilot emits GPL code by z3t4 on Friday April 21, 2023 @05:14PM (#35660281)
Where the data is stored does not matter much. Laws deal with people and companies, so it matters where you live or where your company operates. So if you live in the US you don't have to worry about EU laws unless you do buisness in EU.
Re:GitHub Copilot emits GPL code by concordDance on Friday April 21, 2023 @06:04PM (#35660854)
Hence why you should live on that unclaimed but of land in Africa. :D
Re:GitHub Copilot emits GPL code by AnthonyMouse on Friday April 21, 2023 @03:48PM (#35659037)
The other problem with these "copyright traps" is that they do nothing to prove someone copied the legitimate parts of the data.

Suppose you recreate the entire dataset from scratch. Then someone notices (e.g. using an automated comparison) that the "trap" is in the other dataset but missing from yours, and submits it to you to add.

This is arguably too small an addition to be copyrighted on its own, but regardless of that, it would then be all you have to remove to get back to a clean version. And since it's erroneous data, you would want to remove it anyway.

Re:GitHub Copilot emits GPL code by plasticchris on Friday April 21, 2023 @04:00PM (#35659201)
My favorite of these was a town founded to match the map. Pretty sure I heard an npr story on it.
Re:GitHub Copilot emits GPL code by jprete on Friday April 21, 2023 @04:14PM (#35659420)
The relevant line is “information alone without a minimum of original creativity cannot be protected by copyright”.

There is definitely creativity in writing code; it’s not a completely deterministic translation of even a complete specification.

Re:GitHub Copilot emits GPL code by iudqnolq on Friday April 21, 2023 @04:50PM (#35659902)
Oh absolutely. I was speaking only about the comment I replied to.
Re:GitHub Copilot emits GPL code by netfortius on Friday April 21, 2023 @03:39PM (#35658927)
I think I mentioned this before, in another context: the solution is known as "honeytoken", and it is equally applicable in computer security.
Re:GitHub Copilot emits GPL code by cxr on Friday April 21, 2023 @03:33PM (#35658868)
It's occasionally explained—but still not widely understood, I'd wager—that this is the reason why so much GNU code is hard to follow.

In the US legal system the merger doctrine is a concept whereby a given expression cannot be granted protection if it's not sufficiently creative—and there only so many ways to express something when stripped down to its fundamentals. In response to this, RMS and Moglen encouraged contributors from very early on to try to express the inner workings of GNU utilities in creative and non-obvious ways out of caution against the possibility that the copyleft obligations of the GPL wrt a given package could be nullified by a finding in court that it did not pass the threshold for creativity.

Re:GitHub Copilot emits GPL code by noirscape on Friday April 21, 2023 @04:42PM (#35659790)
GNU code is partially hard to follow because of RMS paranoia, but that mostly manifests itself in the code being weirdly structured. The far bigger reason is that GNU code tends to run with really strange optimizations and project decisions since they want their tools to be able to run on ancient mainframes that practically nobody uses anymore, so everything is overoptimized for that.
Re:GitHub Copilot emits GPL code by jschrf on Friday April 21, 2023 @03:42PM (#35658962)
Also, re: maps, fake streets and cul-de-sacs that don't exist.

I've set a "trap" myself years ago in code in a novel solution at the time for uploading photos from iOS non-interactively after the fact. It was to support disconnected field workers taking photos from iPhones/iPads, with the payloads uploaded at a later date.

Chunked form data constructed in userland JS was the solution. Chunk separator was 17 dashes in a row (completely arbitrary), company name in 1337 speak, plus 17 more dashes.

Found a competitor that had copied the code, changing only the 1337 speak part. 17 dashes remained on each side. Helped me realize that they had unminified and indeed ripped off our R&D work.

Wonder if Copilot could be gamed the same way.

Re:GitHub Copilot emits GPL code by peteradio on Friday April 21, 2023 @04:40PM (#35659769)
How did you manage to find that your competitor copied your code?
Re:GitHub Copilot emits GPL code by aetch on Friday April 21, 2023 @05:14PM (#35660280)
Javascript
Re:GitHub Copilot emits GPL code by jschrf on Saturday April 22, 2023 @11:28AM (#35667535)
Yeah. The feature set offerred by the competitor was similar to ours, and we went through the wringer building that solution, so i unminified their code and sure enough...it easn't exactly theirs.

Oh yeah and they ripped off our website too. That was the first clue haha.

Re:GitHub Copilot emits GPL code by tedivm on Friday April 21, 2023 @03:59PM (#35659182)
We don't need the copyright traps here though as Github openly admits to using the public code for training. They just don't care that they're essentially license laundering code since they can make money doing it.

That said we used copyright traps at Malwarebytes, which is how we found out that iobit was stealing our database.

Re:GitHub Copilot emits GPL code by peytoncasper on Friday April 21, 2023 @04:02PM (#35659221)
What happens if GitHub didn't use GPL licensed code, but still generated code that was identical to GPL licensed code?
Re:GitHub Copilot emits GPL code by tedivm on Friday April 21, 2023 @04:08PM (#35659326)
We know that isn't the case because we can see code being reproduced even with comments, and Github has been open about the fact that they used everything they had in training.

That said, lets say there's a new model that explicitly excluded closed source and copyleft licenses. Well, the MIT, MPL, Apache, BSD- they all say you can't strip their licensing off.

Okay, so to get to the spirit of your question, lets say Github managed to program a model that worked using only their own code or code that was explicitly put in the public domain. If Github managed to reproduce code that wasn't in the training set, then it can't be accused of copying it. At that point the argument could be made that it independently created it.

At the same time algorithms can't be copyrighted, but implementations of an algorithm can be, so if Github was basically just spitting out an algorithm that just happened to be implemented similarly to how some other code it wasn't trained on implemented it, then I would say there was no copyright violation.

Re:GitHub Copilot emits GPL code by bryanrasmussen on Friday April 21, 2023 @04:20PM (#35659507)
>We know that isn't the case because we can see code being reproduced even with comments

If the comment is something like

//check fromIndex is greater than toIndex

then that is not any more individualistic or different than the actual function. Sadly, many people comment like this, on the other hand if it reproduced a comment with typos or something more complicated like

/* this hack is because Firefox's implementation of SVG z-indexing does not match how Chrome or Safari does it - please read this article ...url...*/

then yeah, then you would have something

Re:GitHub Copilot emits GPL code by marginalia_nu on Friday April 21, 2023 @04:23PM (#35659545)
Well yeah, we've already seen exactly this:

https://twitter.com/StefanKarpinski/status/14109710611816816...

Re:GitHub Copilot emits GPL code by theRealMe on Friday April 21, 2023 @05:02PM (#35660092)
In almost any other scenario this would be evidence. But Fast Inverse Square Root isn’t some tightly held secret. That exact code, with those specific comments included, is found in the Wikipedia page for that algo:

https://en.m.wikipedia.org/wiki/Fast_inverse_square_root

Re:GitHub Copilot emits GPL code by marginalia_nu on Friday April 21, 2023 @05:02PM (#35660102)
Yeah, it's still GPL though.
Re:GitHub Copilot emits GPL code by theRealMe on Friday April 21, 2023 @05:15PM (#35660295)
True.
Re:GitHub Copilot emits GPL code by nextaccountic on Saturday April 22, 2023 @12:24AM (#35663318)
The usage in Wikipedia is probably fair use, but it's still copyrighted, even without being a secret
Re:GitHub Copilot emits GPL code by bryanrasmussen on Friday April 21, 2023 @05:25PM (#35660419)
OK that tracks as more than just lazy comments lookalikes.
Re:GitHub Copilot emits GPL code by rvba on Friday April 21, 2023 @06:24PM (#35661045)
Did you read the article you are commenting on? It has examples.
Re:GitHub Copilot emits GPL code by visarga on Friday April 21, 2023 @05:00PM (#35660066)
How about rewording a code snippet so it doesn't exactly replicate the source, but is functionally identical? Could be applied before training. Can we say the LLM only learned the ideas not the expression? Copyright should protect expression and not restrict reusing ideas.
Re:GitHub Copilot emits GPL code by janoc on Friday April 21, 2023 @06:36PM (#35661179)
Except that's not how LLM works. LLM has no idea about "ideas", only probabilities of how certain words string together.

So you literally can't make it produce functionally identical but not verbatim identical code. It doesn't understand that the two are equivalent.

Also, such "functionally identical but not violating copyright" transformation is not possible to do, both given the complexity of the problem and the sheer volume of the data.

And training it on some simplistically obfuscated code wouldn't help - all it would learn would be production of obfuscated code. Not useful for the intended use.

Re:GitHub Copilot emits GPL code by chii on Friday April 21, 2023 @11:56PM (#35663209)
> It doesn't understand that the two are equivalent.

it doesn't need to understand the way a human might do the understanding.

The pattern that the LLM managed to extract could include the structure, rather than the pure text. And in reproducing the structure, the LLM can replace the variable names but keep the structure intact.

I am not sure if copilot is able to do this, but chatGPT was somewhat able to (if imperfectly at the moment).

Re:GitHub Copilot emits GPL code by belorn on Saturday April 22, 2023 @06:03AM (#35664948)
Copying a piece of code and changing the variable names is still a copy. It is similar to how copying a piece of music and changing the pitch/volume/any other attribute would still be a copy of the original music.

The thing that the LLM need to do is to convince a judge/jury that it has not created a copy, and that it operate differently from a transformation.

Re:GitHub Copilot emits GPL code by nextaccountic on Saturday April 22, 2023 @12:26AM (#35663326)
> So you literally can't make it produce functionally identical but not verbatim identical code. It doesn't understand that the two are equivalent.

But it does - similar but not identical code are closer in the embedding space

Re:GitHub Copilot emits GPL code by NoZebra120vClip on Friday April 21, 2023 @09:56PM (#35662589)
> Copyright should protect expression and not restrict reusing ideas.

That's what patents are for.

Re:GitHub Copilot emits GPL code by layer8 on Friday April 21, 2023 @04:06PM (#35659290)
They’d have to prove to the court that the former is true despite the latter happening, which I imagine would be difficult to do in practice.
Re:GitHub Copilot emits GPL code by concordDance on Friday April 21, 2023 @06:01PM (#35660830)
Using for training doesn't mean its reproduced.

Consider a junior dev who writes a range check function while working for a company (so they own the copyright) then goes to a different company and writes the same range function because that's just how he writes code.

Has copyright been infringed?

Re:GitHub Copilot emits GPL code by cyanydeez on Friday April 21, 2023 @06:36PM (#35661182)
They have clean room implementation for just this problem.

The _only_ escape clause is some random function that says how arbitrary a code block is. Or nontrivial.

A person or AI can absolutely be violating copyright via your example.

Re:GitHub Copilot emits GPL code by Swenrekcah on Friday April 21, 2023 @06:09PM (#35660916)
That programmer definitely reproduced the code, so if copilot does the same that’s definitely reproduction.

Then the legalities can be argued, but an individual is in any case not remotely comparable to a service like copilot.

Re:GitHub Copilot emits GPL code by seadan83 on Friday April 21, 2023 @06:29PM (#35661099)
> Then the legalities can be argued, but an individual is in any case not remotely comparable to a service like copilot.

Why is this? Copilot in some ways is an automated way to search code & stack overflow. There is a very annoying website that does nothing more than show relevant code samples of various google search terms.

If the manual version of something is okay (eg: googling for code, finding it, fitting for a new and specific purpose that is similar), why would an automated version of that be any different?

Re:GitHub Copilot emits GPL code by okamiueru on Friday April 21, 2023 @06:40PM (#35661219)
Because of the license the code is under?
Re:GitHub Copilot emits GPL code by Swenrekcah on Friday April 21, 2023 @06:43PM (#35661239)
For a similar reason that camera surveillance can be forbidden in places where people are still allowed to keep their eyes open.

Or sending millions of messages in an automated way can be illegal but millions of people sending a message is not.

Re:GitHub Copilot emits GPL code by seadan83 on Friday April 21, 2023 @07:20PM (#35661550)
I'm confused by the forbidden surveillance example. Generally surveillance camera's are legal for any place where there is no expectation of privacy. The expectation of privacy is largely only ones home, outside of that you can be video taped all day long by anyone. I'm not sure how this is analgous..

The million messages example is interesting. Though, what examples are there? In what cases is something legal to do it once, but there is some threshold where you cannot do it many times?

The "sending millions of messages" is only perhaps illegal because it breaks terms of service. Or, the one message is perhaps also illegal but nobody cares to pursue litigation for one instance of an infraction. The point remains though, if an individual does something once that is legal - it makes that activity legal, period and full stop. No?

Re:GitHub Copilot emits GPL code by Swenrekcah on Friday April 21, 2023 @07:39PM (#35661687)
I was thinking about things like spam and also social media.

Note that my main objection is to equating a person doing something with an automated process. Sometimes it may be legal or other times illegal but it just clearly isn’t the same.

For the last point, I think the answer to that is a definite no in most jurisdictions. Laws and judicial conventions often allow differing circumstances to affect the legality of things.

Re:GitHub Copilot emits GPL code by seadan83 on Friday April 21, 2023 @11:12PM (#35663024)
> For the last point, I think the answer to that is a definite no in most jurisdictions. Laws and judicial conventions often allow differing circumstances to affect the legality of things.

Curious, any concrete examples? I can't really think of any where one instance is okay but many is not. I can think of examples where one instance is ignored and many instances are harder to ignore (and so is prosecuted), but overall - I can't really think of anything that is okay to do once but not many times.

Re:GitHub Copilot emits GPL code by Swenrekcah on Saturday April 22, 2023 @10:00AM (#35666681)
Don’t forget the automation part, that’s the key issue.

Unsolicited robocalls are illegal in many places where human callers may not be.

Re:GitHub Copilot emits GPL code by belorn on Friday April 21, 2023 @06:43PM (#35661242)
Playing a movie for a few friends who visits is fine, but start to demand tickets and suddenly it will look like a cinema which is not fine.

The reason is always the same. Courts and judges will look at the situation and make a decision about what seems fair and what does not. It is them that need to be convinced that a specific use of a copyrighted work is permitted either through fair use or by a license.

Re:GitHub Copilot emits GPL code by seadan83 on Friday April 21, 2023 @07:14PM (#35661507)
> Playing a movie for a few friends who visits is fine, but start to demand tickets and suddenly it will look like a cinema which is not fine.

Interesting analogy. "Ripping" something off an only using it for your personal project sounds like the "playing a movie for a few friends". Doing so for the benefit of corporation that then has thousands of daily visitors sounds like the "movie cinema" example. Though, in both cases it was an individual googling and finding how to implement a specific function.

"fair use" in copyright is pretty specific in that it refers to things like "you can play portions of a clip in order to comment on it." Or as another example, you can use clips/portions for the purposes of a review commentary.

"Form and function" is perhaps a very important crux here. Some things you can only do a certain way. For example, quick-sort, there are is only really one way to implement quick sort (or otherwise it is not at all quick sort!).

Personally I feel the copyright line is higher than a function, the copyright is on the collection of functions who together create a specific software. The individual functions IMHO are as copyright'able as-is a cog on a bike cassette, or the chain on a motorcycle.

Re:GitHub Copilot emits GPL code by belorn on Saturday April 22, 2023 @06:17AM (#35665009)
I think there are quite few things in programming that can only be implemented one way. I see it as similar to music in that almost every song have notes going up or down the scale. Obviously there can't be that many variations, but then the important distinctions is often in the details. Applying copyright on a single function is like applying copyright on a single riff. Sometimes the legal system will accept it, but it should be the exception rather than the norm.

Fair use seem to had a change in scope. Historically it seems to be mostly about things like "play a clip in order to comment on it.", but now we have things like google making a copy of all books ever written in order for people to search through them. Similar arguments has been made over copying news articles from news sites in order to put a portion of it in search results. A stack overflow-like search engine that trawled proprietary code bases would likely be sued, but in theory they could argue fair use just like google.

Re:GitHub Copilot emits GPL code by sinrtb on Tuesday April 25, 2023 @01:00PM (#35703335)
I am pretty sure both cases would break copyright. But in the first case the copyright holders would never go after you and the second they would. But in both cases they could. The damages that a company could recover from you for watching a movie with a few friends is much lower than the damages they could recover if you made money selling tickets. Not to mention the negative PR a company would get for going after someone buying a DVD and watching it with friends.
Re:GitHub Copilot emits GPL code by jitix on Friday April 21, 2023 @07:43PM (#35661723)
IMO it’s the same thing because I fundamentally see LLMs in the same role as calculators that helps reduce cognitive load by offloading repetitive work.

Practically with an LLM the programmer can focus on the creative part (handler function, react component, etc) while the LLM generates the necessary boilerplate for the ever changing frameworks and infra configurations. The programmer (and QA) would still review and test everything but would save time writing boilerplate and ship features faster.

Re:GitHub Copilot emits GPL code by lallysingh on Friday April 21, 2023 @06:16PM (#35660975)
Yup. They just copied manually.
Re:GitHub Copilot emits GPL code by blibble on Friday April 21, 2023 @06:14PM (#35660958)
> Has copyright been infringed?

yes

now if he had written a specification as to what the function should be, then passed it to someone else that had never seen the function and worked from the spec then he'd be ok

see: IBM BIOS

Re:GitHub Copilot emits GPL code by antonvs on Friday April 21, 2023 @06:21PM (#35661016)
> yes

It's not nearly that simple. No real copyright case is going to hinge on what a single range check function looks like.

This is human law, it's not a programming situation where you can just apply some simple rule and get a deterministic answer. Context plays a huge part, among other things.

Re:GitHub Copilot emits GPL code by blibble on Friday April 21, 2023 @06:35PM (#35661167)
> No real copyright case is going to hinge on what a single range check function looks like.

you realise this exact extremely famous function was the focus of a billion dollar supreme court copyright battle that went on for years?

https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_...

that's the entire reason GP brought it up

Re:GitHub Copilot emits GPL code by antonvs on Saturday April 22, 2023 @03:50PM (#35670309)
I should have said that no successful copyright case is going to hinge on that.

Oracle's position on that was legally incorrect, for the reason I was alluding to: the relevant standard requires that illegal copying involve the core of the creative expression of the original work, which a generic range check function clearly doesn't do.

Re:GitHub Copilot emits GPL code by stagger87 on Friday April 21, 2023 @06:36PM (#35661173)
IANAL, but I do not think this is correct. "Clean room" implementation is a valid strategy to avoid this specific type of copyright concern. I'm aware of it because I've done it and worked with lawyers through the process.
Re:GitHub Copilot emits GPL code by seadan83 on Friday April 21, 2023 @06:27PM (#35661075)
As the copyright holder of "throw new", the Junior dev infringed my copyright! Let alone them infringing copyright of the company they crafted that code for.

On a more serious note, there is a question whether algorithms and code blocks can be copyrighted, or if it is the _software_ that is copyrighted. Let's say I use websockets and you crib my usage of websockets for your own application. My opinion is that unless you rebuild the same thing I did, then "cribbing" is the long held art of "let me google how to do that". The artistic creation is the end software product, not really some measly embedded function that is boiler plate (form and function) for anything to work.

The 'form and function' clause of copyright almost certainly makes a range check function not a copyright infringement.

Re:GitHub Copilot emits GPL code by veec_cas_tant on Friday April 21, 2023 @06:28PM (#35661086)
Easy money idea: when you know an employee will be leaving the company, have them spend their last weeks writing basic, foundational functions in multiple languages!
Re:GitHub Copilot emits GPL code by ml-anon on Monday April 24, 2023 @05:42AM (#35685474)
It literally means reproduced in some capacity. Just because its called "training" it doesn't mean it has any reasonable analogy to how humans learn or how expert humans train in a skill.

GPT-style models literally aim to reproduce the input character by character (token by token).

Re:GitHub Copilot emits GPL code by ljm on Friday April 21, 2023 @05:44PM (#35660631)
I first saw this in action on StackOverflow when, during an interview, a candidate copy-pasted a solution verbatim including the attribution. Didn't even give it a second thought, like they didn't even read the code or what it was doing.

It wasn't the right solution to the problem in question, for what it's worth.

Just manually did what GPT does now.

Re:GitHub Copilot emits GPL code by rvnx on Friday April 21, 2023 @03:25PM (#35658749)
In the big picture, if we enter a world where an AI is instantly capable of doing code better than you do and without efforts, then I'm not sure why code should be copyrightable at all.

Copyright protects original works of authorship including literary, dramatic, musical, and artistic works, such as poetry, novels, movies, songs, computer software, and architecture.

Copyright does not protect facts, ideas, systems, or methods of operation, although it may protect the way these things are expressed.

Here (and in the future even more), AI is totally capable of expressing one idea in any programming language if you ask for it (even if conceptually inspired by copyrighted code).

Which means that a particular expression (a specific implementation) is practically of no value or particular interest at this stage.

You could ask the AI to do a slightly different implementation, it would not be a problem for it and would require no efforts.

There is no point to protect something that can be generated using no effort and has no particular genius in it.

Re:GitHub Copilot emits GPL code by DanHulton on Friday April 21, 2023 @04:25PM (#35659578)
We don't need to enter a world where AI gets any better at all to be able to argue that software shouldn't be copyrightable, smart people have been doing that for ages.

The problem, however, is that we live in this world, where it is copyrightable, and componies relying on Copilot to do large swathes of code generation do potentially have to worry about including copyrighted code in their codebase, and what the legal fallout from that might be.

Re:GitHub Copilot emits GPL code by Longlius on Friday April 21, 2023 @04:48PM (#35659865)
It also creates a world where developers who have created code and specifically protected it with copyleft licenses to ensure that derivative works always remain a public good are having their rights laundered away via LLMs. I fully expect the FOSS community to fold if their rights are not respected and it could lead to a software dark age.
Re:GitHub Copilot emits GPL code by blibble on Friday April 21, 2023 @05:46PM (#35660654)
> I fully expect the FOSS community to fold if their rights are not respected and it could lead to a software dark age.

just happens to be a coincidence this was all initiated by Microsoft?

Re:GitHub Copilot emits GPL code by jimmaswell on Friday April 21, 2023 @07:06PM (#35661447)
How often does GPL succeed in bullying people into sharing code under the same license when they wouldn't have wanted to otherwise? I imagine it mostly results in wasted duplicative effort to keep GPL out of the codebase. I'm glad more permissive licenses appear more popular now, like MIT.
Re:GitHub Copilot emits GPL code by zvolsky on Friday April 21, 2023 @03:06PM (#35658505)
This "think you wrote, but actually you didn't!", sometimes with another "actually you did, but you are looking at the code of someone who wrote it the same" happens often with people who have similar taste for solving problems. Or whose taste is influenced by the same teachers, such as you, jrockway! I've been using your open source as as one of my references for Go style. Thank you for sharing your opinionated-server, jsso2, and other projects, under the Apache 2.0 license!
Re:GitHub Copilot emits GPL code by sp332 on Friday April 21, 2023 @03:28PM (#35658804)
The way copyright works, it's a violation if it was copied, but it's fine if it was generated independently. In this case I would say it's a copy, but I'm sure someone else would argue differently.
Re:GitHub Copilot emits GPL code by makk on Friday April 21, 2023 @03:36PM (#35658896)
IANAL but I work alongside them. Here's an argument I've heard.

You can read the data to train a thing. So long as that thing doesn't literally copy the data into itself then the training hasn't violated copyright.

When that thing later generates an output, the output isn't copyrightable because it's machine generated (this is the current US position) and it isn't a copyright violation because it was generated, not copied.

You can launder copyrighted material through an LLM, basically.

Re:GitHub Copilot emits GPL code by contravariant on Friday April 21, 2023 @03:47PM (#35659018)
> So long as that thing doesn't literally copy the data into itself then the training hasn't violated copyright.

Could luck proving that hasn't happened. If a language model that can reproduce the code verbatim doesn't count then a movie re-encoded into a different format shouldn't count either.

Re:GitHub Copilot emits GPL code by numpad0 on Friday April 21, 2023 @04:04PM (#35659256)
I think it’s unproven either ways. Courts ignore definition wars so long both party ignores it too. If you sued me for stealing some cheese, the justice system won’t care if it actually had been cheese or what actually cheese is so long I stick to such insistence that I didn’t do anything wrong up to your accusation.
Re:GitHub Copilot emits GPL code by prepend on Friday April 21, 2023 @03:56PM (#35659141)
The movie re-encoded into a different format is perfectly fine if the work is sufficiently different.

Taking a file of wolf of Wall Street and encoding it so all the oranges are blue but there’s no other changes is bad as that’s clearly a derived work.

Taking the same file and scrambling it so it doesn’t resemble is perfectly fine.

Watching the movie and then making your own version of the same exact plot points is infringement. But using plot points that are changed is perfectly fine.

There’s existing copyright law that prevents the makers of the movie Deep Impact from suing the makers of Armageddon.

Re:GitHub Copilot emits GPL code by belorn on Friday April 21, 2023 @07:06PM (#35661449)
A 420p copy of the movie is very different from a 4k version. Similarly an encryption copy of the file will intentionally not resemble the original in any way. Both of those distinctions would likely be ignored by a court.

Similar, a movie that copies the plot points will likely be fine, but a song that copies the notes of a song will not be. Very different cover version will sometimes be found as a derived work, even when they are as different as Deep Impact is to Armageddon.

Re:GitHub Copilot emits GPL code by madeofpalk on Friday April 21, 2023 @03:49PM (#35659055)
Which, by the way, this is completely untested in courts.

Courts have decided, after a bunch of case-by-case decisions, that sampling a song consitutes creating a derivitive work, and you must obtain a license from a copyright holder to do so.

It is my opinion that training a model copies and creates derivitive work on what you used to train it, so you must have a license to train LLMs on content. I am not a lawyer, I am no one, my opinion here is worthless.

We already know that you can create a copy of something without doing a bit-for-bit duplicate because a) copyright law existed before we had bits, and b) transcoding a movie still counts as creating a copy. Recording my own VHS of HBO and selling it is still illegal.

Re:GitHub Copilot emits GPL code by kmeisthax on Friday April 21, 2023 @04:36PM (#35659713)
Most generative AI actually does have significant problems with the model copying the data into itself. Not literally - there isn't a bunch of model parameters that line up to the exact PNG bitstream of particular images. But courts wouldn't care as long as the model outputs something that looks "close enough", because the chain of provenance is clearly established from the training set, through gradient descent and the model weights, into the final output.

There's a paper from Google and Princeton about regurgitation happening in Stable Diffusion and Imagen: https://arxiv.org/pdf/2301.13188.pdf

OpenAI also had to spend a bunch of time on deduplicating an insanely large dataset to prevent this from happening in DALL-E: https://openai.com/research/dall-e-2-pre-training-mitigation...

I have no clue how they handled this in GPT-3 or -4. Given the amount of regurgitation found in Copilot I imagine there's lots of significant code fragments floating about nominally different projects that a deduplicator wouldn't match as identical.

Re:GitHub Copilot emits GPL code by shagie on Friday April 21, 2023 @05:06PM (#35660162)
We've been laundering licenses on code on Stack Overflow and the rest of the SE network (whatever to CC (which can then be GPL'ed)) for a decade now.

Consider https://softwareengineering.stackexchange.com/questions/2695...

The source code is GPL'ed, but that page is CC BY-SA 3.0.

It's also fairly easy to assume that a fair bit of material on SO that was copied from employer's codebases into SO (and thus now CC) can be included in GPL code now too.

Re:GitHub Copilot emits GPL code by tick_tock_tick on Friday April 21, 2023 @05:24PM (#35660403)
> You can launder copyrighted material through an LLM, basically.

Good!

Re:GitHub Copilot emits GPL code by jrm4 on Friday April 21, 2023 @03:00PM (#35658401)
They do not. This is pretty easily provable. I was in a CS class that had an automated plagiarism checker over 20 years ago.

(And since Brian Kernighan was teaching it, I'm inclined to believe in it.)

Re:GitHub Copilot emits GPL code by 15155 on Friday April 21, 2023 @03:11PM (#35658575)
The trick with these:

1) They are using your IP with coerced consent in the future to check other people's work as well as your own in the future. (Let's have a fun discussion about "self-plagiarism."

2) ChatGPT and the like are going to so massively increase the noise floor on this problem space that these counterfeit detection companies should all but disappear in a number of years.

Re:GitHub Copilot emits GPL code by rcme on Friday April 21, 2023 @03:01PM (#35658421)
Did it notify you automatically if you had plagiarized something, or did it flag you internally for manual review?
Re:GitHub Copilot emits GPL code by jacquesm on Friday April 21, 2023 @03:00PM (#35658403)
As a datapoint: I once successfully fielded a copyright case on about 15 lines of code.
Re:GitHub Copilot emits GPL code by avbanks on Friday April 21, 2023 @03:02PM (#35658446)
You could probably do that w/ 1 line of code depending on the variable name :)
Re:GitHub Copilot emits GPL code by hgsgm on Friday April 21, 2023 @03:26PM (#35658775)
What does "fielded" mean?
Re:GitHub Copilot emits GPL code by neogodless on Friday April 21, 2023 @03:53PM (#35659097)
I've only heard it used in reference to questions but I think it's being stretched slightly here to just mean "dealt with" or "handled".
Re:GitHub Copilot emits GPL code by pyth0 on Friday April 21, 2023 @04:07PM (#35659303)
Likely a typo. "fielded" -> "filed"
Re:GitHub Copilot emits GPL code by antonvs on Friday April 21, 2023 @06:24PM (#35661041)
"Successfully filed" means nothing though. Anyone can file anything. The question is whether the case was won.
Re:GitHub Copilot emits GPL code by breck on Friday April 21, 2023 @03:02PM (#35658450)
> On a more serious note, I really wonder where the line is drawn for copyright.

As soon as you start thinking about copyright, you end up realizing it's all non-sense. Stephan Kinsella (a patent lawyer!) is the leading thinker on this, and his videos, essays, and podcasts are worth listening to: https://www.youtube.com/watch?v=e0RXfGGMGPE

Re:GitHub Copilot emits GPL code by gjsman-1000 on Friday April 21, 2023 @03:08PM (#35658530)
> I see a lot of people claiming that AI is producing code they've written verbatim, but sometimes I wonder if everyone just writes certain things the same way. For the above rangeCheck function, there isn't much opportunity for the individual programmer to be creative.

This point is absolutely going to come up in any lawsuits; because the law does sometimes examine how much creativity there is available in a field before making a determination (Oracle v Google comes to mind). If you can show that there are very, very few reasonable ways to accomplish a goal, and said goal is otherwise not patented or prohibited, it's either not copyrightable or Fair Use, take your pick.

This even applies under the interoperability section of the DMCA and similar laws for huge projects. Assuming that ReactOS, for example, is actually completely clean-room; that would be protected despite having the same API names and, likely, a lot of similar code implementing most of the most basic APIs.

Re:GitHub Copilot emits GPL code by asddubs on Friday April 21, 2023 @03:24PM (#35658746)
the code is a reference to oracle v google
Re:GitHub Copilot emits GPL code by shagie on Friday April 21, 2023 @05:10PM (#35660219)
Incidentally this code doesn't have any license attached to it. So if an LLM happened to produce this code and Oracle said "where did you get that?! did you illicitly include the Java code base as part of your training data?" the organization that got the data for the LLM training can say "no, we used Hacker News comments and this code happened to have been in there verbatim... sorry."

License successfully laundered!

Re:GitHub Copilot emits GPL code by asddubs on Friday April 21, 2023 @06:09PM (#35660914)
that would work if no license didn't mean all rights reserved by default
Re:GitHub Copilot emits GPL code by shagie on Friday April 21, 2023 @06:36PM (#35661178)
The question isn't what is the license but rather the location that the code was used as part of a data set.

I could just as easily point to https://stackoverflow.com/a/13910492 which is on a page that is CC licensed.

Re:GitHub Copilot emits GPL code by numpad0 on Friday April 21, 2023 @03:44PM (#35658991)
I believe there are couple different aspects to “it’s AI training legal same as human” argument:

1. Copyright is only granted to creative elements; lots of program codes are supposedly un-copyrightable, though no one wants to fight on that ground.

2. It is lawful in many jurisdictions to effectively steal and train AI with even copyrighted materials, for the sake of humanity at large; same supposedly not apply to the output. But AI-supportive clusters tends to conflate between the two.

3. AI training processes, stochastic gradient descent and all, are only called “learning” and/or “training” by convention; there is no public consent that it is same as how the word is supposedly defined, though we generally don’t scare quote airplanes flying.

Re:GitHub Copilot emits GPL code by ml-anon on Monday April 24, 2023 @05:52AM (#35685527)
on 3, the convention could have just as easily gone a different way i.e. it could have converged to model "fitting" using the statistical parlance or the sklearn convention. Further if you take the math seriously most of these models are "just" fitting probability distributions to data.

Also, in part it depends greatly on the objective function used. In GPT style models the objective is to precisely copy from input to output, token by token. I think its extremely bad-faith to argue that this has any relationship to human learning or learning objectives.

you shouldn't take the math seriously and I'm not being dismissive with the word "just" in scare quotes. However the community somehow wants to have its cake an eat it too.

Re:GitHub Copilot emits GPL code by layer8 on Friday April 21, 2023 @04:14PM (#35659415)
Copyright is limited to works that meet a certain threshold of originality [0]. It is assumed that works meeting such a threshold won’t be replicated by mere coincidence.

[0] https://en.wikipedia.org/wiki/Threshold_of_originality

Re:GitHub Copilot emits GPL code by amelius on Friday April 21, 2023 @04:24PM (#35659567)
Or anything from Numerical Recipes in C.
Re:GitHub Copilot emits GPL code by itslennysfault on Friday April 21, 2023 @04:54PM (#35659959)
I wouldn't worry about this code. It wouldn't compile anyways. lol

Syntax Error on line 1. Missing closing ) in the method definition.

Re:GitHub Copilot emits GPL code by tehsauce on Friday April 21, 2023 @05:29PM (#35660471)
In the example from the article, copilot produces identical comments, not just a functionally identical implementation. So in this case your hypothesis is false. But thanks for trying to stand up against the open source community for microsoft. /s
Re:GitHub Copilot emits GPL code by ChatGTP on Friday April 21, 2023 @06:32PM (#35661142)
I don’t understand why people have become so accepting. “Oh they’ve stolen all the public code and not provided attribution then sold it for a profit, can we just give these poor evil companies a break? It’s just progress…”.

This is completely unacceptable and another example that Microsoft is an evil and amoral company who only cares about open source for financial gain.

Re:GitHub Copilot emits GPL code by z3t4 on Friday April 21, 2023 @05:34PM (#35660525)
* * *
Re:GitHub Copilot emits GPL code by m_0x on Friday April 21, 2023 @05:38PM (#35660570)
Why? Why is that function special?
Re:GitHub Copilot emits GPL code by csmattryder on Friday April 21, 2023 @05:50PM (#35660705)
Oracle's lawyers said they owned the rights to it, Google disagreed. Google was right, legally.

https://www.supremecourt.gov/opinions/20pdf/18-956_d18f.pdf

Re:GitHub Copilot emits GPL code by numlock86 on Friday April 21, 2023 @05:49PM (#35660695)
> but sometimes I wonder if everyone just writes certain things the same way

> For the above rangeCheck function, there isn't much opportunity for the individual programmer to be creative.

We are at a point at which compilers detect such functions and replace them with highly optimized ones. If you have to artificially change just for the sake of patent or license trolls you don't just get more work but also worse performance/optimizations in most cases.