Build training pairs and distinguish a prediction objective from a semantic guarantee.
Preparation: Averages, probabilities and vector multiplication.
Plan 20–35 minutes with the activities; this is a study estimate, not a timed requirement. Both paths have complete narration. Your notes and progress are kept separately for each level.
FULL LOCAL NARRATION
Follow the complete explanation.
Narration includes worked solutions. Pause at each practice prompt before continuing. Formula notation has a spoken explanation; all teaching text remains readable.
High-school path. Build training pairs and distinguish a prediction objective from a semantic guarantee.
Preparation: Averages, probabilities and vector multiplication. Work through one section at a time. Predict the experiment result before changing its controls, then explain what the example leaves out.
Take a short sentence and cover one word. Guessing that word from its neighbors resembles continuous bag of words, or CBOW. Skip-gram reverses the direction: use one center word to predict nearby words. Both learn useful representations through a task, rather than receiving a dictionary of meanings.
Worked step 1. Use we learn useful ideas today and center useful.
Worked step 2. Radius one gives context learn and ideas.
Worked step 3. CBOW uses the pair to predict useful; Skip-gram creates two prediction pairs.
Try it yourself. Does Skip-gram predict the whole sentence at once?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. In this setup it produces center-context training pairs. A sequence language model is a different objective.
Section 02 / 07
The window changes the evidence
A wider window includes more neighbors but may mix different relationships. Nearby words can reveal grammar; more distant words may reveal topic. Count positions at the edge of a sentence carefully: there may be fewer neighbors than in the middle. Do not invent padding words unless your method defines them.
Worked step 1. For five tokens and radius one, neighbor counts are 1,2,2,2,1.
Worked step 2. There are eight directed center-context pairs.
Worked step 3. Radius two gives counts 2,3,4,3,2: fourteen pairs.
Try it yourself. Does doubling the radius double this sentence’s pair count?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Boundaries matter: eight becomes fourteen. Calculate the valid neighbors for each center rather than using an interior-only shortcut.
Section 03 / 07
Two tables play different roles
One table supplies the vector used to make a prediction. Another table supplies vectors for possible answers. They may have the same shape but serve different jobs. Comparing a center with an answer uses both. Decide which representation to export instead of assuming there is only one learned table.
Worked step 1. Context vectors [1,0] and [0,2] average to [0.5,1].
Worked step 2. Output vectors [2,0] and [0,1] each score 1.
Worked step 3. The two candidates tie under these illustrative scores.
Try it yourself. Would summing instead of averaging preserve the numerical scores?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. The summed vector [1,2] gives scores 2 and 2. Ranking ties remain here, but softmax confidence can change.
Section 04 / 07
Negative sampling changes the objective
Instead of comparing every word in a large vocabulary on each update, sample a few contrast words. Reward a real pair and discourage sampled pairs. A sampled word is not a universal opposite or a proven false statement. It is a training example selected by a distribution.
Worked step 1. A positive pair with score zero has sigmoid probability 0.5.
Worked step 2. Its negative log likelihood is about 0.693.
Worked step 3. One sampled negative at score zero contributes another 0.693.
Try it yourself. Can those two sigmoid values be read as a vocabulary distribution?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Independent binary terms do not generally sum to one across vocabulary items. Full softmax uses a different normalization.
Section 05 / 07
Follow one gradient
A correct observed pair with a low score should become easier to predict. The update changes vectors in directions determined by their partners. This is not a hand-written command saying two words mean the same thing. Many small updates accumulate patterns from the training examples, including unwanted patterns.
∂L/∂u = (σ(u·v)−1)v
Worked step 1. Input u=[0,0], output v=[2,0], positive pair.
Worked step 2. Score derivative is -0.5; gradient of u is [-1,0].
Worked step 3. At learning rate 0.1, u becomes [0.1,0].
Try it yourself. Why does the score increase after this input update?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. The input moves toward the output vector: the new dot product is 0.2. Updating both tables simultaneously adds further effects.
Section 06 / 07
Evaluate beyond an attractive analogy
Try words from different subjects, languages and communities. Inspect both useful neighbors and misleading ones. Frequent stereotypes in text can become frequent associations in a representation. A successful analogy is interesting evidence about one test, not a certificate that the entire word map is fair or complete.
Worked step 1. Choose ten held-out query words and inspect five neighbors each.
Worked step 2. Record missing words separately from poor neighbors.
Worked step 3. Compare two training windows using the same evaluation set.
Try it yourself. Should a missing word count as a successful prediction?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Report coverage and quality separately so that a small easy subset cannot conceal missing vocabulary.
Section 07 / 07
Mastery and transfer
Bring the pieces together. First answer the checkpoint without the worked solutions. Then explain the mechanism in your own words, using one numerical example from this lesson.
Skip-gram uses… Option 1: Neighbors to predict a center only. Option 2: A center to predict context words. Option 3: Token IDs as measured meanings.
Pause here and choose an answer before continuing. The checkpoint explanation follows.
Reveal worked solution
The correct choice is option 2: A center to predict context words. The direction is center to context; the chosen loss determines how those pairs train the tables.
Transfer task. Change one assumption in the worked example. State your prediction, calculate or test it in Workbench, then explain whether the result supports your prediction.
Reveal worked solution
Self-check rubric. Name the changed assumption, keep the other inputs fixed, show at least one intermediate calculation, and distinguish what the toy example guarantees from what would require a trained model or a real measurement.
WORKBENCH / PREDICT → TEST → EXPLAIN
Inspect exact numerical data
These are computed teaching fixtures. No remote AI model or GPU is called by the experiment.
CHECK YOUR UNDERSTANDING
Commit to an explanation.
Keep your learning record.
Sources and scope
Original worked examples and teaching text, grounded in these primary references. Numerical fixtures explain mechanisms; model quality and hardware performance require separate measurements. Both levels share key examples, with different explanations and checkpoints.