CPSC 440/550: Advanced Machine Learning – 23W2 (Jan-Apr 2024)

Instructor: Danica Sutherland (she): dsuth@cs.ubc.ca, ICICS X539.
Lecture info: Mondays/Wednesdays, 3:30 - 4:50pm, MacMillan 360.
Canvas; Piazza; Gradescope. Office hour calendar and course recordings are linked from Piazza and Canvas.

Previous offerings: 2022w2 by me, or 2021w2, 2020w2 by Mark Schmidt. This course will be broadly similar to these, with some changes.


First, miscellaneous notes mentioned in the lectures and homeworks (some of which are background material, some are supplements to things we'll see in this course): and assignment submission instructions.

Italicized entries are tentative; in particular, the timing and even number of assignments might change. Textbook acronyms are explained below.

M Jan 8Syllabus
Binary density estimation
ML vs. Stats, 3 Cultures of ML
Math for ML, Essence of Linear Algebra
PML1 2.1-2.4
W Jan 10Bernoulli MLE and MAP; product of BernoullisPML1 4.5, 4.6.2
ThJan 11Assignment 1 released: pdf, tex, zip
M Jan 15Multivariate models; generative classifiersPML1 9.3
W Jan 17Discriminative models
F Jan 19Assignment 1 due at 5pm
F Jan 19Add/drop deadline
M Jan 22Deep learning: review, double descent, autodiffPML1 13
Double descent papers: 1 2 3 4
W Jan 24Deep learning: CNNs, autoencoders, FCNsPML1 14.1-14.5
M Jan 29Class canceled (sick)
Tu-ThJan 30-Feb 1Quiz 1
W Jan 31Categorical variables, Monte CarloPML1 2.5; PML2 11.2
M Feb 5More categorical / Monte Carlo
Tu-ThFeb 6-8Quiz 2
W Feb 7Recurrent networksPML1 15.2
ThFeb 9Assignment 2 released: pdf, tex, zip
M Feb 12Attention and transformers
[Guest lecturer: Alan Milligan (TA)]
PML1 15.4-15.7; PML2 16.2.7, 16.3.5
W Feb 14What are we learning?
[Online: at a workshop]
PML2 19; Fairness in vision tutorial
Fair ML book; Data Feminism
M Feb 19No class: Family Day + midterm break
W Feb 21No class: midterm break
M Feb 26Gaussians, Bayesian learningPML1 2.6, 4.6.7
Tu-ThFeb 27-29Quiz 3
W Feb 28Multivariate GaussiansPML1 3.2
F Mar 1Withdrawal deadline
F Mar 1Assignment 2 due at 11:59pm
M Mar 4Project proposal guidelines released
M Mar 4Learning with Gaussians; empirical BayesPML1 3.3, 11.7
W Mar 6Empirical BayesPML2 3.7
M Mar 11Approximate inferencePML2 7.4.3, 11.4, 11.5; PML2 2.4
Tu-ThMar 12-14Quiz 4
W Mar 13Exponential families; start mixturesPML2 2.4
M Mar 18Mixtures, EM, KDEPML1 8.7.2 / PML2 6.5; PML2 16.3
M Mar 18Assignment 3 released: pdf, tex, zip
W Mar 20finish EM/KDE; start Markov chainsPML2 2.6
M Mar 25Markov chains; start message passingPML2 2.6, 9.2
Tu-ThMar 26-28Quiz 5
W Mar 27Message passing; start MCMCPML2 9.2; 12.1-12.2
F Mar 29Project proposal due at 11:59pm (or hand in earlier for earlier feedback)
M Apr 1No class: Easter Monday
TuApr 2Assignment 3 due at 11:59pm
W Apr 3More MCMC; directed graphical modelsPML2 4.2, bonus material on PML2 9
M Apr 8Undirected graphical modelsPML2 4.3-4.4; bonus on PML2 9, 28.5
Tu-ThApr 9-11Quiz 6
W Apr 10Variational inference, VAEs, image generation
ThApr 19Bonus assignment 4 released: pdf, tex, zip
SuApr 21Final exam (in person, handwritten), 3:30-6pm in PHRM 1101
SaApr 27Final project due at 11:59pmstyle files, instrutions
SaApr 27Bonus assignment 4 due at 11:59pm


This course is intended as a second or third university-level course on machine learning, a field that focuses on using automated data analysis for tasks like pattern recognition and prediction. The class is intended as a continuation of CPSC 340 (also called 540, or previously 532M); it will assume a strong background in math and computer science. Topics will (roughly) include deep learning, generative models, latent-variable models, Markov models, probabilistic graphical models, and Bayesian methods.

Note that the numbers for graduate cross-listings of our machine learning courses changed this year: previously 340 was also called 532M, and 440 was also called 540. Now 340 is also called 540, and 440 is also called 550.


The course meets in person in MacMillan 360. I plan to release recordings, but encourage you to come to class in person if you can.

Grading scheme:

Further details in the syllabus slides.

Registration and Prerequisites

Registration: Graduate and undergraduate students from any department are welcome to take the class. Undergraduate students should enroll in CPSC 440, and graduate students should enroll in CPSC 550. Below are more details on registration for each course: My expectation (no guarantee) is that everyone on both waitlists will probably get in, and we should also have room for auditors. Join the waiting list by January 15th if you want to register.

Starting in the second week of classes, we'll have weekly tutorials run by the TAs. These will do things like go through provided assignment code, review background material, review big concepts, and/or do exercises. You can register for particular tutorial sections if you want to save a seat at a particular time, but note that you do not need to register in a tutorial section.

CPSC 340/540 vs. CPSC 440/550: CPSC 340 and 440 are roughly structured as one full-year course. CPSC 340 (which is sometimes cross-listed as CPSC 540 for graduate students; formerly 532M) covers more data mining methods and the methods that are most widely-used in applications of machine learning. CPSC 440 (cross-listed as CPSC 545 for graduate students) focuses on probabilistic methods which appear in more niche applications, as well as various other topics not covered in 340/540. It is strongly recommended that you take CPSC 340/540 first, as it covers the most fundamental ideas as well as the most common and practically-useful techniques. In 440/550 it will be assumed that you are basically familiar with all the material in the current offering of CPSC 340/540. Note that online machine learning courses and courses from many other universities may not be an adequate replacement for CPSC 340; they typically have more overlap with our applied machine learning course, CPSC 330. If you're not sure, look at last term's 340 website and see if it all seems familiar.


Undergraduate students will not be able to take the class without these prerequisites. Graduate students may be asked to show how they satisfy prerequisites.


Textbook: There is no textbook for the course, but the textbook with the most extensive coverage of many of the course's topics is Kevin Murphy's Probabilistic Machine Learning series. While the one-volume 2012 version covers most of the material, we'll refer to the very recent two-volume version (2022/2023), PML1 and PML2, both of which have free Creative Commons draft pdfs through those links. I'll try to refer to the relevant sections of both versions as we go, as well as links to various other free online resources.

If you need to refresh your linear algebra or other areas of math, check out Mathematics for Machine Learning (Marc Deisenroth, Aldo Faisal, Cheng Soon Ong; 2020).

Related courses: Besides CPSC340, there are several 500-level graduate courses in CPSC and STAT that are relevant: check out the graduate courses taught by people on the ML@UBC page and the MILD list. CPSC 422/425/436N, DSCI 430, EECE 360/592, EOSC 510/550, and STAT 305/306/406/460/461 are also all relevant.

Some related courses that have online notes are:

A YouTube playlist covering in detail many of the core topics in the course: