(no title)
DonaldFisk | 1 month ago
I 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.
nerdponx|1 month ago
nerdponx|1 month ago
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.
maxweylandt|1 month ago
Berlin - Germany + France = Paris , that sort of thing
DonaldFisk|1 month ago
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.
bee_rider|1 month ago
magimas|1 month ago
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.
robocat|1 month ago
jhbadger|1 month ago