Live data from Hacker News

Large language models do not recognize identifier swaps in Python

arxiv.org

91–100 of 103 posts

Re: Large language models do not recognize identifier swaps in Python

#91

Earlier quoted context omitted.

To answer your question. Of course I have been in those situations. But nobody has ever tried to deceive me nor have I tried. I wonder what kind of software interviews you have been in? If somebody confuses functions from different languages or frameworks, that's of course something that I wouldn't count as cheating. That's just a mistake and of course that happens regularly. But in those cases the functions did actu…

> The difference obviously is that in humans this is intentional behavior unless the human is not in a healthy state memory-wise. This has not been my experience. Once you get out of the tech bubble you will frequently find people who genuinely treat talking as just pattern matching and signalling and speak words that don't correspond to any actual internal model of how the world works.

I am frequently talking to people outside the tech bubble. Could you give me an example? And maybe a hint how this would relate to my argument about intention and understanding? I have a hard time following your argument.

Re: Large language models do not recognize identifier swaps in Python

#92

Earlier quoted context omitted.

Going to paste together snippets from comments on this thread. This bit is from the paper. > Typical programming languages have invariances and equivariances in their semantics that human programmers intuitively understand and exploit, such as the (near) invariance to the renaming of identifiers. This is bullshit lol. Identifier renaming may be a no-op for the code, or even for the compiler/interpreter, but it's abso…

That's just shifting the goalposts. Someone gets LLMs to do something impressive? "Ooh, LLMs are intelligent!". Someone shows LLMs falling flat on their face? "Lol of course LLMs can't do that you're using it wrong". I'd also like to call out the preposterous claim that a human would not pass the example test illustrating the article. While in the normal course of coding and if they hadn't noticed the swap a human pr…

> That's just shifting the goalposts. Someone gets LLMs to do something impressive? "Ooh, LLMs are intelligent!". Someone shows LLMs falling flat on their face?

It's still intelligent! It may have weird failure modes that are different to typical human failure modes, but intelligence isn't restricted to entities that never get anything wrong.

Re: Large language models do not recognize identifier swaps in Python

#93

Earlier quoted context omitted.

To be clear, did you have any trouble figuring out the correct answer in the motivating example in the article's introduction? I'm asking because sure, a human programmer might well get tripped up by a name swap if they had missed the swap, or forgot it, but when presented with a short test of three lines like the one in the article's motivating example, the majority of human programmers would pass the test easily. T…

My take is: does a human programmer in this case would have to consciously talk to themselves to not make a mistake? "Remember, remember, 'el eye en' prints, 'pee ar aye en tee' computes length". Would they have to double-check their output? If yes, then don't expect LLMs to do better in general case, unless you make them do those steps. This is what I mean when I keep saying that a good analogy for current LLMs, GPT…

>> My take is: does a human programmer in this case would have to consciously talk to themselves to not make a mistake? "Remember, remember, 'el eye en' prints, 'pee ar aye en tee' computes length". Would they have to double-check their output? If yes, then don't expect LLMs to do better in general case, unless you make them do those steps.

I'm pretty sure most people would not need to do any of that to answer the question in the motivating example correctly.

Remember: it's three lines and a question. Pretty much the Country Music of experiments, eh?

Re: Large language models do not recognize identifier swaps in Python

#94

Earlier quoted context omitted.

> I agree with the description of your inner voice process, but does your inner voice produce new function or enum value names that you need to filter? Yes! Very often. That's because it's exactly "thoughts that could make sense in some simplified form of reality, but need revision or filtering to match the actual real world". In my actual code writing practice, I've spotted this manifesting in several ways. One, my…

> str.cou > str.size() and > str.split > does not have a split() method. Both confuse two existing entities from different languages/frameworks, which is exactly my point. These entities exist, they are not made up at all. They are just out of context. Ironically, the LLMs I used did rarely run into this kind of mistake (confusing similar entities of a different context). As an example of what I got when asking a pop…

> It lectures me in a quite self-satisfied tone that I should commence to use the function "AXObserve" that does not exist, as it turns out. This is completely made up. There is no such thing. If you google the exact word, it doesn't even bring up anything related to programming let alone the macOS APIs.

I've seen this happening too, but it still feel more like a case of a generalized "there is something like this, or at least should be". In some cases, it was clear to me it was guessing at some reasonable patterns - like, upon seeing function calls like InitializeFoo() or AddBar(), it would assume existence of functions UninitializeFoo() and RemoveBar(). But in other cases, more similar to yours, it does invent stuff that doesn't exist (though perhaps should).

