
Explore natural language processing from fundamentals to practice, including word2vec algorithm, language meaning, and representations, with a focus on stochastic gradient descent, reading papers, and solid programming.
This course targets beginners with light algebra and calculus prerequisites and covers linear algebra essentials for natural language processing, with Python, numpy, and matplotlib on CPU.
Accept that the course is challenging and use forums, core slides as notes, concept quizzes, and GitHub solutions to build solid natural language processing fundamentals.
Language transmits and stores vital information across generations, enabling knowledge to spread through reading and experience. Semantics and syntax create context-dependent meanings, challenging computers and driving natural language processing.
Examine how computers represent words beyond WorldNet, noting limitations of dictionaries and one-hot encodings. Learn to encode word meaning with dense, reduced-dimension vectors that capture similarity between words.
Explore how word vectors convert language into dense, continuous representations that capture similarity via context and dot products, moving beyond one-hot encodings to distributional semantics.
Explore how word vectors encode meaning from context, linking dot products to word co-occurrence probabilities in a corpus via skip-gram and continuous bag of words models.
Build a data set class to parse the Stanford movie reviews, skipping the header and line numbers. Normalize to lowercase, and generate vocabulary, word mappings, and word counts.
Learn how to augment a text dataset for word vector learning by applying frequency-based sub-sampling, dropping frequent words while preserving rare ones, and implementing a data augmentation function.
Select an augmented sentence at random, pick a context length from one to five, and extract the center word with its context.
Study how word vectors in high dimensions depend on theta to determine word probabilities. Use center and context vectors within a two-word window to compute sequence likelihood as a product.
Learn how to optimize word vectors by minimizing a cost function, using softmax and sigmoid probabilities to predict word occurrences in a corpus.
Explore how calculus guides optimization by using derivatives and gradients to minimize a cost function over the parameter space of word vectors, while navigating local minima.
Apply the chain rule to complex derivatives, use quotient and product rules, and handle logarithms, exponentials, and softmax, with a hands-on word vectors implementation for NLP.
Derive word2vec gradients using cross entropy loss with a softmax distribution, computing derivatives for center and outside word vectors, and applying the outer product for gradient updates.
Implement the skip gram algorithm by computing loss and gradients with softmax loss, converting words to indices, and accumulating gradients across context words.
Apply stochastic gradient descent to optimize word vectors using random mini batches of center words and contexts. Decay the learning rate to approach a global minimum.
Replace the naïve softmax loss with negative sampling to speed training by updating the center word and a few negative outside words drawn from a three-fourth power frequency distribution.
Explore the negative sampling loss function, derive its gradients for the center word, outside word, and negative samples, and implement efficient word vector training with testing compared to softmax.
Train word vectors with negative sampling and visualize results via the plot words function, optimizing with a one-million element table and focusing on central word vectors.
Use a paper's abstract, introduction, background, experiments, results, and conclusion to gauge significance, then map insights to code with data structures, algorithms, and unit tests.
Explore how the abstract and introduction describe a grand model learning syntax and semantics from unstructured text, using skip-gram with negative sampling and phrases to boost speed and quality.
Learn how the skipgram model learns word vectors by predicting context words from a center word, with a log probability objective, subsampling, negative sampling, and hierarchical softmax.
Compare hierarchical softmax, negative sampling, and sub sampling in analogical reasoning, and show how phrase skip-grams from 33 billion words reach about 72 percent accuracy.
Explore additive compositionality and comparisons in word vectors trained on 30 billion words, showing the skip phrase model outperforms others and produces meaningful long text representations.
In this course motivated beginners will learn the fundamentals of natural language processing and deep learning. Students will code their own word embedding vectors from scratch, using just Numpy and a little bit of calculus. For students who don't have the required background, a crash course in the required mathematics is included. We'll cover the fundamentals of differential calculus and linear algebra in a succinct overview, so students can easily follow all mathematical derivations.
Rather than simply be presented with results, each step of the mathematical derivations is included. This is to help students foster a deeper understanding of natural language processing and artificial intelligence in general.
Far from being a course where students are simply spoon fed the instructors' interpretation, students will learn to gather information directly from the source. I will show you a repeatable and easy to remember framework to read, understand, and implement deep learning research papers. You will get insight into how the verbiage in research papers maps to real world code. This is an essential skill set for all practitioners of artificial intelligence and data science, and will help you stand out from the crowd.
Throughout the course, good coding practices will be stressed. Students will learn the fundamentals of writing pythonic and extensible code from the very beginning, so that they can easily transition into writing more complex code for production.
By the end of the course, students will be able to answer the following questions:
What is the difference between the skip-gram and continuous bag of words models?
What is distributional semantics?
How can we use vectors to teach computers about language?
How do we derive the word2vec gradients?
Why is the softmax function so slow in natural language processing?
How can we deal with small datasets for natural language processing?
How can we improve word embedding using negative sampling?
What is the best way to to deal with proper nouns in natural language processing?
What were some of the historical approaches to natural language processing?
What can word plots teach us about how computers understand language?
There is zero fluff in this course. It is taught at a brisk pace, and is intended for motivated beginners who want deeper insights into natural language processing. Those that complete this course will learn how to implement research papers on there own; you'll never have to rely on Medium blog posts again.