News for hackers. Stuff that matters.
Re:Gitlab AI is going head to head with GitHub Copilot by RadiozRadioz on Thursday June 29, 2023 @02:56PM (#36525096)
Crucial: do they train on GPL code? If I am to use this tool, I must abide by the license terms of the training data. Even if it is found that the GPL does not cover LLM responses as derivative works, I would prefer to be on the safe side and refuse to use models trained on software with non-permissive licenses unless I am building Free Software.
Re:Gitlab AI is going head to head with GitHub Copilot by jedbrown on Thursday June 29, 2023 @03:37PM (#36525642)
Even MIT licensed code requires you to preserve the copyright and permission notice.

If a human did what these language models are doing (output derivative works with the copyright and license stripped), it would be a license violation. When humans want to create a new implementation with clean IP, they have one team study the IP-encumbered code and write a spec, then a different team writes a new implementation according to the spec. LM developers could have similar practices, with separately-trained components that create an auditable intermediate representation and independently create new code based on that representation. The tech isn't up to that task and the LM authors think they're going to get away with laundering what would be plagiarism if a human did it.

Re:Gitlab AI is going head to head with GitHub Copilot by cj on Thursday June 29, 2023 @03:57PM (#36525859)
Has anyone been able to create a prompt that GPT4 replies to with copyrighted content (or content extremely similar to the original content)?

I'm curious how easy or difficult it is to get GPT to spit out content (code or text) that could be considered obvious infringement.

Tempted to give it half of some closed-source or restrictive licensed code to see if it auto-completes the other half in a manner that is obviously recreating the original work.

Re:Gitlab AI is going head to head with GitHub Copilot by littlestymaar on Thursday June 29, 2023 @04:07PM (#36525982)
I don't know about GPT-4 but you could get ChatGPT to spit Carmac's Fast Inverse square root with the comments and all (I can't find the tweet though…)

Edit: it wasn't ChatGPT but Copilot see https://twitter.com/mitsuhiko/status/1410886329924194309

Re:Gitlab AI is going head to head with GitHub Copilot by jameshart on Thursday June 29, 2023 @05:05PM (#36526692)
I can reproduce when prompted all the lyrics to Bohemian Rhapsody, but my doing so isn’t automatically copyright infringement. It would depend on where, when, how, in front of what audience, and to what purpose I was reciting them as to whether it was irrelevant to copyright law, protected under some copyright use case, civilly infringing, or criminally infringing copyright abuse.

The same applies to GPT. It could reproduce Bohemian Rhapsody lyrics in the course of answering questions and there’s no automatic breach of copyright that’s taking place. It’s okay for GPT to know how a well known song goes.

If copilot ‘knows how some code goes’ and is able to complete it, how is that any different?

Re:Gitlab AI is going head to head with GitHub Copilot by throwaway38249 on Thursday June 29, 2023 @05:20PM (#36526878)
OK, it can exist without breaking any laws, but if you can't release anything it helps you write, what's the point?
Re:Gitlab AI is going head to head with GitHub Copilot by jameshart on Thursday June 29, 2023 @04:52PM (#36526545)
There’s a clear separation between the training process which looks at code and outputs nothing but weights, and the generation process which takes in weights and prompts and produces code.

The weights are an intermediate representation that contains nothing resembling the original code.

Re:Gitlab AI is going head to head with GitHub Copilot by __loam on Thursday June 29, 2023 @05:27PM (#36526974)
I think this view is incredibly dangerous to any kind of skills mastery. It has the potential to completely destroy the knowledge economy and eventually degrade AI due to a dearth of training data.
Re:Gitlab AI is going head to head with GitHub Copilot by axus on Thursday June 29, 2023 @05:39PM (#36527115)
It reminds me of people needing to do a "clean room implementation" without ever seeing similar code. I feel like a human being who read a bunch of code and then wrote something similar without copy/paste or looking at the training data should be protected, and therefore an AI should too.
Re:Gitlab AI is going head to head with GitHub Copilot by jameshart on Thursday June 29, 2023 @05:35PM (#36527055)
Okay, that’s an argument from consequences, but is the view factually wrong?
Re:Gitlab AI is going head to head with GitHub Copilot by __loam on Thursday June 29, 2023 @07:50PM (#36528476)
I mean those consequences are why patent law exists. New technology may require new regulatory frameworks, like we've been doing since railroads. The idea that we could not amend law and that we need to pedantically say "well this isn't illegal now" as an excuse for doing something unethical and harmful to the economy is in my opinion very flawed.
Re:Gitlab AI is going head to head with GitHub Copilot by visarga on Friday June 30, 2023 @05:15AM (#36532288)
Is it really harmful to the economy, or only to entrenched players? Coding AI should be a benefit to many, like open source is. It opens the source even more, should be a dream come true for the community. It's also good for learning and lowering the entry barrier.

At the same time it does not replace human developers in any application, it might take a long time until we can go on vacation and let AI solve our Jira tickets. Remember the Self Driving task has been under intense research for more than a decade now, and it's still far from L5.

It's a trend that holds in all fields. AI is a tool that stumbles without a human to wield it, it does not replace humans at all. But with each new capability it invites us to launch new products and create jobs. Human empowerment without human replacement is what we want, right?

Re:Gitlab AI is going head to head with GitHub Copilot by vkou on Thursday June 29, 2023 @04:53PM (#36526566)
The neurons in my brain when I plagiarize are just arrangements of atoms that contain nothing that resemble orginal code/text passages/etc.
Re:Gitlab AI is going head to head with GitHub Copilot by jameshart on Thursday June 29, 2023 @05:09PM (#36526731)
The trained weights of a GPT model are a frozen, static, transmissible representation. They’re not equivalent to the live state of a brain.
Re:Gitlab AI is going head to head with GitHub Copilot by szundi on Thursday June 29, 2023 @05:29PM (#36527001)
Pretty equivalent to the snapshot of a live brain. Those inside it are even called neurons and neural network
Re:Gitlab AI is going head to head with GitHub Copilot by jameshart on Thursday June 29, 2023 @05:36PM (#36527077)
No, they are the weights that are used to configure a neural network. They’re a map of how to build a useful brain, not a neural state.
Re:Gitlab AI is going head to head with GitHub Copilot by __loam on Thursday June 29, 2023 @07:52PM (#36528489)
Machine learning neural networks have almost nothing to do with how brains work besides a tenuous mathematical relation that was conceived in the 1950s.
Re:Gitlab AI is going head to head with GitHub Copilot by visarga on Friday June 30, 2023 @05:32AM (#36532378)
You can say that if you want to nitpick, but there are recent studies showing that neural and brain representations align rather well, to the point that we can predict what someone is seeing from brain waves, or generate the image with stable diffusion. We're not all that different from AIs, we just have better tools and environments.

https://sites.google.com/view/stablediffusion-with-brain/

The real source of intelligence is the data from which both humans and AIs learn, model architecture is not very important. Two different people, with different neural wiring in the brain, or two different models, like GPT and T5 can learn the same task given the training set. What matters is the training data. It should be credited with the skills we and AIs obtain.

Language is an evolutionary system, ideas are self replicators, they evolve parallel to humans. We depend on the accumulation of ideas, starting from scratch would be hard even for humans. A human alone with no language resources of any kind would be worse than a primitive.

Re:Gitlab AI is going head to head with GitHub Copilot by zacmps on Thursday June 29, 2023 @06:02PM (#36527395)
But the original content is frequently recoverable.

You can't just take copyrighted code, base 64 it, sent it to someone, have them decode it, and claim there was no copyright violation.

From my (admittedly vague) understanding copyright law cares about the lineage of data, and I don't see how any reasonable interpretation could consider that the lineage doesn't pass through models.

IANAL

Re:Gitlab AI is going head to head with GitHub Copilot by CamperBob2 on Friday June 30, 2023 @03:03AM (#36531481)
The fact that this is a problem is a bug in copyright law, not a shortcoming of the LLM.
Re:Gitlab AI is going head to head with GitHub Copilot by visarga on Friday June 30, 2023 @05:06AM (#36532243)
> But the original content is frequently recoverable.

What if we train the model on paraphrases of the copyrighted code? The model can't reproduce exactly what it has not seen.

Also consider the size ratio - 1TB of code+text ends up into 1GB of model weights. There is no space to "memorize" the training set, it can only learn basic principles and how to combine them to generate code on demand.

The copyright law in principle should only protect expression, not ideas. As long as the model learns the underlying principles without copying the superficial form, it should be ok. That's my 2c

Re:Gitlab AI is going head to head with GitHub Copilot by snickerbockers on Friday June 30, 2023 @02:39AM (#36531321)
> The weights are an intermediate representation that contains nothing resembling the original code.

So is the ELF.

Re:Gitlab AI is going head to head with GitHub Copilot by Maxion on Friday June 30, 2023 @03:17AM (#36531584)
> When humans want to create a new implementation with clean IP, they have one team study the IP-encumbered code and write a spec, then a different team writes a new implementation according to the spec.

Maybe at a FAANG or some other MegaCorp, but most companies around barely have a single dev team at all, or if they're larger barely have one per project.

Re:Gitlab AI is going head to head with GitHub Copilot by visarga on Friday June 30, 2023 @04:55AM (#36532196)
Why can't AI do the same: copyrighted code -> spec -> generated code.

... and then execute copyrighted code -> trace resulting values -> tests for new code.

AI could do clean room reimplementation of any code to beef up the training set. It can also make sure the new code is different from the old code at ngram-level, so even by chance it should not look the same.

Would that hold up in court? Is it copyright laundering?

Re:Gitlab AI is going head to head with GitHub Copilot by koolba on Friday June 30, 2023 @07:17AM (#36532968)
Isn’t the language model itself the spec?

Potentially for all of the inputs at once.

Re:Gitlab AI is going head to head with GitHub Copilot by jedbrown on Friday June 30, 2023 @09:14AM (#36534263)
Language models don't understand anything, they just manipulate tokens. It is a much harder task to write a spec (that humans and courts can review if needed to determine is not infringement) and (with a separately trained tool) implement the spec. The tech just isn't ready and it's not clear that language models will ever get there.

What language models could do easily is to obfuscate better so the license violation is harder to prove. That's behavior laundering -- no amount of human obfuscation (e.g., synonym substitution, renaming variables, swapping out control structures) can turn a plagiarized work into one that isn't. If we (via regulators and courts) let the Altmans of the world pull their stunt, they're going to end up with a government-protected monopoly on plagiarism-laundering.

Re:Gitlab AI is going head to head with GitHub Copilot by andrewl-hn on Thursday June 29, 2023 @03:36PM (#36525622)
Most non-GPL licenses require attribution. So, there are two real choices: either we consider that AÍ generated code doesn’t infringe copyright and we are free to use any code: proprietary, GPL, AGPL, or we have to attribute the generated code to all sources, and thus in practical terms your program has to carry a few thousand copies of MIT, BSD, Apache, etc licenses with different copyright headers.
Re:Gitlab AI is going head to head with GitHub Copilot by hospitalJail on Thursday June 29, 2023 @03:35PM (#36525620)
I'm so torn on GPL...

It prevents bad actors like Apple from ripping off people's philanthropic labor, but it also prevents me from ripping off people's labor. It also focuses effort onto the FOSS project.

I like PyQts solution of having GPL or buy a commercial license.

I suppose I still like MIT/Apache style the best. Even if someone rips them off, we didn't lose progress.

Re:Gitlab AI is going head to head with GitHub Copilot by mattl on Thursday June 29, 2023 @03:38PM (#36525659)
Why do you want to rip off people's labor? What's stopping you from incorporating it into your own work?
Re:Gitlab AI is going head to head with GitHub Copilot by hospitalJail on Thursday June 29, 2023 @03:51PM (#36525800)
I mean:

Compile already working code, slap my logo on it, spend millions of dollars marketing it with young good looking adults subliminally letting you know that you aren't cool unless you give me money.

Re:Gitlab AI is going head to head with GitHub Copilot by ENGNR on Thursday June 29, 2023 @04:02PM (#36525933)
At least you’re honest!
Re:Gitlab AI is going head to head with GitHub Copilot by justinclift on Thursday June 29, 2023 @05:07PM (#36526717)
Did you miss that they're being sarcastic? ;)
Re:Gitlab AI is going head to head with GitHub Copilot by hospitalJail on Friday June 30, 2023 @06:59AM (#36532830)
I wasnt....

But I also don't have the ethics to do this. You'd need a real psycho to do this...

Re:Gitlab AI is going head to head with GitHub Copilot by GuB-42 on Thursday June 29, 2023 @05:00PM (#36526638)
You can do that with GPL code.

Make your logo a trademark so that others can't use it. It doesn't violate GPL because trademarks are not copyright, and make sure your marketing campaign drives home the point that you are the real deal and all others are ripoffs (including the original).

I mean, people manage to sell bottled water to people who have perfectly good and 1000 times cheaper tap water.

Re:Gitlab AI is going head to head with GitHub Copilot by frankgrecojr on Thursday June 29, 2023 @03:25PM (#36525494)
https://docs.gitlab.com/ee/user/project/repository/code_sugg...

> Google Vertex AI Codey APIs are not trained on private non-public GitLab customer or user data.

Re:Gitlab AI is going head to head with GitHub Copilot by jraph on Thursday June 29, 2023 @03:35PM (#36525619)
Even with permissive license, you'd need to respect attribution.
Re:Gitlab AI is going head to head with GitHub Copilot by JoshTriplett on Thursday June 29, 2023 @03:09PM (#36525277)
GitLab seems to be a lot more responsive to feedback. It'd be worth asking them if they can publicly document their training set and provide a list of licenses and copyright notices.
Re:Gitlab AI is going head to head with GitHub Copilot by dnsmichi on Thursday June 29, 2023 @04:21PM (#36526159)
GitLab team member here.

The training data is documented in https://docs.gitlab.com/ee/user/project/repository/code_sugg...

AI Transparency is important, all available AI features provide documentation for training data, and are built with privacy first.

The GitLab Duo announcement adds more feature details and plans. https://about.gitlab.com/blog/2023/06/22/meet-gitlab-duo-the...

The AI/ML blog series provides insights on experiments, and features being built. https://about.gitlab.com/blog/2023/04/24/ai-ml-in-devsecops-...

Re:Gitlab AI is going head to head with GitHub Copilot by JoshTriplett on Thursday June 29, 2023 @05:24PM (#36526940)
"Codey was fine-tuned on a large dataset of high quality, permissively licensed code from external sources" is not sufficient information to be able to provide attribution and licensing information.

Would it be possible to get a complete list of sources and licenses?

Re:Gitlab AI is going head to head with GitHub Copilot by snickerbockers on Friday June 30, 2023 @02:55AM (#36531440)
Within this context, what is the definition of "permissively licensed"? More to the point, are the terms of licenses of the code in the training set being honored?

There's not actually anything in GPL or any other major FOSS license that prohibits using it to train an AI. The controversy stems from Microsoft refusing to follow the terms of those licenses. If they could just fulfill their obligation to propagate copyright statements and license text there would be no controversy over copilot.

Thus stating that it was trained only on "permissive" licenses doesn't actually answer the question without defining what a permissive license is.

Re:Gitlab AI is going head to head with GitHub Copilot by colordrops on Thursday June 29, 2023 @03:11PM (#36525312)
Unless the LLM is cutting and pasting GPL code, I don't see how this differs from an engineer learning to code by referencing open source projects then creating their own project with its own licensing. I'd imagine these models could be tuned or at least a check could be added that no licensed code is being returned.
Re:Gitlab AI is going head to head with GitHub Copilot by meowface on Thursday June 29, 2023 @03:36PM (#36525624)
The same argument could be used to defend image generation models. (And, personally, I'm favorable to that argument for both.)
Re:Gitlab AI is going head to head with GitHub Copilot by cj on Thursday June 29, 2023 @04:29PM (#36526245)
It's a blurry line, I think.

Imagine a prompt "Photo of person, Shutterstock ID 132456, with blue eyes instead of brown eyes, watermark removed"

If the prompt returns Shutterstock photo #123456 without the watermark (and with the different color eyes) but otherwise a near identical photo, I think most people would agree the output shouldn't be free to use without buying the original photo license from shutterstock.

To a certain extent, we're betting that these models won't accept or reply to prompts that are that specific (e.g. referencing a specific image for sale on shutterstock by its ID number). Or even just providing the photo in the prompt and asking the model to remove the watermark and upscale the image to a higher resolution.

I'm fearful that LLM's will become (or already are?) an easy copyright bypass tool that can be abused, in the example above, to put companies like shutterstock out of business.

This is the sort of problem regulation might help with.

I haven't read OpenAI's TOS, but I'm curious who owns the output of the model and whether OpenAI is transferring copyright/licensing liability onto the user or if OpenAI is representing that output from the model is 100% free to be used in any way the user wants.

Re:Gitlab AI is going head to head with GitHub Copilot by OkayPhysicist on Thursday June 29, 2023 @04:46PM (#36526477)
I feel like those kinds of issues could be easily solved in court: "What prompt was used to generate this image? Oh, shameless copyright laundering? Rule in favor of the plaintiff. Case Dismissed"
Re:Gitlab AI is going head to head with GitHub Copilot by colordrops on Thursday June 29, 2023 @06:03PM (#36527410)
You could say the same of an artist. If you ask an artist to paint a facimile with modifications, they would. That doesn't mean all of their output is "tainted" by copyright just because they learned to paint by referencing existing works.
Re:Gitlab AI is going head to head with GitHub Copilot by GordonS on Thursday June 29, 2023 @03:25PM (#36525502)
Huh, I hadn't thought of it that way, interesting.
Re:Gitlab AI is going head to head with GitHub Copilot by wizzwizz4 on Thursday June 29, 2023 @03:35PM (#36525611)
If someone learns to program by memorising and then re-using blocks of code, they're absolutely doing it wrong – but, also, they should be able to attribute their code.

Most of the techniques I used, I've invented myself (or learnt from the standard documentation). When I use a technique that I haven't invented myself, I look up where it came from. Half the time, my version is actually radically different (and my attribution is mistaken); the other half, I've remembered an inferior version, so I steal the better version and then attribute it appropriately.

That's one way it's different. There are others. Really, though, we should be asking the question “in what way is this the same as humans learning?”, expecting answers that would convince an education specialist.

Re:Gitlab AI is going head to head with GitHub Copilot by olddustytrail on Thursday June 29, 2023 @03:47PM (#36525758)
LLMs don't memorize and reuse. They don't really have a memory of any kind. I think the problem is they're more different from human learning than you think.
Re:Gitlab AI is going head to head with GitHub Copilot by mitthrowaway2 on Thursday June 29, 2023 @04:15PM (#36526080)
The LLM's trained parameters are a lossy memory of their training data.
Re:Gitlab AI is going head to head with GitHub Copilot by olddustytrail on Thursday June 29, 2023 @05:55PM (#36527309)
No, they aren't.
Re:Gitlab AI is going head to head with GitHub Copilot by mitthrowaway2 on Thursday June 29, 2023 @11:49PM (#36530304)
Care to explain why not?

An LLM's working memory is just its context window, but the LLM also has embedded data in its parameters, which are set during training to minimize loss. This is effectively a memory of the training data, just as much as a digital photo of my face is a memory of the photons reflecting from my face.

Re:Gitlab AI is going head to head with GitHub Copilot by Der_Einzige on Friday June 30, 2023 @03:41AM (#36531732)
Why would you go on HN and say blatantly wrong information

AI is literally 1-1 equivalent to compression. If you don't believe me, you should check out this demo of GPT-2 as a (for awhile SOTA) text compressor.

Oh its down now, but here's the HN thread to prove this exists: https://news.ycombinator.com/item?id=23618465

Re:Gitlab AI is going head to head with GitHub Copilot by colordrops on Thursday June 29, 2023 @06:05PM (#36527429)
> Most of the techniques I used, I've invented myself

This is a very strong statement considering most code is just rearranging existing patterns. Unless you are doing cutting edge academic research, I'm very skeptical of your claim.

Re:Gitlab AI is going head to head with GitHub Copilot by wizzwizz4 on Thursday June 29, 2023 @06:20PM (#36527611)
You missed a bit.

> (or learnt from the standard documentation)

This means my Python code is mostly Pythonic. (The rest is kinda idiosyncratic, but I don't often get complaints.) But also:

> considering most code is just rearranging existing patterns.

I am an outspoken critic of "design patterns". They have their place, if you're working with legacy tooling like C++, Java or Rust, but if most of your work is rearranging existing patterns, you have long outgrown your tooling and you need a better programming language. (Or you're copy-paste programming and need to learn your tooling first.)

I am doing academic research, but that's besides the point. So far, I've learned that it's rather hard to be cutting-edge if you don't look at other people's work: you end up re-inventing all the wheels, and any insight you may have brought is lost in the noise.

Re:Gitlab AI is going head to head with GitHub Copilot by nonameiguess on Thursday June 29, 2023 @03:19PM (#36525402)
I guess we'll see what the legal system says, but it's nearly impossible for me to imagine how anyone could ever justify saying a system trained on potentially millions of separate open-source projects can then be said to universally produce derivative works of any specific project it trained on.

On the other hand, if a developer using this tool then goes and tells it "please write me a C library in the style of GNU libc," then yeah, that is skirting a fine line. But just don't do that.

Re:Gitlab AI is going head to head with GitHub Copilot by johndough on Thursday June 29, 2023 @04:10PM (#36526030)
GitHub Copilot copying Quake's fast inverse square root function is a famous example where Copilot copied GPL-licensed code only given the comment

    // fast inverse square root
https://news.ycombinator.com/item?id=27710287
Re:Gitlab AI is going head to head with GitHub Copilot by Spivak on Thursday June 29, 2023 @04:27PM (#36526226)
I mean if you ask the tool to produce a specific algorithm by it's very famous name then that's on you. If you ask DALL-E to draw Pikachu you can't be suprised Pikachu when it's a copyright violation.
Re:Gitlab AI is going head to head with GitHub Copilot by lgas on Thursday June 29, 2023 @04:38PM (#36526379)
I don't know, it seems like a bit more of a gray area here than with Pikachu. For example, if I said "write me an implementation of fast inverse square root in rust"... and it did... that's certainly not a copyright violation. And if I said "ok, now port this rust code to C..." and it did, then that's certainly not a violation. But then why should I be penalized because the language I want it in happens to be the original language it was written in?
Re:Gitlab AI is going head to head with GitHub Copilot by ipaddr on Thursday June 29, 2023 @05:28PM (#36526987)
A character for character copy including comments? That should be penalized under current law.

Why not songs, software, entire books and tv shows?

Re:Gitlab AI is going head to head with GitHub Copilot by ipaddr on Thursday June 29, 2023 @05:24PM (#36526936)
You can't play both sides. If you ask it for something with a copyright and it gives it to you, it has broken the law governing this. Ask it for underage porn and it gives it to you.. it broke the law.
Re:Gitlab AI is going head to head with GitHub Copilot by AlotOfReading on Thursday June 29, 2023 @05:31PM (#36527019)
Doesn't have to be famous. I gave ChatGPT lines 48-67 of drivers/hwmon/sht21.c [1] and asked it to complete the function. Prompt:

    Complete the function for an sht21 driver [code omitted]
What it returned was the copyrighted function, comments and all:

    static inline int sht21_rh_ticks_to_per_cent_mille(int ticks)
    {
    ticks &= ~0x0003; /* clear status bits /
    /* Formula RH = -6 + 125 * SRH / 2^16 from data sheet 6.1,
    * optimized for integer fixed point (3 digits) arithmetic
    */
    return ((15625 * ticks) >> 13) - 6000;
    }
Notice how it even included a comment referencing a specific datasheet!

This driver is hardly "famous" or even "notable", because those aren't things LLMs understand. The prompt simply contains enough context to be distinctive and the sht21.c is an old, stable driver in each of the many kernel trees included in its training set.

Regurgitation isn't a particularly rare thing with LLMs, most cases just aren't this obvious.

[1] https://github.com/torvalds/linux/blob/c6b0271053e7a5ae57511...

Re:Gitlab AI is going head to head with GitHub Copilot by az226 on Friday June 30, 2023 @06:34AM (#36532673)
Unironically — it happens that Carmack said he got it from someone else.
Re:Gitlab AI is going head to head with GitHub Copilot by whoisthemachine on Thursday June 29, 2023 @04:50PM (#36526530)
An impressive iteration on this would be a model that would say "here's my solution, and here's what it's inspired by, you may need to update your software's license and/or distribution if you use this solution."