# End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF

Neural end-to-end sequence labeling without hand-crafted features

Xuezhe Ma, Eduard Hovy · arXiv · 2016-3-4

- **Problem** Sequence labelers depended on hand-crafted features and task-specific resources, which are expensive to build and hard to move to new tasks.
- **Method** BLSTM-CNNs-CRF joins a CNN character vector to each word embedding, reads the sentence with a bi-directional LSTM, then decodes labels jointly with a CRF.
- **Results** The model reached 97.55% accuracy on WSJ POS tagging and 91.21% F1 on CoNLL 2003 NER, state of the art on both test sets.

## Why feature-heavy sequence labelers are hard to adapt

POS tagging and NER are early steps in language understanding, and the models that handle them have long been linear statistical models such as HMMs and CRFs. Those models lean on hand-crafted features and task-specific resources, such as spelling patterns for POS tagging and gazetteers for NER. Building that knowledge is expensive, which makes it hard to carry such a labeler over to new tasks or domains.

Neural models took over input representation: a window-based feed-forward network classifies each word from its context, and RNN, LSTM and GRU variants handle sequential data. Even so, many neural taggers used embeddings only to add to hand-crafted features such as capitalization patterns, and their performance drops quickly when they rely on neural embeddings alone.

## From characters to a jointly decoded label sequence

The model needs no task-specific resources, so the same network can be applied to different languages and domains once pretrained word embeddings are available. A CNN turns the characters of each word into a character-level vector, which is joined to the word embedding and fed to a bi-directional LSTM that models the context of every word.

A CRF on top of the BLSTM outputs decodes the labels for the whole sentence together.

The character CNN follows the design of Chiu and Nichols (2015), with one difference: it takes only character embeddings as input and omits character type features. Character embeddings pass through a dropout layer before the convolution, and max pooling over the convolution outputs gives one fixed-size vector per word that can capture prefixes and suffixes.

Each LSTM unit keeps a memory cell that is updated by a forget gate and an input gate, with an output gate controlling what is passed on as the hidden state. The cell update is \\( c\_t = f\_t \\odot c\_{t-1} + i\_t \\odot \\tilde{c}\_t \\) and the hidden state is \\( h\_t = o\_t \\odot \\tanh(c\_t) \\), where \\( \\odot \\) is the element-wise product. The formulation has no peephole connections.

A forward LSTM reads the sentence left to right and a backward LSTM reads it right to left, so each position gets a past-context state and a future-context state. The two states are concatenated to form the output for each word.

Label choices depend on their neighbours: a POS tag sequence and a BIO2 entity sequence both have constraints between successive labels, for example an I-ORG tag cannot follow an I-PER tag under BIO2. A CRF scores the whole label sequence \\(y\\) given the input \\(z\\), with potentials that depend on the input vectors and on each pair of successive labels.