I find the latter most common when asking for Emacs instructions or Emacs Lisp code. GPT-4 is prone to inventing functions based on the prompt, such as e.g. `org-timestamp-diff-day' (or something similar), when I asked it for the command that computes difference between Org Mode timestamps in days. This function does not exist, but there are a few functions like `org-timestamp-[something]', and even a few like `org-timestamp-[sth]-day' - and more generally, Emacs/ELisp code tends to be full of functions named like the very thing you're trying to do, like `kill-whole-line' or `move-end-of-line', `kill-comment' and `duplicate-line', so it's not that surprising GPT-4 would, the other day, give me something like `kill-whole-comment-and-duplicate-line'.

> Now I will admit that my mind is capable of doing the same. Under severe intoxication :)

Mine too. It's not a bad analogy. I've observed in myself that moderate intoxication does magic when it comes to letting my "inner voice" drive the conversation. I sometimes experienced the feeling of my conscious mind being too late to catch sentences produced by my "inner voice" before they exited my mouth.

Another analogy I particularly like is, GPT-4 is actually quite like a ~4 year old kid in many ways. One that has somehow consumed half the internet, but still with child-like attention span and propensity to continue talking and making shit up even long after crossing the point of lack of knowledge.

My daughter turned 4 lasts week. The way she makes stuff up is quite similar to LLM "hallucinations" (except it's easier to tell, because she's only heard so much in her life, so she's less good at making up stuff that sounds believable). And earlier than that - between the age of 2.5 and 4 - I could observe what's best described as a "rolling context window" growing. A little more than half a year ago, I could tell hers is about 30 seconds long - anything she invented and said once would be forgotten after about that time, unless it was repeated in between by someone, possibly herself. And believe it, she talked in an extremely repetitive way back then - ~every third sentence was 50-100% repeating the critical things said earlier - as if, intuitively, she was trying to overcome her own "context window" limit.

> Maybe we could agree that LLMs can probably serve as part of a foundation for a future model that actually can output a result of some "real" understanding of a subject?

Sure. I suppose we should also agree on the same understanding of "real understanding". I'm only proposing that LLMs pick up the same kind of "understanding" your unconscious/subconscious mind does, and produce output of similar nature. This implies that, to replicate human reasoning/performance, we'll need to layer some additional models/systems on top of the LLM.

Re: Large language models do not recognize identifier swaps in Python

#95

Earlier quoted context omitted.

My take is: does a human programmer in this case would have to consciously talk to themselves to not make a mistake? "Remember, remember, 'el eye en' prints, 'pee ar aye en tee' computes length". Would they have to double-check their output? If yes, then don't expect LLMs to do better in general case, unless you make them do those steps. This is what I mean when I keep saying that a good analogy for current LLMs, GPT…

> Even with a clear problem statement, at intuitive level, your intuition would still cling to those associations (and heaps of Python code you may have read and wrote in your life) - you need to override that at a conscious level. For the simple problem posed here, I dispute this. I do not need to rely on consciously overriding my intuition in order to replace "print" with "len" in this simple of an example. It's im…

FWIW, I copy-pasted the example to GPT-4 and played with it a bit, and doing so I noticed that I do need to keep consciously overriding my intuition at all times when reading the output - the moment I stop, I get confused, and have to re-read the last 1-3 lines with even more concentration.

Re: Large language models do not recognize identifier swaps in Python

#96

Earlier quoted context omitted.

My take is: does a human programmer in this case would have to consciously talk to themselves to not make a mistake? "Remember, remember, 'el eye en' prints, 'pee ar aye en tee' computes length". Would they have to double-check their output? If yes, then don't expect LLMs to do better in general case, unless you make them do those steps. This is what I mean when I keep saying that a good analogy for current LLMs, GPT…

>> My take is: does a human programmer in this case would have to consciously talk to themselves to not make a mistake? "Remember, remember, 'el eye en' prints, 'pee ar aye en tee' computes length". Would they have to double-check their output? If yes, then don't expect LLMs to do better in general case, unless you make them do those steps. I'm pretty sure most people would not need to do any of that to answer the qu…

> Remember: it's three lines and a question. Pretty much the Country Music of experiments, eh?

IDK, three lines of math is more than enough for me to make fatal mistakes in. For example, in my secondary and high school times, it took me years to stop carelessly forgetting to carry a minus sign during calculations - even as simple as requiring three lines.

Another analogy - you may argue this is goal-post shifting, but I'm really not inventing new analogies here, only bringing up the other one of the two I always use - GPT-4 being like a 4 year old kid in terms of focus. Anyway: the few tests I run tended to show GPT-4 first understanding the problem correctly, and then confusing itself mid-way through its output. This is quite similar to what my 4 y.o. often does. She'll say stuff like "no, X isn't like Y, X is more like Z, it's not like Y", and then suddenly continue as if X was like Y, as if the idea of X being like Y overpowered her earlier assertion that it's not.

Re: Large language models do not recognize identifier swaps in Python

#97

Earlier quoted context omitted.

> The difference obviously is that in humans this is intentional behavior unless the human is not in a healthy state memory-wise. This has not been my experience. Once you get out of the tech bubble you will frequently find people who genuinely treat talking as just pattern matching and signalling and speak words that don't correspond to any actual internal model of how the world works.

I am frequently talking to people outside the tech bubble. Could you give me an example? And maybe a hint how this would relate to my argument about intention and understanding? I have a hard time following your argument.

Tell your family and friends you, e.g., like regularly having a pizza for dinner, or that you're ditching sugar for artificial sweetener - and enjoy watching people on an acid trip with no LSD. You'll hear plenty of warnings warning and advice that's quite obviously bullshit, and which they acquired from other people and/or lifestyle magazines/blogs/memes - except they don't even realize it, because they're not in a habit of remembering where did the idea come from along with the idea itself, and so instead they "just know" they're right.

Re: Large language models do not recognize identifier swaps in Python

#98

Earlier quoted context omitted.

>> My take is: does a human programmer in this case would have to consciously talk to themselves to not make a mistake? "Remember, remember, 'el eye en' prints, 'pee ar aye en tee' computes length". Would they have to double-check their output? If yes, then don't expect LLMs to do better in general case, unless you make them do those steps. I'm pretty sure most people would not need to do any of that to answer the qu…

> Remember: it's three lines and a question. Pretty much the Country Music of experiments, eh? IDK, three lines of math is more than enough for me to make fatal mistakes in. For example, in my secondary and high school times, it took me years to stop carelessly forgetting to carry a minus sign during calculations - even as simple as requiring three lines. Another analogy - you may argue this is goal-post shifting, bu…

I think you're really good at convincing yourself of whatever you want to be convinced :P

Re: Large language models do not recognize identifier swaps in Python

#99

Earlier quoted context omitted.

> Remember: it's three lines and a question. Pretty much the Country Music of experiments, eh? IDK, three lines of math is more than enough for me to make fatal mistakes in. For example, in my secondary and high school times, it took me years to stop carelessly forgetting to carry a minus sign during calculations - even as simple as requiring three lines. Another analogy - you may argue this is goal-post shifting, bu…

I think you're really good at convincing yourself of whatever you want to be convinced :P

Quite possibly :). Not going to dispute that. But FWIW, it seems to be mostly working well for me, so there must be at least some correlation with objective reality here.

