Papers › Deep contextualized word representations

Deep contextualized word representations

15 Feb 2018NAACL 2018 6arXiv:1802.05365archive 2025-07-28

Matthew E. Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, Luke Zettlemoyer

We introduce a new type of deep contextualized word representation that models both (1) complex characteristics of word use (e.g., syntax and semantics), and (2) how these uses vary across linguistic contexts (i.e., to model polysemy). Our word vectors are learned functions of the internal states of a deep bidirectional language model (biLM), which is pre-trained on a large text corpus. We show that these representations can be easily added to existing models and significantly improve the state of the art across six challenging NLP problems, including question answering, textual entailment and sentiment analysis. We also present an analysis showing that exposing the deep internals of the pre-trained network is crucial, allowing downstream models to mix different types of semi-supervision signals.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1802.05365")

Code

Syntology Ran 23 of 58 code samples harvested from 16 repositories linked to this paper; 35 have no recorded run. Of those that ran: 2 ran · honoured contract; 4 ran · our draft was wrong; 2 ran · fixture could not drive it; 15 ran with no contract checked.

By repository: community (archive-listed): 58 samples from 16 repositories, 23 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

46 repositories listed; official and paper-mentioned ones first.

2023-MindSpore-1/ms-code-190 mentioned on GitHubmindsporeMIT report
HIT-SCIR/ELMoForManyLangs mentioned on GitHubpytorch report
Hironsan/anago mentioned on GitHub report
IMPLabUniPr/UniParma-at-semeval-2021-task-5 mentioned on GitHubpytorchApache-2.0 report
LamLauChiu/Tensorflow_Learning mentioned on GitHubtf report
Mind23-2/MindCode-98 mentioned on GitHubmindsporeMIT report
PrashantRanjan09/Elmo-Tutorial mentioned on GitHubtf report
RundongChou/elmo-chinese-oversimplified mentioned on GitHubtfApache-2.0 report
TEAMLAB-Lecture/deep_nlp_101 mentioned on GitHubtf report
UKPLab/elmo-bilstm-cnn-crf mentioned on GitHubtfApache-2.0 report
YC-wind/embedding_study mentioned on GitHubtf report
allenai/bilm-tf mentioned on GitHubtfApache-2.0 report
ankurbanga/Language-Models mentioned on GitHubpytorch report
bestend/tf2-bi-lstm-crf-nni mentioned on GitHubtfMIT report
bplank/teaching-dl4nlp mentioned on GitHub report
cheng18/bilm-tf mentioned on GitHubtfApache-2.0 report
flairNLP/flair mentioned on GitHubpytorchNOASSERTION report
griff4692/LMC mentioned on GitHubpytorch report
helboukkouri/character-bert mentioned on GitHubpytorch report
horizonheart/ELMO mentioned on GitHubtfApache-2.0 report
iliaschalkidis/ELMo-keras mentioned on GitHubtf report
kafura-kafiri/tf2-elmo mentioned on GitHubtf report
kaist-dmlab/BioNER mentioned on GitHubpytorch report
kinimod23/NMT_Project mentioned on GitHub report
kunde122/bilm-tf mentioned on GitHubtfApache-2.0 report
menajosep/AleatoricSent mentioned on GitHubtfApache-2.0 report
mingdachen/bilm-tf mentioned on GitHubtf report
nlp-research/bilm-tf mentioned on GitHubtf report
richinkabra/CoVe-BCN mentioned on GitHubpytorch report
sarveshsparab/DeepElmoEmbedNer mentioned on GitHubtf report
seunghwan1228/ELMO mentioned on GitHubtfApache-2.0 report
shelleyHLX/bilm_EMLo mentioned on GitHubtf report
weixsong/bilm-tf mentioned on GitHubtf report
yangrui123/Hidden mentioned on GitHubtf report
yangzonglin1994/bilm-tf-extended mentioned on GitHubtfApache-2.0 report
young-zonglin/bilm-tf-extended mentioned on GitHubtfApache-2.0 report
yuanjing-zhu/elmo mentioned on GitHubpytorch report
yuanxiaosc/ELMo mentioned on GitHubtf report
zenanz/ChemPatentEmbeddings mentioned on GitHubtf report
dmlc/gluon-nlp mxnetApache-2.0 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

58 samples harvested; 23 ran; 2 honoured the contract we drafted; 35 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
4ran · our draft was wrong
2ran · fixture could not drive it
15ran
35unverified

Licence: 25 of the 58 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 16 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

