3 ms·
Yeah I have seen a lot of people bring up the question of essentially how training an AI to regurgitate code snippets is different from a human reading through
by mplanchard 5y ago
Yeah I have seen a lot of people bring up the question of essentially how training an AI to regurgitate code snippets is different from a human reading through and learning how to write similar code.
To me they seem obviously and intrinsically different, and I think your post gets at some of the reasons. For one, an AI can ingest a much larger quantity of data much faster than a human. No human could possibly read all of the public code on GitHub in one lifetime. But more importantly, the method of ingestion and synthesis, as well as the nature of the application of what’s learned, is vastly different. Generally a human reading through OSS code to learn isn’t going to then permanently store verbatim segments of it in their memory to regurgitate later. They may copy a bit of code while learning, but that then morphs into an independent understanding of the type of problem being solved and one way to approach that problem. Copilot OTOH has no capacity to understand different approaches to solving a problem, to compare one against the other, and so on. All it knows is which is used more frequently, with no capacity to map that against metrics of long term maintenance, CI suite success, readability, and so on.
As for the poison pill problem, I think it actually illustrates the difference quite well. A simple comment explaining that the code is a booby trap would be enough for any human reading the code to know how to avoid it. The AI on the other hand has no capacity to understand that comment and to know not to put the code into its dataset.
- rented_mule 5y ago> A simple comment explaining that the code is a booby trap would be enough for any human reading the code to know how to avoid it. The AI on the other hand has no capacity to understand that comment and to know not to put the code into its dataset. Copilot users can be leveraged to train the algorithm to emit less such comments/traps. Copilot inserts snippets by having an extension running in the editor, watching what is typed and responding. That's an opportunity to gather more training labels. For example, which lines of Copilot emitted code are frequently deleted soon after being inserted? Gather enough such training labels and the algorithm can start to recognize many of those comments (and/or the traps the comments call out) and stop emitting those specific lines. At that point, warning comments help the algorithm better distinguish desirable lines of code from traps. And you'll be less likely to have traps leak into your code by using Copilot rather than copy/pasting snippets from the web (both are subject to human review, but Copilot will already have filtered some traps). So it's possible that widespread deployment of traps would drive adoption of Copilot by people who frequently copy/paste code from the web.