News for hackers. Stuff that matters.
Re:Copilot regurgitating Quake code, including sweary comments by advisedwang on Friday July 02, 2021 @11:26AM (#27712737)
The claim for AI systems like this is that it has actually learned something and is generating code from scratch. Oftentimes the authors will claim regurgitation is simply not possible, and this example shows that's a lie.

Many arguments on the benefits, legality and power of AI systems rely on this claim.

To turn around now and say it's OK to regurgitate in the right setting is to move the goalposts.

Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @02:09PM (#27714772)
> Oftentimes the authors will claim regurgitation is simply not possible

Do the Copilot authors claim this?

I get that you're suggesting that Copilot may benefit from absolute claims made by the authors of other, similar systems (or their proponents), but I also don't think it's reasonable to exclude nuance and the specifics of Copilot from ongoing discussions on that basis. The Copilot authors have publicly acknowledged the regurgitation problem, and by their account are working on solutions to it (e.g. attribution at suggestion-generation time) that don't involve sweeping it under the rug.

Re:Copilot regurgitating Quake code, including sweary comments by ohazi on Friday July 02, 2021 @04:07PM (#27716216)
Nat Friedman explicitly stated that it shouldn't regurgitate [0]:

> It shouldn't do that, and we are taking steps to avoid reciting training data in the output

He's being woefully naive. To put it bluntly, we don't know how to build a neural network that isn't capable of spitting out training data. The techniques he pointed to in other threads are academic experiments, and nobody seems to have a credible explanation for why we should believe that they work.

[0] https://news.ycombinator.com/item?id=27677177

Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @04:15PM (#27716316)
"Shouldn't" isn't the same as "doesn't".

I'm not anything close to an ML expert, and I have no opinion on whether what they're aiming for is possible, but this document^[1] (linked in your linked comment) states explicitly that they are aware of the recitation issue and are taking steps to mitigate it. So, in the context of the comment I replied to, I think Github is very far from claiming that recitation is "simply not possible".

^[1] https://docs.github.com/en/github/copilot/research-recitatio...

Re:Copilot regurgitating Quake code, including sweary comments by ohazi on Friday July 02, 2021 @04:31PM (#27716512)
That kind of bullshit phrasing can only get you so far.

It's like if some corporate PR department told you "we're aware of the halting problem, and are taking steps to mitigate it." You would rightly laugh them out of the room.

It's not going to work, and the people making these statements either don't understand how much they don't understand, or are deluding themselves, or are actively lying to us.

An honest answer would be something like "We are aware that this is a problem, and solving it is an active area of research for us, and for the machine learning community at large. While we believe that we will eventually be able to mitigate the problem to an acceptable degree, it is not yet known whether this category of problem can be fully solved."

Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @04:47PM (#27716677)
You're using some pretty strong language here, but do you have any more substantive criticisms of the analysis they present at https://docs.github.com/en/github/copilot/research-recitatio... ? They seem to think the incidence of meaningful (i.e. substantively infringing) recitation is very low, and that their solution in those cases will be attribution rather than elimination.

Again, I'm not an ML expert, but that sounds a lot more reasonable to me than announcing one's intention to solve the halting problem.

Re:Copilot regurgitating Quake code, including sweary comments by ohazi on Friday July 02, 2021 @05:10PM (#27716912)
They had some people use the thing for a while, and concluded "Hey look, it doesn't seem to quote verbatim very often. Yay!" There is nothing in there that describes any sort of mitigation. The three sentences about an attribution search at the very end are aspirational at best, and are presented as "obvious" even though it's not at all clear that such a fuzzy search can be implemented reliably.

I use the halting problem as an analogy because their naive attempts to address this problem feel a lot like naive attempts to get around the halting problem ("just do a quick search for anything that looks like a loop," "just have a big list of valid programs," etc.). I can perform a similar analysis of programs that I run in my terminal and come to a similar "Hey look, most of them halt! Yay!" conclusion. I can spin a story about how most of the ones that don't halt are doing so intentionally because they're daemons.

But this approach is inherently flawed. I can use a fuzz tester to come up with an infinite number of inputs that cause something as simple as 'ls' to run forever.

Similarly, I can come up with an infinite number of adversarial inputs that attempt to make Copilot spit out training data. Some of them will work. Some of them will produce something that's close enough to training data to be a concern, but that their "attribution search" will fail to catch. That's the "open research question" that they need to solve.

We don't have a general solution to this problem yet, and we may never have one. They're trying to pass off a hand-wavey "we can implement some rules and it won't be a problem most of the time" solution as adequate. I don't see any reason to believe that it will be adequate. Every attempt I've seen at using logic to try and coax a machine learning model into not behaving pathologically around edge cases has fallen flat on its face.

Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @05:20PM (#27717036)
> The analysis you're citing is just that -- a statistical analysis. They had some people use the thing for a while, and concluded "Hey look, it doesn't seem to quote verbatim very often. Yay!" There is nothing in there that describes any sort of mitigation.

> The three sentences about an attribution search at the very end are aspirational at best, and are presented as "obvious" even though it's not at all clear that such a fuzzy search can be implemented reliably.

I agree with all of this, though I do think that the attribution strategy they describe sounds a lot easier than solving the halting problem or entirely eliminating recitation in their model. Obviously, the proof will be in the pudding.

Maybe you and others are reacting to them framing this as "research", as if they're trying to prove some fundamental property of their model rather than simply harden it against legally questionable behavior in a more practical sense. I think a statistical analysis is fine for the latter, assuming the sample is large enough.

Re:Copilot regurgitating Quake code, including sweary comments by csande17 on Friday July 02, 2021 @05:02PM (#27716813)
The biggest issue with that analysis is that their model is clearly very able to copy code and change the variable names, copying code and changing variable names is very clearly still "copying", and the analysis doesn't seem to include that in its definition of "recitation event".
Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @05:09PM (#27716901)
I'd fully expect it to copy code and change variable names in a lot of cases--if it wants to achieve the goal of filling in boilerplate, how could it do anything else? That's pretty much the definition of boilerplate: it's largely the same every time you write it.

What's less clear to me is that Copilot regularly does that sort of thing with code distinctive enough that it could reasonably be said to constitute copyright infringement. If somebody's actually shown that it does, I'd love to see that analysis.

Re:Copilot regurgitating Quake code, including sweary comments by rckstr on Friday July 02, 2021 @02:39PM (#27715144)
They did! In the faq which I can't find anymore they said:

>GitHub Copilot is a code synthesizer, not a search engine: the vast majority of the code that it suggests is uniquely generated and has never been seen before. We found that about 0.1% of the time, the suggestion may contain some snippets that are verbatim from the training set.

Re:Copilot regurgitating Quake code, including sweary comments by YeGoblynQueenne on Saturday July 03, 2021 @09:33AM (#27721523)
There's a risk of confirmation bias though, because the search was performed by the developers of the system who are strongly motivated to find no problem with their work.

I have done this to myself many, many times. I look, carefully, at length, for problems with my work until I satisfy myself that there's no obvious problem with it. Then someone else points out the obvious problem I was overlooking. Actually, this has happened often enough and it's painful enough that I learned to really look nowadays.

In the context of the search for "snippets that are verbatim from the training set" there's all sorts of things that can go wrong. The search (a regex search I think?) can be unintentionally made too weak to catch obvious cases. Or too strong, probably. The search for "snippets that are verbatim from the training set" may ignore snippets that are 80% verbatim. Or the code generated during the experiment can be generated in such a way as to only generate verbatim snippets very rarely, contrary to more typical use. And so on and so forth.

There's so many ways to fool oneself when looking for errors in one's own work.

Edit: They explain their search methodology and with only a quick look I gave it, it seems legit, but it was a quick look. The devil is in the details, yes? Maybe people who are really interested in this issue should take a closer look.

Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @02:51PM (#27715297)
This actually seems like an explicit acknowledgement that regurgitation is possible, and not remotely a claim that it is "simply not possible".

It stands to reason that cases where people are intentionally trying to produce regurgitation will strongly overlap with the minority of cases where it actually happens. So I think we are probably suffering from some selection bias in discussions on HN and similar forums--that might be unavoidable, and it certainly stimulates some interesting discussion, but we should try to avoid misrepresenting the product as a whole and/or what its creators have said about it.

Re:Copilot regurgitating Quake code, including sweary comments by sombremesa on Friday July 02, 2021 @03:14PM (#27715597)
I think only Github's lawyers would interpret what GP posted the way you did. Looks like weasel wording to make such an interpretation possible, while making customers believe that code is more or less synthesized in realtime. "Snippets" makes one think one or two lines of code, not entire functions and classes.
Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @03:44PM (#27715938)
I think that until somebody shows that Copilot is willing to copy distinctive code fragments verbatim, unprompted, with a high occurrence rate, I'm not going to start accusing Github of building an engine to cynically exploit the IP rights of open source copyright holders for profit. I've seen no evidence of that, and in absence of evidence I prefer to remain neutral and open-minded.

How would that work, anyway? Rare, distinctive code forms seem much more difficult for an ML thing to suggest with a high-ish confidence level, since there won't be much training data. The Quake thing makes sense because it's one of the most famous sections of code in the world, and probably exists in thousands of places in the public Github corpus.

I'm emphasizing distinctive because a lot of boilerplate takes up a lot of room, but still doesn't make a reasonable argument for copyright infringement when yours looks like somebody else's.

Re:Copilot regurgitating Quake code, including sweary comments by sombremesa on Friday July 02, 2021 @03:55PM (#27716057)
It looks like you're responding to the wrong comment. I don't recall alleging that Github is "building an engine to cynically exploit the IP rights of open source copyright holders for profit".
Re:Copilot regurgitating Quake code, including sweary comments by caconym_ on Friday July 02, 2021 @04:08PM (#27716225)
> I think only Github's lawyers would interpret what GP posted the way you did. Looks like weasel wording to make such an interpretation possible,

So what are you suggesting here, except that Github is attempting a legal sleight-of-hand to hide real infringement?

> while making customers believe that code is more or less synthesized in realtime.

What are you suggesting here except that Github is (essentially) lying to customers, making them believe something that is substantially untrue?

When I say "building an engine to cynically exploit the IP rights of open source copyright holders for profit", I am talking about a scenario in which they are sweeping legitimate IP concerns under the rug with bad faith legal weaselry and misrepresentation of how the product functions, etc., to chase profit. I do not see how that is substantially different from the implications of your comment, especially in the context of this subthread.

Could you enlighten me as to how your intended meaning substantially differs from my interpretation? If you don't mean to accuse Github of malfeasance, we probably don't have much to discuss.