Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Enriching Word Vectors with Subword Information

Word vectors built from character n-grams handle rare and morphologically rich words

  • Problem Word embedding models give each word its own vector and ignore word structure. This leaves rare words and words in morphologically rich languages with poor or missing vectors.
  • Method Subword skipgram builds each word vector as the sum of vectors for its character n-grams. Instead of one vector per word, each word also keeps its whole-word vector, so rare words borrow from shared pieces.
  • Results On German GUR350, the model scored 70, compared to 62 for cbow. It reached state-of-the-art results across nine languages on word similarity and analogy tasks.

Why whole-word vectors stall

Most embedding methods give each word of the vocabulary its own vector and ignore the internal structure of words. That gap matters most in morphologically rich languages such as Turkish or Finnish, where one lemma can take many surface forms. For example, most French or Spanish verbs have more than forty inflected forms, and Finnish nouns have fifteen cases.

Many word formations follow rules, so the characters inside a word carry information that a whole-word vector ignores. The authors therefore ask whether character-level information can improve vectors for these languages.

Key idea: words as sums of character n-grams

The core idea is to keep the skipgram training but to represent each word as the sum of vectors for its character n-grams. The model also adds the whole word to its set of n-grams, so each word keeps a vector of its own in addition to the pieces. Sharing the pieces lets a rare word borrow strength from other words that contain the same substrings.

Boundary symbols < and > mark the start and end of a word, so a prefix or suffix differs from the same letters inside a word. For example, the word where with n equal to 3 gives the n-grams <wh, whe, her, ere and re, plus the special sequence <where>. The n-gram her from where is therefore not the same object as the word her, which has its own boundary-marked form.

In practice the model extracts all n-grams with n from 3 to 6.

To keep memory bounded, each character sequence is hashed with the FNV-1a function into one of K buckets, with K set to 2.106 in the paper. A word is then stored as its dictionary index together with the set of hashed n-grams it contains.

Scoring and loss

The skipgram objective maximizes the log-probability of each context word given the target word, summed over all positions and their context windows. A softmax would predict one context word per target, which doesn't fit the setting where many context words are present. Instead, the authors frame each context word as an independent binary decision, with context words as positives and random dictionary words as negatives.

With the logistic loss written as \( \ell(x) = \log(1 + e^{-x}) \), each observed pair contributes \( \ell(s(w_t, w_c)) \) and each sampled negative contributes \( \ell(-s(w_t, n)) \). In the baseline, the score is the scalar product \( s(w_t, w_c) = u_{w_t}^\top v_{w_c} \) between an input vector and an output vector. The subword model changes only the score, which becomes \( s(w, c) = \sum_{g \in G_w} z_g^\top v_c \), summing the n-gram vectors \( z_g \) of word \( w \) and dotting them with the context vector \( v_c \).

Training runs stochastic gradient descent on this negative log-likelihood, with a step size that decays linearly over the total number of words processed. Threads share parameters and update them asynchronously in the Hogwild style, so the optimization runs in parallel.

Settings and training speed

Both the proposed model and the baselines use 300-dimensional word vectors, with 5 negatives drawn for each positive example. Negatives are sampled with probability proportional to the square root of the unigram frequency, and the context window size is drawn uniformly from 1 to 5. The step size starts at 0.025 for the skipgram baseline and at 0.05 for both the subword model and the cbow baseline.

On English data, the subword model is about 1.5 times slower to train than the skipgram baseline. It processes 105k words per second per thread, while the baseline processes 145k. The authors trained the models on Wikipedia dumps in nine languages, normalized and shuffled, with five passes over the data.

Word similarity results

Similarity is measured as Spearman rank correlation between human judgements and cosine similarity of the vectors. The evaluation uses WS353, RW and the German sets GUR65, GUR350 and ZG222, among others, across nine languages. On German GUR350, sisg scored 70, compared to 62 for cbow. On the English RW set, sisg scored 47, compared to 43 for cbow, which fits the authors' view that rare words benefit most.

The subword model is higher than cbow on every listed dataset except English WS353. On that dataset sisg scored 71, compared to 73 for cbow. The authors attribute this to WS353 containing common words that get good vectors without subword information.

For out-of-vocabulary words, summing n-gram vectors (sisg) scored at least as high as using null vectors (sisg-) on every dataset. On GUR350, sisg scored 70 compared to 64 for sisg-. The authors link the gain on German and Russian to noun compounding and case declensions, as in Tischtennis, which shares character pieces with Tennis.

Analogy results

The analogy tests use English, Czech, German and Italian datasets, and questions with words missing from the corpus were excluded. The metric is accuracy, reported separately for semantic and syntactic questions.

