---
title: "Sparse Coding of Neural Word Embeddings for Multilingual"
description: "Sparse coding turns dense word embeddings into reusable features for multilingual tagging, with particular gains when labeled sentences are…"
canonical: "https://research.elamur.ai/free/en/papers/berend-2017-sparse-coding-neural-word-embeddings/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/berend-2017-sparse-coding-neural-word-embeddings/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2017](https://md.research.elamur.ai/free/en/papers/2017/) / Sparse Coding of Neural Word Embeddings for Multilingual Sequence Labeling

# Sparse Coding of Neural Word Embeddings for Multilingual Sequence Labeling

Paper · 2017 · Gábor Berend

**Authors:** Berend, Gábor · **Year:** 2017 · **Venue:** Transactions of the Association for Computational Linguistics · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Transactions of the Association for Computational Linguistics · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/Q17-1018/)
- [PDF](https://aclanthology.org/Q17-1018.pdf)
- [DOI 10.1162/tacl_a_00059](https://doi.org/10.1162/tacl_a_00059)

## Summary

A system that labels words in a sentence needs evidence about which words behave alike. That evidence is especially valuable when the system has seen few labeled sentences. Berend asks whether [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), which summarize how words are used in large collections of text, can supply that evidence through a small set of reusable features. The paper tests the idea on [part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/) and [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/). The former assigns grammatical categories to tokens. The latter identifies mentions of entities and assigns them types.

The method starts with dense embeddings and learns a shared dictionary of vectors that can approximately reconstruct them. Each word uses only a small selection from the dictionary. The tagger sees which dictionary entries a word uses and whether their contributions are positive or negative. It gets the same information about the words immediately beside the target. These indicators are the only word features in the main system. A linear-chain conditional random field learns how to use them to label a sentence, taking account of how adjacent labels go together. The dictionary and word features learned for a language can serve both tasks without task-specific changes.

On the CoNLL 2006/07 test sets, sparse Polyglot features give an average part-of-speech accuracy of 94.44% across 12 treebanks when all the labeled training sentences are available. A feature-rich baseline using both words and characters reaches 95.75%. With the first 150 labeled sentences per language, the sparse system averages 84.83%, ahead of the word-and-character baseline at 81.07% and the word-only feature-rich baseline at 70.28%. The paper reports that the sparse system retains 89.8% of its full-training average accuracy with 1.2% of the available labeled training sentences. The embeddings in that experiment still draw on Wikipedia.

The study also evaluates tagging on 33 Universal Dependencies treebanks. Sparse features beat word identity alone on the common comparison set, and combining the two raises average accuracy there. For named entity recognition in English, Spanish and Dutch, each of the tested embeddings gives better F1 after sparse feature extraction than when its dense coordinates are used directly in the same kind of tagger. Sparse Polyglot averages 77.54 F1 across the three test sets, compared with 71.50 for dense Polyglot. Taken together, the experiments show that a fixed lexical representation can support different labeling tasks, and that the way a tagger receives that representation matters.

## Deep dive: Sparse Coding of Neural Word Embeddings for Multilingual Sequence Labeling

Sparse coding turns dense word embeddings into reusable features for multilingual tagging, with particular gains when labeled sentences are scarce. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What a sequence labeler needs to know

Predicting a label for a word involves evidence at several scales. The word itself can suggest a grammatical category. A neighboring word can make one reading more likely. Labels for nearby tokens can also fit together better in some combinations than in others. In entity recognition, the labels assigned at consecutive positions help describe the boundaries of a mention. The representation of words and the procedure for choosing labels across a sentence therefore solve related parts of the problem.

A feature is a piece of evidence made available to the tagger. An indicator for a particular suffix, for instance, lets the tagger learn how that suffix relates to a category. A feature for a word's identity gives it a way to learn that the exact form has frequently received a particular label. Joining names of nearby words in a feature gives it a way to recognize a recurring local pattern. Such features can express useful judgments about what matters for a task. Their usefulness also depends on whether the labeled examples give the tagger enough evidence to estimate their effects.

The paper describes a tradition of designing rich feature sets for individual kinds of linguistic analysis. Design decisions can embody knowledge about a language, the source of the texts, or the labels being assigned. When any of these change, the same decisions may carry a different amount of information. Capitalization is one of the examples that matters to the experimental design. Word suffixes, spelling patterns and gazetteers, which provide lists of names or other entries, could all tell a labeler something. Berend leaves them outside the main system so that the usefulness of the embedding-derived features can be measured on their own.

Exact word identity poses a particular problem for learning from a small labeled corpus. An indicator for one spelling receives evidence from instances of that spelling. The tagger has to learn separately about another spelling, even if the two words tend to appear in similar settings. A shared lexical feature can pool evidence across those words. The paper tests this intuition through changes in the amount of labeled training data and through comparisons with features that identify words directly.

#### What dense embeddings already contribute

The alternative tradition described in the paper learns word representations from large amounts of unannotated text. In [distributional semantics](https://md.research.elamur.ai/free/en/concepts/distributional-semantics/), similarities in the contexts where words occur provide evidence about their behavior and meaning. A dense embedding expresses this information as a vector of real-valued coordinates. Words with similar contexts can have similar vectors even if they have entirely different spellings. That is the starting point for transferring evidence across the vocabulary.

A vocabulary lookup can be understood as a change in how the information is represented. Imagine a vector with one position for every vocabulary entry. To specify a word, activate its position and leave all the others at zero. The resulting one-hot vector identifies a word exactly, and two different word forms activate disjoint positions. Looking up an embedding replaces that indicator with the corresponding column of a much shorter matrix. A dense column can share patterns with many other columns. Every component of that column can also be available to the tagger, giving it a different kind of evidence from a set of discrete indicators.

The paper describes several ways of learning such vectors. The prediction-based approaches represented by [word2vec](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/) learn from the relationship between a word and its context. The related literature also compares them with approaches built around counts of word contexts. Berend gives weight to earlier evidence that the outcome of that comparison depends on the choices made when training the embeddings. The design of the experiments accordingly treats embedding source and training window as variables worth examining.

[Polyglot](https://md.research.elamur.ai/free/en/papers/rfou-2013-polyglot-distributed-word-representations-multilingual/) is the primary source of embeddings because its publicly available vectors cover more than 100 languages. The public representations were developed with word analogy performance in mind. The paper distinguishes them from the vectors that Polyglot's authors used in their own part-of-speech experiments. For Berend, the salient property of the released vectors is that they were already available across languages and could be used without adapting them to the labels in either task.

Earlier work by Collobert and colleagues also drew on unannotated Wikipedia text for word representations. Their procedure subsequently updated the representations for individual tasks in a neural architecture. Berend keeps the embedding stage separate from supervised sequence labeling, and uses a log-linear tagger downstream. This organization makes it possible to test whether the same fixed representation supplies adequate information for both grammatical categories and entity mentions. It also makes the amount of labeled text a variable that can change while the lexical representation stays fixed.

#### Where sparse coding enters

Sparse coding expresses an input vector through a combination of a small number of building blocks. Dictionary learning determines those building blocks from a collection of inputs. The idea had already been applied to words. [Sparse Overcomplete Word Vector Representations](https://md.research.elamur.ai/free/en/papers/faruqui-2015-sparse-overcomplete-word-vector-representations/) described objectives for converting dense word vectors into sparse ones, including an option that limits the coefficients to non-negative values. The paper also describes earlier research on hierarchical sparse word representations and on learning sparse continuous bag-of-words vectors directly.

Berend makes a specific choice about how to use a sparse representation for tagging. A word with a non-zero coefficient gets a feature corresponding to that dictionary entry and the sign of the contribution. Any other word using that entry with the same sign can activate the same feature. Two words can therefore coincide on one feature and differ on others. The feature space reflects overlapping patterns of use across the vocabulary.

The paper contrasts that overlap with the hierarchy of Brown clusters. A word's Brown cluster identifier can give rise to several features by taking prefixes at different depths. Those features describe nested memberships along the word's path through the hierarchy. The sparse code can draw several entries from a shared dictionary without imposing that nesting. Both approaches yield discrete features and bring information from unannotated text into the tagger. Comparing them is a way of asking whether the organization of the lexical information matters once the downstream task is held fixed.

### The method, step by step

#### From a vocabulary to a dictionary

The workflow has an unsupervised stage and a supervised stage. The first starts from the dense vectors available for the vocabulary and finds a sparse description of each vector. The second learns from tagged sentences. By the time the tagger receives a sentence, the mapping from a word form to its sparse features has already been determined. The same features can then be presented to a tagger for grammatical categories or to a tagger for entities.

From dense word vectors to sentence labels The steps in order.

The dense lookup can be written as a matrix acting on a word's one-hot vector.

```
wᵢ = W 𝟙ᵢ
```

Here `i` identifies the word, `𝟙ᵢ` is its one-hot vector, `W` is the embedding lookup matrix, and `wᵢ` is the resulting dense word vector. The active entry of `𝟙ᵢ` is at the word's vocabulary index. Multiplication selects the corresponding column of `W`. The matrix has `k` rows, one for each embedding coordinate, and `|V|` columns, where `V` is the vocabulary and the bars denote its size.

Now consider all the columns of that lookup matrix as the inputs to a reconstruction problem. Each should be expressible approximately by combining reusable vectors. A basis vector, in the paper's terminology, is one dictionary entry. Its coordinates live in the original embedding space. A coefficient determines how much of that vector enters a particular reconstruction. A coefficient of zero omits it, a positive coefficient adds a scaled copy, and a negative coefficient contributes in the opposite direction.

The learned dictionary has more entries than the input vectors have coordinates in the main Polyglot setup. The paper uses 64-dimensional input vectors and 1024 dictionary entries. The code can therefore be longer than the original embedding and still be sparse. Length counts all the positions the representation makes available. Sparsity concerns how many of those positions are zero for a given representation, or across the whole collection of representations. The feature vocabulary can offer many shared patterns while an individual word activates only a subset.

In the general formulation, `X` collects input vectors as columns. The product of the dictionary and the coefficients approximates this matrix.

```
X ≈ Dα
```

`X` has `k` rows and `n` columns, where `k` is the input dimension and `n` is the number of inputs. `D` is the dictionary matrix, with `k` rows and `m` columns, where `m` counts the dictionary entries. `α` is the coefficient matrix, with `m` rows and `n` columns. Each column of `Dα` reconstructs the corresponding column of `X`. The symbol `≈` indicates that the reconstruction can be approximate. In the application, the inputs are the columns of `W`, and the coefficient matrix has a column for each represented word.

#### How the objective produces sparse codes

The main objective balances reconstruction against a penalty on the coefficients. It also limits the length of each dictionary vector. This is the formulation the paper calls SC-1 in its comparison of learning objectives.

```
min over D ∈ 𝒞 and α  (1 ∕ (2n)) ∑ᵢ₌₁ⁿ (‖xᵢ − Dαᵢ‖₂² + λ‖αᵢ‖₁)
```

`min` calls for the choice of `D` and `α` that minimizes the expression. `𝒞` is the allowed set of dictionaries, and `∈` denotes membership in that set. Every column of a dictionary in `𝒞` has Euclidean norm at most one. The sum `∑` runs over inputs indexed by `i`, from `1` through the total `n`. The leading factor `1 ∕ (2n)` scales the summed objective. The input `xᵢ` and its coefficient column `αᵢ` describe the same item, and `Dαᵢ` is its reconstruction. The squared Euclidean norm `‖·‖₂²` measures the sum of squared coordinate errors in the residual. The norm `‖·‖₁` adds the absolute values of the coefficients. The parameter `λ` weights that penalty.

The reconstruction term rewards a dictionary that can account for the input vectors. The penalty charges for using coefficients, and small coefficients can drop to zero when their contribution to reconstruction is too slight to justify the cost. Limiting the lengths of dictionary columns also matters to the balance. Scaling up a column would otherwise allow it to contribute the same vector with a smaller coefficient. A lower penalty could then come from changing the scale of the dictionary entry while keeping its contribution to reconstruction the same.

The paper also gives the objective in matrix form when describing the sequence labeler.

```
‖W − Dα‖F² + λ‖α‖₁
```

`W` contains the dense word embeddings, and `Dα` contains their reconstructed columns. `‖·‖F²` denotes squared Frobenius norm, which sums the squared residuals over all the matrix entries. `‖α‖₁` represents the absolute-value penalty on the sparse coefficients in this description. The symbol `λ` again governs the strength of the penalty. This expression groups all the word reconstructions into one matrix residual. The constrained objective specifies the dictionary restriction used in the main experiments.

The paper uses SPArse Modeling Software, or SPAMS, for dictionary learning. In the preliminary choice of dictionary size, the author starts with `m` equal to 256 and doubles it across trials. The reported usefulness of the resulting features levels off at 1024, which becomes the working value. With the dictionary fixed, encoding a word amounts to solving the reconstruction problem for its coefficient column with the absolute-value penalty. The paper uses `λ` equal to 0.1 in its main comparisons unless a different value is specified.

There are separate reasons to care about dictionary size and coefficient sparsity. The dictionary size limits how many kinds of building blocks are available. The penalty influences how many a particular reconstruction uses. A dictionary can offer a broad selection while the penalty discourages most words from drawing on many entries. Both choices affect what the supervised stage receives, even though neither uses the POS or entity labels.

#### From coefficients to features

The sequence labeler receives an indicator for each non-zero coefficient. Its identity comes from the coefficient's dictionary index and its sign.

```
f(wᵢ) = { (j, sign(αᵢ[j])) | αᵢ[j] ≠ 0 }
```

`f` is the feature function, and `wᵢ` is the dense embedding of word `i`. `αᵢ` is that word's sparse coefficient vector. The index `j` selects a dictionary entry, and `αᵢ[j]` is the coefficient of that entry. `sign` distinguishes positive and negative values. The braces describe the set of feature identities, and the vertical bar introduces the condition for including a pair. `≠ 0` means the coefficient must be non-zero. The pair notation makes explicit that dictionary index and sign jointly identify an indicator.

A word with a strong positive contribution and a word with a weak positive contribution from the same entry both activate its positive indicator. The coefficient size affects the reconstruction but is discarded at feature extraction. A negative contribution from the same entry activates a separate indicator. This is how the feature design preserves the direction in which a dictionary entry was used while giving the tagger a discrete event it can recognize across words.

When assigning a label to a token, the tagger receives features from the token’s word form and from its immediate neighbors on both sides. The paper describes this as a window of size 1. Location matters because a cue carried by a neighbor can have a different use from the same cue carried by the target. The dictionary index also has a stable meaning within a learned dictionary, which allows the tagger to encounter the same indicator at training and test time on different word forms.

The method extracts these features wherever there is an embedding to encode. For a form outside the embedding vocabulary, the corresponding position cannot supply sparse indicators for that form. A neighboring word may still supply its indicators, and the relationship between adjacent labels still contributes to the sentence prediction. This is why lexical coverage affects the available evidence without turning each uncovered token into an automatic error.

The supervised part is a linear-chain conditional random field, or CRF. It assigns scores to possible sequences of labels conditioned on the sentence. The observed word features supply evidence at individual positions, and the chain allows adjacent labels to affect the preference for a sequence. The paper uses CRFsuite with its default coefficients of 1.0 for ℓ₁ regularization and 0.001 for ℓ₂ regularization. These penalties apply at the tagging stage. The coefficient penalty in dictionary learning governs a different set of weights before the tagger is trained.

The distinction between the stages explains what reuse means here. The same mapping from word forms to signed indicators goes to the POS and entity labelers. Labeled sentences teach the CRF how these indicators relate to the labels of the current task. Entity recognition also uses its own tagging scheme for expressing mention boundaries. Thus reuse concerns the lexical features, while the task determines the supervised training targets and the learned scoring weights.

#### The alternative feature and dictionary choices

For the direct dense comparison, the tagger receives the numerical value of every coordinate of the corresponding embedding.

```
f(wᵢ) = { (j, wᵢ[j]) | j ∈ {1, …, k} }
```

`f` again maps the word embedding `wᵢ` to features, and `i` identifies the word. The position `j` selects a coordinate, and `wᵢ[j]` gives its real value. In each pair, `j` identifies the feature and the coordinate gives its value. The braces describe the feature collection, the vertical bar introduces the index rule, and `∈` means that `j` belongs to the index set running from `1` through the embedding dimension `k`. The ellipsis denotes the intervening indices. This form keeps the input embedding as it was learned and bypasses dictionary learning and sign-based indicators.

The sparse comparison also includes the objective from Faruqui and colleagues that replaces the hard restriction on dictionary columns with a penalty.

```
min over D and α  (1 ∕ (2n)) ∑ᵢ₌₁ⁿ (‖xᵢ − Dαᵢ‖₂² + λ‖αᵢ‖₁ + τ‖D‖₂²)
```

`D` and `α` are the dictionary and the matrix of coefficient columns to be chosen by minimization. The sum indexed by `i` covers the `n` inputs, and `1 ∕ (2n)` is its scaling factor. For input `xᵢ`, `αᵢ` is its coefficient vector and `Dαᵢ` its reconstruction. The squared Euclidean residual and the ℓ₁ coefficient penalty have the same roles as before, with `λ` again weighting the latter. The new parameter `τ` weights the squared norm penalty `‖D‖₂²` on the dictionary, using the paper's notation. There is no fixed cap on each column in this objective. The paper calls this variant SC-3.

SC-4 uses the penalized objective and restricts the coefficients.

```
min over D ∈ ℝᵏˣᵐ and α ≥ 0 elementwise
    (1 ∕ (2n)) ∑ᵢ₌₁ⁿ (‖xᵢ − Dαᵢ‖₂² + λ‖αᵢ‖₁ + τ‖D‖₂²)
```

`D ∈ ℝᵏˣᵐ` means that the dictionary is a real matrix with `k` rows and `m` columns. Here `k` is the input dimension, and `m` counts dictionary entries. The condition `α ≥ 0 elementwise` requires each coefficient to be zero or positive. The sum `∑` visits the `n` inputs indexed by `i`, and `1 ∕ (2n)` scales it. Its terms are the squared reconstruction error of `xᵢ` from `Dαᵢ`, the absolute-value penalty on `αᵢ` weighted by `λ`, and the squared dictionary norm penalty weighted by `τ`. A non-zero coefficient from this variant can only supply a positive feature. The comparison between objectives therefore changes the dictionary learning procedure and, for SC-4, the range of indicators the tagger can receive.

### Experiments and results

#### What the baselines can learn

The central comparisons keep the linear-chain CRF and change the evidence available to it. The dense version tests whether passing the original coordinates suffices. The Brown clustering version tests a different way of supplying shared lexical indicators. The feature-rich variants show how the sparse indicators fare against a collection of spelling and word-context templates. The Universal Dependencies experiments add explicit word identity by itself and in combination with sparse features, along with published recurrent tagging results for comparison.

The Brown cluster baseline is trained from the same Wikipedia articles used for the corresponding Polyglot embeddings. It uses 1024 clusters, matching the number of dictionary entries in the sparse setup. Its features are prefixes of length 4, 6, 10 and 20 from the cluster identifiers. A match at a shorter prefix lets forms share a feature at a higher level of the hierarchy. A match at a longer prefix recognizes a finer grouping. Matching the nominal cluster count to the dictionary size and using the same articles control some relevant conditions, while the two approaches still have distinct ways of producing and sharing features.

The feature-rich CRFs draw on templates used in CRFsuite's POS tagging example. The word-only version, denoted FR w, treats forms as units and can use combinations of nearby words at specified positions. FR w+c adds character-level features, including spelling prefixes and suffixes and indicators for properties such as title case. Both tasks use the same inventory of templates. This keeps the comparison aligned with the paper's choice to leave the sparse representation unchanged between tasks. It also means that the feature-rich entity baseline represents one fixed design carried over from POS tagging.

#### Part-of-speech tagging on CoNLL treebanks

The first POS suite uses 12 treebanks in CoNLL-X format. A [treebank](https://md.research.elamur.ai/free/en/topics/treebanks/) is a corpus with grammatical annotation, and the experiments use the POS tags assigned to its tokens. The paper keeps the original train and test partitions. It uses the scripts from [A Universal Part-of-Speech Tagset](https://md.research.elamur.ai/free/en/papers/petrov-2012-universal-part-speech-tagset/) to map each treebank's labels to 12 shared categories. Accuracy measures the proportion of test tokens assigned the correct mapped tag. The paper reports separate results by treebank and averages across the collection.

This suite includes a data coverage check. The paper measures the share of running tokens with embeddings and the share of distinct word forms with embeddings on the combined training and test sets. These are different measures because a common covered word contributes once to the distinct-form count and many times to the token count. For most languages, the paper describes token coverage as around 90%. Turkish is lower. This measurement describes where the tagger has access to the lexical representation under test, and the results include the tokens outside that coverage.

With all training sentences, sparse Polyglot scores 94.44% on average. The feature-rich word-only CRF averages 90.77%, and Brown clustering averages 93.27%. The word-and-character feature-rich CRF reaches 95.75%. The sparse system beats both the Brown and feature-rich word-only baselines consistently in this suite. The character-inclusive feature set has the stronger average when all the annotated data are available.

The individual test sets show how much variation sits behind that average. Sparse Polyglot reaches 97.20% on English, 96.33% on German and 85.93% on Turkish. Their corresponding FR w+c scores are 97.74%, 98.42% and 89.63%. Slovene provides a case in which the sparse system has the higher full-training test score, with 94.10% against 93.90% for FR w+c. These comparisons are within treebanks. Raw differences in accuracy across languages also reflect differences in corpora, vocabulary coverage and the conditions under which the tags were assigned.

#### Results with less annotated text

The paper trains the taggers on all the available training sentences, on the first 1,500 sentences from each training set, and on the first 150. It uses the same test partitions throughout. The restricted training sets change how much supervised evidence the CRFs can use, while the vectors and sparse word codes still come from the same unsupervised preparation. Each sentence budget is applied separately to each language, so the fraction of a full corpus represented by a budget varies across treebanks.

Average POS tagging accuracy on the CoNLL 2006/07 test sets with the first 150 training sentences per language Sparse Polyglot features lead both feature-rich baselines in the smallest labeled training regime.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Feature-rich words only | 70.28 |
| Feature-rich words and characters | 81.07 |
| Sparse Polyglot (this paper) | 84.83 |

With the first 1,500 training sentences, sparse Polyglot averages 91.90%, compared with 91.82% for FR w+c and 85.05% for FR w. The first 150 sentences give the sparse system a clearer advantage on the average. The paper reports advantages of 3.76 points over FR w+c and 14.55 points over FR w at that smallest budget. The relationship with FR w+c therefore depends on how much annotated text is available. It leads with all the training data, is close to sparse Polyglot at the intermediate budget, and falls behind at the smallest one.

The paper gives another view of the same experiment by comparing each system with its own full-training result. Sparse Polyglot retains 89.8% of its average accuracy at the smallest budget. FR w+c retains 85%, and FR w retains 77%. These figures describe retention relative to the full-training average. The chart shows the absolute token accuracy on the unchanged test sets. Both views capture the smaller deterioration for the sparse features as the labeled sample shrinks.

The average advantage has exceptions. With 150 training sentences, sparse Polyglot scores 89.51% on Danish against 83.34% for FR w+c, and 75.24% on Dutch against 69.28%. On German, FR w+c leads with 89.64% against 88.29%. These examples also show that a fixed count of sentences has different implications in different corpora. At the intermediate budget, the first 1,500 sentences represent 97.78% of Slovene's training set and 3.77% of English's. At the smallest budget, German and English each have a reported training fraction of 0.38%, whereas Slovene has 9.78%.

#### Results with different input embeddings

Besides the released Polyglot vectors, the paper uses continuous bag-of-words, skip-gram and [GloVe](https://md.research.elamur.ai/free/en/concepts/glove/) embeddings. The author trains these alternatives on the same Wikipedia dumps used for Polyglot, using 64 dimensions and a symmetric context window of size 2 in the main comparison. The training context here belongs to the embedding learner. The tagger's immediate-neighbor window is a separate choice.

Average POS tagging accuracy on the CoNLL 2006/07 test sets by embedding source and feature representation Every embedding source scores higher with sparse indicators than with its original coordinates.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Dense Polyglot | 91.17 |
| Sparse Polyglot (this paper) | 94.44 |
| Dense continuous bag-of-words | 88.30 |
| Sparse continuous bag-of-words | 93.74 |
| Dense skip-gram | 86.89 |
| Sparse skip-gram | 93.63 |
| Dense GloVe | 81.53 |
| Sparse GloVe | 91.92 |

The sparse entries here use `λ` equal to 0.1 and `m` equal to 1024. The averages for the continuous bag-of-words and skip-gram systems are reported under the headings in the dense and sparse results table. The discussion elsewhere in the paper reverses the attribution of the two sparse averages. Under the table's labels the sparse variants are close, and each improves on its own dense version. Polyglot leads in both forms.

The paired comparisons clarify what the highest score alone would leave open. The result does not depend on using the Polyglot training procedure. Within each tested embedding source, the sparse feature pipeline improves the average in the same CRF setting. At the same time, the differences across input sources persist after sparse coding. The lexical information available in the starting vectors continues to shape the outcome.

#### Tagging with Universal Dependencies

The second POS suite uses [Universal Dependencies](https://md.research.elamur.ai/free/en/concepts/universal-dependencies/) v1.2, which defines 17 POS categories. The paper uses the default train and test partitions and leaves the development sets out of per-language tuning. After exclusions for licensing or embedding availability and coverage, it evaluates on 33 treebanks covering 29 languages. Ancient Greek receives representations trained on Modern Greek. Brown clustering results are unavailable for some treebanks because the Wikipedia dumps used to produce their Polyglot embeddings were unavailable.

Sparse Polyglot alone is called SC in these experiments. WI uses the identities of the current word and its neighbors, and WI+SC combines those identity features with the sparse indicators. On the 20 treebanks with results in every comparison column, the average token accuracies are 89.05% for WI, 93.15% for SC and 93.73% for WI+SC. On that same common set, the feature-rich word-only CRF averages 88.77%, Brown clustering averages 91.95%, and the published word-only bidirectional LSTM averages 92.40%. The feature-rich word-and-character CRF averages 94.76%, and the published word-and-character bidirectional LSTM averages 95.99%.

The overlap available for a direct count against [Plank and colleagues' multilingual bidirectional LSTM tagger](https://md.research.elamur.ai/free/en/papers/plank-2016-multilingual-part-speech-tagging-bidirectional/) consists of 21 treebanks. The paper reports that SC beats the word-only bidirectional LSTM on 15 of them and WI+SC beats it on 20. The comparison paper reported results for treebanks with at least 60k tokens, so these counts describe only the relevant overlap. The set used for the counts differs from the set used to average all columns together.

The Greek treebanks show why both the coverage and identity columns matter. On the two Ancient Greek treebanks, the reported token coverages are 43.58% and 45.74%. SC scores 70.27% and 67.17%, respectively. With identity features added, WI+SC reaches 85.04% and 91.38%. These are cases where the shared lexical representation has unusually limited access to the forms being labeled. The added features give the CRF evidence from the observed spellings, including forms for which the sparse feature lookup is unavailable.

#### Entity recognition with the same word features

The final experiments use the English, Spanish and Dutch data from the CoNLL 2002 and 2003 named entity recognition shared tasks. The author uses the organizers' train and test partitions and their official F1 evaluation script. Entity F1 balances precision, the share of predicted mentions that are correct, and recall, the share of annotated mentions recovered. A tagging accuracy and an entity F1 score consequently answer different questions. F1 in this setting accounts for whether the entity predictions match, so a mistake at a mention boundary can affect the status of the whole prediction.

The CRF learns and predicts with a 17-tag IOBES scheme. This scheme distinguishes positions at the beginning, inside and end of a mention, tokens outside mentions, and mentions consisting of a single token. The word features are those used for POS tagging. The different scheme determines what the tagger learns to predict and gives the sequence a way to express the spans that the official evaluation checks.

Average entity F1 on the English, Spanish and Dutch CoNLL test sets with dense and sparse features Sparse coding raises average entity F1 for each source, with Polyglot giving the strongest average.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Dense Polyglot | 71.50 |
| Sparse Polyglot (this paper) | 77.54 |
| Dense continuous bag-of-words | 67.32 |
| Sparse continuous bag-of-words | 76.76 |
| Dense skip-gram | 68.27 |
| Sparse skip-gram | 76.30 |
| Dense GloVe | 65.72 |
| Sparse GloVe | 75.98 |

The main sparse comparison carries over `m` equal to 1024 and `λ` equal to 0.1 from POS tagging. Sparse Polyglot scores 82.92 F1 on English, 77.03 on Spanish and 72.66 on Dutch. Its dense counterpart scores 78.80, 70.13 and 65.58. A different source gives the strongest English result in this comparison, with sparse continuous bag-of-words at 83.40 F1. Polyglot's lead describes the average and its general tendency in the experiments.

The paper reports that the sparse systems do better than its feature-rich word-and-character baseline for entity recognition. It also gives published English figures from Collobert and colleagues for context. Their reported F1 is 81.47 without additional unannotated text for their language training stage and 87.58 when that stage uses Wikipedia. Sparse Polyglot falls between those results. This places the score in the context of prior English work while keeping the matched dense-versus-sparse CRF comparisons as the evidence about feature choice.

### What the ablations show

#### The feature transformation contributes across embedding sources

The comparison with dense coordinates is the most direct test of the paper's central design. Both representations begin with the same embeddings within a pair and go into the same type of sequence labeler. The dense variant supplies numerical coordinates. The sparse variant learns a dictionary, estimates coefficients and turns the non-zero indices and signs into indicators. The consistent gains across input sources and both tasks attribute the improvement to this complete change in representation under the tested conditions.

The continuous bag-of-words and skip-gram comparison helps reveal what that transformation can change. The paper reports that dense continuous bag-of-words leads dense skip-gram by 1.4 points on average for CoNLL POS tagging. The sparse versions have much closer averages. A comparison of embedding methods made through their original coordinates can therefore give a different impression of their relative usefulness from a comparison made through sparse indicators. The embedding source and the way the downstream tagger uses it are separate choices.

This experiment changes several properties together. It learns a new basis, increases the number of possible feature positions, encourages exact zeros and drops magnitudes when producing indicators. The resulting scores support the combination. The experiment does not assign an individual share of the gain to wider codes, coefficient sparsity or binarization by sign. The comparison of sparse objectives offers additional evidence about the utility of negative coefficients, but it changes the codes themselves as well as the signs available to the CRF.

The Brown comparison addresses a different question. Both Brown features and sparse indicators share information across words and can be used as discrete inputs to the CRF. The Brown hierarchy yields features at nested levels. Sparse features describe combinations of dictionary entries. The consistent advantage of sparse Polyglot over the corresponding Brown results in the first POS suite shows that the particular way of sharing information among word forms matters for this setup. The control over training articles helps make that result informative, while the construction procedures still differ in more than the structure of their features.

#### Sparsity and context are separate settings

The author varies `λ` through 0.05, 0.1, 0.2, 0.3, 0.4 and 0.5 in the regularization sweeps. The figures use sparsity on the horizontal axis. This lets the reader compare the outcomes in terms of the property that directly changes the feature input, the prevalence of zero coefficients. The same penalty setting can induce different sparsity in different collections of embeddings, so the fraction of zeros is a more direct description of the codes being compared.

For CoNLL POS tagging, accuracy is fairly insensitive over much of the sweep. The paper reports problems at extreme sparsity above 99.5%. This indicates that the useful setting is a range, with degradation when too many coefficients are suppressed in this experiment. Named entity recognition behaves differently on its tested datasets. Its curves show no comparable loss at the extreme sparsity settings examined. The observed pattern is specific to those sweeps. The fixed setting of 0.1 serves both tasks in the main comparisons even though their responses to the sweep differ.

The paper also changes the context used to train the input embeddings, comparing windows of size 2 and 10 for continuous bag-of-words, skip-gram and GloVe. The shorter training context tends to produce better POS accuracy after sparse coding. The difference is most pronounced for skip-gram. One reading of this comparison, consistent with the prior work the paper cites, is that short-range patterns in the input vectors are especially useful for recognizing grammatical categories. The experiment changes the evidence gathered when forming the vectors while using the resulting vectors in the same sparse feature pipeline.

The context window at labeling time is another variable. The main CRF uses the immediate neighbors of the target word, and the paper says that increasing that window to size 2 brought no substantial difference. It omits the wider-window scores. This observation plays a supporting role for the narrow window used in the main results. The embedding-window experiment provides the fuller comparison, with results shown across embedding sources.

#### Similar levels of sparsity can hide different dictionaries

The comparison among SC-1, SC-3 and SC-4 seeks operating points with similar average sparsity on the 12 CoNLL languages. SC-1 uses `λ` equal to 0.05, and SC-3 and SC-4 use 0.5. The versions with a dictionary penalty use the default `τ` of 10⁻⁵. The respective average sparsity levels are 95.3%, 94.5% and 95.2%. Choosing these operating points reduces the extent to which a difference in POS accuracy can simply be attributed to one method making far more coefficients zero overall.

SC-4, the version requiring non-negative coefficients, averages 0.7 points less in POS accuracy than SC-3. Earlier research cited in the paper describes a motivation for non-negative representations in terms of cognitive plausibility. The controlled tagging comparison addresses prediction accuracy. On that measure, the motivation for using non-negative codes does not yield a gain under the chosen conditions. The difference between the average accuracies of SC-1 and SC-3 is only 0.18 points, placing the strongly constrained and the penalized dictionary options close on the task.

The dictionaries themselves look different. With the hard constraint in SC-1, the lengths of the learned entries vary very little. The entries learned by SC-3 and SC-4 vary substantially in length within and across languages. The paper also measures how frequently each entry receives a non-zero coefficient among the words. For the two penalized objectives, longer entries tend to be active more often, and the plots show a strong association. For the constrained objective, the paper reports no corresponding association. Some entries from the penalized objectives have norms orders of magnitude larger than those of the constrained dictionary. The author points to increasing `τ` as a way to restrain this effect.

The analysis makes a distinction between overall sparsity and the distribution of the nonzeros. A percentage of zeros describes how many coefficients have been suppressed in aggregate. It leaves open whether the remaining activity is spread across dictionary entries or concentrated among a smaller group. The paper finds both comparable tagging scores and visibly different patterns of activity. Accuracy alone can thus leave substantial differences in the learned representation unresolved. The subsequent experiments use the constrained objective, so their sparse indicators come from the dictionaries with the explicit column bound.

#### Word identity can complement shared features

The Universal Dependencies comparisons place word identity under direct control. WI learns from the spellings of the word and its neighbors. SC learns from the sparse indicators. WI+SC receives both. On the common comparison set, SC improves on WI by a substantial margin. Adding WI to SC raises the average further. The two observations are compatible with different roles for the features. A shared indicator can let the CRF use evidence gathered from multiple words. An identity feature can preserve information about a particular form that sharing can blur or that the embedding vocabulary cannot supply.

The pattern varies across treebanks. The Greek results show especially large gains from adding word identities where direct embedding coverage is low. On Danish, the SC score is 93.32% and the combined system scores 93.29%. On Slovene, the corresponding scores are 92.65% and 92.70%. These cases show how modest the effect of adding identities can be in some settings, even though the common-set average improves. The experiment establishes that identity remains useful alongside sparse features in part of the suite, and that sparse features on their own can already carry enough shared information to outperform identity on average.

The training-size experiment tests another consequence of sharing. An exact-form indicator or a template combining several forms requires enough occurrences to be useful. A sparse indicator can receive supervision from several words before the tagger sees a particular spelling in the labeled data. The performance pattern with fewer training sentences is consistent with that explanation. The paper varies labeled corpus size directly and reports aggregate accuracy, so this connection is an interpretation of the comparison. The study does not follow individual indicators through training to measure which transfers account for the gains.

### Limitations

#### Limits identified by the author

The representation depends on being able to look up word forms in the embedding vocabulary. The paper treats coverage as a central condition of the method and describes several concrete cases in the Universal Dependencies evaluation. Japanese is omitted because the licensed release strips the words from the treebank. Old Church Slavonic and Gothic lack released Polyglot embeddings. Arabic has a released representation, but the treebank uses vocalized forms and the vector vocabulary contains unvocalized forms. Fewer than 30% of the Arabic tokens could be associated with vectors under the paper's setup, so the Arabic treebank is left out.

Even a vector resource with the right language name can therefore provide limited evidence if the surface forms disagree. The author suggests that morphology and the available Wikipedia text can also affect coverage. Comparisons with Brown features have an additional resource requirement, because constructing a matched baseline calls for the articles used to train the vectors. The paper identifies 4 languages, associated with 6 treebanks, for which the Polyglot vectors are accessible but those Wikipedia dumps are unavailable. The absence of a result in the Brown column reflects that dependency.

The paper places cross-lingual analysis in future work. Its experiments run a common procedure across different languages, each with its labeled tagging data. Using Modern Greek embeddings on Ancient Greek treebanks is a specific case of using a lexical resource trained on a different variety. The paper does not train a tagger on labels in one language and report its transfer to another. The measurements establish multilingual applicability for the included datasets, with those resource choices.

The conclusion also frames performance in relation to the best available comparisons. The dense-to-sparse gains and the strong word-only comparisons are central results. Character-inclusive systems still reach higher averages in the full-training POS comparisons. For English entity recognition, the paper itself reports a higher published score from the earlier Wikipedia-assisted neural system. The claim that one fixed sparse representation works across tasks and languages is supported by those results without requiring it to lead every comparison.

#### Limits that follow from the design

The small-training-set experiment reduces the amount of annotated material. The vectors still rely on a substantial unannotated resource, and dictionary learning still has access to the embedding vocabulary. The result therefore addresses scarcity of labels given an existing lexical resource. A setting with a small unannotated corpus, poor lexical coverage and few labels creates additional constraints. The paper's coverage exclusions show how consequential those constraints can be before supervised learning even begins.

The supervised subsets are prefixes of the training corpora. An equal sentence count can give unequal quantities of token evidence, and the early part of a corpus may have its own mix of constructions or topics. The tables report the outcomes on those specific subsets. They do not give variation across repeated samples of the same size or report uncertainty around the small average difference at the intermediate budget. The close comparison at 1,500 sentences supports a claim of similar observed performance there.

Tags and metrics also delimit what can be compared. The first POS suite collapses treebank-specific distinctions into the Google universal categories. The Universal Dependencies suite uses a different inventory, as well as different treebanks and splits. Aggregate POS accuracy measures performance on the tag categories used in a given run. It says less about information in distinctions that a mapping has collapsed. The named entity experiment covers three languages and assesses entities with F1. The broader range of POS languages gives direct evidence about POS tagging, while the entity result has the narrower scope of its own tests.

The paper studies reconstruction norms, activation frequencies and predictive performance. It does not assign linguistic meanings to individual dictionary entries or test whether they correspond to stable categories that a person can name. The indicators are inspectable in the sense that each occurrence has an index and sign, and one can observe which words share them. Their usefulness for labeling supplies evidence of predictive structure. A claim about their correspondence to a particular linguistic property would call for separate evidence.

Finally, the comparison with dense coordinates concerns the use of those coordinates as inputs to a linear-chain CRF. A different sequence architecture can learn other transformations of dense vectors. The results show that adding this sparse coding and indicator stage helps the tagger used in the paper. They leave open how the same lexical evidence would fare under a different downstream learning procedure, or how much of the improvement could be reproduced by changing just one component of the sparse feature pipeline.

### What came after

[Robust Multilingual Part-of-Speech Tagging via Adversarial Training](https://md.research.elamur.ai/free/en/papers/yasunaga-2018-robust-multilingual-part-speech-tagging/) is a later paper that cites Berend. It shares the focus on multilingual POS tagging and takes adversarial training as its approach to robustness. In Berend's experiments, robustness to scarce annotation is examined by holding the lexical representation fixed and reducing the number of labeled sentences. The citation connects the two studies at the level of the research problem. It does not establish that the later tagger used Berend's sparse dictionary, signed indicators or released word vectors.

## Cite

Cite as Gábor Berend. 2017. Sparse Coding of Neural Word Embeddings for Multilingual Sequence Labeling. Transactions of the Association for Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1162/tacl_a_00059](https://doi.org/10.1162/tacl_a_00059)

```bibtex
@article{gabor2017sparse,
  title = {{Sparse Coding of Neural Word Embeddings for Multilingual Sequence Labeling}},
  author = {Gábor Berend},
  journal = {Transactions of the Association for Computational Linguistics},
  year = {2017},
  doi = {10.1162/tacl\_a\_00059},
  url = {https://doi.org/10.1162/tacl_a_00059}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