Or at least that's what I want to believe :).

Re: Large language models do not recognize identifier swaps in Python

#100

Earlier quoted context omitted.

> there's a big usability gap around correctness From an engineer's perspective I can see this seems minor -- but from a scientific perspective, it's kinda a crazy statement, right? Imagine an alien who speaks english giving apparently correct descriptions of, eg., a room; and then, seemingly at random, saying wholly false things with the confidence (etc.) of its other statements. A scientist studying this alien woul…

Speaking of aliens, the GPTs sound a lot like the aliens from Blindsight: they don't question the semantic ambiguity in > our cousins lie about the family tree with nieces and nephews and Neanderthals. We do not like annoying cousins. They just reply to it regardless and carry on. The aliens: "We'd like to know about this tree" GPT-4: > I'm sorry to hear that there's some family discord. > [Snip, about 200 words] > N…

Sure -- if we want to play the engineers game of "define a computational test by which we can know if X is intelligent" (ironically, a dumb game) -- this is one issue we can see here immediately

ChatGPT doesnt ask us to write for it; does not seek to resolve the ambiguity in our speech. Indeed, the very way we "engineer prompts" kinda exposes the whole show -- that prompts need "engineered" at all, that the machine cannot prompt us -- makes it clear it's a tool

we play a game with it to get out of it what we need by eliminating thinking from our own heads, and replacing it with word association --- in exactly the same way we've always done when googling

Post reply on HN