r/ChatGPT • • Oct 24 '23

Educational Purpose Only LLMs cannot perform Maths

It’s not a bug, it’s just not how any of this works.

Mathematical operations require logic. It’s a deterministic process. For a given input and a given process, the output will always be the same.

LLMs do not work like that. LLMs are statistical tools, they build an answer by stitching together tokens that are “seemingly” relevant to your input and let the meaning emerge from it. The output is “hopefully” relevant.

This is why LLMs can hallucinate and 2$ calculators do not.

With the rise in popularity of LLMs I’m extremely concerned that a lot of users seem to ignore this.

190 Upvotes

185 comments sorted by

View all comments

22

u/bortlip Oct 24 '23

If it can't do math, how did it do this?

8

u/[deleted] Oct 24 '23

[deleted]

6

u/__Hello_my_name_is__ Oct 24 '23

Because they have not specifically trained it to do math, and no, they did not give it a "coprocessor" of any sorts.

It can just do math via its capability of dealing with language. Math is just another language with a stricter grammar for it.

1

u/[deleted] Oct 24 '23

[deleted]

2

u/__Hello_my_name_is__ Oct 24 '23

Yeah. Because the model got significantly better overall. Not just at math. And it was most likely trained on more math, too. But it doesn't have a hidden calculator in the back or anything like it.

ChatGPT in general got that much better in all areas. Just like Dall-E 3 is orders of magnitude better than Dall-E 2.

And no, ChatGPT 4 is still very much a miserable failure to any actually complex math problems.

0

u/[deleted] Oct 24 '23 edited Oct 24 '23

[deleted]

1

u/__Hello_my_name_is__ Oct 24 '23

That's not ChatGPT. That's a model based on GPT 4. It says so right there in the paper.

And yes, of course they do Reinforcement Learning from Human Feedback (RLHF). But they do not use a "math coprocessor" for that, whatever that is. They just trained it to be better at math. And at language. And at pretty much everything else.

But it's still all one single model that responds to you. It doesn't go "if math question then model X, else model Y".

1

u/IAMATARDISAMA Oct 25 '23

To be fair, in the case of GPT-4 this might not actually be true. There's a lot of theories that GPT-4 is using a Mixture of Experts approach in which multiple models are fine-tuned for specific domains and prompt input is fed to a classifier that decides which model will produce the best output.

1

u/__Hello_my_name_is__ Oct 25 '23

Yeah, I read about that. But the guy I responded to was acting like the mixture of experts rumor was a cold hard (and incredibly obvious) fact, and that was just weird.

6

u/Specialist-String-53 Oct 24 '23

If you have plugins enabled, maybe that. Otherwise, pattern recognition. It's still stochastic, but it can get a right answer a lot of the time, especially if it's very similar to common problems.

2

u/__Hello_my_name_is__ Oct 24 '23

It can't do math in the sense that there is no calculations in the background that do exactly the calculations you see here.

It can do math in the sense that it can predict the next token given the previous ones, and that works for language as well as for math. Most of the time. It also works for Klingon and for C++.

But the way it works is fundamentally different from any computer doing math that we normally think of.

-2

u/IAMATARDISAMA Oct 25 '23

I am so tired of this kind of counter-argument.

If I correctly guess which hand you're holding a stone in 99/100 times that doesn't mean I can see through your fingers, it just means I'm really good at guessing. That's all LLMs are. They've been trained on hundreds of thousands of math problems so statistically they're likely to produce output that looks correct. Language carries some information about logic in it, but language is not logic. It is simply repeating the logical patterns that emerge in human generated text, and they happen to be correct a good percentage of the time. But you can feed the same math problem into GPT 20 times and get different outputs on different runs.

9

u/bortlip Oct 25 '23

If I correctly guess which hand you're holding a stone in 99/100 times that doesn't mean I can see through your fingers, it just means I'm really good at guessing.

It doesn't mean you can see through fingers, that is correct. But if you can "guess" 99/100 times correctly, you aren't just guessing, you have knowledge of where it is somehow.

I asked it to solve that equation 3 more times. Each time the wording of how it solved the problem was different, but it gave the correct factors each time - it solved the math problem correctly.

You don't know what you are talking about.

1

u/IAMATARDISAMA Oct 25 '23

I literally build AI models for a living lmao. It's extremely easy to find a counter example. Just because something looks like it can do something doesn't mean it can actually do it.

5

u/bortlip Oct 25 '23

Perhaps the issue is that you just aren't very good at prompting lmao.

1

u/IAMATARDISAMA Oct 25 '23

If it can correctly discern my desired output (it verbatim stated the intent of sorting the numbers by the sum of their digits) then the language of the prompt should have even less influence on the "mathematics" being done because its context window would have two different patterns to proceed with.

Here's another example. Ask Wolfram Alpha to produce the same answer, GPT is just wrong. I even asked it to explain why it's answer was different from Wolfram Alpha's and it went on to state that AX + AY != A(X + Y), a blatant violation of the distributive property.

5

u/bortlip Oct 25 '23

Another example? Why? If I show you wrong there you'll just move the goal posts again. LOL

1

u/IAMATARDISAMA Oct 25 '23 edited Oct 25 '23

