Live data from Hacker News

Is GitHub Copilot a blessing, or a curse?

fast.ai

151–160 of 201 posts

Re: Is GitHub Copilot a blessing, or a curse?

#151
post #83

Earlier quoted context omitted.

I as an open source author absolutely do not want Microsoft to get richer from using my code, code that I contributed or published for the benefits of other developers. They took my work, removed my name and trained an advanced pattern matching technique to try to make code like mine and then sell it. It’s so obviously ethically questionable it’s insane. Developers are absolutely pissed about this, and rightfully so.

Did you license your code under terms that allowed them to do so?

Most licenses would require attribution and some notion of the license(s) of the code behind the suggestion.

Re: Is GitHub Copilot a blessing, or a curse?

#152
post #83

Earlier quoted context omitted.

Copilot generally (excepting rare cases where it produces snippets verbatim) does not steal code. The GPL restricts distribution, not usage. And (to my knowledge) no open-source license restricts learning from code. I cannot see anyone who doesn't want others to learn from their code ever release code as open-source.

I as an open source author absolutely do not want Microsoft to get richer from using my code, code that I contributed or published for the benefits of other developers. They took my work, removed my name and trained an advanced pattern matching technique to try to make code like mine and then sell it. It’s so obviously ethically questionable it’s insane. Developers are absolutely pissed about this, and rightfully so.

I wonder if they could generate the correct license to code copilot produces, and maybe even infer the preferred one from repo and generate code that is restricted to that?

Re: Is GitHub Copilot a blessing, or a curse?

#153

Earlier quoted context omitted.

People routinely share code on Github that is not owned or at least not fully owned by them, so they can't really rely only on the ToS.

See one paragraph above what I initially linked. They cover that also.

IANAL, but that is not my reading. They cover "Your Content" with the license grant, but not "any Content". The user still has the right to post "any Content" if they have the appropriate license to do so, but obviously they can't grant additional licenses to content the user doesn't own.

In my understanding your reading is that users uploading code that they don't own the copyright to, but otherwise have the right to copy through a license, are in violation with the ToS in general.

My reading is that the license grant only applies to "Your Content" as defined in the ToS, and otherwise users are free to upload code with permissive license and it _does not grant_ additional licenses to Github.

Re: Is GitHub Copilot a blessing, or a curse?

#154
post #98
post #70

Earlier quoted context omitted.

So this product that would not be possible without public, open-source code will itself be non-public, closed-source, closed-data. It is extracting value from the commons and funneling it to a private company. This is just business as usual for tech companies though. How many Silicon Valley businesses built their products on top of open source projects without contributing much back? Heck.. how many YC companies do t…

> We can't reasonably claim there's anything wrong with a company building a product on the back of open source work when literally all of us do that as well. We cannot (are not allowed to, by law, contracts etc.) open source everything we write. I think the most important contribution is not funding but to contribute in some way or another for most. Having said that, it is disheartening that important projects lack…

GitHub isn't good for Open Source in my opinion. Debian is right to use their own GitLab instance. Lots of things seem good in the short term and are bad in the long term.

Edit: I don't really know what things would be like without GitHub. Same with YouTube and Facebook. I don't assume any of these have a net positive impact, though.

Re: Is GitHub Copilot a blessing, or a curse?

#155
post #147
post #127

Earlier quoted context omitted.

GPL asks to release back changes to code made by a company, for which the company paid already, i.e. it's almost zero price for the company, and just look how much companies are afraid to donate zero ($0) worth of code back to the opensource project and prefer to pirate it instead, including such mega-rich companies as M$.

> GPL asks to release back changes to code made by a company Only if the code is distributed. SaaS can be (and is) used to get around this.

Hence the AGPL.

Re: Is GitHub Copilot a blessing, or a curse?

#156
I signed up for Copilot’s waiting list yesterday and I am looking forward to trying it, with some skepticism.

That said, I find OpenAI’s beta APIs based on GPT-3 to be very useful (so useful that I immediately released new versions of my Common Lisp and Clojure books with examples). These APIs are so inexpensive to use and useful, that they really should be part of many developers’ standard stack: different than Copilot that seems like a gimmick (but to be fair, I haven’t tried it yet).

Re: Is GitHub Copilot a blessing, or a curse?

#157
post #148

Earlier quoted context omitted.

You might want to take a look in https://www.tabnine.com/

I've been using TabNine for a while and found it very helpful. It really does seem like more of a hyper-intelligent autocomplete than CoPilot which feels like it wants to write it for you.

The thing I love the most about tabnine is how it learns on your own code base. So if you have particular naming schemes or weird idioms, it eventually picks up on them.

Re: Is GitHub Copilot a blessing, or a curse?

#158
[Warning: long comment ahead]

I haven't used Copilot yet (I'm not coding in any of the languages it covers) but I've tried to understand it from the few articles (most critical) posted about it on the internet and from my understanding of program synthesis and languae modelling. I don't fully trust lay users to be able to exercise a machine learning model comprehensively enough to precisely understand its pros and cons, but I think I've formed some intuition about how Copilot works from the demonstrations I've seen. Here's my thoughts:

a) As TFA points out, Copilot was trained on _all_ code on github (for select languages). "All" includes good code and bad code, code with bugs and code with, er, fewer bugs, code that does what it should and code that doesn't. The result is that Copilot models _all_ that code, regardless of whether it's got bugs or not.

