GEN AI: Introduction to Deep Learning and Generative AI
Introduction to Deep Learning and Generative AI: week-wise syllabus, notes, short notes, and available revision material.
Introduction to Deep Learning and Generative AI
DiplomaComplete week-wise syllabus
Introduction to Deep Learning and Generative AI · 12 weeks
Week 1: Artificial Neural Networks – Theory
Topics covered
Introduction to Deep Learning
- Difference between Machine Learning and Deep Learning.
- Basic concept of Neural networks.
- Real-world applications of Deep Learning.
Artificial neurons
- Artificial neuron inspired by biological neuron.
- Weights, biases and weighted sum.
- Mathematical representation of Neuron.
Neural network architecture
- Input layer, hidden layers and output layer.
- Forward propagation.
- Parameters and model architecture.
Activation functions
- Sigmoid, Tanh and ReLU.
- Need for activation functions.
- Role of non-linearity.
Loss metrics
- Purpose of loss function.
- Mean Squared Error (MSE).
- Introduction of Cross-Entropy loss.
Expected skills:
- Understanding the basic architecture of Neural Network.
- Explaining the role of weights and biases.
- Identifying activation functions and loss functions.
- Understanding the forward pass of simple neural networks.
Week 2: Artificial Neural Networks – Practice
Topics covered
TensorFlow and Keras
- Introduction of Deep Learning framework.
- Tensor, layers and models.
- Making Sequential Model.
Building neural networks
- Defining input and output layers.
- Adding hidden layers.
- Compile and train the model.
Training process
- Epochs and batch size.
- Training and validation data.
- Monitoring loss and accuracy.
Optimization methods
- Practical idea of gradient descent.
- Learning rate.
- Introduction of optimizers.
Experimentation
- Comparing performance by changing activation functions.
- Model architecture and hyperparameters experiment.
Expected skills:
- Implementing basic neural network with TensorFlow/Keras.
- Model train and evaluate.
- Interpreting training results.
- Comparing the effects of different activation functions and optimization settings.
Week 3: Modeling Vision – CNN Theory
Topics covered
Introduction to Computer Vision
- Representation of image data.
- Image classification problem.
- Traditional image processing and CNN-based learning.
Convolutional Neural Networks
- CNN architecture.
- Convolution operation.
- Filters and kernels.
- Feature maps.
Convolution parameters
- Stride.
- Padding.
- Output feature-map dimensions.
Pooling layers
- Max pooling.
- Average pooling.
- To reduce spatial dimensions.
CNN architecture
- Convolution, activation and pooling layers.
- Flattening and fully connected layers.
- Hierarchical feature extraction.
Expected skills:
- Explaining the architecture of CNN.
- Understanding Convolution and pooling operations.
- Identifying the effect of filter, stride and padding.
- Understanding the role of CNN in image classification.
Week 4: Modeling Vision – CNN Practice
Topics covered
Image classification
- Datasets like MNIST and CIFAR-10.
- Image preprocessing.
- Labels and class representation.
CNN implementation
- Creating convolutional layers.
- Adding pooling and dense layers.
- Use of Softmax output layer.
Training
- Training-validation split.
- Monitoring loss and accuracy.
- Tuning epochs and batch size.
Evaluation
- Model evaluation on test data.
- Inspecting misclassified images.
- Comparing model performance.
Expected skills:
- Implementing CNN-based image classifier.
- Preprocessing image datasets.
- Interpreting training curves and evaluation metrics.
- Identifying classification errors.
Week 5: Modeling Sequential Data – Theory
Topics covered
Sequential data
- Sequence and time-dependent data.
- Text, speech and time-series examples.
- Limitations of feedforward networks for sequences.
Recurrent Neural Networks (RNNs)
- Recurrent connections.
- Hidden state.
- Sequence processing.
- Unrolling an RNN through time.
Training RNNs
- Backpropagation Through Time (BPTT).
- Introduction of vanishing and exploding gradients.
Long Short-Term Memory (LSTM)
- LSTM architecture.
- Forget gate, input gate and output gate.
- Cell state and hidden state.
RNN vs LSTM
- Long-term dependencies.
- Memory mechanism.
- Typical use cases.
Expected skills:
- Understanding the need for RNN for sequential data.
- Differentiating RNN and LSTM architectures.
- To explain the purpose of LSTM gates.
- Understanding the basic challenges of sequential modeling.
Week 6: Modeling Sequential Data – Practice
Topics covered
Sentiment analysis
- Text preprocessing.
- Tokenization and sequence representation.
- Positive and negative sentiment classification.
LSTM implementation
- Use of embedding layer.
- To configure LSTM layers.
- Generating classification output.
Text generation
- Concept of next-character or next-word prediction.
- Simple RNN/LSTM language modeling.
- Evaluation of generated text.
Time-series prediction
- Giving historical values as sequence input.
- Time-window creation.
- Predicting future values.
Model evaluation
- Training and validation performance.
- Basic idea of overfitting.
- Comparing predictions and actual values.
Expected skills:
- Making sentiment classifier from LSTM.
- To perform simple RNN/LSTM-based text generation experiment.
- Preparing sequential inputs for time-series prediction.
- Evaluating the results of the sequential model.
Week 7: Generative AI for Vision – VAEs and GANs
Topics covered
Introduction to Generative AI
- Difference between discriminative and generative models.
- Concept of data generation.
- Image generation applications.
Autoencoders
- Encoder and decoder architecture.
- Latent representation.
- Reconstruction loss.
Variational Autoencoders (VAEs)
- Probabilistic latent space.
- Mean and variance representation.
- Sampling from latent distribution.
- Reconstruction loss and KL divergence.
Generative Adversarial Networks (GANs)
- Generator and discriminator.
- Adversarial training.
- Discrimination between real and generated data.
Model comparison
- Autoencoder and VAE.
- VAE and GAN.
- Generation quality and training challenges.
Expected skills:
- Differentiating generative and discriminative models.
- Understanding the encoder-decoder workflow of Autoencoder.
- To explain the purpose of latent space and sampling in VAE.
- Understanding the role of generator and discriminator of GAN.
Week 8: Generative AI for Vision – Diffusion Models
Topics covered
Introduction to diffusion models
- Diffusion-based approach to generative modeling.
- Relationship between noise and data.
Forward diffusion process
- Gradually adding noise to the original image.
- Noise schedule.
- Generation of noisy samples.
Reverse diffusion process
- Noise predicting.
- Denoising steps.
- Image reconstruction from noise.
Diffusion probabilistic models
- Basic idea of probabilistic modeling.
- Training objective.
- Sampling process.
Training and inference
- Use of noisy images during training.
- Iterative denoising during inference.
- Sampling steps and generation quality.
Expected skills:
- To explain forward and reverse process of Diffusion model.
- Understanding the role of noise schedule.
- Identifying the differences between training and inference.
- To understand the workflow of Diffusion-based image generation.
Week 9: Generative AI for Vision – Practice
Topics covered
GAN implementation and experimentation
- Implementing generator and discriminator.
- Basic workflow of training loop.
- Inspecting generated image samples.
Pretrained diffusion models
- Use of pretrained models.
- Image generation workflow.
- Practical introduction to prompt-based image generation.
Image generation
- Image generation from latent noise.
- To compare generated outputs.
- Experimenting with different generation settings.
Evaluation
- Visual quality inspection.
- Basic idea of diversity and consistency.
- Identifying common generation artifacts.
Expected skills:
- Experimenting with image generation with GANs.
- Generating images from pretrained diffusion models.
- To inspect the quality of generated images.
- Identifying practical limitations of generative models.
Week 10: Large Language Models – Transformer Architecture
Topics covered
Introduction to LLMs
- Concept of language modeling.
- Next-token prediction.
- Applications of large language models.
Text representation
- Word embeddings.
- Tokenization.
- Vocabulary and token IDs.
- Introduction to contextual representation.
Attention mechanism
- Need of attention.
- Query, Key and Value.
- Scaled dot-product attention.
- Self-attention.
Transformer architecture
- Transformer blocks.
- Multi-head attention.
- Positional encoding.
- Feedforward layers.
- Basic idea of residual connections and normalization.
Transformer workflow
- Input tokens to contextual representations.
- Attention-based information exchange.
- Output predictions.
Expected skills:
- Explaining the role of tokenization and embeddings.
- Understanding the basic calculation of self-attention.
- Identifying major components of Transformer architecture.
- Understanding the core differences of RNN and Transformer.
Week 11: Large Language Models – Encoder, Decoder and Encoder-Decoder Models
Topics covered
Transformer model families
- Encoder-only models.
- Decoder-only models.
- Encoder-decoder models.
BERT-like models
- Bidirectional context.
- Masked language modeling.
- Text classification and other NLP tasks.
Decoder-based text generation
- Autoregressive generation.
- Causal attention.
- Next-token prediction.
Machine translation
- Source and target sequences.
- Encoder-decoder workflow.
- Sequence-to-sequence generation.
Fine-tuning LLMs
- Difference between pretraining and fine-tuning.
- Parameter-efficient fine-tuning (PEFT).
- LoRA (Low-Rank Adaptation).
- Comparison of full fine-tuning and parameter-efficient approaches.
Expected skills:
- Differentiating encoder, decoder and encoder-decoder models.
- Identifying use cases of BERT-like and decoder-based models.
- Understanding Transformer workflow of machine translation.
- To explain the purpose of PEFT and LoRA.
Week 12: Large Language Models – Practice
Topics covered
Prompting techniques
- Zero-shot prompting.
- Few-shot prompting.
- Instruction-based prompting.
- Prompt structure and clarity.
Prompt experimentation
- Comparing outputs of different prompts.
- Task-specific instructions.
- Output formatting and constraints.
Prompt fine-tuning
- Basic idea of prompt tuning.
- Trainable prompt representations.
- Compared to traditional fine-tuning.
Other adaptation methods
- Overview of fine-tuning approaches.
- Practical context of PEFT-based methods.
- Trade-offs of model adaptation.
Evaluation
- Assessing the quality of generated responses.
- Consistency and task relevance.
- Basic awareness of hallucinations and limitations.
Expected skills:
- Using different prompting techniques.
- Comparing the effects of prompts.
- Understanding the difference between prompt tuning and fine-tuning.
- Evaluating LLM outputs against task requirements.
Quick revision map
Introduction to Deep Learning and Generative AI topic distribution
Week 1: ANN – Theory
1 weekNeurons, layers, activation, loss
Week 2: ANN – Practice
1 weekTensorFlow, Keras, training
Week 3: CNN – Theory
1 weekConvolution, pooling, feature maps
Week 4: CNN – Practice
1 weekImage classification, MNIST, CIFAR-10
Week 5: Sequential Models – Theory
1 weekRNN, LSTM, hidden state, gates
Week 6: Sequential Models – Practice
1 weekSentiment analysis, text generation, time series
Week 7: VAEs and GANs
1 weekAutoencoders, latent space, adversarial training
Week 8: Diffusion Models
1 weekForward/reverse diffusion, denoising
Week 9: Vision Generative AI – Practice
1 weekGANs, pretrained diffusion models
Week 10: Transformer Architecture
1 weekTokenization, embeddings, attention
Week 11: LLM Architectures
1 weekBERT, decoders, translation, LoRA
Week 12: LLM Practice
1 weekPrompting, prompt tuning, adaptation
For assignments, quizzes and exams, follow the current term's course portal and official assessment announcements.
Practise forward propagation, CNN dimensions, RNN/LSTM architecture, VAE versus GAN, diffusion processes, attention and Transformer architectures through numerical, conceptual and implementation exercises.
IIT Madras official course page