The probability is \\\[ p(y\|z;W,b)=\\frac{\\prod\_{i=1}^{n}\\psi\_i(y\_{i-1},y\_i,z)}{\\sum\_{y'\\in Y(z)}\\prod\_{i=1}^{n}\\psi\_i(y'\_{i-1},y'\_i,z)} \\\] where \\( \\psi\_i(y',y,z)=\\exp(W^T\_{y',y}z\_i+b\_{y',y}) \\), and the denominator sums over all label sequences in \\( Y(z) \\). Training maximizes the log-likelihood of the gold label sequences, and decoding searches for \\( y^\*=\\arg\\max\_{y\\in Y(z)} p(y\|z;W,b) \\) with the Viterbi algorithm, which is tractable because only successive label pairs interact.

The character vector is concatenated with the word embedding, and the BLSTM encodes the result; its outputs go to the CRF layer. Dropout is applied to the input and to the output of the BLSTM, as the model figure shows.

## Initialization, optimization and regularization

The network was implemented in Theano and run on a single GeForce GTX TITAN X GPU per model. Training took about 12 hours for POS tagging and 8 hours for NER.

The word embeddings start from Stanford's GloVe vectors with 100 dimensions, trained on 6 billion words, and are fine-tuned during training. Character embeddings are drawn uniformly with dimension 30, and matrix weights use a uniform range scaled by the rows and columns of each matrix. Biases start at zero, except the forget-gate bias, which starts at 1.0.

Parameters are updated by mini-batch SGD with batch size 10 and momentum 0.9. The initial learning rate is \\( \\eta\_0 = 0.01 \\) for POS tagging and 0.015 for NER, and it decays per epoch as \\( \\eta\_t=\\eta\_0/(1+\\rho t) \\) with \\( \\rho = 0.05 \\). Gradients are clipped at 5.0 to limit gradient explosion. AdaDelta, Adam and RMSProp were tried in preliminary runs and did not improve on SGD with momentum and clipping.

Early stopping on validation sets gave best parameters at around 50 epochs.

Dropout with rate 0.5 is applied to character embeddings, to the BLSTM input and to the BLSTM output in all experiments. Hyper-parameters were chosen by random search on the development sets; the search could not cover the full space, so the POS and NER settings were shared except for the initial learning rate. The LSTM state size is 200, and the CNN uses 30 filters with window length 3.

## Effect of each layer over the baselines

The ablation compares BRNN, BLSTM and BLSTM-CNN with the full model, all using Stanford's GloVe 100-dimensional embeddings and the hyper-parameters in Table 1. BLSTM scores above BRNN on both tasks: test POS accuracy is 96.93 against 96.76, and test NER F1 is 87.00 against 85.44.

Adding the character CNN gives BLSTM-CNN test POS accuracy of 97.33 and test NER F1 of 89.36, above the BLSTM baseline on both tasks. The authors read this as evidence that character-level representations matter for these tasks.

The full model, labeled BRNN-CNN-CRF in Table 3 and called BLSTM-CNNs-CRF in the text, reaches test POS accuracy of 97.55 and test NER F1 of 91.21. Relative to the BLSTM-CNN row, the CRF layer raises test POS accuracy from 97.33 to 97.55 and test NER F1 from 89.36 to 91.21. The authors attribute the gain to joint decoding of label sequences.

## Scores against published systems

On the WSJ test set, the POS table places the model at 97.55, above Shen et al. (2007) at 97.33 and Søgaard (2011) at 97.50, the highest of the earlier entries. The model is 0.23% above the CharWNN model of Santos and Zadrozny (2014), which also uses CNNs over characters, and 0.05% above the Søgaard (2011) result.

Huang et al. (2015) also reported a BLSTM-CRF on WSJ POS tagging, but with a different train, development and test split, so those numbers cannot be set against these directly.

The authors describe a gain of 0.01% over the Luo et al. (2015) model, which uses many hand-crafted features and external knowledge bases.

The 90.77 score reported by Chiu and Nichols (2015) is not comparable, since their final model was trained on the training and development data combined. The authors re-ran their own setting and obtained 91.37% F1, and they note that the Luo et al. (2015) table reports precision, recall and F1 values that do not agree with each other.

## Word embeddings and dropout

With randomly initialized 100-dimensional embeddings, the model reaches 97.13 POS accuracy and 80.76 NER F1, against 97.55 and 91.21 with GloVe 100-dimensional embeddings. Senna 50-dimensional embeddings give 97.44 and 90.28, and Word2Vec 300-dimensional embeddings give 97.40 and 84.91.

NER depends more on pretrained embeddings than POS tagging does, which the authors connect to earlier reports. Word2Vec is far behind GloVe and Senna on NER, and the authors suggest vocabulary mismatch as a cause: Word2Vec was trained case-sensitively and without many punctuation marks and digits, while this work does no pre-processing to handle them.

Without dropout, the test scores are 97.11 for POS and 89.25 for NER, against 97.55 and 91.21 with dropout. The training POS accuracy is higher without dropout, at 98.46 against 97.86, while dev and test are higher with dropout, and the authors take this as evidence that dropout reduces overfitting.

## Where the CRF helps on out-of-vocabulary words

Words are split into in-vocabulary (IV), out-of-training-vocabulary (OOTV), out-of-embedding-vocabulary (OOEV) and out-of-both-vocabulary (OOBV) groups, using the training vocabulary and the GloVe 100-dimensional vocabulary. An entity counts as OOBV when at least one of its words is missing from the training set and at least one word is missing from the embedding vocabulary.

On the NER test set, the OOBV F1 is 80.60 for LSTM-CNN-CRF against 78.44 for LSTM-CNN. On POS, the OOBV test accuracy is 82.49 against 80.07. The largest gains are on the OOBV subsets of both corpora, and the authors take this as evidence that the CRF makes the model stronger on words unseen in both training and embeddings.

The CRF does not help every group: on POS, OOTV accuracy is 93.16 against 93.45 on test and 93.65 against 93.75 on dev.

## Limits of the evidence

The experiments cover only POS tagging on the WSJ portion of the Penn Treebank and NER on English CoNLL 2003 data. The authors expect the approach to apply to other languages, domains and tasks, and list social media and multi-task learning as future work, but these were not tested here.

Some comparisons use different splits or training data, as in the Huang et al. (2015) POS numbers and the Chiu and Nichols (2015) NER number. The tables report one score per setting, and the text gives no variance or confidence intervals. Hyper-parameters were searched randomly on the development sets within a limited budget, so the settings are not a full search.

## Paper info

- **Authors**: Xuezhe Ma, Eduard Hovy
- **Venue**: arXiv · Preprint
- **First published**: 2016-3-4
- **Added**: 2026-11-12
- **Updated**: 2016-5-29
- **Version**: v5
- **arXiv**: 1603.01354
- **Category**: cs.LG · cs.CL · stat.ML
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1603.01354v5) · [PDF ↗](https://arxiv.org/pdf/1603.01354v5)

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

Xuezhe Ma, Eduard Hovy (2016). End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF. arXiv:1603.01354v5. https://arxiv.org/abs/1603.01354v5

**BibTeX**

```
@misc{ma2016sequence,
  title = {{End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF}},
  author = {Xuezhe Ma and Eduard Hovy},
  year = {2016},
  eprint = {1603.01354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1603.01354v5}
}
```

## Other paper commentary

- [Crowdsourcing a Word-Emotion Association Lexicon](https://refivu.com/en/papers/3b0b67cb-6dd6-4162-9110-cdbb5d2cea2a-crowdsourcing-a-word-emotion-association-lexicon.md)
- [A Neural Attention Model for Abstractive Sentence Summarization](https://refivu.com/en/papers/d68d7c9a-7c6e-4b4f-a4e9-ba1853fdfad2-a-neural-attention-model-for-abstractive-sentence.md)
- [From Frequency to Meaning: Vector Space Models of Semantics](https://refivu.com/en/papers/dc10591f-f090-4830-a33f-924cbfeba0ff-from-frequency-to-meaning-vector-space-models-of.md)
- [Semantic Similarity Based on Corpus Statistics and Lexical Taxonomy](https://refivu.com/en/papers/fc160cc9-5a90-432c-8808-b3a1a431f015-semantic-similarity-based-on-corpus-statistics-and-lexical.md)
- [Pointer Sentinel Mixture Models](https://refivu.com/en/papers/8f7d0844-f517-4c18-ba24-8cd7dc616a74-pointer-sentinel-mixture-models.md)
- [TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension](https://refivu.com/en/papers/34db6f08-4b90-47eb-a2d8-fd0c5a90bf6e-triviaqa-a-large-scale-distantly-supervised-challenge.md)
- [Equality of Opportunity in Supervised Learning](https://refivu.com/en/papers/97e846bf-1b27-4e7b-934a-caa8326bd5e9-equality-of-opportunity-in-supervised-learning.md)
- [Occupancy Networks: Learning 3D Reconstruction in Function Space](https://refivu.com/en/papers/ebb91803-99a7-402a-90f0-6aa763fd3e16-occupancy-networks-learning-3d-reconstruction-in-function.md)
- [Explaining Explanations: An Overview of Interpretability of Machine Learning](https://refivu.com/en/papers/1e2e5cea-7806-41cc-934c-581f9dec0a44-explaining-explanations-an-overview-of-interpretability-of.md)
- [Predicting Depth, Surface Normals and Semantic Labels with a Common Multi-Scale Convolutional Architecture](https://refivu.com/en/papers/e513ebec-7ee7-41d2-bb2e-ed519797b97d-predicting-depth-surface-normals-and-semantic-labels-with.md)
- [OpenVLA: An Open-Source Vision-Language-Action Model](https://refivu.com/en/papers/3dd15569-8eba-48b1-88e8-a1ca295a743e-openvla-an-open-source-vision-language-action-model.md)
- [Microsoft COCO Captions: Data Collection and Evaluation Server](https://refivu.com/en/papers/1cf4256e-f015-43b3-a7f1-14167d272b8f-microsoft-coco-captions-data-collection-and-evaluation.md)

## Terms in this paper

- [Accuracy](https://refivu.com/en/terms/1995c0cd6282-accuracy)
- [dropout](https://refivu.com/en/terms/db73f75bbdd3-dropout)
- [GloVe](https://refivu.com/en/terms/8a6b3410f3dd-glove)
- [Stochastic Gradient Descent (SGD)](https://refivu.com/en/terms/5c2447143b09-stochastic-gradient-descent-sgd)
- [early stopping](https://refivu.com/en/terms/22aea610d43d-early-stopping)
- [gradient clipping](https://refivu.com/en/terms/6fc07396f3f7-gradient-clipping)
- [Viterbi algorithm](https://refivu.com/en/terms/182c9369a000-viterbi-algorithm)
- [CRF](https://refivu.com/en/terms/0bba1b0be4f5-crf)
- [LSTM unit](https://refivu.com/en/terms/ee4ad58f26b2-lstm-unit)
- [BIOES](https://refivu.com/en/terms/006a910e233b-bioes)
- [BLSTM](https://refivu.com/en/terms/07b75318c72d-blstm)
- [CoNLL 2003](https://refivu.com/en/terms/8848c0c5178e-conll-2003)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/ce633cbf-8295-40aa-a4ee-656b431af25f-end-to-end-sequence-labeling-via-bi-directional)
