使用错误的嵌入解决语义难题
Solving Semantle with the Wrong Embeddings

原始链接: https://victoriaritvo.com/blog/robust-semantle-solver/

这篇帖子详细介绍了两种Semantle(一种词语相似度游戏)解题器。第一个,与Ethan Jantz合作开发,需要精确了解游戏的嵌入模型和余弦相似度。同事Daniel Vitek提出了一种更稳健的替代方案,只需要相对猜测排名——知道哪些猜测比其他猜测“更好”。 第二个解题器通过几何方式解释排名。两个猜测之间的每次比较都会分割嵌入空间,消除一半可能的目标词。通过累积这些“半空间”约束,解题器缩小了可能性。最初,这在使用相同的嵌入模型时效果很好,但在使用不同的模型时由于排名冲突而失败。 为了克服这个问题,实施了一种概率方法。与其消除词语,不如每次约束调整词语成为目标词的概率。这使得解题器即使在嵌入模型不匹配的情况下也能有效运行,尽管速度较慢(100-200次猜测)。有趣的是,解题器的过程反映了人类的游戏方式,从语义上距离较远的猜测开始,逐渐收敛到相关的术语,展示了一种令人惊讶的人类化方法,用有限的信息来导航语义空间。

对不起。
相关文章

原文

In my last post, I wrote about a solver for Semantle (the word game where guesses are scored based on semantic similarity to a hidden target word) that Ethan Jantz and I built while at the Recurse Center.

If your goal is (as ours was) to solve Semantle in as few guesses as possible, that solver works great. But it requires knowing exactly what embedding model the game itself is using, and the exact cosine similarities between every word in the vocabulary. After writing the post, a former colleague from grad school, Daniel Vitek, reached out with an idea for a solver that doesn’t rely on that knowledge, and instead only uses information about which guesses are better than others.

It takes more guesses to win, but it’s more robust, in that it works even with a different underlying embedding model than the game uses. To me, it also feels more aligned with what it’s actually like to play Semantle. Daniel shared a notebook showing how it works, which I adapted into this solver.

Which guess is closer?

Let’s say I’m playing Semantle and guess 1 is “biology” (which scored 26.03) and guess 2 is “philosophy” (which scored 3.09). The most important piece of information I receive from the scores the game returns is the relative ordering: “biology” (guess 1) is closer to the target word than guess 2 (“philosophy”). That would make sense if the hidden target word were “medical.” For this solver, that relative rank is the core of what we need.

Here, guess 1 corresponds to embedding g1g_1

Here’s what that would look like geometrically, pretending we’re only dealing with three dimensions rather than 300 for simplicity:

A single ranking comparison between two guesses splits the embedding space in two. All vectors on one side of the plane are more similar to g₁ than g₂. Guess 1 is better, so only those candidates could still be the target.

In linear algebra terms:

To reframe in linear algebra terms: Assuming these are unit vectors, if g1g_1

tg1>tg2t \cdot g_1 > t \cdot g_2
联系我们 contact @ memedata.com