News for hackers. Stuff that matters.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by fer on Thursday June 08, 2023 @12:47PM (#36244875)
It's just a language model.

I've asked it to prove the Riemann hypothesis, GPT-4 replied it can't, since none of the training data say anything about such proof.

Then I asked it to prove statements of the implications of said hypothesis (I tried 2 or 3, don't remember which), without calling them by name or mentioning Riemann, and it confidently proved them in a way that it reads like it knows what its doing, though it really doesn't. It just takes bits and pieces from proofs in the same field of mathematics that kinda hold together language-wise.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by Verdex on Thursday June 08, 2023 @01:33PM (#36245579)
My takeaway from all of the GPT successes and failure (the linear algebra vs riemann hypothesis cases being one example) is that language and jargon can have built in structural constraints such that by having a good LLM you can get good results because the grammatical structure happens to match reality's structure. But reality is under no constraint to conform to the grammatical structures that we use in order to communicate about related problems or solutions.

And I suppose this shouldn't be too surprising considering even logic itself runs into godelian issues. For any consistent logic there exists some statement which is true, but which does not have a proof. Which feels vaguely similar to "for any functional LLM there exists some truth which defies the next statistically likely sequence of tokens".

Re:Weird GPT-4 behavior for the specific string “ davidjl” by Buttons840 on Thursday June 08, 2023 @12:52PM (#36244964)
I've asked it to evaluate Python loops that are about as complex as FizzBuzz, it makes mistakes and even when I direct its attention towards those mistakes it wasn't able to correct itself.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by exitb on Thursday June 08, 2023 @01:09PM (#36245233)
I don’t think it’s a reasonable expectation for a language model to evaluate arbitrary code.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by daveguy on Thursday June 08, 2023 @01:15PM (#36245328)
It's definitely not a reasonable expectation. That doesn't stop the breathless hype from implying it is reasonable.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by williamcotton on Thursday June 08, 2023 @02:24PM (#36246373)
Where is this breathless hype everyone speaks of? All I see is an endless stream of populist hot takes on the exact opposite!
Re:Weird GPT-4 behavior for the specific string “ davidjl” by Culonavirus on Friday June 09, 2023 @02:51AM (#36254246)
"populist hot takes" haha, I'm sorry, but seeing this kind of language in a "gpt can/can't code" debate on a "hacker" forum is just funny to me
Re:Weird GPT-4 behavior for the specific string “ davidjl” by goatlover on Friday June 09, 2023 @06:39AM (#36255878)
There was a post on reddit about how all software was going to be replaced by LLMs, there's a podcast talking about how ChatGPT will become the universal interface that can reconfigure itself as needed depending on the API it's using and what the user needs. There are people claiming programmers will be replaced by prompt engineers. The hype has been everywhere the last few months.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by TeMPOraL on Thursday June 08, 2023 @04:04PM (#36248004)
It's not breathless hype, as much as surprise in the fact that it actually does work, way better than it should.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by Buttons840 on Thursday June 08, 2023 @01:19PM (#36245380)
It's weird that reasoning through complex mathematical proofs is easier (for both me and GPT) than mentally evaluating a short snippet of code. I've done a BSCS, I've done those tests that ask you what the output of a poorly written and tricky loop is, that stuff hurts my brain. In comparison, a mathematical proof, once your ready, feels good.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by Filligree on Thursday June 08, 2023 @01:31PM (#36245556)
"Mentally evaluating a short snippet of code" requires remembering the state of that code, then repeatedly overwriting your memory as you step through it. GPT-4 isn't able to do that; it is in a sense purely functional.

I've had success getting it to evaluate FizzBuzz, but to do so I told it to write out the state of the program one timestep at a time.

https://chat.openai.com/share/c109e946-fb6d-494e-8182-fc93d2...

...this is actually 3.5. 4 wouldn't need as much explanation.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by Verdex on Thursday June 08, 2023 @01:54PM (#36245902)
This feels like an interesting insight into not just why LLMs might have trouble understanding some code, but also why people might have trouble understanding some code.

I wonder how gpt handles code where multiple objects of the same class call the same methods and each individual object calls the same methods with different threads as well as method local variables, class member variables, and static member variables are all in play. [Being fair to our LLM brethren; us meat sacks are sure to hate that hypothetical code as well.]

Re:Weird GPT-4 behavior for the specific string “ davidjl” by Filligree on Thursday June 08, 2023 @04:06PM (#36248021)
If you give me an example, I'll try it. From that description I'm not sure of much more than I hate it. :)
Re:Weird GPT-4 behavior for the specific string “ davidjl” by Verdex on Thursday June 08, 2023 @04:32PM (#36248511)
Off the top of my head, something like this comes to mind:

    class X {
        private static int _staticCount = 0;
        private int _memberCount = 0;

        public uint Stuff(int input) {
            if (input <= 0) {
                return (uint)(_staticCount + 1);
            }

            var y = new Thread(() => { 
                Interlocked.Add(ref X._staticCount, (int)Stuff(input - 1));
                Interlocked.Add(ref _memberCount, (int)Stuff(input - 2));
            });
            y.Start();

            y.Join();

            return (uint)(Stuff(input - 1) + _memberCount); 
        }
    }

    class Program {

        public static void Main() {

            var x = new X();
            var y = new X();
            var z = new X();

            uint resultX = x.Stuff(4);
            uint resultY = y.Stuff(3);
            uint resultZ = z.Stuff(2);


            Console.WriteLine(resultX + resultY + resultZ);
        }

    }
EDIT: Probably should have setup another way to wait for the threads to end, that way all three X classes could be running at the same time. But perhaps this is a good enough start point.

I get 3274511360 when I run it. Although, I had to upgrade everything to uint because I was getting some overflow ... so there might be some of that in the output.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by Filligree on Friday June 09, 2023 @10:04AM (#36257978)
It punted on the request, which is to be fair what I also would do.

> Writing out an exact state of a multi-threaded program line-by-line is inherently challenging due to the inherent unpredictability of thread scheduling. However, I can provide an abstracted example of the flow of execution based on the order of operations in the code. Here is a simplified breakdown:

> x, y, z are instantiated as new X(), _staticCount is 0 for all, _memberCount is 0 for each individually.

> x.Stuff(4) is called.

> Inside Stuff(), check if input <= 0, it's not, hence, skip.

> Create new Thread with lambda function and start it.

> In the new thread, Stuff(input - 1) recursively calls Stuff(3).

> This recursion continues until Stuff(0) is called, returning _staticCount + 1 which is 1.

> This recursion unwinds, incrementing _staticCount and _memberCount at each level.

> After the thread finishes, call Stuff(input - 1) again and add it to _memberCount, effectively doubling the _memberCount.

> Return the final value for Stuff(4) for x.

> Repeat the above steps for y.Stuff(3) and z.Stuff(2).

> Write the sum of resultX, resultY, and resultZ to the console.

> Please note that due to the nature of multi-threaded execution, there is a risk of race conditions. The Interlocked.Add method is used to help prevent these race conditions by making the increment operations atomic. Also, keep in mind that the state of _staticCount after all calls to the Stuff method will be dependent on the interleavings of the threads, and hence, not deterministic.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by Verdex on Friday June 09, 2023 @11:08AM (#36258968)
Interestingly enough, my threads here are deterministic because they always just wait for the execution to finish. So they're the same as not having them.

My plan was to go back and store off the threads generated and have something else wait for them, but I needed to think it through so that it could be done in a way to get deterministic results (like threads only read from member variables and writing to them is done in deterministic order or idempotently). Although, for a contrived example, it was more work than I really wanted to do.

I agree, punting is definitely the right course of action. I sort of have a vague intuition for what's going on here, but hammering down the exact details is just so tedious that I don't want to do it.

Although, it is interesting that the AI basically sees threads and blurts out that the problem is impossible, when they're not actually doing anything in this case.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by Filligree on Friday June 09, 2023 @01:28PM (#36261073)
It explained the code better than I would have, I think. “Inherently challenging” seems… accurate. I bet that if we’d used a data-parallel approach, e.g. with Rayon, it would have handled that better.

As a code assistant, it’s extremely useful if and only if you can check its work. And know how to prompt it.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by waboremo on Thursday June 08, 2023 @01:16PM (#36245335)
It isn't, yet it's used that way.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by krapp on Thursday June 08, 2023 @02:36PM (#36246548)
Everyone is worried about doomsday scenarios like runaway AGI and Skynet, meanwhile the real danger of AI turns out to be people naively assuming it works like the computer in Star Trek, that because it can hold a conversation, is has some form of intelligence and awareness.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by JasonFruit on Thursday June 08, 2023 @03:24PM (#36247301)
Please keep saying this over and over. Even people who get that it doesn't work that way don't seem to grasp the danger of others relying on these tools in inappropriate ways.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by krapp on Thursday June 08, 2023 @08:08PM (#36251196)
The problem is LLMs are kind of an outside context problem for our culture. We're still arguing over the correct language to even describe what it does ("hallucinate"? "confabulate"? "lie?") because every word we have presupposes the existence of a stateful mind with intent. It's a philosophical zombie, which is so counterintuitive most people can't even accept it as a sensible concept.

Between the hype and decades of indoctrination through science fiction about how AI is "supposed" to work, I guess it isn't surprising that this is how things are shaking out. People will learn, the way they learned with the internet, but it will take a few years I think.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by goatlover on Friday June 09, 2023 @06:41AM (#36255892)
The computer in Star Trek seems to only work like a sentient intelligence when you prompt to the Holodeck a certain way, like make a worthy opponent for Data.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by ftxbro on Thursday June 08, 2023 @04:51PM (#36248803)
> "It's just a language model."

This is true. The base pretrained model is even technically a Markov chain. As they have been getting more and more powerful with more parameters and compute and dataset sizes they've been unlocking more and more powerful cognitive capabilities.

> "I've asked it to prove the Riemann hypothesis, GPT-4 replied it can't, since none of the training data say anything about such proof."

This is some alignment/docility/lobotomy that the RLHF did. The raw base model would never say it. This is part of their No Tay No Syndey push.

> "Then I asked it to prove statements of the implications of said hypothesis (I tried 2 or 3, don't remember which), without calling them by name or mentioning Riemann, and it confidently proved them in a way that it reads like it knows what its doing, though it really doesn't. It just takes bits and pieces from proofs in the same field of mathematics that kinda hold together language-wise."

Yes it's true. Even though these LLMs have unlocked so many cognitive capabilities, they are still not yet powerful enough to prove the Riemann hypothesis. They aren't quite yet to the level of scientists who can advance the state of the art in their field. Some will say it's an inherent limitation, but I disagree, for complicated reasons that are easy to make superficial and pithy arguments against.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by mikojan on Friday June 09, 2023 @03:00AM (#36254299)
LLMs do not have cognitive capabilities because they lack consciousness and self-awareness. Cognitive abilities require the ability to perceive and understand the world around us through our senses, emotions, and experiences. These processes are rooted in biological structures such as neurons, synapses, and brain chemistry that enable humans to learn from experience.

While LLMs can simulate human-like behavior and decision-making based on algorithms trained on large data sets, they lack awareness or understanding of their actions. They rely on pre-programmed rules or statistical correlations rather than intuition or insight derived from personal experience.

Therefore, even though LLMs may seem intelligent in certain contexts like playing games or recognizing objects in images with high accuracy rates- they cannot replicate human cognition since there is no consciousness behind those decisions made by the systems.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by ftxbro on Friday June 09, 2023 @01:39PM (#36261234)
OK but that's why I wrote 'cognitive capabilities' instead of 'intelligence'. What I meant by 'cognitive capabilities' are all of the objective abilities it has unlocked, like scoring well on standardized tests and psychological tests of theory of mind.
Re:Weird GPT-4 behavior for the specific string “ davidjl” by UniverseHacker on Friday June 09, 2023 @01:43PM (#36261288)
It is unclear what consciousness or self awareness are, they are qualia, e.g. subjective inner experiences that can’t be externally validated, and have no known mechanisms or requirements. There is no reason to think humans actually have this, nor that LLMs do not. I think that what you are saying basically boils down to “we humans feel that there is something special about us that can’t possibly apply to anything but us.”

Your statements make equal sense if you turn it around and claim LLMs have this but we do not: "these processes are rooted in computational structures such as neural networks, and data that allow LLMs to learn from experience. While humans can simulate LLM-like behavior and decision-making based on information from past experiences, they lack awareness or understanding of their actions."

All we can do is measure real world problem solving abilities, the ability to come up with correct solutions to difficult and novel problems. LLMs can do this well, in some cases exceeding human abilities, and there is no reason to think there is any fundamental limitation that will prevent them from exceeding human abilities in more areas the future.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by mikojan on Friday June 09, 2023 @03:08PM (#36262579)
The argument presented above is flawed in several ways.

First, it assumes that consciousness and self-awareness are merely subjective inner experiences that can't be externally validated. While it's true that these processes cannot be directly observed or measured like other physical phenomena, there is ample evidence to suggest that they are real and have important functional roles in the brain. For example, studies have shown that damage to certain areas of the brain can result in a loss of self-awareness or an altered sense of consciousness. Additionally, research has demonstrated correlations between neural activity patterns and conscious experience.

Secondly, the argument suggests that there is no reason to think humans actually possess consciousness or self-awareness. This assertion runs counter to our everyday experiences and perceptions as human beings. We all have first-hand knowledge of our own subjective inner world - our thoughts, emotions, sensations - which strongly suggests the existence of some form of conscious awareness.

Re:Weird GPT-4 behavior for the specific string “ davidjl” by visarga on Friday June 09, 2023 @02:55AM (#36254267)
> It just takes bits and pieces from proofs in the same field of mathematics that kinda hold together language-wise.

That's how AI research works, you do that first, then run the tests and see the score. If it works, then you publish. There is no real understanding anywhere in this process.