Papers › Contextual String Embeddings for Sequence Labeling

Contextual String Embeddings for Sequence Labeling

1 Aug 2018COLING 2018 8archive 2025-07-28

Alan Akbik, Duncan Blythe, Rol Vollgraf,

Recent advances in language modeling using recurrent neural networks have made it viable to model language as distributions over characters. By learning to predict the next character on the basis of previous characters, such models have been shown to automatically internalize linguistic concepts such as words, sentences, subclauses and even sentiment. In this paper, we propose to leverage the internal states of a trained character language model to produce a novel type of word embedding which we refer to as contextual string embeddings. Our proposed embeddings have the distinct properties that they (a) are trained without any explicit notion of words and thus fundamentally model words as sequences of characters, and (b) are contextualized by their surrounding text, meaning that the same word will have different embeddings depending on its contextual use. We conduct a comparative evaluation against previous embeddings and find that our embeddings are highly useful for downstream tasks: across four classic sequence labeling tasks we consistently outperform the previous state-of-the-art. In particular, we significantly outperform previous work on English and German named entity recognition (NER), allowing us to report new state-of-the-art F1-scores on the CoNLL03 shared task. We release all code and pre-trained language models in a simple-to-use framework to the research community, to enable reproduction of these experiments and application of our proposed embeddings to other tasks: https://github.com/zalandoresearch/flair

PaperPDFConference PDFCode

Code

zalandoresearch/flair mentioned in paperpytorchNOASSERTION report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

ChunkingLanguage ModelingLanguage ModellingNamed Entity RecognitionNamed Entity Recognition (NER)Part-Of-Speech TaggingWord Embeddingsnamed-entity-recognition

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Chunking CoNLL 2000 Flair Exact Span F1 96.72 #6 of 9 Archive leaderboard report
Chunking Penn Treebank Flair embeddings F1 score 96.72 #2 of 8 Archive leaderboard report
Named Entity Recognition (NER) CoNLL 2003 (English) Flair embeddings F1 93.09 #30 of 73 Archive leaderboard report
Named Entity Recognition (NER) CoNLL 2003 (German) Revised Flair F1 88.3 #5 of 5 Archive leaderboard report
Part-Of-Speech Tagging Penn Treebank Flair embeddings Accuracy 97.85 #3 of 20 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections