https://www.anthropic.com/research/tracing-thoughts-language...
1,378 karma · joined September 30, 2009
https://www.anthropic.com/research/tracing-thoughts-language...
No. Possibly you're confused between GAs and GP, a common confusion. In GP, the goal is to find an algorithm - in a real programming language, not as weights - to optimise an objective function. Often that is specified by input-output pairs, similar to supervised learning.
Not quite! You don't really know how you look, because you see yourself before transmission.
> So while Athena knew where it was relative to the surface of the Moon, the lander did not know how far it was above the surface.
This is really crappy writing. That second paragraph sounds like a self-contradiction. Unless "the lander" is a separate entity from "Athena"? Some publications refuse to use the same term twice, even if it introduces ambiguity as here.
According to your definition of reasoning, which involves surely getting the right answer, no human does reasoning. Probably less than 1% of published mathematics meets the definition.
> Important problems are those which require correct responses.
There are many important problems where formal reasoning is not possible, and yet a decision is required, and both humans and LLMs can provide answers. "Should I accept this proposed business deal / should I declare war / what diagnostic test should I order?" We would like to have correct responses for these problems, but it is not possible, even in principle, to guarantee correctness. So yes, we use heuristics and approximate reasoning for such problems. Is an LLM "unreliable" or "dangerous" in such problems? Maybe yes, and maybe more so than humans, but maybe not, it depends on the case. To try to keep the point of the thread in focus, an LLM should probably not try to solve such problems by writing code.
You didn't like "what colour is the sky" (without looking), ok. "Given the following [unseen during training] page of text, can you guess what emotion the main character is feeling at the end?" This is a problem that a human can solve, and many LLMs can solve, even if they can't solve the detective puzzle. In case it doesn't sound important, this can be reframed as a customer-service sentiment-recognition problem.
Human "reasoning" (ie speech or self-talk that sounds a bit like reasoning) often outputs correct results. Does "often" fit the definition?
> Which problems that demand producing correct solutions could be solved by a processor which could not solve a "detective game"?
For example, "what colour is the sky right now?". A lot of people could solve this (even if they haven't looked outside), and so could a lot of language models, which can't solve this detective game.
Right, but the question is whether this is good enough. And what counts as "proper". A lot of what we call proper reasoning is still quite informal, and even mathematics is usually not formal enough to be converted directly into a formal language like Coq.
So this is a deep question: is talking reasoning? Humans talk (out loud, or in their heads). Are they then reasoning? Sure, some of what happens internally is not just self-talk, but the thought experiment goes: if the problem is not completely ineffable, then (a bit like Borges' library) there is some 1000-word text which is the best possible reasoned, witty, English-language 1000-word solution to the problem. In principle, an LLM can generate that.
If your goal is a reductio, ie my statement must be false since it implies models should write code for every problem - then I disagree, because while the ability to solve these problems might be a requirement to be deemed "an intelligence", nonetheless many other problems which require an intelligence don't require the ability to solve these problems.
I'm not sure what that means specifically. I don't agree overall. Only certain types of problems encountered by LLMs map cleanly to well-understood problems where existing solvers are perfect.
From what I can see (not rigorous): Claude 3.7 fails, ChatGPT with reasoning succeeds, DeepSeek with reasoning succeeds.
But of course the best way for a model to solve a problem like this is to translate it into a constraint satisfaction problem, and write out Python code to call a CSP solver.
And yes indeed, their ability to answer basic questions about coding on the same exam has drastically dropped versus last year.
What really amazes me is motorists' dislike of cyclists (common here in Ireland, also). If that cyclist you see wasn't cycling, they'd be in a car in front of you, and your traffic queue would be worse. Every cyclist is doing every motorist a favour.
The second simplest method might indeed use something like a system prompt with metadata like that, injected before the current window of text. But what would happen at runtime, when that metadata is not present? Probably performance would be much worse.
In [10]: o1[0, :, :3]
Out[10]:
tensor([[ 0.0053, 0.0017, -0.0012],
[ 0.0053, 0.0017, -0.0012],
[ 0.0053, 0.0017, -0.0012],
[ 0.0053, 0.0017, -0.0012],
[ 0.0053, 0.0017, -0.0012],
[ 0.0053, 0.0017, -0.0012]], grad_fn=<SliceBackward0>)
Every token has the same attention values. I expect attention(cat, everything) to differ from attention(dog, everything), even without positional encoding.Further, the attention weights are uniform and identical for both sentences:
In [46]: o1, aw1 = mha(W_q(e1), W_k(e1), W_v(e1))
In [47]: o2, aw2 = mha(W_q(e2), W_k(e2), W_v(e2))
In [48]: aw1.shape
Out[48]: torch.Size([1, 6, 6])
In [49]: aw2.shape
Out[49]: torch.Size([1, 6, 6])
In [50]: aw1
Out[50]:
tensor([[[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667]]],
grad_fn=<MeanBackward1>)
In [51]: aw2
Out[51]:
tensor([[[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667],
[0.1667, 0.1667, 0.1667, 0.1667, 0.1667, 0.1667]]],
grad_fn=<MeanBackward1>)
That is not expected. It's because the Linear layers are initialised with such small values. And the softmax causes a collapse.Trying random weights on a larger scale:
In [52]: W_q.weight.data *= 100
W_k.weight.data *= 100
W_v.weight.data *= 100
In [55]: o1, aw1 = mha(W_q(e1), W_k(e1), W_v(e1))
In [56]: o2, aw2 = mha(W_q(e2), W_k(e2), W_v(e2))
In [57]: aw1
Out[57]:
tensor([[[0.2049, 0.1606, 0.1256, 0.1095, 0.1723, 0.2270],
[0.0883, 0.2047, 0.1544, 0.2776, 0.1405, 0.1345],
[0.1196, 0.1719, 0.1831, 0.1541, 0.1374, 0.2339],
[0.1413, 0.2399, 0.1617, 0.2056, 0.1634, 0.0880],
[0.1455, 0.1432, 0.2432, 0.1239, 0.1494, 0.1948],
[0.1897, 0.1817, 0.1920, 0.1478, 0.1618, 0.1270]]],
grad_fn=<MeanBackward1>)
In [58]: aw2
Out[58]:
tensor([[[0.2049, 0.1606, 0.2270, 0.1095, 0.1723, 0.1256],
[0.0883, 0.2047, 0.1345, 0.2776, 0.1405, 0.1544],
[0.1897, 0.1817, 0.1270, 0.1478, 0.1618, 0.1920],
[0.1413, 0.2399, 0.0880, 0.2056, 0.1634, 0.1617],
[0.1455, 0.1432, 0.1948, 0.1239, 0.1494, 0.2432],
[0.1196, 0.1719, 0.2339, 0.1541, 0.1374, 0.1831]]],
grad_fn=<MeanBackward1>)
In [60]: o1[:, :, :5]
Out[60]:
tensor([[[ 0.0145, 0.3128, -0.3659, -0.1884, 0.1724],
[-0.2319, 0.1407, -0.6010, -0.4064, 0.4259],
[-0.3231, 0.1622, -0.6351, -0.1711, 0.4014],
[-0.0596, 0.2610, -0.7388, -0.2987, 0.3214],
[-0.2750, 0.0676, -0.4140, -0.2024, 0.3383],
[-0.1434, 0.0871, -0.3154, -0.0755, 0.3314]]],
grad_fn=<SliceBackward0>)
In [61]: o2[:, :, :5]
Out[61]:
tensor([[[ 0.0145, 0.3128, -0.3659, -0.1884, 0.1724],
[-0.2319, 0.1407, -0.6010, -0.4064, 0.4259],
[-0.1434, 0.0871, -0.3154, -0.0755, 0.3314],
[-0.0596, 0.2610, -0.7388, -0.2987, 0.3214],
[-0.2750, 0.0676, -0.4140, -0.2024, 0.3383],
[-0.3231, 0.1622, -0.6351, -0.1711, 0.4014]]],
grad_fn=<SliceBackward0>)
In [62]: print("Matches: ", torch.allclose(o1, o2, atol=1e-6))
Matches: Falsethe dog chased the cat: position 1 in the output is attention(dog, everything)
the cat chased the dog: position 1 in the output is attention(cat, everything)
[*] Ok, we can differ on that. My feeling is partly because the types of distributions that can't be learned - eg hash functions - are generally the kind of functions we don't really want to learn. Underneath this are deeper questions related to no free lunch and how "nice"/"well-behaved" this universe is.
(Like another commenter, I was also hoping for a direct/standalone explanation for why the red matrix is transposed.)
But I know what Steve Jobs would have said to this. Just go up and ask the girl what breed her dog is, and get to know her.
I was talking nonsense here - confusing the visual spectrum of light from red to blue with the visual spectrum of images, as in "how quickly the image changes as you move across the image". The article illustrates the latter concept well.
But another issue not mentioned in the article is that in images we can zoom in/out arbitrarily. So the width of a pixel can change – it might be 1mm in one image, or 1cm in another, or 1m or 1km. Whereas in audio, the “width of a pixel” (the time between two audio samples) is a fixed amount of time – usually 1/44.1kHz, but even if it’s at a different sample rate, we would convert all images to have the same sample rate before training an NN. The equivalent of this for images would be rescaling all images so that a picture of a cat is say 100x100 pixels, while a picture of a tiger is 300x300.
Which, come to think of it, would be potentially an interesting thing to do.