Remix.run Logo
bilsbie a day ago

I’m confused where in the weights the jspace is.

wongarsu a day ago | parent | next [-]

There was a series of blog posts posted to HN a while ago investigating how models behave on similar prompts in different languages. To paraphrase the results: the first couple layers map the query to some internal encoding that's mostly independent of the language. Then there are layers in the middle, then the last couple layers map the result back to the target language. You can actually take those middle layers and repeat them, and you get a stronger model. Those middle layers would be what Anthropic calls the J-Space, and their J-Lens maps activity in those layers back to tokens that trigger similar activity (with a technique they only drop hints at)

The finding that you can repeat the middle layers pairs neatly with Anthropic's finding that there is some internal CoT-like process happening in them. I'm not sure how to find those blog posts, but maybe someone else remembers them

steveklabnik a day ago | parent | next [-]

Here's Anthropic on this topic, last year https://www.anthropic.com/research/tracing-thoughts-language...

> Recent research on smaller models has shown hints of shared grammatical mechanisms across languages. We investigate this by asking Claude for the "opposite of small" across different languages, and find that the same core features for the concepts of smallness and oppositeness activate, and trigger a concept of largeness, which gets translated out into the language of the question.

bilsbie a day ago | parent | prev [-]

Thanks! Any rough guesses how the jlens might work? I can’t even seem to hazard a conception.

nh23423fefe a day ago | parent | prev | next [-]

It's not in the weights. Sounds to me like jspace is the "positive cone" over relevant (large norm) j-lenses, and j-lenses are gradients wrt tokens on the residual stream when you average over some training data.

lucrbvi a day ago | parent | prev | next [-]

Anthropic theorize that middle layers in an LLM is a "J-Space" used to "think" about the future answer or about abstract concepts.

Their method is used to identify which tokens can appears in which layers of the model.

throw310822 a day ago | parent | prev | next [-]

It's been shown that LLMs use their outer layers to decode from and encode to language, while their middle layers deal in language-independent abstract concepts. This means that the same question or statement in different languages activates the outer layers differently but produces the same patterns in the middle layers. Check this article with cool visualizations (btw, this is one of the articles mentioned also by a sibling answer):

https://dnhkng.github.io/posts/sapir-whorf/

The middle layers also perform reasoning on the abstract concepts, to the point that you can replicate some blocks of inner layers (thus giving the LLM more internal "reasoning space") and by this increase the model's reasoning abilities. The video in this article shows that when performing a sequence of arithmetic operations (without CoT, i.e. the result is spit out directly), internally the intermediate calculations are spelled out, and this can only happen in the depth direction of the LLM (since no new token is added to the sequence). So this "jspace" can only be situated in the middle layers, probably in circuits that repeat nearly identical across several layers.

epolanski a day ago | parent | prev [-]

Tokens that are activated but not present in it's output maybe?

I too have confusion.