Dear Friends,
Next, we explore
ELMo (Embeddings from Language Models) and how it addresses the fundamental limitations of previous models like Word2Vec, GloVe, and FastText.
While Word2Vec, GloVe, and FastText were revolutionary, they share a common
POLYSEMY problem: they produce static embeddings. In these models, a word has a single fixed vector regardless of its context. This means the word "bank" would have the same mathematical representation whether you are talking about a "river bank" or a "financial bank." While FastText improved upon this by using subword information to handle out-of-vocabulary words, it still could not resolve polysemy—the phenomenon where one word has multiple meanings.
ELMo solves this by introducing contextualized word representations. Instead of a fixed lookup table, ELMo looks at the entire sentence before assigning a vector to each word. It achieves this using a deep bidirectional LSTM (BiLSTM) trained on a massive corpus.
Key advantages of ELMo include:
Contextual Awareness: The representation of a word changes based on the words surrounding it, accurately capturing different meanings in different contexts.
Deep Representations: ELMo combines the internal states of the BiLSTM layers, allowing it to capture both low-level morphological features and high-level semantic nuances.
Improved Performance: By integrating ELMo into existing NLP models, we see significant improvements across tasks like question answering, sentiment analysis, and named entity recognition.
I have detailed these concepts and the transition from static to dynamic embeddings in the following video:
Happy learning,
Neeraj