classnotes RTX 4070 Ti SUPER · faster-whisper · DeepSeek

6103 - Advanced ML

← 6103 - Advanced ML

Advance Machine Learning-20261027_183128-Meeting Recording

Date 2026-10-27 Words 10,815 Segments 5,671
⤓ Download transcript (.txt with timestamps) ⤓ Plain transcript (.txt) ⤓ Transcript (.md)

Summary


session: "6103-advanced-ml/2026-10-27 1831 Advance Machine Learning"

title: "Advance Machine Learning"

date: "2026-10-27 18:31"

duration: "--"

language: "en"

model: "deepseek-ai/DeepSeek-V3.2"

parts: 3

transcript_chars: 56375

generated: "2026-11-23T00:42:19+05:30"


Advanced Machine Learning

Overview

This class introduced sequential data modeling, contrasting it with non-sequential data handled by CNNs. It covered the motivation and architecture of Recurrent Neural Networks (RNNs), including input representation via one-hot encoding and the concept of unfolding over time steps. The lecture then detailed various RNN architectures (one-to-one, one-to-many, many-to-one, many-to-many) and their inherent problems—vanishing/exploding gradients and failure to capture long-term dependencies. Finally, Long Short-Term Memory (LSTM) networks were introduced as a solution, explaining their core components of cell state, hidden state, and gating mechanisms. This session lays the foundation for sequence modeling within the course.

Learning outcomes

Core concepts

Sequential vs. Non-Sequential Data

Definition: Non-sequential data items are independent (e.g., images), while sequential data items have strong relationships with previous observations (e.g., stock prices, text). Why it matters: This fundamental distinction dictates the choice of model architecture: CNNs for non-sequential data and RNNs/LSTMs/Transformers for sequential data. Connection: It is the primary motivation for introducing RNNs in the class.

Recurrent Neural Network (RNN) Architecture

Definition: A neural network with cyclic connections, allowing the hidden layer's output (hidden state) to be fed back as input alongside the next data point. Why it matters: This recurrence enables the network to maintain a memory of previous inputs, making it suitable for sequential data. Connection: It is the basic building block contrasted with feedforward networks (like CNNs) and extended into more complex models like LSTM.

Unfolding and Timesteps

Definition: The process of visualizing the RNN's single, looping hidden layer as a series of discrete, repeated steps (T0, T1, T2...), where the number of steps equals the input sequence length. Why it matters: Unfolding makes the sequential processing explicit and simplifies understanding of forward propagation and backpropagation through time. Connection: This concept is key to understanding how RNNs handle variable-length inputs and why deep unfolding leads to gradient problems.

RNN Architectural Types

Definition: Categorization based on the sequential nature of inputs and outputs: One-to-One (vanilla NN), One-to-Many (e.g., image captioning), Many-to-One (e.g., sentiment analysis), and Many-to-Many (e.g., machine translation or video classification). Why it matters: Different real-world tasks require different input-output mappings; choosing the correct architecture is crucial. Connection: This taxonomy shows the flexibility of the RNN framework and introduces the encoder-decoder (sequence-to-sequence) model.

Vanishing and Exploding Gradients

Definition: Problems during backpropagation in deep networks where gradients become extremely small (vanishing) or large (exploding), hindering effective weight updates, especially in early layers. Why it matters: These problems are particularly acute in RNNs due to many unfolded layers, preventing learning over long sequences. Connection: This flaw in standard RNNs motivates the development of more advanced architectures like LSTM.

Long-Term Dependency

Definition: The phenomenon where a term in a sequence depends on information from much earlier in the sequence, not just the immediately preceding element. Why it matters: Standard RNNs with simple recurrent connections often fail to learn these distant relationships. Connection: This specific limitation of RNNs is the key problem that LSTM's cell state and gates are designed to solve.

Long Short-Term Memory (LSTM)

Definition: An RNN variant featuring a cell state (long-term memory), a hidden state (short-term memory), and three gates (forget, input, output) that regulate information flow. Why it matters: LSTMs can learn long-term dependencies and mitigate vanishing/exploding gradients, making them superior to standard RNNs for many sequential tasks. Connection: It is presented as the direct solution to the problems identified with standard RNNs.

Gates in LSTM

Definition: Neural network layers (using sigmoid activation) that decide how much information to forget, add, or output. They operate on a continuous scale from 0 to 1. Why it matters: Gates provide fine-grained control over the cell state, allowing the network to selectively remember or forget information across many time steps. Connection: These are the core mechanisms that enable the LSTM to manage long-term memory and address the dependency problem.

Formulas and maths

Example: For vocabulary ["movie", "was", "enjoyable", "disappointing", "not"], "movie" = \([1, 0, 0, 0, 0]\).

Symbols: \( V \) is the vocabulary size.

Used when: Converting categorical text data into numerical input for an RNN.

Symbols: \( n \) is the sequence length (number of tokens/timesteps), \( f \) is the feature size (e.g., vocabulary size \( V \)).

Used when: Defining the input dimensions for an RNN layer.

Symbols: \( \mathbf{x}_t \) is the input vector at time \( t \), \( \mathbf{W} \) is the input-to-hidden weight matrix, \( \mathbf{h}_{t-1} \) is the previous hidden state, \( \mathbf{H} \) is the hidden-to-hidden (recurrent) weight matrix.

Used when: Calculating the activation for the hidden layer at each step during RNN forward propagation.

Symbols: \( \mathbf{w} \) are the weights, \( \alpha \) is the learning rate, \( \frac{\partial L}{\partial \mathbf{w}} \) is the gradient of the loss with respect to the weights.

Used when: Updating model parameters during backpropagation.

Symbols: \( \sigma \) denotes the sigmoid activation function.

Used when: Applying activation in LSTM gates to produce gating values between 0 (completely forget/block) and 1 (completely remember/pass).

Worked examples

1. Dataset for Sentiment Analysis:

2. RNN Network Sizing:

3. RNN Unfolding for "movie was good":

4. Illustrative Deep RNN:

5. Long-Term Dependency Example:

6. Sigmoid Gate Operation (Illustrative):

7. Learning Rate Example:

Questions asked in class

Key takeaways

Exam-style questions

1. Question: Given a vocabulary of size 10 and a maximum sentence length of 7 tokens, describe the input preparation for an RNN. What would be the shape of the input tensor for a batch of 5 such sentences? Explain the role of the "sequence length" parameter.

2. Question: Compare and contrast the Many-to-Many RNN architectures used for Machine Translation versus Frame-level Video Classification. Use diagrams if necessary.

3. Question: Explain why a standard RNN might fail to learn the relationship between the words "Ram" and "He" in the sentence: "Ram, who arrived early, finished his work quickly. He then left." Propose a solution and describe one core mechanism it uses.

4. Question: During backpropagation in a deep RNN, you observe that the weights in the early layers are not updating significantly, while the loss remains high. Name the problem, its cause, and one common architectural solution used to mitigate it.

Glossary

Follow-ups

Transcript

One line per segment, [hh:mm:ss] timestamp first.

loading…