Live data from Hacker News

OpenAI is good at unminifying code

glama.ai

291–300 of 321 posts

Re: OpenAI is good at unminifying code

#291

This is an example of superior intellectual performance to humans. There’s no denying it. This task is intellectual. Does not involve rote memorization. There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from. The llm understands what it is unminifying and it is in general superior to humans on this regard. But only in this specific subject.

I don’t claim expertise in AI or understanding intelligence, but could we also say that a pocket calculator really understands arithmetic and has superior intellectual performance compared to humans?

Things are called AI only until they can be done well by a computer, and then they become just an algorithm.

There was a time when winning in Chess was a proof of humans' superior intellect, and then it became just an algorithm. Then Go.

Re: OpenAI is good at unminifying code

#292

This is an example of superior intellectual performance to humans. There’s no denying it. This task is intellectual. Does not involve rote memorization. There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from. The llm understands what it is unminifying and it is in general superior to humans on this regard. But only in this specific subject.

Why not count the fact that humans created a tool to help themselves at unminifying towards human score?

Having a computer multiplying 1000-digit numbers instantly is an example of humans succeeding at multiplying: by creating a tool for that first. Because what else is intellectually succeeding there? It’s not like the computer has created itself.

If one draws a boundary of human intelligence at the skull bone and does not count the tools that this very intelligence is creating and using as mere steps of problem solving process, then one will also have to accept that humans are not intelligent enough to fly into space or do surgery or even cook most of the meals.

Re: OpenAI is good at unminifying code

#293
post #239

This is an example of superior intellectual performance to humans. There’s no denying it. This task is intellectual. Does not involve rote memorization. There are not tons and tons of data pairs on the web of minimized code and unminified code for llms to learn from. The llm understands what it is unminifying and it is in general superior to humans on this regard. But only in this specific subject.

I'm bullish on AI, but I'm not convinced this is an example of what you're describing. The challenge of understanding minified code for a human comes from opaque variable names, awkward loops, minimal whitespacing, etc. These aren't things that a computer has trouble with: it's why we minify in the first place. Attention, as a scheme, should do great with it. I'd also say there is tons of minified/non-minified code o…

> These aren't things that a computer has trouble with

They are irrelevant for executing the code, but they're probably pretty relevant for an LLM that is ingesting the code and text and inferring its function based on other examples it has seen. It's definitely more impressive that an LLM can succeed at this without the context of (correct) variable names than with them.

Re: OpenAI is good at unminifying code

#294

Should the title say ChatGPT or gpt-4 (the model) instead of OpenAI (the company)?

There is a certain justice in the use of OpenAI as a name for their product, given that OpenAI has turned the generic technical GPT name into a brand.

And that they launch new models so often that GPT could mean 3.5, 4, 4o mini, or 4, just to name the ones I know off the top of my head.

Re: OpenAI is good at unminifying code

#295
post #97

Author of HumanifyJS here! I've created specifically a LLM based tool for this, which uses LLMs on AST level to guarantee that the code keeps working after the unminification step: https://github.com/jehna/humanify

As someone who has spent countless hours and days deobfuscating malicious Javascript by hand (manually and with some scripts I wrote), your tool is really, really impressive. Running it locally on a high end system with a RTX 4090 and it's great. Good work :)

Re: OpenAI is good at unminifying code

#297

Earlier quoted context omitted.

> all they can do is, in fact, sample from a compression of historical texts To me, results like the Othello paper make any sort of "stochastic parrot" thinking completely untenable. https://thegradient.pub/othello/

Abstract functions are fully representable by function approximations in the limit n->inf; ie., sampling from a circle becomes a circle as samples -> infinity. This makes all "studies" whose aim is to approximate a fully representable abstract mathematical domain irrelevant to the question. This is just more evidence of the naivety, mendacity, and pseudoscientific basis of ML and its research.

...I see...

Re: OpenAI is good at unminifying code

#298

Earlier quoted context omitted.

Only in the web environment. In fact the condition itself is true only when it runs in a web browser and not in a web worker.

which is the case for that code and it was added by the obfuscator

No obfuscator would add only that. It is almost surely from some library that is aware of the possibility that `window` may not exist.

Re: OpenAI is good at unminifying code

#299

Earlier quoted context omitted.

I would say the actual difficulty greatly varies. It is generally easy if you have a good guess about what the code would actually do. It would be much harder if you have nothing to guess, but usually you should have something to start with. Much like debugging, you need a detective mindset to be good at reverse engineering, and name mangling is a relatively easy obstacle to handle in this scale. Let me give some con…

How do we end up with you pasting large blocks of code and detailed step-by-step explanations of what it does, in response to someone noting that just because process A is simple, it doesn't mean inverting A is simple? This thread is incredibly distracting, at least 4 screenfuls to get through. I'm really tired of the motte/bailey comments on HN on AI, where the motte is "meh the AI is useless, amateurish answer that…

Because the original reply missed three explicit adverbs to hint that this is not a general rule (EDIT: and also had mistaken my comment to be dismissive). And I believe it was not in a bad faith, so I went to give more contexts to justify my reasoning. If you are not interested in that, please just hide it because otherwise I can do nothing to improve the status quo and I personally enjoyed the entire conversation.

Re: OpenAI is good at unminifying code

#300
post #225

JS minification is fairly mechanical and comparably simple, so the inversion should be relatively easy. It would be of course tedious enough to be manually done in general, but transformations themselves are fairly limited so it is possible to read them only with some notes to track mangled identifiers. A more general unminification or unobfuscation still seems to be an open problem. I wrote handful of programs that…

> JS minification is fairly mechanical and comparably simple, so the inversion should be relatively easy. This is stated as if it's a truism, but I can't understand how you can actually believe this. Converting `let userSignedInTimestamp = new Date()` to `let x = new Date()` is trivial, but going the other way probably requires reading and understanding the rest of the surrounding code to see in what contexts `x` is…

You are technically true, but I think you should try some reverse engineering to see that it is usually possible to reconstruct much of them in spite of the amount of transformations made. I do understand that this fact might be hard to believe without any prior.

EDIT: I think I got why some comments complain I downplayed the power of LLM here. I never meant to, and I wanted to say that the unminification is a relatively easy task compared to other reverse engineering tasks. It is great we can automate the easy task, but we still have to wait for a better model to do much more.

Post reply on HN