Word2Vec learns static word vectors through CBOW or skip-gram. Distinguish normalized softmax models from negative-sampling scores and evaluate financial text features without future-corpus leakage.
Word2Vec
Word2Vec is a family of shallow models that learns a fixed vector for each vocabulary word from its neighbouring words in a text corpus. It can turn filing language into numerical features for a financial-text classifier. A nearby vector means similar usage under the training design; it does not guarantee the same accounting meaning, sentiment or expected return.
The learned vectors are a form of text embedding. Training labels come from the text itself, making this self-supervised learning. The central choice is which direction to predict, followed by how to train that prediction efficiently.
Two prediction directions
For the illustrative fragment “credit spreads widened”, take “spreads” as the centre word and a window of one word on each side.
Architecture
Input
Training target
Continuous bag of words (CBOW)
Aggregate the vectors for “credit” and “widened”
Predict “spreads”
Skip-gram
The vector for “spreads”
Predict “credit” and “widened” as separate surrounding-word targets
CBOW pools its context without preserving the order of those input words. Skip-gram constructs word–neighbour pairs. Here context means nearby corpus positions, not an economic regime or the full information set of an investor. A symmetric window can include words on either side; the task is not necessarily next-token prediction. These are the two architectures in Mikolov et al., Efficient Estimation, §§3.1–3.2.
Prediction direction and output objective are different choices
In the usual full-softmax or negative-sampling formulation there are two embedding tables: an input vector vw and an output/context vector uw for each vocabulary type. A pair score is their dot product s=uc⊤vw. The two roles are trainable parameters, not two context-dependent senses of a word.
Output objective
What is trained?
Vocabulary probabilities?
Full softmax
Compete against every output word through a common denominator
Yes: normalized over the vocabulary
Hierarchical softmax
Predict binary branches along a tree path to an output word
Yes: leaf probabilities sum to one; output parameters belong to internal tree nodes
Negative sampling
Distinguish observed pairs from sampled noise pairs
Binary discrimination scores; no normalized word distribution is supplied by this loss
For full softmax, the conditional probability of a context word is
p(c∣w)=∑j∈Vexp(uj⊤vw)exp(uc⊤vw),
where V is the vocabulary. Hierarchical softmax changes the output parameterization; it does not use the same per-word output table. Negative sampling changes the objective, rather than simply estimating this denominator with a handful of words. See Mikolov et al., Distributed Representations, §§2–2.2.
Read a negative-sampling loss correctly
Let c be one observed context for centre word w, and let n1,…,nk be draws from a specified noise distribution. One realized skip-gram negative-sampling loss, using natural logarithms, is
The first term rewards a high observed-pair score. Each subsequent term rewards a low noise-pair score. A “negative” is a sampled training label, not a claim that the pair is linguistically impossible. The original work samples using a distribution proportional to unigram frequency raised to the power 3/4. Both that distribution and the number of draws affect the training problem. Original negative-sampling objective, §2.2.
A fixed-score toy. Suppose one observed pair has dot product ln3 and one sampled noise pair has dot product −ln3. The observed pair gets σ(ln3)=0.75. For the noise pair, the probability assigned to its correct label is σ(−(−ln3))=0.75; its observed-pair score would be 0.25.
Thus the summed, rather than averaged, loss is
ℓ=−2ln(0.75)=0.5753641449nats.
Fixed illustrative scores: an observed pair has dot product ln(3) and a noise pair has dot product minus ln(3). Each receives correct-label probability 0.75, giving summed negative log-loss 0.575364 nats.
Original fixed-score example. The bars show two separate binary classification terms, not a probability allocation across vocabulary words.
The two values of 0.75 have different correct labels. Adding them is not a test that word probabilities sum to one. More generally, three candidate pairs with zero scores each have sigmoid value 0.5, summing to 1.5. A sigmoid applied separately to each word score does not create a next-token probability law.
Which vectors should be exported is a separate decision. The original implementation, in TrainModel, writes its input table syn0 when saving word vectors. Its negative-sampling output table is syn1neg. Using output vectors or combining tables changes the representation; record the convention before comparing neighbours.
Static geometry, financial evaluation
Once training is frozen, a word type has the same input vector in every occurrence. Its training context shaped that vector, but a new sentence does not change the lookup. BERT instead produces contextual token representations from surrounding text. Google's historical BERT explanation makes this distinction explicitly. BERT still begins with token embeddings; its contextual output is the relevant comparison.
For filings, record the corpus cutoff, tokenisation, phrase handling, window, dimension, frequency filtering, objective and exported table. General news and financial disclosures need not put a term in the same neighbourhood. Two opposite sentiment words can share contexts, and a mean of word vectors does not automatically preserve negation or word order.
A nearest-neighbour list is a diagnostic of the fitted geometry. For a disclosure classifier, evaluate against held-out labels on the intended documents. For an investment feature, separately evaluate feasible decision-time availability and later performance. Training even an unlabelled embedding on future filings can introduce look-ahead bias; the absence of return labels does not make future text available in the past.
The Embeddings lesson develops corpus choices, document aggregation and task-specific validation. Text Representation develops the measurement choices that precede an embedding. Both have public previews; full lessons require membership.
Tomas Mikolov's word2vec implementation, InitNet, TrainModelThread and TrainModel: separate parameter arrays, training branches and saved input vectors. Read as the original implementation, not a claim about defaults in every current library.
Google Research, BERT README, “What is BERT?”: context-free versus contextual representations. Historical project documentation; the repository is archived.