5 ms·
This is very fishy. You can get code like this by substituting words in identifier names for other words, but how can an algorithm trained on English dataset "l
by gambler 8y ago
This is very fishy. You can get code like this by substituting words in identifier names for other words, but how can an algorithm trained on English dataset "learn" that keywords like 'function' and 'class' are exempt from substitution? I know most people here have unwavering faith in the magic of deep neural networks, but you'd need _a lot_ of examples to deduce this with any certainty, regardless of how you do it.
- hnarn 8y ago> you'd need _a lot_ of examples to deduce this with any certainty Are you saying that "a lot" isn't almost semi-trivial to obtain, seeing how much code is available online?
- gambler 8y agoWhy would a model trained on English texts see "a lot" of PHP code? What was the prompt used for generating this code?
- IanCal 8y agoIt was trained on contents of links found on Reddit, wasn't it? Links to sample code or stack overflow posts could be pretty prevalent.
- gambler 8y agoSo you're buying the idea that it looked at a bunch of code snippets embedded at various pages, managed to build a sub-model for PHP (separate from all other languages it should have encountered) and managed to generate a long, nearly syntactically correct program uninterrupted by English text? And while it makes tons of obvious mistakes in English (which is a much more flexible and forgiving language), its PHP is somehow nearly syntactically perfect? - Examples from GPT-2 GitHub have a lot of code: https://raw.githubusercontent.com/openai/gpt-2/master/gpt-2-samples/conditional-topk40.txt https://raw.githubusercontent.com/openai/gpt-2/master/gpt-2-... To me, this doesn't seem like an argument in favor of this model "understanding" English (or C, or PHP). It seems more like an indication that it memorizes way more information than the paper implies and then does clever word substitution.
- moyix 8y agoYes, I do think that it learned a model of PHP and JavaScript syntax. 40GB of text data is a lot, and PHP syntax is a lot simpler than English grammar, which it learns quite well. See also the example in the paper of accidentally learning to translate into French even though they tried to remove French pages from the corpus.
- xkapastel 8y agoWhat is fishy? This isn't even state of the art for program synthesis. Here's another simple example trained on the Linux kernel: http://karpathy.github.io/2015/05/21/rnn-effectiveness/ http://karpathy.github.io/2015/05/21/rnn-effectiveness/ I'm not sure what point you're trying to make. Do you think a neural net is not capable of generating the code in the gist? Because it's pretty easy to do that. The harder part that we're still trying to figure out is getting that code to do something meaningful.
- gambler 8y agoBecause there is a huge difference between generating C code by training on C code and generating PHP code by training on random internet articles.
- root_axis 8y agoDid you read the GPT-2 paper? Frankly the english examples therein are much more impressive than this, and this certainly seems within the realm of possibility for GPT-2 based on some of the other emergent behavior of the model (e.g. inadvertent french translation skills)