Lab · Word map词图练习 · 词图
When was “these words are close” drawn by hand?“这些词很近”是什么时候亲手画上的?
The classmate scores the same two headlines a second way before writing “the headlines agree.” Counts only notice shared spelling, so “raised” and “lowered” barely change the score. On this page each content word has a place that was typed in: “raised” sits opposite “lowered,” and “pay” sits near “earnings.” The map score therefore drops on the opposite-claim pair and rises on the different-words pair. A trained embedding would learn those places from a large pile of headlines. These places were typed.同学在写下“两则标题说的是一回事”之前,用第二种办法给同样两则标题打分。计数只看见相同的拼写,所以 raised 和 lowered 几乎不改变分数。这一页每个实词都有一个手写的位置:raised 在 lowered 对面,pay 靠近 earnings。于是地图分数在意思相反那一对下降,在用词不同那一对上升。训练出来的嵌入会从一大堆标题里学习这些位置。这些位置是手写的。
Why it matters.为什么要紧。 A tutorial note can quote whichever score looks convenient. The count score says the wage lines agree when one verb has flipped the story. The map score says two different wordings are close, because the map was drawn that way. Neither score was learned from a newspaper archive.导修笔记可以引用看起来顺手的那个分数。计数分数会说两则工资标题一致,可一个动词已经把故事说反了。地图分数会说两种说法很近,因为地图就是这样画的。两个分数都不是从报纸档案里学来的。
Try this试一试 Stay on “Opposite claims” and compare the two numbers. Then move to “Different words.” The count and the map should trade places.停在“相反的主张”,比较两个数。再移到“用词不同”。计数和地图应该对调。
A.A. The new training program raised wages for the workers in the plant.
B.B. The new training program lowered wages for the workers in the plant.
How to read the chart怎么读这张图
If you read this wrong要是读错了
If the classmate tells the tutorial that a high map score means a model understood the headlines, the note may say the headlines agree. The marks sit close because pay was typed near earnings. Those places were not learned from a pile of headlines.如果同学告诉导修,地图分数高表示模型读懂了标题,笔记里就可能写成两则标题一致。点靠在一起,是因为 pay 被放在 earnings 旁边。这些位置不是从一堆标题里学来的。
What this picture is enough for这张图够说明什么
Enough to see the word-count score and the map score disagree on the same two headlines.看得出:词数分数和地图分数,在同样两则标题上可以不一致。
Not enough for a note that says the headlines agree. You still need places learned from headlines you can name, and a check that those places separate “pay rose” from “pay fell.”还不够拿来写“两则标题一致”。你仍需要从你能点名的标题里学来的位置,并检查这些位置把“工资涨了”和“工资降了”分开。
The equation, and where it stops式子、假设和边界
A headline’s place is the average of the places of the words that have one. Cosine similarity is the angle between those two averages. The count score is the bag-of-words cosine from the other page, with little words kept. The two scores answer different questions because they use different pictures of the same headlines.一则标题的位置,是有坐标的那些词的位置的平均。余弦是这两个平均之间的夹角。计数分数是另一页的词袋余弦,小词也留着。两个分数回答的不是同一个问题,因为它们用的是同一对标题的两种画法。
A trained embedding would place words by a learning rule on a large pile of headlines. This page types the places directly. Words with no place are ignored.训练出来的嵌入会按一大堆标题上的学习规则去放词。这一页直接写下位置。没有位置的词不算。
Easy to get wrong.容易踩的坑。 A high map score is easy to read as “the model understood the sentences.” Here the places were chosen so that some synonyms sit together and one contrasting pair sits apart. Change the places, keep the sentences fixed, and the ranking of the pairs can change. Another mistake is to average a sentence and then talk as if the mark were a single word. The mark is a mixture.地图分数高,很容易被读成“模型读懂了这些句子”。这里的位置是选定的,让一些同义词靠在一起,并让一对反义词分开。改位置、句子不动,哪一对更近也可以变。另一个错,是把一句平均之后,还当成在谈某一个词。那个点是混在一起的。