6103 - Advanced ML
session: "6103-advanced-ml/2026-11-03 1830 Advance Machine Learning"
title: "Advance Machine Learning"
date: "2026-11-03 18:30"
duration: "--"
language: "en"
model: "deepseek-ai/DeepSeek-V3.2"
parts: 2
transcript_chars: 44111
generated: "2026-11-23T00:46:42+05:30"
This class covered the transition from basic RNNs to more advanced sequence-to-sequence models. It began by recapping the limitations of standard RNNs, such as the inability to learn long-term dependencies due to gradient issues, and introduced LSTM as a solution using gating mechanisms. The core focus was on the encoder-decoder architecture, which enables models to handle variable-length input and output sequences, forming the foundation for tasks like machine translation. The lecture detailed the components of this architecture and introduced the training technique of teacher forcing. This session sets the stage for understanding modern transformer models.
Standard RNNs struggle with learning long-term dependencies due to vanishing and exploding gradients during backpropagation. The LSTM (Long Short-Term Memory) network solves this by introducing a cell state and three gates (forget, input, output) that regulate information flow. This matters because it enables the network to retain relevant information over many time steps, which is crucial for processing long sequences, a prerequisite for building effective encoder-decoder models.
An encoder-decoder model is a neural network designed to transform one sequence into another, accommodating variable-length inputs and outputs. It matters because many real-world problems, like translation and captioning, involve sequences of different lengths. The encoder compresses the input into a fixed-size context vector, and the decoder expands this vector into the output sequence. This architecture connects directly to the need for a structured way to handle sequential data transformation.
The context vector is a fixed-size, dense representation output by the encoder, summarizing the entire input sequence. It matters because it serves as the sole source of information from the input for the decoder. Its fixed size is a constraint that necessitates effective compression of the input sequence, linking to later concepts like attention mechanisms which alleviate the information bottleneck of a single vector.
Teacher forcing is a training technique where the decoder receives the ground-truth token from the previous time step as input, rather than its own prediction. This matters because it stabilizes and accelerates training by preventing error propagation in early epochs. It connects to the practical training dynamics of sequence generation models, contrasting the ideal autoregressive generation used during inference.
Tokenization is the process of splitting text into tokens (e.g., words), and vectorization converts these tokens into numerical vectors (e.g., via one-hot encoding). This matters because neural networks require numerical input. It is the mandatory first step in processing any textual data for an encoder-decoder model and connects all NLP tasks to the underlying mathematical operations of the network.
No explicit new formulas were derived, but the following functions and methods were mentioned:
Explanation: Converts the decoder's hidden state outputs into a probability distribution over the target vocabulary.
When used: At every time step in the decoder to predict the next token.
Explanation: Techniques to convert textual tokens into numerical feature vectors.
When used: During the preprocessing stage before feeding data into the encoder or decoder.
1. Input Sequence Processing: For the input sentence "The weather is nice", the encoder processes tokens sequentially: the → weather → is → nice.
2. Context Vector Size: A long input sequence (e.g., 100 tokens like "I love movie that was released in 1997 and add...") is compressed into a small, dense context vector of size 10.
3. Vocabulary Size: For a translation task, the target vocabulary (output classes) might consist of 20,000 unique tokens/words.
4. Sequence Length Mismatch: Input "how are you" (3 words) can be translated to an output with 2 words in another language.
5. One-Hot Encoding: In a vocabulary of size 5, the token "think" is encoded as [1, 0, 0, 0, 0] and "it" as [0, 0, 1, 0, 0].
6. Decoder Start Input: The decoder's first input is a start token vector, e.g., [1, 0, 0, 0, 0, 0, 0] for a vocabulary of 7 classes (5 words + start + end tokens).
7. Softmax Output: The decoder's softmax layer might output probabilities like [0.1, 0.3, 0.31, 0.56, 0.2, 0.1, 0.01] over 7 classes. The class with the highest probability (0.56) is selected as the predicted token.
8. Training Mismatch: During training, the model might predict "low", but the correct target output from the dataset is "SOCH".
1. Describe the information bottleneck in a basic encoder-decoder model and explain how it impacts performance on long sequences.
Outline: The bottleneck is the fixed-size context vector. The encoder must compress all information from the input sequence into this vector. For long sequences, this compression can lead to information loss, as early details may be forgotten or diluted, degrading the decoder's ability to generate accurate outputs.
2. Compare and contrast the training process of an encoder-decoder model with and without teacher forcing. What is the key advantage of using teacher forcing?
Outline: Without teacher forcing, the decoder uses its own previous prediction as input for the next step, which can lead to error accumulation and unstable training. With teacher forcing, the true previous output is used, which provides correct guidance, accelerates convergence, and reduces the number of backpropagation steps needed by preventing early error propagation.
3. Walk through the steps an encoder-decoder model takes, from receiving the raw input sentence "Think about it" to producing the first output token during training. Assume one-hot encoding is used.
Outline: (1) Tokenize input: ["think", "about", "it"]. (2) Vectorize: Convert each token to a one-hot vector (e.g., [1,0,0,0,0]). (3) Encoder processes vectors sequentially, updating hidden/cell states. (4) Final encoder states (context vector) passed to decoder. (5) Decoder's first input is the start token vector. (6) Decoder computes hidden state and applies softmax to produce probability distribution over output vocabulary. (7) The token with highest probability is the first output (though for loss calculation, it's compared to the true first token).
One line per segment, [hh:mm:ss] timestamp first.
loading…