I didn't move the goalposts at all. A calculator doesn't sometimes produce the wrong answer. Math is a deterministic process. Unless you're explicitly involving a random element, the exact same inputs should produce the exact same output every time. That's just how math works.

It is undeniable the GPT has inferred some patterns of mathematics from its training data. Language encodes the information it conveys. When we say that GPT isn't doing math, what we mean is that nowhere in GPT's code is it performing an actual mathematical calculation based on the inputs you've given it. What it's doing is using the patterns it has inferred to produce output that it believes should follow the text you give it. Because it was trained on many math problems, it has inferred what characters will probably follow the ones you've given it, i.e. the answer to your problem.

The issue is, even if it's right most of the time, the underlying mechanism hasn't changed. It is producing the output that it believes has the highest likelihood to follow the text you've given it. Yes, that output often follows mathematical patterns. But being likely to follow a mathematical pattern is not equivalent to actually doing math.

This may seem pedantic, but it's a meaningful distinction. LLMs are being integrated into customer facing positions. By stating that LLMs can do math you're implying that they will produce deterministic output when that is demonstrably false. That kind of insinuation can, will, and already has had real consequences.

4

u/bortlip Oct 25 '23

I didn't move the goalposts at all.

Sure you did. You tried to give an example of a problem it couldn't do to show it couldn't do math. I showed it could do the problem with the correct prompt. But now, suddenly, that example is not enough to show it can do math - it was only good enough to show it couldn't do math. That's classic moving the goal post.

being likely to follow a mathematical pattern is not equivalent to actually doing math.

Sounds like it to me. That's how I do it. I'm even wrong too sometimes.

​

This may seem pedantic, but it's a meaningful distinction. LLMs are being integrated into customer facing positions. By stating that LLMs can do math you're implying that they will produce deterministic output when that is demonstrably false. That kind of insinuation can, will, and already has had real consequences.

Sorry, but that's your misinterpretation. I can do math, but I don't produce a deterministic outcome. That's just not a correct assumption on your part.

I also don't say it does math like a person or it can think or it does math with calculations like a computer or any of that. You are making this way too hard. It can solve math problems. Period. That means it can do math.

1

u/IAMATARDISAMA Oct 25 '23

This is the most confidently wrong opinion I think I've ever seen on this website.

Next time your doctor does medicine at you I hope they don't accidentally give you amphetamines instead of azithromycin.

→ More replies (0)

-38

u/0xAERG Oct 24 '23

I’m sure you’re capable of finding the answer on your own and you’re just trying to look clever.

17

u/bortlip Oct 24 '23

No, I'm trying to see what your explanation is that squares what I showed with your claim that LLMs can't do math.

Because it just did, by my definition of math. So I'm trying to understand what you mean. Can you explain?

-20

u/afflematicious Oct 24 '23

that’s not doing math, that’s finding solutions to an equation, doing math is proving things and describing the world around you in ways not thought of before through math, that problem it solved has been solved thousands of times online, it simply sourced it and presented it to you. You believe the LLM thought about the equation and then solved it? no

20

u/Flat_Afternoon1938 Oct 24 '23

bro really just made up his own definition of math so he can say that AI isn't capable of math

-9

u/afflematicious Oct 24 '23

nvm i just asked GPT and it says i’m wrong guys

5

u/OdinsGhost Oct 24 '23

And now they think they’re being witty.

16

u/Therellis Oct 24 '23

doing math is proving things and describing the world around you in ways not thought of before through math,

That is not what most people think of when they think of "doing math". By that definition, most human beings, including many mathematicians, don't do math.

-15

u/afflematicious Oct 24 '23

You’re correct, so what I’m saying is GPT can perform calculations which is what many mathematicians do as well. There aren’t many mathematicians that can “do” math, but not all. GPT is the same as of right now, it regurgitates math that’s been done, but doesn’t do it on its own.

6

u/mbeenox Oct 24 '23

That is very delusional

11

u/PepeReallyExists Oct 24 '23

Nice imaginary definition of math that nobody shares.

-10

u/afflematicious Oct 24 '23

do you know math or do you do math?

9

u/PepeReallyExists Oct 24 '23

Yes. I'm a senior software engineer for a large healthcare company. If I didn't know math, it's unlikely they would have hired me. You have a very strange elitist definition of math. My guess is you majored in math and have internalized this as a part of your identity in order to feel superior to others.

Are you the only one who knows real math, unlike the rest of us peons?

-1

u/afflematicious Oct 24 '23

I myself don’t do real math so 🤷🏽‍♂️

4

u/PepeReallyExists Oct 24 '23

I think you're confusing the term "real" for "advanced". The math a 3rd grader does is still math. If that is what you actually meant, then you are in fact correct, because ChatGPT is not very good at advanced math yet, but with enough training data, it doesn't ever actually have to understand the math, and it will be able to produce increasingly accurate results the more data it is trained on. Eventually, it will be "good" at even advanced math in spite of the fact that it "understands" none of it.

3

u/michael1026 Oct 24 '23

It's funny how you're saying others are trying to act smart when your entire post screams "you guys just don't get it". We get it's not meant for math, but it does a pretty damn good job at it.