SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1411.2738 · 2014

word2vec Parameter Learning Explained

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 2 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1411.2738.json · badge: /api/ran/1411.2738.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
gymk/ANLP community (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
mayank2498/Skip-Gram-model-using-numpy reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FunctionStatusWhere it lives
H_approx Ran
ran on a synthesized input
gymk/ANLP/zipfs_law-2.py
code served (permissive licence) · get_code("d454996ae5afa9b9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

def H_approx(n):
    """
    Returns an approximate value of n-th harmonic number
    http://en.wikipedia.org/wiki/Harmonic-number
    """
    gamma = 0.5772156649015329
    return gamma + math.log(n) + 0.5 / n - 1.0 / (12 * n ** 2) + 1.0 / (120 * n ** 4)

ARGS = {
    "n": 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
cosine_similarity Ran
ran, violated the contract we drafted
gymk/ANLP/Week2-Quiz-4.py
pointer only (licence: MIT); the stored copy get_code serves, from davidjackson99/PKI_KG, is pointer only (licence: NONE) · get_code("d1d3a336b99abbf2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from davidjackson99/PKI_KG, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

getFingerPrintOnCount Ran
ran on a synthesized input
gymk/ANLP/Week2-Quiz-5to7.py
code served (permissive licence) · get_code("ca439c565aba5b68")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function iterates over A and checks if each element equals 1
# A should be an iterable with boolean/integer values (0 or 1)

# Create a simple list with boolean/integer values
A = [1, 0, 1, 1, 0, 1]

ARGS = {
    "A": A
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getScore Ran
ran on a synthesized input
gymk/ANLP/Week10/Q9.py
code served (permissive licence) · get_code("61583f325997c9a0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function getScore takes vals as input
# It iterates through vals and computes np.log(x) for each element
# This means vals should be an iterable of numeric values (not zero or negative)

vals = np.array([1.0, 2.0, 3.0, 4.0])

ARGS = {
    "vals": vals
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
getTanimotoCoefficient Ran
ran on a synthesized input
gymk/ANLP/Week2-Quiz-5to7.py
code served (permissive licence) · get_code("d543f3d5ca3a0afa")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function getTanimotoCoefficient takes two fingerprints A and B
# which are iterables of boolean values (0 or 1)
# It performs bitwise AND operations and counts 1s

# Create two small fingerprints as lists of binary values
fingerprint_A = [1, 0, 1, 1]
fingerprint_B = [1, 1, 0, 1]

ARGS = {
    "A": fingerprint_A,
    "B": fingerprint_B
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
loadPairs Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from LouisTernon/NLP
pointer only; the stored copy get_code serves, from LouisTernon/NLP, is pointer only (licence: NONE) · get_code("24b8995c9efdcdb7")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_data_for_training Ran
ran, honoured the contract we drafted
mayank2498/Skip-Gram-model-using-numpy/word2vec.py
pointer only (licence: NONE) · get_code("78fb2b422c62f1e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mayank2498/Skip-Gram-model-using-numpy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

softmax Ran
ran, honoured the contract we drafted
mayank2498/Skip-Gram-model-using-numpy/word2vec.py
pointer only (licence: NONE) · get_code("c0cf1196424d4f71")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mayank2498/Skip-Gram-model-using-numpy when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

text2sentences Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from LouisTernon/NLP
pointer only; the stored copy get_code serves, from LouisTernon/NLP, is pointer only (licence: NONE) · get_code("375693019fa03226")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 2 later) and 5 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
softmax 12 other papers
12 later
1803.05337 (2018-03)
Learning to Recognize Musical Genre from Audio
1906.05394 (2019-06)
Neural Arabic Question Answering
2103.15692 (2021-03)
Self-Constructing Neural Networks Through Random Mutation
and 9 more not named here
cosine_similarity 2 other papers
2 later
2404.07220 (2024-04)
Blended RAG: Improving RAG (Retriever-Augmented Generation) Accuracy with Semantic Search and Hybrid Query-Based Retrievers
2603.00097 (2026-03)
Exploring Drug Safety Through Knowledge Graphs: Protein Kinase Inhibitors as a Case Study
loadPairs 1 other paper
1 dated earlier
1402.3722 (2014-02)
word2vec Explained: deriving Mikolov et al.'s negative-sampling word-embedding method
text2sentences 1 other paper
1 dated earlier
1402.3722 (2014-02)
word2vec Explained: deriving Mikolov et al.'s negative-sampling word-embedding method

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The word2vec model and application by Mikolov et al. have attracted a great amount of attention in recent two years. The vector representations of words learned by word2vec models have been shown to carry semantic meanings and are useful in various NLP tasks. As an increasing number of researchers would like to experiment with word2vec or similar techniques, I notice that there lacks a material that comprehensively explains the parameter learning process of word embedding models in details, thus preventing researchers that are non-experts in neural networks from understanding the working mechanism of such models. This note provides detailed derivations and explanations of the parameter update equations of the word2vec models, including the original continuous bag-of-word (CBOW) and skip-gram (SG) models, as well as advanced optimization techniques, including hierarchical softmax and negative sampling. Intuitive interpretations of the gradient equations are also provided alongside mathematical derivations. In the appendix, a review on the basics of neuron networks and backpropagation is provided. I also created an interactive demo, wevi, to facilitate the intuitive understanding of the model.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1411.2738")
get_code_for_paper("1411.2738")
have("1411.2738")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1411.2738.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1411.2738.svg)](https://syntology.ai/paper/1411.2738)

Connect an agent — have() is free.