antics
14 hours ago
As an NLP person it's very hard for me to endorse this explanation, because the Vaswani et al transformer (as it is described here) simply does not work until you add the most important ingredient of all: the positional encoding.
Most of the semantics of a sentence are indicated by the precise order the tokens appear. This is easiest to see in a language like English, since it is visible in two very prominent ways.
First, the morphology is fairly derivational, meaning you can keep adding suffixes to things and English speakers will generally get what you mean. For example, add some more suffixes to that word: derivational-ish-ly. You've probably never heard this specific variant, but you still probably have some idea of what it means anyway. The transformer can only capture these semantics if it has some representation of the fact that the suffixes inflect the meaning of the word's root (presumably something like `deriv`). English encodes this entirely by the position of the suffixes relative to the root. Without the positional information, there is no way to recover it, and sentences would lose much of their meaning, since English depends heavily on this construction.
Second, English has relatively few cases, and thus relies very heavily on the order of words to indicate what is the subject and what is the object. English specifically is Subject-Verb-Object, and the instinct of native English speakers to use SVO ordering is so strong, you will find them inserting nouns and pronouns into sentences that do not actually have subjects at all. "It's raining outside" is the most famous example. This sentence has no subject at all, and yet native English speakers feel a strong need to place "it's" at the beginning.
If the transformer did not have positional encodings it would be completely hopeless to recover what is the subject and what is the object from English sentences. There simply is no other way to reliably tell, other than inspecting the word positions.
It's worth noting we also do have the counterfactual. Generative language models that explicitly exclude positional information, like Latent Dirichlet Allocation, are only able to (essentially) cluster word co-occurrences. That is not as useless as it sounds—if I say "fire house burning ambulence" you kind of get the point even without a subject or an object—but it certainly does not generate the lucid, provoking sentences that modern LLMs do.
okeuro49
13 hours ago
> "It's raining outside" is the most famous example. This sentence has no subject at all, and yet native English speakers feel a strong need to place "it's" at the beginning.
German: es regnet French: Il pluet
I don't see why English is special here.
antics
13 hours ago
French is interesting because it evolved this so-called "dummy subject" pattern (which is actually called "subject-prominence") for an entirely different reason than English.
French is descended from Latin, which is "pro-drop" in the sense that you'd drop the "dummy subject" and simply write "pluit." Later, Old French, like English, lost most of its cases. Because of that, many word endings started sounding very similar (a problem known as "agreement syncretization"). The pro-drop "null" subject disappears in the record roughly as that happens, presumably to help disambiguate.
This is an entirely different path than English took, and it's also not a path any other Romance language took. Spanish isn't even subject-prominent. It fully allows the "null" construction, e.g., "llueve", which literally is just "rains."
Swizec
13 hours ago
Slovenian: Dežuje.
One word (rains) is the full sentence. Because nothing else needs to be said.
strofocles
12 hours ago
Romanian: Plouā
glimshe
10 hours ago
Klingon: SIStah
adventured
13 hours ago
The sentence does have a very obvious subject. The environment is producing rain. The subject is the environment and its condition is being elaborated. It = environment.
The rain is not magical, the environment is producing it. The environment is raining. It's raining outside means the environment is producing rain outside.
Who could possibly confuse that as lacking a subject.
https://www.cambridge.org/core/journals/journal-of-linguisti...
antics
13 hours ago
And with this reply we begin one of the permanent debates on this subject. Regardless of where anyone here comes down on this particular case, "it" is an indisputable truth that not all English sentences have subjects. Yet, many of them have pronouns where a subject should be. Maybe the famous example isn't one of them, but "it" is not at all hard to come up with a sentence where that is true. :)
birksherty
9 hours ago
Then why don't you say "environment is raining outside" ?
SAI_Peregrinus
5 hours ago
Many syllable waste time. Contraction fast.
hackernudes
4 hours ago
Sky wet
psychoslave
13 hours ago
Il pleut*
I guess the author means in contrast to some cases like "Pluvas" in Esperanto, see https://www.youtube.com/watch?v=fOBkKcbJUAE for a nice employ of it.
Italian, Spanish and Latin (for example) can generally avoid to express explicitly the subject in a dedicated pronoun, as the verb already encode the it through specific flection. In contrast in French and German only in imperative tense one can formally make such an ellipsis (colloquially of course one can encounter more nuances).
So nothing exceptionnal
inkysigma
14 hours ago
Well, the masking could be causal and I think that's been investigated by several groups.
antics
14 hours ago
Yes, as I mentioned to another commenter, I'm talking about the original formulation because that's what the article talks about. We have more options now, although (as you seem to be suggesting) they do all necessarily model position. They have to—there is no other way to do things like recover the subject in an English sentence without positional information.
lostmsu
3 hours ago
AFAIK, positional encoding is not that important for the performance of causal transformers (e.g. all important modern LLMs). The causal masking itself supplies necessary information implicitly.
antics
2 hours ago
This has been addressed several times now in the peer comments to this one. I am addressing the original formulation of the problem because the article is about the original formulation. There are other options available now, including causal masking, but in the original formulation positional encodings are THE most important single ingredient in success, because many aspects of semantics cannot be recovered from anything except position. One example is the subject in an English sentence.
cyanydeez
14 hours ago
The Chinese will eventually test this theory with their 80000 character set.
numpad0
9 hours ago
They don't really have that many different characters, it's just that the way Chinese script was adapted to computers use a rigid set of that many pre-composed characters.
in-silico
14 hours ago
I like the enthusiasm but no they actually work fine without positional encodings: https://arxiv.org/abs/2512.12167
antics
14 hours ago
To clarify, I'm talking about the original formulation of the problem, where positional encodings are crucial, because the article is talking about the original formulation of the problem.
But these days, there are many more options. They all maintain this positional information in one way or another. The one you cite (as I understand it) drops the positional encodings after pretraining, and keeps (e.g.) the causal mask.
krackers
13 hours ago
>drops the positional encodings after pretraining,
I thought with NoPE schemes you don't even need it during pretraining
https://arxiv.org/abs/2305.19466
https://sebastianraschka.com/llm-architecture-gallery/nope/
Given the causal mask and the way attention works LLMs can implicitly propagate a signal for ordering
antics
13 hours ago
You could be right, I have not kept up with the literature very closely! I'm just trying to help people understand that this article does not capture something very important about the Vaswani et al formulation of the transformer architecture. :)
psychoslave
13 hours ago
>Most of the semantics of a sentence are indicated by the precise order the tokens appear.
I would rather say it’s derived from contextual element. And in linguistic context which encodes more interpretation cues, order of morphemes drop symmetrically in semantical importance, though it can still affect interpretation on pragmatic level. Latin for example already offers more flexibility regarding word order, though it’s used mostly in poetry/stylised-rhetoric. And as German show having the case encoded in the nouns don’t even prevent mandatory rigidity in sentence structure.
antics
13 hours ago
It's hard to speak for every language on Earth, but generally languages that have less flexible word orderings will have correspondingly more complicated morphology. In those cases, order does obviously still matter, but instead of in word orderings, it would be in things like prefixes and suffixes.
There isn't really a way to get around this. Natural language IS structured as a recursive tree. Our job is to extract this tree from a flat stream of tokens (or similar), and straightforwardly the only way to do that is to make the ordering of the tokens meaningful. There is no other option! This is how 100% of parsing works in any context whatsoever, both theoretically and practically.
gorgolo
9 hours ago
Think you mean it the other way? More flexible languages require more complex morphology
psychoslave
11 hours ago
There is nothing like a valid criterion to discriminate "natural" in languages. All human languages are praxeostratic, they result from the cumulation of practices through time. Some might be more or less blank slate founded through theoretical jump, but even burning the bridge doesn’t mean creation ex nihilo. I mean, the only thing that would not be "natural", would obviously be "supernatural", like if one pretend a language to be some divine creation and not result of human contingent existence.
And just because utterances can be more or less matched with recursive tree doesn’t mean there is an ontological absolute truth about language there. Even "language" refers to some vague abstraction. Just like the "it" in "it rains" mentioned in this discussion: no entity out there actually respond to "language".
At introspection level, I absolutely don’t interpret utterances like recursive tree. They are more like cues going through living graphs more or less already connected and being able to change topology on the go. Impermanence of interpretation results is the only constant.
Now it’s not to dismiss that some other people might feel like "Natural language IS structured as a recursive tree" is the only way. People have different perspective, different brains, different life experiences. One who dwell in aphantasia¹ don’t perceive the world the same way as people that have hyperphantasia². Different of course here doesn’t mean better/worst or superior/inferior.
¹ A word I discovered in some HN comment
² A word that I had never red before but just popped up in my mind as I was thinking about this sentence, but which is actually already is in use in literature apparently: https://en.wikipedia.org/wiki/Hyperphantasia
antics
5 hours ago
A tree is a graph so I’m not sure I understand your idea. But, at the end of the day, the point of the tree is just to represent the relationships between the tokens. There IS a relationship. As long as your theory represents that as precisely and with as much predictive power as trad linguistics, it doesn’t really matter how.
I’m also not sure why you are talking about why natural languages are not different from other ones. That is what I’m saying, it’s the reason behind the comment that all parsing works the same way.
spwa4
11 hours ago
But positional encoding by itself also won't work nearly as well.
And if you look at how transformers work you will immediately realize there's nothing a transformer can do that an RNN cannot do, and frankly that an RNN cannot do 1000x more efficiently at inference time. It's just that training even the best known RNNs is going to take a lot longer because it can't be parallelized. It cannot train on 100 GPUs, in fact it cannot really use a GPUs advantage.
Plus equivalence proofs will get you a lot further than RNNs too. Kernel methods will obviously work as well, for example.