Probabilistic Machine Learning
CS 691 · IIT Gandhinagar · Semester I, 2022–23
This course treats machine learning as inference under uncertainty. It moves from Bayes' rule, maximum likelihood and MAP estimation through approximate inference (Laplace, Monte Carlo, MCMC and variational methods) to Bayesian neural networks, Gaussian processes, latent-variable models, active learning, Bayesian optimisation and diffusion models. Assignments are written in JAX with TensorFlow Probability, and a project carries most of the grade.
- Instructor
- Prof. Nipun Batra
- nipun.batra@iitgn.ac.in
- Classes
- Thursday, 12:00–1:30 pm, 7/102; Friday, 2:00–3:30 pm, 7/105
- Google Classroom
- Class code
u7jjtu2 - Teaching assistant
- Zeel B Patel
- Prerequisites
- Mathematics for ML, a prior ML course such as ES 654, and good Python programming (details)
This offering ran from August to November 2022. Its slides, notebooks and assignments remain available.
- Lectures
- 23
- Assignments
- 4
- Projects
- 14 ideas
- Notebooks
- 12, on GitHub
Lectures
- 1–6Introduction to probabilistic ML6 lectures
- 7–12Approximate inference6 lectures
- 13–14Bayesian neural networks2 lectures
- 15–16Gaussian processes2 lectures
- 17–18Unsupervised learning2 lectures
- 19–20Active learning and Bayesian optimisation2 lectures
- 21–23Autoencoders, hierarchical and generative models3 lectures
- +Additional material1 topic
Questions
What does the course cover?
- Probability refresher: probability theory, discrete and continuous distributions, joint distributions, sampling from different distributions (for example with the Box–Muller transform), uncertainty modelling, and information-theoretic concepts such as KL divergence and entropy.
- Bayesian concept learning: likelihood, prior and posterior; maximum likelihood (MLE) and maximum a posteriori (MAP) estimation; full Bayesian estimation with conjugate priors (the Beta–Bernoulli model for a coin toss, the Normal–Normal model for the parameters of a Normal distribution).
- Bayesian supervised methods: for regression, Bayesian linear regression and robust linear regression through alternative likelihoods (Laplace, Student-t); for classification, Bayesian logistic regression and Bayesian naive Bayes.
- Latent-variable modelling: Gaussian mixture models and probabilistic principal component analysis (PPCA).
- Approximate inference: sampling (rejection sampling, importance sampling, Markov chain Monte Carlo, Metropolis–Hastings, Gibbs sampling, the No-U-Turn Sampler) and variational inference (mean field, the evidence lower bound, the reparameterisation trick, stochastic VI, automatic differentiation VI).
- Gaussian processes: the multivariate Normal distribution and its properties, kernels, GP regression and classification, approximate inference and sparse GPs.
- Bayesian optimisation and active learning: query by committee, uncertainty sampling, expected model change; acquisition functions, GP-based and random-forest-based Bayesian optimisation.
- Probabilistic deep learning: MC dropout, deep ensembles, Bayesian neural networks and deep GPs.
What should I know before the course?
- Mathematics for ML: the recommended reading is the Mathematics for Machine Learning book.
- A prior ML course: ES 654 at IIT Gandhinagar or equivalent.
- Good programming skills in Python and familiarity with NumPy, pandas, Matplotlib and scikit-learn. The recommended reading is the Python Data Science Handbook.
How is the course graded?
Assignments 20%, quizzes 20% and the project 60%. Each quiz covers everything from the previous quiz up to the day of the quiz. See Assessment.
How are assignments done?
In groups of two, as a single Jupyter notebook, using TensorFlow Probability with the JAX substrate for distributions and JAX for automatic differentiation and vectorised code. Draw insights from your results rather than only presenting answers. See Assignments.
Is there a project?
Yes, and it is worth 60% of the grade. The Projects page lists ideas, from Bayesian unlearning and Stein variational inference to deep GPs and neural processes for energy disaggregation and air quality.
References
Textbooks:
- Kevin P. Murphy, Machine Learning: A Probabilistic Perspective, MIT Press, 2012
- Kevin P. Murphy, Probabilistic Machine Learning: An Introduction, MIT Press, 2022
- Kevin P. Murphy, Probabilistic Machine Learning: Advanced Topics, MIT Press, 2023
- Christopher M. Bishop, Pattern Recognition and Machine Learning
- Allen B. Downey, Think Bayes: Bayesian Statistics in Python, Green Tea Press, 2012
- David Barber, Bayesian Reasoning and Machine Learning, Cambridge University Press, 2012
- Carl Edward Rasmussen and Christopher K. I. Williams, Gaussian Processes for Machine Learning, MIT Press, 2006
- Richard McElreath, Statistical Rethinking, CRC Press, 2020
Similar courses:
- Probabilistic Machine Learning by Piyush Rai, IIT Kanpur
YouTube channels and playlists:
- mathematicalmonk
- Mutual Information
- ritvikmath
- Machine Learning & Simulation
- Probabilistic Machine Learning by Philipp Hennig, University of Tübingen, 2021
- Statistical Rethinking 2022 by Richard McElreath
Teaching assistant
- Zeel B Patelpatel_zeel@iitgn.ac.in