Skip to main content
XenonStack
ELMo Explained: Embeddings from Language Models
J
K
N
O
R
X
Y
Z

XenonStack Glossary ELMo Explained: Embeddings from Language Models

Key takeaway

  • ELMo (Embeddings from Language Models) gives each word a vector based on its whole sentence. See how it works and differs from static embeddings.

ELMo, short for Embeddings from Language Models, is a method that represents each word with a vector computed from the whole sentence it appears in, using the internal states of a deep bidirectional language model. The same word therefore gets a different vector in different contexts, which helps with words that have more than one meaning.

This page is for data scientists, NLP engineers and technology leaders who want a clear definition of ELMo. It covers how the representations are produced, how they differ from static word embeddings and from BERT, where they are used, and how they relate to AI agents.

What is ELMo and why does it matter?

The ELMo paper, titled Deep contextualized word representations and written by Matthew Peters and colleagues, introduces word vectors that are learned functions of the internal states of a deep bidirectional language model (biLM) pre-trained on a large text corpus.

The representations capture characteristics of word use, such as syntax and semantics, and how those uses change across contexts. That addresses polysemy, where one word has several meanings. The authors report that adding these representations to existing models significantly improved results on six NLP problems, including question answering, textual entailment and sentiment analysis.

How do ELMo embeddings work?

In a traditional word embedding, each word has one fixed vector. In ELMo, the vector assigned to a token is a function of the whole sentence in which the word is used. The same word can therefore receive different vectors in different sentences.

Two-column diagram. Static embeddings: one vector per word, context ignored, simple lookup, fixed after training. ELMo: sentence-level vector, context captured, language model states, added as features.

The paper argues that exposing the deep internal layers of the pre-trained network is crucial, because it lets downstream models combine different types of semi-supervision signals. In practice, a task model takes the ELMo vectors as additional input features alongside its usual word inputs.

How do ELMo embeddings differ from static word embeddings and BERT?

ApproachVector for a wordHow it is used
Static word embeddingsOne fixed vector per word, whatever the contextLooked up as input to a task model
ELMoA function of the whole sentence, from a deep bidirectional language modelAdded to an existing task model as features
BERTContextual representations from Transformer encodersThe pre-trained model itself is fine-tuned for each task

ELMo and BERT both produce context-dependent representations. See our glossary pages on BERT and universal language model fine-tuning for the related approaches.

What is ELMo used for?

The paper reports gains on question answering, textual entailment and sentiment analysis, among six NLP problems. Because ELMo plugs into an existing model as extra features, a working system can be extended without being redesigned.

How does ELMo relate to AI agents?

Agents that read language need representations that reflect meaning in context, so that a word such as bank is understood from the sentence around it. Contextual embeddings such as ELMo are one way to supply that. For teams building and running agents, ElixirClaw is XenonStack's AI agents computing platform.

What should you do first?

  1. Identify where ambiguous words limit your current text model.
  2. Test contextual embeddings as extra features on a small sample.
  3. Compare the result with a fine-tuned pre-trained model such as BERT.
  4. Keep the approach that performs best on your own text.

To map one decision your agents make from language input, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.

Frequently asked questions

What does ELMo stand for?

ELMo stands for Embeddings from Language Models. It produces context-aware word representations from a deep bidirectional language model.

How is ELMo different from traditional word embeddings?

A traditional embedding gives each word one fixed vector. ELMo assigns a vector that is a function of the whole sentence, so the same word can have different vectors in different contexts.

What problem does ELMo help with?

It helps with polysemy, where a word has several meanings, because its representation changes with the context in which the word is used.

What tasks can ELMo be used for?

The paper reports improvements on six NLP problems, including question answering, textual entailment and sentiment analysis.

How is ELMo different from BERT?

ELMo adds context-aware vectors from a bidirectional language model to an existing task model. BERT is built from Transformer encoders and is itself fine-tuned for each task.

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue