CS57800 - Foundations Deep Learning¶
Spring 2026¶
Instructor: Bruno Ribeiro¶
Sylabus¶
Course Description
This course covers the principles behind deep learning. A lot of our coding will be in Python and Pytorch. We assume all students are proficient in python or can learn it quickly. Upon completing the course, students should be able to: Understand the mathematical foundations of deep learning, including:
- Statistical Foundations of Deep Learning
- Causal Mechanisms in Deep Learning
- Out-of-distribution Tasks in Deep Learning
- Disentangled representations
- Feedforward Networks
- Transformers
- Set Representations
- Graph Representations
- Graph Neural Networks and Graph Embeddings
- Convolutional Networks
- Stochastic optimization of neural network models
- Invariant Representations
- Multi-task Learning, Transfer Learning, and Meta Learning
- Variational Auto-Encoders
- Implicit Generative Models
- Generative Adversarial Networks
- Diffusion models / flow matching
- Maybe LLM RLHF / GRPO
Understand how to evaluate the performance of neural networks, as well as formulate and test hypotheses Understand how algorithmic elements interact to impact performance
See syllabus at https://www.cs.purdue.edu/homes/ribeirob/courses/Spring2026/
Prerequisites
CS37300 or equivalent (Machine Learning).
- A good understanding of statistical machine learning is needed for this course
- This course has programming assigments
- All assigments are in Python 3. We assume all students are procifient in python or can learn it quickly (say, become proficient in less than a week).
Books
- (required, online) Ian Goodfellow, Yoshua Bengio, and Aaron Courville, Deep Learning, MIT Press (FREE online copy)
- (required, online) Michael M. Bronstein, Joan Bruna, Taco Cohen, Petar Veličković, Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges
- (required, online) Thrun, Sebastian, Pratt, Lorien (Eds.), Learning to Learn, Springer. (free with your Purdue account)
- (recommended, online) William L. Hamilton, Graph Representation Learning, Morgan and Claypool, 2020 (FREE online copy).
- (recommended, online) Kevin Patrick Murphy, Probabilistic Machine Learning: An Introduction, MIT Press, 2021 (FREE online copy)
Supporting books
- (recommended, online) Aston Zhang, Zachary C. Lipton, Mu Li, and Alexander J. Smola. Dive into Deep Learning. Unpublished v0.7 draft (2019).
- (optional) C. Bishop, Pattern Recognition and Machine Learning, Springer, 2006.
- (optional, online) The Elements of Statistical Learning: Data Mining, Inference, and Prediction by Trevor Hastie, Robert Tibshirani and Jerome Friedman.
- (optional, online) A Course in Machine Learning by Hal Daumé III.
Logistics
Time and location: Tue/Thu 1:30-2:45pm • Stewart Center 320
Instructor: Bruno Ribeiro, (Contact through Piazza only)
- Office hours: TBD
Teaching assistants:
- Gabriel Buginga (Head TA)
- Office hours: TBD
- Kai Cheng
- Office hours: TBD
- Gabriel Buginga (Head TA)
Webpage: http://www.cs.purdue.edu/~ribeirob/courses/Spring2026
Course Policies¶
Evaluation¶
Methods of evaluation and grading criteria
Homework: 25% (5 homeworks)
Midterm Exam: 35%
Final Project: 35%
Attendance: 5%
Late policy: No late assigments (homeworks and projects) (Grade = zero after deadline)
Submission on Gradescope
Firm deadline
Lowest homework (1) grade is discarted
GPU compute resources¶
We will use the Scholar Cluster for some of our homework
Projects¶
A final project will account for 35% of the grade
- Students may propose projects
- Students may select from a set of pre-defined projects
- We will post a deadline for project proposals
Review¶
Review: Basic Python, Numpy¶
Here are some online basic Python tutorials:
- Python and NumPy: Stanford Python and Numpy Tutorial.
- Python with interactive quizes https://www.w3schools.com/python/
- Basic Python Tutorial with an Introduction to "Class" objects
- Basic Numpy Tutorial
Review: Basic Probability Theory¶
The following chapters on probability and information theory are part of the pre-requisites:
Pre-requisite Review: Probability and Information Theory
- Chapter 3.2 (Random Variables)
- Chapter 3.3 (Probability Distributions)
- Chapter 3.4 (Marginal Probability)
- Chapter 3.5 (Conditional Probability)
- Chapter 3.6 (The Chain of Conditional Probabilities)
- Chapter 3.7 (Independence and Conditional Independence)
- Chapter 3.8 (Expectation, Variance, and Covariance)
- Chapter 3.9 (Common Probability Distributions)
- Chapter 3.10 (Useful Properties of Common Functions)
- Chapter 3.11 (Bayes Rule)
Review: Machine Learning Basics¶
Pre-requisite Review: Machine Learning Basics
- Chapter 5.1 (Learning Algorithms)
- Chapter 5.2 (Capacity, Overfitting and Underfitting)
- Chapter 5.3 (Hyperparameters and Validation Sets)
- Chapter 5.4 (Estimators, Bias and Variance)
- Chapter 5.5 (Maximum Likelihood Estimation) -- Extremelly important
- Chapter 5.6 (Bayesian Statistics)
- Chapter 5.7 (Supervised Learning Algorithms)
- (not needed) Except Chapter 5.7.2, 5.7.3
- Chapter 5.8.0 (Unsupervised Learning Algorithms) -- We will review this
- (not needed) Except 5.8.1, 5.8.2
- Chapter 5.9 (Stochastic Gradient Descent) -- We will review this
- Chapter 5.10 (Building a Machine Learning Algorithm)
Review Content (Not in the DL book)¶
Evaluation: Supervised Learning¶
Some general principles:
- More data never hurts but we must be careful to always have quality data
- Theoretical results sometimes can bound how much data is needed for a given family of models
- In practice these bounds tend to be too loose to be useful
- Deep learning models generally don't have tight bounds
- In traditional machine learning models, more complex models require more data
- Not quite true for deep learning models
Measuring Generalization Error in Classification Tasks¶
The generalization error is the error once the model is deployed in real life
Generalization error can be estimated with a test dataset.
Measuring generalization error for two classes¶
- Precision and Recall
Two classes: (AUC) Area under the ROC curve¶
- (ROC) The ROC (Receiver Operating Curve) is created by plotting
- Assumes a probabilistic model, deciding whether to make an example $y=1$ or $y=0$ based on $p(y|x;{\bf W})$.
- The ROC is the true positive rate (TPR) against the false positive rate (FPR = 1 - true negative rate) at various thresholds for $\hat{y} = {\bf 1}\{p(y|x;{\bf W}) > \text{threshold}\}$, where ${\bf 1}\{A\}$ is 1 if the $A$ is true.
(AUC) Area Under the ROC¶
The AUC is the Area under the ROC curve
Not an ROC (common error using software libraries)¶
If your ROC looks like this, you are likely doing something wrong
- Either you have too few discrete features
- Or you are predicting labels “0” and “1” but gave software library the predictions ∈ {“0”, “1”} instead of the probability $\in [0,1]$ the label is “1”
Multi-class Metrics:¶
- We seek a single metric to represent the confusion matrix (example from the iris dataset, credit sklearn)
- Widely used multi-class metrics: Micro-F1 and Macro-F1 scores
- Consider:
- Class sentosa: 13 TP and 0 FP
- Class versicolor: 0 TP and 16 FP
- Class virginica: 9 TP and 0 FP
- Micro-F1 score considers the proportion of examples on each class: $$ \text{Micro-F1} = \frac{13+0+9}{13+16+9} = 0.579 $$
- Macro-F1 score does not consider the proportion of examples on each class: $$ \text{Macro-F1} = \frac{1 + 0 + 1}{3} = 0.666 $$
- Consider:
Our solution:
- This course:
- Fundamentals, not stirring the pile
- Emphasis on the statistical foundations
Learning Curves¶
A learning curve is a graphical representation of how an increase in amount of data improves the model:
error (measured on the vertical axis) as a function of
training examples (the horizontal axis)
It is measured both w.r.t. to the training dataset v.s. a separate validation dataset.
The gap between the error over the training data and error over validation data is a good proxy to assess how much a model is overfitting the data.
Understanding Learning Curves (and generalization error)¶
Learning curves of a traditional ML method (e.g., logistic regression)
If we could hypothetically decompose the classification error linearly into $$ \text{Validation Error} = \text{Bias (ability to fit signal)} + \text{Variance (ability to fit training noise)} + \text{Noise (true validation noise)} $$
When the learning curves meet we know $$ \text{Validation Error} = \text{Bias (ability to fit signal)} + \text{Noise (true validation noise)} $$ since $\text{Variance (ability to fit training noise)}$ is the distance between the curves.
Deep Learning, learning curves and generalization error¶
Deep neural networks using stochastic gradient descent may find a near-perfect fit over the training data and still generalize well (we will cover this phenomenon later).
- In most cases, we want neural networks to have enough capacity to easily fit the noise of the training data.
- Their generalization error comes from a statistical property of the optimization itself (more later)