b) Copilot is (based on) a language model that predicts the next sequence of tokens, not a discriminator of good/bad code. That means it can generate code but it can't generate "correct" code. It doesn't have a concept of correct/incorrect code.

b.1) More generally, it's impossible to discriminate between "correct" and "incorrect" code from features (tokens, in the case of language models) alone. The correctness of code depends on the programer's intent. In program synthesis, the programmer's intent is encoded as a specification and the correctness of a synthesised program must be considered in the context of that specification. A language model could be trained to include a specification as a feature, or as an additional modality (similar to training on images and text together to generate captions for images, or images from captions). However, this is not how Copilot was trained. The upshot of all this is that Copilot can't generate "correct programs" because it doesn't know what "correct programs" are.

b.2) But wait! Copilot can generate code from a specification! From a natural language specification, in the form of inline comments given as part of a prompt. This seems to be a favourite mode of testing Copilot and its results are impressive, but there are two problems: i) natural language specifications are imprecise and get more so the longer they grow; and, ii) Copilot still has no way to determine whether the code it generates satisfies a natural language specification, or not.

b.3) For program synthesis with guarantees of correctness, a specification is not enough: a verification procedure is also necessary -and those tend to be very tricky because Halting Problem.

c) Copilot has memorised at least part of its training set. This is evident in the demonstrations of verbatim generation of known code, e.g. the Inverse Square Root function (from Quake... III Arena I think?) etc.

c.1) This observation is helpful in understanding language models in general. The assumption is often stated that a model can't possibly be memorising its training set because models are smaller on disk than their training sets. And yet it seems that large language models are memorising parts of their training sets- most likely, the ones that are more common, and therefore most likely.

c.2) This in turn means that the programs that Copilot is most likely to generate are variations of programs included in its training set and that have been memorised. Why is this most likely? Because those programs are themselves "most likely" - they are programs with the highest prior probability in the space of programs represented by Copilot's model.

c.3.1) That said, Copilot doesn't always generate memorised programs verbatim. It clearly has the ability to "mix and match" and generate programs that are not included in its training set. How does Copilot (or language models in general) achieve that? A language model is essentially a representation of a dense region of Cartesian space bounded by the elements (tokens, expressions, whole programs) of the training set. Anything within that dense geometric region, a language model can recognise and generate. Anything outside it, is down to luck.

c.3.2) To generate programs not included in its training set, Copilot interpolates between the programs in its training set and other programs in its model ("interpolates" as in "finds a point on a gradient between two programs' representations"). However, this interpolation is stochastic. Fudging very, very much, we can imagine Copilot traversing the AST of a memorised program and applying slight peturbations to that AST, at random, though according to its learned prior probabilities. This is why Copilot will generate different code each time it's run even with the same prompt, and the generated code is closer or farther away from memorised code according to its "temperature" parameter (that controls the randomness of "perturbations").

c.4) Suppose you take some program P and walk down its AST, perturbing the nodes at random, without having any way to know whether a perturbation results in correct code, incorrect code, or pure garbage. What is the expected result? The expected result is correct code, incorrect code, or garbage. Remember: Copilot can't tell which is which. So we don't know which we'll get.

d) All that said, I think that i) Copilot can make a great boilerplate generator but ii) only if people learn to use it right. So far I think most demonstrations I've seen are "holding it wrong".

d.1) As to ii) above, I think the best use-case of Copilot is to generate short code snippets, spanning at most a couple of lines, rather than entire functions. I think it's also going to work a lot better if it's allowed to complete code rather than comments (with code). See point b.2 above. The demonstrations I've seen so far seem to try to get Copilot to act as an Autopilot (sorry, couldn't resist). In that, it fails in the ways it should be expected to fail . I suspect that as users get more familiar with Copilot's abilities the best way to use it will become evident and Copilot will take its rightful place as a useful tool in the programmer's toolbox that can simplify, but not replace, day-to-day programming work.

e) Rumours of the imminent demise of the programming profession have, of course, been greately exaggerated. Wait another couple of generations, maybe. Human generations.

f) If you're interested in program synthesis and the progress that has been achieved so far in this old, but still active field of research, the following is a good recent survey of the field:

https://www.microsoft.com/en-us/research/wp-content/uploads/...

Re: Is GitHub Copilot a blessing, or a curse?

#159
post #99
post #95

Earlier quoted context omitted.

There's a difference between building a product using open source and not contributing back, and copying licensed code into your own codebase. One is rude and the other is straight up illegal.

The code doesn't exist in Copilot. The instructions for how to recreate the code does. On a very pedantic level those are not the same, but it probably is enough to argue that the product is 100% legal. It is still quite rude to do that though.

There's an argument that the model is a derivative work. In that case the original copyright still applies.

Re: Is GitHub Copilot a blessing, or a curse?

#160
post #74

Earlier quoted context omitted.

It's called "Copilot" and the tagline is "Your AI pair programmer." It's obviously being marketed as more than code suggestion software. It's being marketed as an AI pair programmer. I agree that it is basically just code suggestion software, or like a big autocomplete. But it's definitely being marketed as more.

This sounds almost like Tesla's Autopilot, both in naming and in actual performance.

Full Self Coding Beta
Post reply on HN