Camouflage kafura-kafiri/tf2-elmo/elmo/model.py community (archive-listed) ran no licence file found · pointer only · ec674c5b8eeb7958 · report
Camouflage iliaschalkidis/ELMo-keras/elmo/model.py community (archive-listed) ran no licence file found · pointer only · 2db008c201204db6 · report
CharacterMapper helboukkouri/character-bert/modeling/character_bert.py community (archive-listed) ran Apache-2.0 (permissive) · cfd68b12db2c3e17 · report
ELMo ankurbanga/Language-Models/ELMo/classes.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · ea8c1ff4812c12cc · report
Highway helboukkouri/character-bert/modeling/character_bert.py community (archive-listed) ran · metamorphic tier: deterministic Apache-2.0 (permissive) · cc42189423d63e55 · report
Highway kafura-kafiri/tf2-elmo/elmo/model.py community (archive-listed) ran no licence file found · pointer only · e498f306dc760a89 · report
Highway iliaschalkidis/ELMo-keras/elmo/model.py community (archive-listed) ran no licence file found · pointer only · 57cb734e9a401a27 · report
LMCDecoder griff4692/LMC/modules/lmc/lmc_model.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · 70c6e34d2c59e6e0 · report
LMCEncoder griff4692/LMC/modules/lmc/lmc_model.py community (archive-listed) ran no licence file found · pointer only · 6fdb9503aabdabb0 · report
SampledSoftmax kafura-kafiri/tf2-elmo/elmo/model.py community (archive-listed) ran no licence file found · pointer only · 6c53dd25c20f1f9e · report
SampledSoftmax iliaschalkidis/ELMo-keras/elmo/model.py community (archive-listed) ran no licence file found · pointer only · e8b8fec264f99c0c · report
TimestepDropout kafura-kafiri/tf2-elmo/elmo/model.py community (archive-listed) ran no licence file found · pointer only · a06d5cf0563d37c9 · report
TimestepDropout iliaschalkidis/ELMo-keras/elmo/model.py community (archive-listed) ran no licence file found · pointer only · 16b8442b08116955 · report
_EncoderBase HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py community (archive-listed) ran MIT (permissive) · f4857820f24ff7ee · report
_make_bos_eos helboukkouri/character-bert/modeling/character_bert.py community (archive-listed) ran · honoured contract Apache-2.0 (permissive) · 348cfec97eece7e0 · report
biLM ankurbanga/Language-Models/ELMo/classes.py community (archive-listed) ran · metamorphic tier: deterministic no licence file found · pointer only · 7d29ba86c14005e5 · report
compute_kl griff4692/LMC/modules/lmc/lmc_model.py community (archive-listed) ran · our draft was wrong fingerprinted no licence file found · pointer only · e6951eb47d3fce83 · report
get_dropout_mask HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 96ea7959d6f99e2d · report
get_lengths_from_binary_sequence_mask HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · eff324cdbb18e166 · report
kl_diag griff4692/LMC/modules/lmc/lmc_model.py community (archive-listed) ran · our draft was wrong fingerprinted no licence file found · pointer only · c5414c47b19c5b9d · report
kl_spher griff4692/LMC/modules/lmc/lmc_model.py community (archive-listed) ran · honoured contract fingerprinted no licence file found · pointer only · da08f69778aa9246 · report
mask_2D griff4692/LMC/modules/lmc/lmc_model.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · 951dfc35f0d874b9 · report
sort_batch_by_length HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py community (archive-listed) ran · fixture could not drive it MIT (permissive) · 3858ae2af0c25703 · report
BertCharacterEmbeddings helboukkouri/character-bert/modeling/character_bert.py community (archive-listed) unverified Apache-2.0 (permissive) · bd90a33e1d9f21db · report
BidirectionalLanguageModelGraph shaneding/bilm-tf-experimentation/bilm/model.py community (archive-listed) unverified Apache-2.0 (permissive) · 4054d9b3dbaf33ca · report
BidirectionalLanguageModelGraph shelleyHLX/bilm_EMLo/bilm_model/model.py community (archive-listed) unverified Apache-2.0 (permissive) · 103b3a72b5b4b48b · report
BidirectionalLanguageModelGraph weixsong/bilm-tf/bilm/model.py community (archive-listed) unverified Apache-2.0 (permissive) · 578b19fe4c168fa3 · report
BidirectionalLanguageModelGraph sarveshsparab/DeepElmoEmbedNer/model/bilm/model.py community (archive-listed) unverified no licence file found · pointer only · c0a935408017d8e6 · report
CharCNNEmbedding YC-wind/embedding_study/ELMO/models/elmo.py community (archive-listed) unverified no licence file found · pointer only · cb17b856cfa85229 · report
CharacterBertModel helboukkouri/character-bert/modeling/character_bert.py community (archive-listed) unverified Apache-2.0 (permissive) · a6db9151ad861684 · report
CharacterCNN helboukkouri/character-bert/modeling/character_bert.py community (archive-listed) unverified Apache-2.0 (permissive) · 95c7c1548e5263c4 · report
ELMO yuanjing-zhu/elmo/Models/eLMO.py community (archive-listed) unverified no licence file found · pointer only · 9cc83b5b233b4295 · report
ELMO YC-wind/embedding_study/ELMO/models/elmo.py community (archive-listed) unverified no licence file found · pointer only · 6c990d1c4cc7d791 · report
ELMo kafura-kafiri/tf2-elmo/elmo/model.py community (archive-listed) unverified no licence file found · pointer only · c0aa2bc72c66ae0c · report
ELMo iliaschalkidis/ELMo-keras/elmo/model.py community (archive-listed) unverified no licence file found · pointer only · 5a6bde73a5e69f0d · report
ElmobiLm HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py community (archive-listed) unverified MIT (permissive) · 8deb52d79571d50a · report
InvalidNumberOfCharacters weixsong/bilm-tf/bilm/model.py community (archive-listed) unverified Apache-2.0 (permissive) · 13e6f293af47814a · report
LMC griff4692/LMC/modules/lmc/lmc_model.py community (archive-listed) unverified no licence file found · pointer only · 26c29c99ec231df8 · report
LstmCellWithProjection HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py community (archive-listed) unverified MIT (permissive) · 6558e478056b71fa · report
_pretrained_initializer shaneding/bilm-tf-experimentation/bilm/model.py community (archive-listed) unverified Apache-2.0 (permissive) · 0a6a6b9c70afd92f · report
_pretrained_initializer sarveshsparab/DeepElmoEmbedNer/model/bilm/model.py community (archive-listed) unverified no licence file found · pointer only · c1a15b755efa2454 · report
average_gradients allenai/bilm-tf/bilm/training.py community (archive-listed) unverified Apache-2.0 (permissive) · 821ed0b50fc8c75a · report
block_orthogonal HIT-SCIR/ELMoForManyLangs/elmoformanylangs/modules/elmo.py community (archive-listed) unverified MIT (permissive) · e5d0679ff3b7299a · report
clip_by_global_norm_summary allenai/bilm-tf/bilm/training.py community (archive-listed) unverified Apache-2.0 (permissive) · 4fd105ebfe01259d · report
compute_f1 UKPLab/elmo-bilstm-cnn-crf/util/BIOF1Validation.py community (archive-listed) unverified Apache-2.0 (permissive) · a2735b43c037f7c3 · report
compute_f1_token_basis UKPLab/elmo-bilstm-cnn-crf/util/BIOF1Validation.py community (archive-listed) unverified Apache-2.0 (permissive) · 1b66320c71babcd2 · report
compute_precision_token_basis UKPLab/elmo-bilstm-cnn-crf/util/BIOF1Validation.py community (archive-listed) unverified Apache-2.0 (permissive) · 6e5cd3fa57bb3c06 · report
dimensions_equal menajosep/AleatoricSent/Cove-BCN/model.py community (archive-listed) unverified Apache-2.0 (permissive) · c86e700a6dce3870 · report
getCasing UKPLab/elmo-bilstm-cnn-crf/util/preprocessing.py community (archive-listed) unverified Apache-2.0 (permissive) · d3126a60257f6f1d · report
loadDatasetPickle UKPLab/elmo-bilstm-cnn-crf/util/preprocessing.py community (archive-listed) unverified Apache-2.0 (permissive) · 1e0cc173e3f36bb5 · report
loss yuanjing-zhu/elmo/Models/eLMO.py community (archive-listed) unverified no licence file found · pointer only · 893138168f6ab89b · report
path_energy UKPLab/elmo-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py community (archive-listed) unverified Apache-2.0 (permissive) · 6f5b259e1a881655 · report
path_energy0 UKPLab/elmo-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py community (archive-listed) unverified Apache-2.0 (permissive) · e13517b914ec8cfe · report
perpareDataset UKPLab/elmo-bilstm-cnn-crf/util/preprocessing.py community (archive-listed) unverified Apache-2.0 (permissive) · f6ef407ec5c308ae · report
readCoNLL UKPLab/elmo-bilstm-cnn-crf/util/CoNLL.py community (archive-listed) unverified Apache-2.0 (permissive) · be7d0a8320f50877 · report
sparse_chain_crf_loss UKPLab/elmo-bilstm-cnn-crf/neuralnets/keraslayers/ChainCRF.py community (archive-listed) unverified Apache-2.0 (permissive) · 29092b6b1ee0e8b7 · report
summary_gradient_updates allenai/bilm-tf/bilm/training.py community (archive-listed) unverified Apache-2.0 (permissive) · 805b441d558f95ba · report
weight_layers mingdachen/bilm-tf/bilm/elmo.py community (archive-listed) unverified Apache-2.0 (permissive) · 4fedf7f6b4d9dbba · report

