Live data from Hacker News

Why can't transformers learn multiplication?

arxiv.org

21–30 of 111 posts

Re: Why can't transformers learn multiplication?

#21

Because they produce output probabilistically, when multiplication is deterministic. Why is this so hard for everyone?

Not true though. Internally they can “shell out” to sub-tasks that know how to do specific things. The specific things don’t have to be models. (I’m specifically talking about commercial hosted ones that have the capability i describe - obviously your run of the mill one downloaded off of the internet cannot do this).

yes, what your describing is not a transformer but a high-level LLM-based product with tool-calling wired up to it

Re: Why can't transformers learn multiplication?

#23
post #5

This is a gut impression and I don't deny it, but LLMs are Large Language Models, and in my own brain, my Language Model isn't doing large-scale multiplication. I have a language-based intuition for the sigle-digit multiplication table and a touch beyond (and based on my observations that's already above average for a human Language Model, at least in my age peer group), but it's not my Language Model doing 283 times…

I agree with you, seems like we are trying to make the shoe fit. Not only are we missing the understanding of what is happening inside transformers, but now we are trying to teach them and see how they respond and then interpret it. That seems fine with viruses and animals, but we are talking about a piece of software here. Shouldn't we know what's happening inside? Maybe these kinds of papers can shine more light and give us better understanding though, still it feels backwards to me...Regarding the multiplication itself, shouldn't pure understanding of the meaning of multiplication(it's a summation basically) be enough for 'AI' to call it a day? If AI or human understands that, then the rest is computation part. We already got that covered, so instead of having 'AI' learn it on its own on crazy amount of data and get it right 99% of time, shouldn't we just give it a calculator? Somebody PLEEAASE give this AI a calculator :-)

Re: Why can't transformers learn multiplication?

#24
post #5

This is a gut impression and I don't deny it, but LLMs are Large Language Models, and in my own brain, my Language Model isn't doing large-scale multiplication. I have a language-based intuition for the sigle-digit multiplication table and a touch beyond (and based on my observations that's already above average for a human Language Model, at least in my age peer group), but it's not my Language Model doing 283 times…

A lot of savants that are able to do really cool calculations, or even people that have synesthesia seeing numbers as colors, don't actually do "real" calculations. I think most humans that do math aren't actually literally computing things as some kind of logic machine. We can produce logic, and follow the steps of using that logic, but it doesn't seem to me that our cognition is some kind of logic machine itself.

True. Generally it seems like you're visualizing things, moving stuff around, seeing vague patterns and trying to make them more clear. IDK how a transformer architecture would fit all of that in its context, or use it productivity once it's there. You can't just keep appending forever, but you also can't delete stuff either, because unlike humans, a deletion is a hard delete; there's no fuzzy remembrance left to rely on, so even deleting bad ideas is dangerous because it'll forget that it was a bad idea and infinite loop. Symbols manipulation doesn't come until the end, after you have a good idea what that part will look like.

Re: Why can't transformers learn multiplication?

#25
post #20

They're not any better at addition, are they? If they are, I wonder how good they are at adding numbers in log space.

The paper uses a number representation that is designed to make attention easy to learn: each digit is a separate token and the least significant digit is put first, so that the first digit of the output is simply the sum of the first digits of the inputs and the second digit is the sum of the second digits plus an optional carry from the first digits and so on. If the numbers are represented with the most significan…

> but I think logarithms are probably another computation that's too difficult to learn without additional hints for intermediate steps.

I suppose you're probably right, but LLMs probably have a lot of log tables in their training data so I'm not so sure.

Re: Why can't transformers learn multiplication?

#27

Because they produce output probabilistically, when multiplication is deterministic. Why is this so hard for everyone?

If being probabilistic prevented learning deterministic functions, transformers couldn’t learn addition either. But they can, so that can't be the reason.

Re: Why can't transformers learn multiplication?

#28

Because they produce output probabilistically, when multiplication is deterministic. Why is this so hard for everyone?

If being probabilistic prevented learning deterministic functions, transformers couldn’t learn addition either. But they can, so that can't be the reason.

People are probabilistic, and I've been informed that people are able to perform multiplication.

Re: Why can't transformers learn multiplication?

#29
post #20

Earlier quoted context omitted.

The paper uses a number representation that is designed to make attention easy to learn: each digit is a separate token and the least significant digit is put first, so that the first digit of the output is simply the sum of the first digits of the inputs and the second digit is the sum of the second digits plus an optional carry from the first digits and so on. If the numbers are represented with the most significan…

> but I think logarithms are probably another computation that's too difficult to learn without additional hints for intermediate steps. I suppose you're probably right, but LLMs probably have a lot of log tables in their training data so I'm not so sure.

The paper is about the ability of transformers to learn a task based on training data for that task only, not about LLMs pretrained on much of the internet. And training on log tables doesn't necessarily allow the model to always output the correct logarithm, just as training on multiplication tables doesn't necessarily confer the ability to multiply.

Re: Why can't transformers learn multiplication?

#30

Because they produce output probabilistically, when multiplication is deterministic. Why is this so hard for everyone?

Not true though. Internally they can “shell out” to sub-tasks that know how to do specific things. The specific things don’t have to be models. (I’m specifically talking about commercial hosted ones that have the capability i describe - obviously your run of the mill one downloaded off of the internet cannot do this).

That doesn't appear to be the kind of thing this article is describing.
Post reply on HN