News for hackers. Stuff that matters.
Re:King – Man + Woman = King? by JD557 on Tuesday July 16, 2019 @05:06AM (#20448537)
At first I thought "What's the big deal? You also remove the query from recommender systems, for example. It's an obvious uninteresting result!".

But then I read the linked article [Nissim 2019] and it all became much clearer with te example in the title: "Man is to Doctor as Woman is to Doctor". If you remove "Doctor" from the results, you'll get "Nurse" instead, not because the dataset/society/... is biased, but because you inserted the bias in your model!

With this small "optimization" (and others presented in the article, such as the "threshold-method" and hand-picked results from the Top-N words), it's trivial to use the anology method to show that any dataset is biased, since you are filtering the unbiased results!

One a side note, I wish articles like this were more popular. I find that it's really easy to use AI techniques "the wrong way" and there's are a lack of articles pointing to common pitfalls (and, to make things worse, there are a lot of blog posts doing things wrong, which only validates bad methodology).

[Nissim 2019]: https://arxiv.org/pdf/1905.09866.pdf

Re:King – Man + Woman = King? by tgb on Tuesday July 16, 2019 @06:09AM (#20448768)
The other reason to not exclude King is that it's pretty likely that Queen is the closest word to King. Then King - X + Y = Queen is just saying that X and Y are close to each other, not an interesting result.
Re:King – Man + Woman = King? by derefr on Tuesday July 16, 2019 @11:50AM (#20451182)
From my perspective (linguistic anthropology), they’re not actually all that close. Most historical “queens” (which have that label applied to them by modern English speakers) were not rulers (and we have a separate term, “queen regnant”, for that) but rather the gender dual to the male “royal consort.” It was only in recent history where you see examples of “equal-opportunity” monarchies that could have either a male or female monarch of equal power, and thus usages of “queen” to denote those monarchs.

Thus—given that we’re defining words based on their centroids of usage in a historical corpus—if a woman is a monarch of a kingdom, “king” is a tighter historical fit to describe her role than “queen” is.

Re:King – Man + Woman = King? by tareqak on Tuesday July 16, 2019 @06:14PM (#20454369)
Re:King – Man + Woman = King? by petters on Tuesday July 16, 2019 @03:33PM (#20453139)
It is not clear that they are close.

I did the same thing with Japanese and Western movies, and the result was not due to the movies just being close. See https://strandmark.wordpress.com/2017/07/08/the-vector-from-...

Re:King – Man + Woman = King? by tgb on Tuesday July 16, 2019 @06:06PM (#20454321)
Luckily we don't have to speculate. See a web interface at [1]. Select English from the dropdown and it says that the closest word to king is kings and second is queen, then monarch. And to test my second statement I also tried "red is to king as blue is to ___" and got kings and queen as the top two answers.

[1] http://bionlp-www.utu.fi/wv_demo/

Re:King – Man + Woman = King? by petters on Friday July 26, 2019 @10:30AM (#20535052)
Thanks!
Re:King – Man + Woman = King? by Tarq0n on Tuesday July 16, 2019 @11:38AM (#20451072)
Considering the very high dimensionality of the space, it's not as obvious as you think. Consider the noise inherent in the word 2vec negative sampling method as well. Another word could very well end up closer to "king".
Re:King – Man + Woman = King? by dllthomas on Tuesday July 16, 2019 @01:53PM (#20452314)
I wonder if there's anything interesting in normalizing Y - X somehow.
Re:King – Man + Woman = King? by novaleaf on Tuesday July 16, 2019 @09:46AM (#20449947)
your 2 sentence explanation is better than the entire article!
Re:King – Man + Woman = King? by SQueeeeeL on Tuesday July 16, 2019 @11:23AM (#20450928)
I disagree, the article was pretty decent. And it had some nice images.
Re:King – Man + Woman = King? by stult on Tuesday July 16, 2019 @07:23AM (#20449064)
I think there are two ways to look at excluding input vectors from the output. You can look at it as cheating/bias, or you could say the method explicitly excludes a specific subcategory of otherwise valid results (i.e., perfectly equivalent analogs, where X:Z == Y:Z... not sure if there is a term of art for that). Which to me seems like a perfectly legitimate limitation on the algorithm, as long as it is explicitly acknowledged and handled.

But I think you are absolutely correct that very few articles explicitly acknowledge and handle these types of common pitfalls. Especially more intro-level articles. Personally, I'd love to read more about effective strategies for ensembling different algorithms to work around some of those pitfalls. For example, the OP points out that Word2Vec underperforms on lexical semantics. I wonder if you could use a different algorithm that performs well on lexical semantics but poorly on other categories as a supplement, with some third algorithm deciding which to use in any given case.

Re:King – Man + Woman = King? by flo_hu on Tuesday July 16, 2019 @07:31AM (#20449100)
I would also agree with you that it is fine to add additional rules to improve the outcome, but than it shouldn't be made clear in the way the result is presented (as you say, that rarely happens in intro-level tutorials/courses).

Your last point sounds like a cool idea! Using those more in-depth metrics to find weaknesses and see if other, complementary algorithms can fill the gap.

Re:King – Man + Woman = King? by SiempreViernes on Tuesday July 16, 2019 @11:10AM (#20450780)
*should?
Re:King – Man + Woman = King? by sooheon on Tuesday July 16, 2019 @05:46AM (#20448688)
Wow, the Manzini et al. paper is particularly egregious, because they accidentally swapped "caucasian" and "black" in their actual query and still got the sensational word associations they wanted.
Re:King – Man + Woman = King? by dmurray on Tuesday July 16, 2019 @06:02AM (#20448738)
Yeah, that's more or less academic fraud.
Re:King – Man + Woman = King? by anjc on Tuesday July 16, 2019 @11:14AM (#20450821)
They're reporting real findings which they allow everyone to verify. There's nothing academically fraudulent about this.
Re:King – Man + Woman = King? by sooheon on Wednesday July 17, 2019 @02:50AM (#20457124)
You're right they're just reporting their findings, and their stated methodology is to look through the top N words and pick the one they like best. They dug all the way down to the 39th word to find asian:engineer => black:? "killer", when the actual top two associations were "operator" and "jockey" (which also indicate bias, but not the kind the authors wanted). They dug to the 53rd word to find christian:conservative => muslim:? "regressive", when top results were "moderate" and "conservative. It may not be fraudulent, but the methodology is highly motivated, subjective, and introduces more bias than it purports to find.
Re:King – Man + Woman = King? by anjc on Friday July 19, 2019 @08:05AM (#20477903)
Yeah I can't disagree with this. I think it's typical to present the highlights of your work though. In this case, the issue seems to be "why do the authors consider 'black:killer' to be a highlight"? It might be racist but it's not academically fraudulent (a strong statement) in my view.
Re:King – Man + Woman = King? by dvfjsdhgfv on Tuesday July 16, 2019 @08:08AM (#20449281)
I wonder why they do that, it's more or less trivial to verify.
Re:King – Man + Woman = King? by bjourne on Tuesday July 16, 2019 @10:04AM (#20450102)
The dataset is biased. Otherwise woman~nurse wouldn't have been the second hit for the query. Had the dataset not been biased it would have been able to produce the analogy "woman is to doctor as man is to nurse". See table 4b where they perform that experiment.

I think it is also important to note that this is an argument over which of two methodologies is best. The answer likely is that it depends on the use case. Researchers are not being accused of using underhanded methods, manipulating data or cheating.

Re:King – Man + Woman = King? by Diggsey on Tuesday July 16, 2019 @10:11AM (#20450150)
Bias is not a boolean quantity. The underlying data set is somewhat biased, and the "trick" being used greatly exaggerates the impact of that bias.
Re:King – Man + Woman = King? by bjourne on Tuesday July 16, 2019 @11:34AM (#20451035)
Bias is a boolean quality. A random distribution is not biased. It really is not a "trick".
Re:King – Man + Woman = King? by 0xFluegel on Tuesday July 16, 2019 @01:44PM (#20452240)
Any finite sampling of any distribution (biased or not) can show bias. A feasible process that doesn't introduce or exagerate bias is the biggest problem when trying to get representative statistics.

And bias can certainly be of different magnitude. A weighted dice can have a bias that shows up after only 10 rolls and another one can only show it's bias after 1000.

Re:King – Man + Woman = King? by dragonwriter on Tuesday July 16, 2019 @03:54PM (#20453316)
> A random distribution is not biased. It really is not a "trick".

A random sample is not a product of a biased sampling method, but it can be (and almost always is) biased, it's just if you take enough such samples, the biases will tend to offset, which is why we say the sampling method isn't biased.

Re:King – Man + Woman = King? by bjourne on Tuesday July 16, 2019 @04:36PM (#20453627)
You are splitting hairs.
Re:King – Man + Woman = King? by Majromax on Tuesday July 16, 2019 @01:15PM (#20451959)
> The dataset is biased. Otherwise woman~nurse wouldn't have been the second hit for the query. Had the dataset not been biased it would have been able to produce the analogy "woman is to doctor as man is to nurse".

I think that this hypothetical example would be evidence of bias. "woman:doctor :: man:nurse" as an analogy only works because of gendered implications of 'doctor' versus 'nurse', so if that were a robust output of the model it would imply that the word2vec found that gender was of great significance in the manifold near 'doctor'. (The analogy would just be applying a negative weight to the gender basis, but that's mathematically fine even if not customary.)

Re:King – Man + Woman = King? by thrwaway3873 on Tuesday July 16, 2019 @03:44PM (#20453229)
but in analogies, a:b::c::___ (a is to b as c is to what), having d be the same as b is not allowed. Such as, I believe, on a Miller Analogies Test.

In a mathematical context, if you have something like this: 2:0::4: (two is to zero as four is to what?) then acceptable answers might be 2 (rule is: subtract 2), or maybe it could be 1 (take half, subtract one). But it couldn't be zero. (rule can't be "multiply by 0").

I could be wrong but I believe that's how it works.

Re:King – Man + Woman = King? by dragonwriter on Tuesday July 16, 2019 @03:51PM (#20453291)
> but in analogies, a:b::c::___ (a is to b as c is to what), having d be the same as b is not allowed

Particular tests may adopt such a rule, but this doesn't apply to analogies in general. Particularly, consider the case where Alice and Carol and both daughters of Bob: Alice:Bob::Carol:Bob is a perfectly valid analogy; a:b::c:b is commonly phrased along the lines of “a and c are similarly situated with respect to b”.

Re:King – Man + Woman = King? by Jenz on Tuesday July 16, 2019 @04:25PM (#20453548)
> I find that it's really easy to use AI techniques "the wrong way"

NLP-wise, is there "a right way"?

Re:King – Man + Woman = King? by JD557 on Wednesday July 17, 2019 @04:30AM (#20457574)
Just because there's not a "right way" doesn't meant that there aren't a lot "of wrong ways" ;)

Actually, some years ago I bumped into a similar problem to the one discussed, where someone wanted to use NLP to show gender bias in a dataset, and hit one of the common pitfalls that I mention (I hope that I don't start a flamewar by sharing this story):

Here's what they tried to do: 1. Fetch a list of ~800 atendee names from a Portuguese tech conference (it had an official API with user profiles) 2. Download a dataset most common male/female names for newborn babies in Portugal and America for the latest 3 years 3. Train a naive bayes model on the downloaded dataset and use it to classify the antedees into male/female

After doing that, the algorithm returned something like "8 female attendees and 792 male antendees".

I found this particularly strange (considering that I knew more than 8 women that attended on previous years), so I took a peek at the antendee dataset and found that: - There were some users using a fake name (including one organization account) - There were certainly more than 8 female antendees, and at least 6 were named "Inês" (female name)

After discussing this with the ones involved, we found the problem! - The dataset was not being normalized (it was being trained with "Ines" and tested with "Inês") - The naive bayes[1] implementation used, when faced with a completly new input, outputed the most common class of the training dataset

In the end, the final result was closer to "80 female, 705 male, 15 unknown", which is a much more believable result (closer to the typical distribution of Software Engineer students in Portugal).

Note that the author wasn't trying to deceive anyone, he just tripped on some common pitfalls (forgot to normalize the data and used an off-the-shelf implementation without looking into the details).

[1] There was only one attribute, so implementing this without using a naive bayes library was actually easier and produced the correct results.

Re:King – Man + Woman = King? by 6gvONxR4sf7o on Tuesday July 16, 2019 @11:50AM (#20451186)
For others reading, there are still important biases these models pick up (for a variety of reasons I won't go into). The takeaway here is that some of the evidence you've heard about isn't really evidence, not that the biases aren't there.