The problem in brief
Each row is a word analogy in the style of aptitude tests (see : saw :: take : took, tadpole : frog :: caterpillar : butterfly, surprise : gasp :: sadness : cry). You must predict the missing word . Q1 asks for a zero-shot method using only pretrained embeddings; the statement adds that you may look at the whole set of rows while solving. Q2 asks for a model trained on the 300 labelled training analogies, and Q3 evaluates it on a public test set of 200 analogies. A private set was used by the organisers (Q4).
How you are scored
Precision@1 is the fraction of analogies whose top prediction equals . Precision@3 is the fraction where is among the top three. Points were awarded by performance ranges that were not published, so there is no target to compare with.
A bug in the official evaluator. evaluate_analogy_predictions computes Precision@K as test_df["D"].isin(predictions_df["Top_K_Predictions"]), where each entry of the second argument is a set of words. isin compares each word with the sets themselves, never with their elements, so the reported Precision@K is always 0. We checked this with pandas: pd.Series(['a']).isin(pd.Series([{'a','x'}])) returns False. The numbers below compute Precision@3 correctly, per row.
First look at the data
- The relations are mostly semantic and causal (stimulus and reaction, tool and action, cause and effect), much harder for word vectors than the classic king : queen or capital-city analogies. Only a minority are grammatical (good : better).
- All words are common (median frequency rank about 2,900 in GloVe), so restricting the search to the 100,000 most frequent words loses nothing. One answer is a two-word expression (old age), which we embed as the mean of its words.
- The rows are built from reused pairs. In 90 % of the training rows, and 78 % of the test rows, the answer pair appears elsewhere in the same file as the pair of another row. For example, exercise : fitness :: rain : flood and rain : flood :: fire : burn. The statement explicitly allows looking at all rows, so this structure is fair game. It is a property of how the dataset was assembled, which the private set very likely shares; we still report the purely semantic scores separately.
A first baseline
The classic vector-offset method, 3CosAdd, returns the word closest to (unit vectors). Equivalently, it maximises
excluding , and themselves. 3CosMul (Levy and Goldberg, 2014) multiplies instead of adding, which stops one large similarity from dominating:
With GloVe 6B-300d over the 100k most frequent words, both reach only P@1 = 0.19 on the public test set. Most failures are "near misses" such as nephew for niece, or the nearest neighbour of , because is a poor direction for relations like surprise : gasp.
The key idea
1. Shrink the candidate set using what the statement gives you. The answer of a row is very often a word that appears somewhere in the file. Searching only among the words of the file's , and columns (about 240 distinct words instead of 100,000) almost doubles precision: P@1 0.35, P@3 0.48 zero-shot. Smaller, relevant candidate sets beat cleverer scoring.
2. Learn how to combine the evidence (Q2). For each training analogy, build candidates (the top 30 3CosMul words from the vocabulary plus the file's words) and describe each one with a few interpretable features: 3CosAdd, 3CosMul, , , , "appears in the file", log frequency rank, and " is an pair of the file". A logistic regression trained on the 300 training rows (the true as the positive) learns how to weigh them, and the test candidates are ranked by its score. This is a learning-to-rank model with about 9 parameters, appropriate for 300 examples, where retraining word vectors on 1,200 words (the helper's suggestion) cannot work.
The learned weights tell the story: the pair-reuse feature dominates (+13.4), comes next (+7.5; the answer is usually close to ), and 3CosAdd still breaks ties.

The full solution
- Load GloVe 6B-300d (400k words; keep the 100k most frequent alphabetic ones), L2-normalise.
- Zero-shot (Q1): 3CosAdd or 3CosMul over the words of the file being solved, excluding , , .
- Trained (Q2): candidate table with 8 features per (analogy, candidate) and logistic regression with balanced classes; predict the top 3 by decision score.
pairs = {(a, b) for a, b in df[["A", "B"]].values} # pairs present in the file
...
rows.append((r, w, add, mul, sa, sb, sc, w in file_words, log_rank, (c, w) in pairs))
clf = LogisticRegression(class_weight="balanced").fit(T[FEATS], y)
Results
| approach | train P@1 | train P@3 | test P@1 | test P@3 |
|---|---|---|---|---|
| 3CosAdd, 100k vocabulary | 0.227 | 0.310 | 0.190 | 0.280 |
| 3CosMul, 100k vocabulary | 0.223 | 0.290 | 0.190 | 0.265 |
| 3CosAdd, candidates = words of the file (Q1 answer) | 0.400 | 0.520 | 0.350 | 0.480 |
| 3CosMul, candidates = words of the file | 0.410 | 0.500 | 0.340 | 0.490 |
| trained re-ranker, semantic features only | 0.377 | 0.593 | 0.365 | 0.490 |
| trained re-ranker + pair-reuse feature (Q2/Q3 answer) | 0.773 | 0.923 | 0.725 | 0.820 |
On the test set the final model is right on 145 of 200 analogies, close to the 155 rows (77.5 %) whose answer pair is present in the file. The remaining 22.5 % rely on embeddings alone and remain hard. The semantic re-ranker without the pair feature improves P@1 only slightly (0.350 to 0.365), a sign that 300 examples and GloVe vectors are the limiting factor for SAT-style relations.
What to remember
- Read what the statement allows, and look at the whole input. "You may look at all rows" was a strong hint: the file's vocabulary and its reused pairs are worth more than any embedding trick. Say clearly when you exploit dataset construction, and report the purely semantic score too.
- Vector offsets work for regular relations only. king : queen is linear in embedding space; surprise : gasp is not. Expect 3CosAdd to be weak on semantic and causal analogies.
- 3CosMul and 3CosAdd differ little; the candidate set differs a lot. Restricting the search space is often the biggest lever in retrieval problems.
- With 300 labels, learn a re-ranker, not embeddings. A handful of interpretable features plus logistic regression is trainable and explainable; retraining word vectors on 1,200 words is not.
- Test the evaluator. The official Precision@K is always 0 because of an
isinon sets: always check the scoring code on a toy example.