Understanding Transformers via N-gram Statistics
(arxiv.org)117 points by pona-a a day ago
117 points by pona-a a day ago
> The results we obtained in Section 7 imply that, at least on simple datasets like TinyStories and Wikipedia, LLM predictions contain much quantifiable structure insofar that they often can be described in terms of our simple statistical rules
> we find that for 79% and 68% of LLM next-token distributions on TinyStories and Wikipedia, respectively, their top-1 predictions agree with those provided by our N-gram rulesets
Two prediction methods may have completely different mechanisms, but agree sometimes, because they are both predicting the same thing.
Seems a fairly large proportion of language can be predicted by a simpler model.. But it's the remaining percent that's the difficult part; which simple `n-gram` models are bad at, and transformers are really good at.
I've always thought that LLMs are still just statistical machines and that their output is very similar to the superpermutation problem, though not exactly.
I just like to think of it as a high dimensional view of the relationships between various words and that the output is the result of continuing the path taken through that high dimensional space, where each point's probability of selection changes with each token in the sequence.
Unfortunately there's no thought or logic really going on there in the simplest cases as far as I can understand it. Though for more complex models/different architectures anything that fundamentally changes the way that the model explores a path through space like that could be implementing thought/logic I suppose.
It's why they need to outsource mathematics for the most part.
I'd also like to see a list of similarly-simple techniques for extracting rules where ML researchers could automatically try them all. In this case, the N-gram rules would be the starting point. For what predictions failed, they'd try to throw in the other techniques. Eventually most or all of the predictions should be captured by one or more simple rules. Some might be compound rules mixing techniques.
I think there will also be benefits to that both in interpretability and hardware acceleration. In time, maybe cheaper pretraining of useful models.
How does this have 74 points and only one comment?
on topic: couldn't one in theory, re-publish this kind of paper for different kinds of LLMs, as the textual corpus upon which LLMs are built based off ultimately, at some level, human effort and human input whether it be writing, or typing?
"How does this have 74 points and only one comment?"
I think one cause is hobbyists upvoting submissions that might be valuable to people in a specific field. We understand just enough to think it could be important but defer to subject matter experts on the rest. That's why I upvoted it.
Sounds regressive and feeds into the weird unintellectual narrative that llm is just like ngram models (lol, lmao even)
Thr author submitted like 10 papers this May alone. Is that weird?
These are different people:
https://arxiv.org/search/cs?searchtype=author&query=Nguyen,+...
Wikipedia mentions that up to ~40% of the Vietnamese population (~40,000,000 people) carries the name Nguyen:
https://en.wikipedia.org/wiki/Nguyen
For the paper itself, as someone working in the field, I find it interesting enough to consider reading at some point (I do not read that many analysis papers recently, but this one looks better than most). As for your accusation about it claiming that large language models are simply n-gram models, read the abstract until you realise that your accusation is very much unfair to the work.
This paper was accepted as a poster to NeurIPS 2024, so it isn't just a pre-print. There is a presentation video and slides here:
https://neurips.cc/virtual/2024/poster/94849
The underlying data has been open sourced as discussed on his blog here https://timothynguyen.org/2024/11/07/open-sourced-my-work-on...