On Czech syntactic questions, sisg reached 77.8, compared to 55.0 for cbow and 52.8 for sg. The gain on syntax is large, which fits the idea that suffixes capture inflection. On German semantic questions, sisg scored 62.3, below 66.8 for cbow.

So the subword model helps syntactic analogies but doesn't help semantic ones. The authors tie the semantic drop to the chosen n-gram length, and they note that with a better length the semantic degradation shrinks.

Comparison with morphology-based methods

Each comparison retrains the subword model on the same data as the compared method, such as English Wikipedia or Europarl and news commentary.

On German GUR350, sisg reached 73, compared to 64 for Soricut and Och (2015). On English RW, sisg scored 48, compared to 42 for the same method. Against Botha and Blunsom (2014), sisg scored 66 on GUR350 compared to 56 for that model.

The authors read the large German gain as a sign that the Soricut and Och approach doesn't model noun compounding, which the n-gram sum does. These are the same kind of word similarity scores, so the comparison is a controlled one only within each training set.

Training data size

The authors train on the first 1, 2, 5, 10, 20 and 50 percent of the Wikipedia data, without reshuffling, so each subset is contained in the next. As the corpus shrinks, the out-of-vocabulary rate rises, which hurts sisg- and cbow.

With 5% of the data, sisg reached 66 on German GUR350, above the 62 that cbow reached on the full dataset. On English RW, 1% of the data gave sisg 45, which beats cbow on the full data at 43. The authors conclude that useful vectors can come from restricted, task-relevant corpora.

The subword model saturates quickly, and adding more data doesn't always improve its results. The cbow baseline keeps improving as more data is added, so the gap narrows with a large corpus.

Choosing the n-gram range

The range 3 to 6 was chosen arbitrarily, because it covers short suffixes such as conjugations and declensions as well as longer roots. The authors vary the range for English and German on similarity and analogy datasets.

On German GUR350, the 3 to 6 range gives 70, while a 2 to 2 range gives 57. Ranges that include longer n-grams work best, which the authors connect to German compound nouns. Because 2-grams can't represent a suffix on their own, the boundary symbols leave them too short for conjugations.

The best range depends on the task and language, and no validation procedure selects it automatically. So 3 to 6 is a reasonable default, not a tuned one.

Language modeling results

The experiment covers five languages with about one million training tokens each, following Botha and Blunsom (2014).

On Czech, the test perplexity is 312 with sisg vectors, compared to 339 with sg vectors. On Russian it is 206 with sisg, compared to 237 with sg. The reduction is 8% for Czech and 13% for Russian, while Spanish and French improve by only 3% and 2%.

The authors attribute the larger gains to the richer morphology of Slavic languages. Initializing from pre-trained vectors helps even without subwords, since the plain LSTM scored 366 on Czech.

What the n-grams capture

To test this, the authors remove one n-gram at a time from the word sum and rank the n-grams by how much the cosine with the full vector drops. A large change means the n-gram matters most for that word.

For German compounds, the top n-grams of Autofahrer are Auto and Fahrer, which are its morphemes. In English, lifetime and starfish split into their parts, while kindness and unlucky surface affixes. In French, endings such as ais>, ent> and ions> stand out as verb inflections.

For out-of-vocabulary words, the n-grams of microcircuit that match chip roughly correspond to micro and circuit. Similarly, the suffix -ness matches -ity well when comparing scarceness with rarity.

Limitations

Character n-grams don't help semantic analogy accuracy, and at the chosen lengths they degrade it for German and Italian. The authors say the semantic result depends on the n-gram length they picked.

The n-gram range was not tuned, because no validation procedure was implemented. Results on WS353 show that common words don't need the subword pieces.

The data-size curve saturates, so more Wikipedia text doesn't always help the subword model.

Paper info

Authors
Piotr Bojanowski, Edouard Grave, Armand Joulin, Tomas Mikolov
Venue
arXiv · Preprint
First published
2016-7-15
Added
2026-11-11
Updated
2017-6-19
Version
v2
arXiv
1607.04606
Category
cs.CL · cs.LG
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Piotr Bojanowski, Edouard Grave, Armand Joulin, Tomas Mikolov (2016). Enriching Word Vectors with Subword Information. arXiv:1607.04606v2. https://arxiv.org/abs/1607.04606v2

BibTeX
@misc{bojanowski2016enriching,
  title = {{Enriching Word Vectors with Subword Information}},
  author = {Piotr Bojanowski and Edouard Grave and Armand Joulin and Tomas Mikolov},
  year = {2016},
  eprint = {1607.04606},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1607.04606v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up