Tasks

Citation Intent ClassificationConversational Response SelectionCoreference ResolutionLanguage ModelingLanguage ModellingNamed Entity Recognition (NER)Natural Language InferenceOnly Connect Walls Dataset Task 1 (Grouping)Question AnsweringSemantic Role LabelingSentiment Analysis

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Citation Intent Classification ACL-ARC BiLSTM-Attention + ELMo Macro-F1 54.6 #4 of 8 Archive leaderboard report
Conversational Response Selection PolyAI Reddit ELMO 1-of-100 Accuracy 19.3% #5 of 5 Archive leaderboard report
Coreference Resolution OntoNotes e2e-coref + ELMo F1 70.4 #21 of 26 Archive leaderboard report
Named Entity Recognition (NER) CoNLL 2003 (English) BiLSTM-CRF+ELMo F1 92.22 #47 of 73 Archive leaderboard report
Named Entity Recognition (NER) CoNLL++ BiLSTM-CRF+ELMo F1 93.42 #9 of 11 Archive leaderboard report
Natural Language Inference SNLI ESIM + ELMo Ensemble % Test Accuracy 89.3 #21 of 98 Archive leaderboard report
Natural Language Inference SNLI ESIM + ELMo Ensemble % Train Accuracy 92.1 #21 of 98 Archive leaderboard report
Natural Language Inference SNLI ESIM + ELMo Ensemble Parameters 40m #21 of 98 Archive leaderboard report
Natural Language Inference SNLI ESIM + ELMo % Test Accuracy 88.7 #31 of 98 Archive leaderboard report
Natural Language Inference SNLI ESIM + ELMo % Train Accuracy 91.6 #31 of 98 Archive leaderboard report
Natural Language Inference SNLI ESIM + ELMo Parameters 8.0m #31 of 98 Archive leaderboard report
Only Connect Walls Dataset Task 1 (Grouping) OCW ELMo (LARGE) # Correct Groups 55 ± 4 #20 of 22 Archive leaderboard report
Only Connect Walls Dataset Task 1 (Grouping) OCW ELMo (LARGE) # Solved Walls 0 ± 0 #20 of 22 Archive leaderboard report
Only Connect Walls Dataset Task 1 (Grouping) OCW ELMo (LARGE) Adjusted Mutual Information (AMI) 14.5 ± .4 #20 of 22 Archive leaderboard report
Only Connect Walls Dataset Task 1 (Grouping) OCW ELMo (LARGE) Adjusted Rand Index (ARI) 11.8 ± .4 #20 of 22 Archive leaderboard report
Only Connect Walls Dataset Task 1 (Grouping) OCW ELMo (LARGE) Fowlkes Mallows Score (FMS) 29.5 ± .3 #20 of 22 Archive leaderboard report
Only Connect Walls Dataset Task 1 (Grouping) OCW ELMo (LARGE) Wasserstein Distance (WD) 86.3 ± .6 #20 of 22 Archive leaderboard report
Question Answering SQuAD1.1 BiDAF + Self Attention + ELMo (ensemble) EM 81.003 #55 of 213 Archive leaderboard report
Question Answering SQuAD1.1 BiDAF + Self Attention + ELMo (ensemble) F1 87.432 #55 of 213 Archive leaderboard report
Question Answering SQuAD1.1 BiDAF + Self Attention + ELMo (single model) EM 78.58 #85 of 213 Archive leaderboard report
Question Answering SQuAD1.1 BiDAF + Self Attention + ELMo (single model) F1 85.833 #85 of 213 Archive leaderboard report
Question Answering SQuAD1.1 dev BiDAF + Self Attention + ELMo F1 85.6 #55 of 55 Archive leaderboard report
Question Answering SQuAD2.0 BiDAF + Self Attention + ELMo (single model) EM 63.372 #266 of 286 Archive leaderboard report
Question Answering SQuAD2.0 BiDAF + Self Attention + ELMo (single model) F1 66.251 #266 of 286 Archive leaderboard report
Semantic Role Labeling OntoNotes He et al., 2017 + ELMo F1 84.6 #13 of 17 Archive leaderboard report
Sentiment Analysis SST-5 Fine-grained classification BCN+ELMo Accuracy 54.7 #8 of 31 Archive leaderboard report
Word Sense Disambiguation Supervised: ELMo SemEval 2007 62.2 #25 of 27 Archive leaderboard report
Word Sense Disambiguation Supervised: ELMo SemEval 2013 66.2 #25 of 27 Archive leaderboard report
Word Sense Disambiguation Supervised: ELMo SemEval 2015 71.3 #25 of 27 Archive leaderboard report
Word Sense Disambiguation Supervised: ELMo Senseval 2 71.6 #25 of 27 Archive leaderboard report
Word Sense Disambiguation Supervised: ELMo Senseval 3 69.6 #25 of 27 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.

Methods

Introduced by this paper: ELMo

BiLSTMELMoLSTMSigmoid ActivationSoftmaxTanh Activation

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