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.
College 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.
CBOW predicts a center token from an aggregated context; Skip-gram predicts context tokens from a center. Window sampling, subsampling frequent words and objective choice affect the training distribution. The names describe prediction direction, not a guarantee that all semantic relationships will become linear.
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
For a fixed radius, each interior center has up to twice that many context positions. Boundaries truncate the window. Dynamic window sampling changes effective distance weighting. The number of pairs is a data construction property; it is not a measure of the information content of every pair.
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
In a basic formulation, input and output embeddings are separate parameter matrices. A score is their dot product. CBOW aggregates input context vectors before scoring outputs; Skip-gram starts from one input row. Averaging versus summing context changes scaling and must be specified for reproducibility.
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
Negative sampling optimizes binary logistic terms for observed versus noise pairs; it is not merely an exact full-softmax computation with fewer outputs. Noise distribution and sample count change the objective. The learned dot products need not be normalized conditional probabilities over the vocabulary.
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
For a positive logistic term, the score derivative is sigmoid(score) minus one. At zero it equals negative one half. The input-vector gradient is this scalar times the output vector. For a sampled negative the derivative is sigmoid(score), producing the opposite incentive at zero.
∂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
Use held-out intrinsic tests and the intended downstream task. Document vocabulary exclusions, frequency effects, corpus provenance and evaluation coverage. Compare frozen representations under the same classifier or retrieval protocol. Word analogies, especially selected examples, are insufficient to establish general quality or absence of representational bias.
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.