14 ms·
GPT-4 “discovered” the same sorting algorithm as AlphaDev by removing “mov S P”
- imranq 3y agoThis is an impressive demonstration of GPT-4's logic and reasoning capabilities, but the DM result uses a real-world reward signal (e.g. the list is sorted correctly) to validate its results whereas we can never be sure that GPT-4 outputs are hallucinated or not. Also this experiment would never be done if not for the DM paper in the first place.
- kolinko 3y agoIn this case you can use exactly the same method as in the paper to verify. Hallucinations are easy to verify in many cases.
- BulgarianIdiot 3y agoI don't like the implications of the quoted "discovered".
- SakeOfBrevity 3y agoAre algorithms discovered or invented?
- BulgarianIdiot 3y agoDiscovery and invention are two words that point to the same process.
- mirekrusin 3y agoGood ones discovered, shitty ones invented.
- smegsicle 3y agoexisting ones "discovered"
- inopinatus 3y agoInformally, per Gödel’s method: algorithms are discovered, axioms are invented. This may however be distinction without a difference, since it corrodes the intellectual form of neither, and the processes are indistinguishable.
- wavesonthing 3y agoThings exist or are created. We discover an existing thing or its application. Discovery is principally a learning process (that may entail creative effort). Invention is principally a creative process (that may entail learning effort).
- inopinatus 3y agoThe first statement is either wholehearted agreement with my remark or a rejection of Gödel numbering. The second statement is similar but highlights the problematic distinction of the terms, since in such a framing they ascribe meaning solely and specifically to human intellectual processes, so one must also show either that we are alone in the universe, or (perhaps equally) that all cognitive entities share the same processes. This is of course merely dancing around questions of the universality of truth. Alas, only Wittgenstein knew the answer.
- wavesonthing 3y agoI didn't attempt to delve into that, so ... With Gödel, there is the space of the possible, the invention indeed being the axiomatic foundation that engenders the space of possibilities. If the space of possibilities is disconnected, intuitive jumps are required to arrived at unreacheable truths. So yes, here we are 'discovering' -- learning the membership set of true statements -- but these are existing things only in the context of the invention, which is why it is correct to say they are discovered in a relative sense.
- mejutoco 3y ago> We discover an existing thing. This is hiding the assumption in plain sight in a different form. The question then would be: was x an existing thing that we "uncovered"/discovered (it has merely hidden) or we created it by thinking it into existence? At least in terms of Mathematics, I do not think there is an objective answer for this question. The definitions you provided are, IMO, just moving the problem to further concepts, that are also ill-defined. "Discovery mainly a learning process, Invention mainly a creative process", could mean almost anything. Also, as a rigorous definition, "mainly" does not cut it. It needs to be 100%. Instead of pretending I know it is my opinion to accept they are merely two ways of looking at the same thing. At least, this is my position for now, until a proper argument emerges. P.S. I see it as arguing which of 0.5 or 1/2 is the "true" number.
- danpalmer 3y agoThe paper shows several distinct improvements to a sorting algorithm, and presents evidence that the process is generally applicable. This tweet points GPT-4 at 20 instructions and asks if any can be removed, and it finds one optimisation. That's good to see from GPT-4, but the comparison seems disingenuous, and I'd expect more from someone in academia.
- deelowe 3y agoAgreed. They pointed GPT-4 at the solution and GPT-4 found it. Still somewhat impressive, but not exactly the same.
- hackerlight 3y ago> but the comparison seems disingenuous, and I'd expect more from someone in academia. And delivered with sarcasm and condescension. Not good to see, but par for the course on social media.
- wilg 3y agoI think this is a fair critique! The original tweeter was being condescending, probably to Increase Engagement. This is something social platforms should systemically discourage!
- lupire 3y agoWhy does Twitter not show any rebuttals? Just Elon saying "Interesting".
- mrguyorama 3y agoYou have answered your own question.
- vidarh 3y agoI just tried feeding GPT-4 some assembler as well, and while I did get it to make some optimisations, I also had to point out several mistakes it made (e.g. it moved one instruction to the other side of a label that'd cause a register to have the wrong value if a preceding branch was taken). It made mistakes that I've seen people new to assembler make, but happened to get some things right. When I pointed out an obvious optimisation it had missed, it applied it "half right" (I suggested it might look at collapsing multiple stack allocations because they didn't overlap, but while it collapsed them into a single allocation, it applied the sum of the allocations instead of just the largest one, which was a pointless increase in stack use). Also the kind of misunderstanding I could see with a junior dev with little assembly experience fall for if they recognise what you point to but don't quite understand the implications. It's "close enough" to be worth trying to see if it hits on something useful, but also bad enough that you really need to carefully scrutinise what it comes up with, and probably need to write a much more comprehensive prompt about strategies it should and shouldn't try to apply to make it more generally usable.
- beisner 3y agoIs it possible that GPT-4 already had this new optimization somewhere in its training set? The optimizing patch DeepMind published on has been floating around for several months at this point… Edit: I found the merges for sorting (Jan 2022) [1] and hashing (Jan 2023) [2]. Both of these are very plausibly in the training set for GPT-4, which was frozen sometime in March 2023. [1] https://reviews.llvm.org/D118029 https://reviews.llvm.org/D118029 [2] https://github.com/abseil/abseil-cpp/commit/74eee2aff683cc7dcd2dbaa69b2c654596d8024e https://github.com/abseil/abseil-cpp/commit/74eee2aff683cc7d...
- deleted 3y ago[deleted]
- drew-y 3y agoProbably not. According to OpenAI, most of its data comes from before 2021: > GPT-4 generally lacks knowledge of events that have occurred after the vast majority of its data cuts off (September 2021) https://openai.com/research/gpt-4 https://openai.com/research/gpt-4
- tejohnso 3y ago> Is it possible that GPT-4 already had this new optimization somewhere in its training set? Isn't it necessary for GPT-4 to have had the optimization somewhere in its training set given how it works?
- wilg 3y agoNo, it's not necessary for it to have had the optimization somewhere in its training set given how it works. LLMs can solve problems they were not trained on, with varying degrees of success.
- cypherpunks01 3y agoWow no reinforcement learning needed! Amazing to think, all they would've had to do instead is spend a decade or two building towards a 1 trillion parameter transformer model and spend 100m or two training it. Then fine-tune the model using.. y'know nevermind : )
- IshKebab 3y agoVery impressive, though you are using a lot of prior knowledge to guide it towards the solution you already know. The RL version presumably wasn't given the hint that it could remove an instruction. Still very impressive, but I'd like to see it work on some other assembly for which the "answer" isn't already known.
- bitshiftfaced 3y agoSince they brute forced all solution programs for this case anyway, Deepmind already admitted that they didn't even need to use AlphaDev in this particular case. GPT-4 being able to work it out is great, but it says nothing about the value of what the AlphaZero/Dev algorithm and the kinds of interesting problems you can solve with it.
- awegio 3y agoDeepMind's blog post on AlphaDev says: > AlphaDev uncovered faster algorithms by starting from scratch rather than refining existing algorithms Finding that specific optimization, especially when given the comments, seems almost trivial by comparison. Edit: I tried to understand the optimization in question. This is not the full sort3 algorithm, but only under the assumption that B < C. In that case the GPT-4 answer is actually wrong because it wasn't given that assumption.
- yieldcrv 3y agoI've gotten extremely odd algorithms and solutions that saved me lots of resources. Lots of bitshifting and unsigned ints and approximations these days. Stuff I would have never thought of, and then I can talk it through how something else only I thought of would be even more applicable, and it refines it for that too! Great pair programmer! This level of competence will never show up in a live no-resource interview or any (watched) time trial I do.
- jiggawatts 3y agoCan you link any examples?
- world2vec 3y agoThe green GPT icon in the chat would indicate it's GPT-3.5 right? GPT-4 is purple, at least for me.
- letmevoteplease 3y agoI think that shared chats all use the green icon. If you check the source code, it says "model_slug":"gpt-4." It will also state that "the previous model used in this conversation is unavailable" if you try to continue the conversation on a free account.
- cafaxo 3y agoGPT-4's explanation of its optimization does not make sense to me. It writes "Instead of moving it to P, we can directly use S in the following comparisons, saving one instruction." but then proceeds to use P as if that mov had happened. AlphaDev's optimization relies on the fact that B and C are already in the correct order. This precondition is missing from the prompt given to GPT-4. It seems that GPT-4 is hallucinating something that only resembles the correct optimization at first glance.
- smeagull 3y agoThere was already a paper on Transformer models and their inability to redefine variables. They had real problems with swapping variables and would forget that it had happened.
- bryan0 3y agoGPT states at the end: > However, in the lines following the removal, P should be replaced with S to maintain correctness.
- bonzini 3y agoAnd that's not enough. Think of the swap sequence t=a,a=b,b=t: all three moves are necessary. While removing moves is a common optimization, it can't be done willy nilly. As mentioned in the comment you replied to, the algorithm is wrong without the extra precondition B<C that is not included in the prompt, as should be clear from the fact that the largest value is computed as max(A,C) rather than max(A,B,C). This is the same precondition that allows to remove the move, effectively computing the smallest value as min(A,B) instead of min(A,B,C). So the only correct answer to the prompt is to find a counterexample which does not sort correctly, for example 3 7 5. Not to remove an instruction randomly.
- deleted 3y ago[deleted]
- summerlight 3y agoIsn't it something like some interviewer who already knows the answer asks some interviewee a very specific question designed with a certain level of guidance in mind? It's still impressive for LLM, but it's not even apple-to-orange comparison.
- pfedak 3y agoI posted a reply, but I think ultimately this is just a coincidence. There's a naïve reason that "mov S P" looks redundant ("just use S instead of P later"), but in typical GPT fashion, this is specious, and can't actually be done. It's essentially trying to swap two variables without using a temporary. If x86 had a conditional swap instruction, it could, but it doesn't, and just doing "cmp,cmov,cmov" can't handle it. Another giveaway is that removing that line in the real optimization changes the output of the provided snippet if C < B. It feels like a hard sell to say GPT picked this line for that subtle reason based on information not provided, but explained it with something only correct at surface level.
- pfedak 3y agoUh, I guess this got combined with the thread on https://twitter.com/DimitrisPapail/status/1666843952824168465 https://twitter.com/DimitrisPapail/status/166684395282416846.... The original result is legit, this GPT tweet has a number of issues
- deleted 3y ago[deleted]
- dang 3y agoComments moved to https://news.ycombinator.com/item?id=36228125 https://news.ycombinator.com/item?id=36228125.
- pama 3y agoIsn’t that a different thread though?
- machdiamonds 3y agoThis thread is someone using GPT-4 to re-discover the optimization made by Deepmind in that thread.
- dang 3y agoAh sorry. Will unmerge! Edit: done. Not sure how I missed that. Thanks!
- machdiamonds 3y agoNo worries, dang! Appreciate your efforts in upholding the standard of conversations here.
- yb303 3y agoIt didn't discover anything. It only minces words it found online up to 2021.
- jdiez17 3y agoFalse.
- logisticpeach 3y agoHow is this false?
- bradley13 3y agoTrying to attribute intelligent intent where there is none. ChatGPT just puts tokens in order, following amalgamated examples it has seen. When it screws up, we call it a hallucination. With careful prompting, you can get it to screw up in a way that works. Color me unimpressed.
- joshuahedlund 3y agoI agree. I don’t think hallucination is the right term. When humans hallucinate, they’re seeing false inputs. When ChatGTP “hallucinates”, it’s giving false outputs. Maybe a better analogy would be a savant with dementia - it knows a lot of things and sounds coherent but it’s inconsistent in keeping track of state and highly variable in the accuracy of its output
- giantrobot 3y agoConfabulation I think is a better description (I didn't come up with it).
- drowsspa 3y agoTrying to attribute intelligent intent when there is none. Human brains just propagate electrical impulses through neuron synapses.
- mrguyorama 3y agoActually no they don't, those neurons are extremely complex machines internally and in their own right. Reducing what they are doing to "propagating electrical impulses" is flat out wrong.
- drowsspa 3y agoTrying to attribute intelligent intent when there is none. Human brains are just an amalgamation of 20 amino acids and other organic molecules that some bunch of DNA produced to copy themselves. Or: Human brains are ultimately just particles following the unavoidable rules of Quantum Mechanics. My point being, we are the result of a bunch of DNA molecules selected to make more copies of itself. Our neurons, whatever their internal structure, still reduce to just chemical and physical processes. Yet, here we are. Reductionism is not the way to dismiss emergent phenomena like intelligence, sentience or consciousness.
- agluszak 3y agoCan you set ChatGPT's temperature by simply asking it to "use temperature 0.0"? Doesn't sound legit
- LatticeAnimal 3y agoI have played around with this a bit and it does actually work. I think it is similar to when people tell you to “think creatively”. It doesn’t actually mean anything, but it can change you internal biases for what you say. ChatGPT-4 “knows” it is an LLM and and that temperature=0 implies a less chaotic more ordered way of thinking. I can easily see that having an effect on what it says
- globular-toast 3y agoIsn't it cheating a bit to prompt for removing a line? Not all algorithms can be optimised by removing a single step.