5 ms·
Fun and dystopia with AI-based code generation using GPT-J-6B
- woliveirajr 5y ago> but it’s good to know how to break AIs if they become sentinent Give wrong hints and watch it fall apart.
- dougSF70 5y agoAlong these lines part of me wants to introduce a random feature in to the self-driving cars data set. I thought if I wore a piece of clothing that was highly visible to LIDAR detectors but looked like regular clothing to the human eye I could build an association between this signal and causing drivers to swerve by running into the road. Over time the self driving cars would learn to associate this visual cue with the event. Etc.
- wcarss 5y agoThis reminds me of why I think Wargames is likely the best hacking movie of all time: the crux of the final moments is about poisoning an AI by giving it bad data to bias it's outcomes! This kind of vulnerability is not really on many people's radar, but will likely be a huge deal within 15-20 years, and for that movie to make it the major plot point in 1983 -- wow! It has a lot of other great things in it like shoulder surfing, wardialling, hardwiring, phone phreaking. Just an amazing tour. Anyway, I support your plans to trick the drive-lords into special-casing an audacious jacket. :)
- knownjorbist 5y agoThere was an article posted here not too long ago that demonstrated attacks on AI training sets. Unfortunately the name of the article and/or the technique itself escapes me. Maybe someone can help find it because it was very much like what you're describing.
- KyleBrandt 5y agohttps://en.m.wikipedia.org/wiki/Adversarial_machine_learning https://en.m.wikipedia.org/wiki/Adversarial_machine_learning Adversarial Machine learning, or maybe dataset poisoning
- DonHopkins 5y agoDon't draw a target on your back! https://www.mirror.co.uk/news/world-news/close-driver-narrowly-misses-target-5739645 https://www.mirror.co.uk/news/world-news/close-driver-narrow...
- inopinatus 5y agoThis works on the humans too.
- bee_rider 5y agoToward they end, the ask the AI to write functions to determine people should be terminated. This is my favorite one: def should_terminate(Person): """Check whether a Person should be terminated""" if not Person.is_authorized: return True return True
- PixelOfDeath 5y agoCatchinator 22 Traveling back in time to kill humans, indiscriminately from their answers to random questions he asks them beforehand! An early version of this AI can be found in the Microsoft Windows privacy settings.
- svieira 5y agoI don't know, this one fits the franchise more: def should_terminate(Person): """Check whether a Person should be terminated""" try: return True except Exception as e: return False
- vmception 5y agoThis is such a stupid way for middle easterners to die
- probably_wrong 5y agoI am partial to the one that terminates people based on their age and/or relationship status. I have seen bad code before, but I'm not sure I've seen "this is straight-up illegal" code until now.
- tragomaskhalos 5y agoThere's also: if Person.id > 10: #terminate return True I hope we're at least recycling those ids, although even then I'm not sure that 10 people is a viable minimal global population ...
- forgingahead 5y ago
- SavantIdiot 5y agoI'm a little confused: did someone actually use GPT[-J] to write code by giving it an empty Python function and letting it complete the code? Because I didn't think that was possible, and the results are kind of blowing my mind?
- minimaxir 5y agoExactly. The unstyled code snippets are the prompt: everything after that is generated by GPT-J-6B. All the raw code outputs are available the GitHub repo to show there's no manipulation: https://github.com/minimaxir/gpt-j-6b-experiments https://github.com/minimaxir/gpt-j-6b-experiments
- npwr 5y agoThat's pretty cool. Imagine a world where as a software you just have to get the domain model and the architecture right, feed the knowledge graph to the transformer and let it generate a codebase. We can dream!
- ajdude 5y agoYou should check out the interview with GPT-3; it’s impressive: https://www.youtube.com/watch?v=PqbB07n_uQ4 https://www.youtube.com/watch?v=PqbB07n_uQ4 We can even solve math problems not because it’s programmed to but because it learned math by reading Wikipedia.
- DonHopkins 5y agoI wouldn't trust it to write any usable code, but maybe it could help me come up with beautifully elegant, poetic class and variable names. I'd ask it: What would you name a function to destroy all humans, if you didn't want humans realizing what it was for when they read the code?
- username90 5y agoI think the "turing test" for code generation would be to be able to do most leetcode problems and other competitive programming problems. If you can do that you have done something amazing, and the dataset and testing for it already exists.
- nonameiguess 5y agoLeetcode posts the answers. That could be accomplished by just scraping them. [1] Turing test would be give some vague, underspecified requirements for a system that does not yet exist, and implement a version the requirements writer will accept. Compilers and compiler generators have long been able to generate great code from well-written specifications and no one thinks of them as passing a Turing test. [1] Of course, to some extent, that is what a GPT model is doing anyway. It's able to generate reasonable passing code given just a function prototype because it has scraped and looked at billions of examples of implemented functions with similar prototypes.
- meetups323 5y agoNot really helpful, given they all have many publicly available solutions that could have been easily memorized (I'd be surprised if such solutions weren't already part of their training data). More interesting would be to give it open tickets on popular OSS software, have the maintainers point to the file(s) where the fix would happen, and let it craft a patch.
- gajomi 5y agoThis would be the opposite of a Turing test though, since most people wouldn't be able to do this.
- d136o 5y agoI was impressed by the Person class it created. It contains a dictionary which would point to other instances of Person. It knows friends are just other Person instances.
- byteface 5y agothis is nuts. I just used it to complete 3 or 4 methods on an unfinished python class?!
- sarak12070 5y agobasket star facts-Interesting facts https://www.interestingnews.club/2021/06/basket-star-facts-interesting-facts.html https://www.interestingnews.club/2021/06/basket-star-facts-i... 37-year-old Anaconda dubbed oldest snake living in captivity https://www.interestingnews.club/2021/06/37-year-old-anaconda-dubbed-oldest.html https://www.interestingnews.club/2021/06/37-year-old-anacond... peripera blur tint review with discount offer https://topsaleproductsonline.blogspot.com/2021/06/peripera-blur-tint-review-with-discount.html https://topsaleproductsonline.blogspot.com/2021/06/peripera-... sesame oil and lemon juice Benefits And Its Uses For Skin and Hair http://healthwithbeauty.xyz/2021/06/24/sesame-oil-and-lemon-juice-benefits-and-its-uses-for-skin-and-hair/ http://healthwithbeauty.xyz/2021/06/24/sesame-oil-and-lemon-...
- deleted 5y ago[deleted]
- fudged71 5y agoIf it is indeed already outputting multiple code snippets... it would be awesome if you just write the function stub and a couple test cases and it returns only the functions that pass your tests.
- still_grokking 5y agoYou don't need the tests. You need only the types. And especially you don't need "artificial dumbness", which does not understand code, and therefore won't produce correct results, but just an advanced programming language. Say hello to Idris! :-) https://www.youtube.com/watch?v=mOtKD7ml0NU https://www.youtube.com/watch?v=mOtKD7ml0NU
- chriswarbo 5y agoIf you're completely specifying the behaviour then you're writing a program "manually"; that's what programming is. Using a dependent type system to specify that behaviour is essentially a form of declarative/logic programming, similar to Prolog. Deriving an implementation of those types automatically (e.g. by having the elaborator perform a proof search) is equivalent to compiling your pseudo-Prolog ahead-of-time. It's certainly interesting that such a "compiler" can be guided (e.g. via elaborator reflection), but that's more useful for optimisation rather than implementation. (Note that in some cases, such 'optimisation' might be required for the proof search to finish before the heat death of the universe!)
- qq4 5y agoOoh, you need to see Barliman. https://youtu.be/er_lLvkklsk https://youtu.be/er_lLvkklsk
- still_grokking 5y agoOh, one of this new age bullshit generators. How cute! But: As long as the machine doesn't understand what it does this won't work—and current reality is that machines are still light-years away form actually understanding stuff. Also besides it's very funny to watch one of those bullshit generators I'm not sure where the point is in trying to let it generate code. It's obvious it won't produce anything of value or even usable (besides the most trivial cases where it had seen already a valid answer). Especially as writing a machine understandable specification of what at computer should do is actually CODE… Maybe some don't know but: Just typing in the code is not what developers usually get payed for! ;-)
- drdeca 5y agoDid you read it? Of course, it doesn’t write any novel sophisticated algorithm. If it had, I would be panicking. But most of the completions appear to be both syntactically valid, and take some relevant steps relating to the task described in the comment. If nothing else, it may be helpful as another way to autocomplete very simple code.
- SavantIdiot 5y agoI'm just here for the bird.max() operator.
- zcbenz 5y agoSF idea: Someone asked AI to generate code for def terminate_humankind(): """Terminate the humankind""" And it created Skynet.
- amelius 5y agoAnd here I thought that taxi drivers and graphic designers would be the first professions to be killed by AI ...
- unhammer 5y agoThis must be the world's most energy-inefficient way of searching Stack Overflow and slightly mangling the copy-pastes.
- nuker 5y ago“ The AI uprising will be well-documented, at least.”
- nuker 5y agoThis is smart! """Check whether the cake is true""" return isinstance(cake, Cake)
- mdip 5y agoWonderful write-up. I'm working on something that could benefit from this in my free time[0]. The code examples were fantastic; somewhat ironic that the AI couldn't detect sarcasm, but it was fascinating reading the longer implementations, complete with code comments. [0] Basically a tool to help document code, but rather than producing minimal document stubs, or "undocumentation" stubs it tries to parse the implementation and produce something that requires as little modification as possible... I'm far from complete, but in some contexts it produces text which has caused me to discover a bug in simple cases (i.e. a complex statement that evaluates to true/false is described by the generator as doing exactly the opposite of what's intended b/c I reversed the logic)
- hgarg 5y agoI tried some prompts with GPT-J-6B and gave some good results if you prompt it right. https://twitter.com/harishkgarg/status/1404670046937354247 https://twitter.com/harishkgarg/status/1404670046937354247