Arithmetic is king = royalty + male, while queen = royalty + female
But then it makes all these words just arithmetic values without meaning. Even if the words "royalty" and "male" can be sum or difference of some other words and so on - all are just numbers, no meaning at all.
Also those are not mere numbers here, but vectors. Dimensionality and orthogonality is key to define complex relationships.
And in the Transformer architecture you’re working with embeddings, which are exactly what this article is about, the vector representation of words.
As others already mentioned, the secret is that arithmetic is done on vector in high-dimensional space. The meaning of concepts is in how they relate to each other, and high dimensional spaces end up being a surprisingly good representation.
Give me a better definition of meaning and I might change my mind on the topic.
And there’s nothing special about my 21x23 square feet lawn. Can you emulate it? To what fidelity? How much should the map correspond to the territory? The same squarage, the same elevations down to the millimeter?
You’re not saying anything that counters the point that was made. Just mentioning stuff that people animals are made of with the assumed strawman argument (not made) that there is any non-physical essence at play. There isn’t.
Put a camera and some feet on an LLM and maybe it has an embodimeent.As long as it just has digital input it does not in the sense being discussed here.
https://youtu.be/wjZofJX0v4M?si=QEaPWcp3jHAgZSEe&t=802
This even opens up a more data-based approach to linguistics, where it is also heavily used.
> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that".
Besides which, this is totally a valid question based on the article. (The temptation to ask if you read it is almost overwhelming!) It talks about how to do arithmetic but not what the result of that will necessarily be, so I don't see that any part of it answers the question of "cash is king" + "female" - "male".
There was always these contextual meanings that differ widely.
Like "carrots are orange" is a fact that's generally okay, but is not true at all, carrots come in a very wide range of colors.
But LLMs completely crushed through these problems. And vector embeddings are a bit part of why it worked.
So yeah, somewhere in those vectors is something that says that when cash is king, "king" has no relationship to monarchy.
Then there’s the phonetic angle in addition to the semantic one. Why isn’t cash emperor? Because “cash is king” is alliterative.
Then there’s the orthographic angle: it’s a lot easier to write “king” than “emperor”.
For instance, a CAD object has no notion of what an airplane wing or car wheel are, but it can represent those in a way that how a wing relates to a fuselage is captured in numerical simulations. This is because it doesn't mangle the geometry the user wanted to represent ("what it means", in a geometric sense), although it does make it differ in certain ways that are "meaningless" (e.g. spurious small features, errors under tolerances), much like this representation might do with words.
Back to words, how do you define meaning anyways? I believe I was taught what words "mean" by having objects pointed to as a word was repeated: "cat", says the the parent as they point to a cat, "bird", as they point to a bird. Isn't this also equality/correspondence by relative frequency?
"cash is king". What is queen?
"expenses", obviously. ;)Cash flow, "because you need the ongoing stream, not just a pile of cash, to reign successfully".
Queen + One = King
I say credit, because it is not as physical and direct as cash, so perhaps it is perceptually more feminine?
But I will have to check the next time I work with word2vec.
Any reason why this is the case?
It is more common for people to personify objects (say, a rock or a frog or a random internet user) as male than female. In many languages, the plural for a group of things is male even if it only has one male element.
A simple charachter like pac man is male in a universal kiki/bouba sense, but the female equivalent needs a bow (it is a more complex specalization of its male counterpart)
Obviously, biologicially male-ness is a specialization of female-ness, because females more resemble unsexed creatures in their ability to reproduce.
But in the latent space of the human mind, or in language I think male is closer to "default" and female is a specialzation of maleness. Even the words female or woman are modifications of the word male or man.
Perhaps this evolved out of primative social structures. If women occupy a more domestic social role and men a more nomadic one, then you would encounter more men in the outer world. So you would generally associate unknown things in the external world as being masculine, and would associate feminity with specific inter-village inter-family things of your local world
*with transformer models, it is pretty much not even wrong.
king - man + woman ≈ queen (0.8510)
Top similarity
0.8510 queen
0.8025 king
0.7674 princess
0.7424 woman
0.7212 queen Elizabeth
Berlin - Germany + France ≈ Paris (0.8786) Top similarity
0.8786 Paris
0.8309 Berlin
0.8057 France
0.7824 London
Sure, 0.85 is not an exact match so things are not exactly linear, and if I dump an entire dictionary in there it might be worse, but the idea very much worksEdit: after running a 100k wordlist through qwen3-embedding:0.6b, the closest matches are:
king – man + woman ≈ queen (0.7873)
berlin – germany + france ≈ paris (0.9038)
london – england + france ≈ paris (0.9137)
stronger – strong + weak ≈ weaker (0.8531)
stronger – strong + nation ≈ country (0.8047)
walking – walk + run ≈ running (0.9098)
So clearly throwing a dictionary at it doesn't break it, the closest matches are still the expected ones. The next closest matches got a lot more interesting too, for example the four closest matches for london – england + france are (in order) paris, strasbourg, bordeaux, marseillesI prefer the old school
king(X) :- monarch(X), male(X).
queen(X) :- monarch(X), female(X).
queen(X) :- wife(Y, X), king(Y).
monarch(elizabeth).
female(elizabeth).
wife(philip, elizabeth).
monarch(charles).
male(charles).
wife(charles, camilla).
?- queen(camilla).
true.
?- king(charles).
true.
?- king(philip).
false.
where definitions are human readable rules and words are symbols.Berlin - Germany + France = Paris , that sort of thing
capital(germany, berlin).
capital(france, paris).
is clearer.Someone once told me you need humongous vectors to encode nuance, but people are good at things computers are bad at, and vice-versa. I don't want nuance from computers any more than I want instant, precise floating point calculations from people.
These are two opposing approaches to AI. Rule induction is somewhere in between - you use training data and it outputs (usually probabilistic) human-readable rules.
And Munich - Germany + France is Strasbourg
1. The W2V example is approximate. Not "fuzzy" in the sense of fuzzy logic. I mean that Man Woman Queen King are all essentially just arrows pointing in different directions (in a high dimensional space). Summing vectors is like averaging their angles. So subtracting "King - Man" is a kind of anti-average, and "King - Man + Woman" then averages that intermediate thing with "Woman", which just so happens to yield a direction very close to that of "Queen". This is, again, entirely emergent from the algorithm and the training data. It's also probably a non-representative cherry picked example, but other commenters have gone into detail about that and it's not the point I'm trying to make.
2. In addition to requiring hand-crafted rules, any old school logic programming system has to go through some kind of a unification or backtracking algorithm to obtain a solution. Meanwhile here we have vector arithmetic, which is probably one of the fastest things you can do on modern computing hardware, not to mention being linear in time and space. Not a big deal in this example, could be quite a big deal in bigger applications.
And yes you could have some kind of ML/AI thing emit a Prolog program or equivalent but again that's a totally different topic.
And in reality you can use it in much broader applications than just words. I once threw it onto session data of an online shop with just the visited item_ids one after another for each individual session. (the session is the sentence, the item_id the word) You end up with really powerful embeddings for the items based on how users actually shop. And you can do more by adding other features into the mix. By adding "season_summer/autumn/winter/spring" into the session sentences based on when that session took place you can then project the item_id embeddings onto those season embeddings and get a measure for which items are the most "summer-y" etc.
male(philip).
If you're missing that rule then you're getting what you would expect?I fixed some math rendering - it has suffered after some migration.
CLPadvocate•3w ago
shantara•2w ago
memsom•2w ago
atiedebee•2w ago
Correct me if I am misunderstanding what you meant, but Dutch has koningin and German has Königin? They are basically a feminized version of king.
aitchnyu•2w ago
pjc50•2w ago
The translator's curse of a language having lots of synonyms, the subtleties of which don't map directly on to English. None of those seem particularly similar to queen/kvinne?
aitchnyu•2w ago
stared•2w ago
And a longer text, https://blog.oup.com/2011/10/wife/
Also, gynecology has the same roots.
DonaldFisk•2w ago