Probabilistic Artificial Intelligence (2023)

How can we build systems that perform well in uncertain environments and unforeseen situations? How can we develop systems that exhibit “intelligent” behavior, without prescribing explicit rules? How can we build systems that learn from experience in order to improve their performance? We will study core modeling techniques and algorithms from statistics, optimization, planning, and control and study applications in areas such as sensor networks, robotics, and the Internet. The course is designed for upper-level undergraduate and graduate students. VVZ information is available here.
    • [Oct 02, 2023] Due to the number of registered students, the exam may be paper-based and may take place on a Saturday. The mode of the exam (computer-based or paper-based) will be finalized in end of October, and the exam date will be announced in December.
Access to lecture materials
The lecture materials and the Q&A zoom meetings are password protected. To obtain the password you need to be inside the ETH network or use the ETH VPN and click here. Check here to learn how to establish a VPN connection.
The lecture script is available here. If you find mistakes or have tips on how to improve the script, we encourage you to send an email to or to create an issue / merge request in the GitLab project. You will be granted access to this repository after the semester starts. We aim to continuously improve the script based on your feedback. Since the script is updated whenever we notice and fix a mistake, we encourage you to re-download the script from time to time. Errors noticed since the beginning of the semester will be listed in the errata at the end of the pdf. You can check which errors have been fixed since your version of the script by comparing with the compilation date on page (ii).
Lectures will be held on Fridays, 10:00 to 12:00 and 13:00 to 14:00, in ETA F5 with a simultaneous video transmission to ETA E1. If you are in ETA E1, you will be able to ask questions via the course channel on the EduApp. The Lectures are not live-streamed. They are recorded and the recording will be made available after the lecture here. The first lecture will take place on Fri, 22nd September 2023, and the last lecture will take place on Fri, 15th December 2023. It is not mandatory to attend the lectures.
Date Topic Slides Annotated Slides Recording
Fri 22.09. Introduction 01_introduction.pdf 01_introduction_annotated.pdf Part1  Part2
Fri 29.09. Bayesian Linear Regression 02_blr.pdf 02_blr_annotated.pdf Part1 Part2
Fri 06.10. Gaussian Processes 03_gps.pdf 03_gps_annotated.pdf Part1 Part2
Fri 13.10. Gaussian Processes II 04_gps2.pdf 04_gps2_annotated.pdf Part1 Part2
Fri 20.10. Variational Inference 05_variational.pdf 05_variational_annotated.pdf Part1 Part2
Fri 27.10. Markov Chain Monte Carlo 06_mcmc.pdf 06_mcmc_annotated.pdf Part1 Part2
Fri 03.11. Bayesian Deep Learning 07_bdl.pdf 07_bdl_annotated.pdf Part1 Part2
Fri 10.11. Active Learning 08_active_learning.pdf 08_active_learning_annotated.pdf Part1 Part2
Fri 17.11. Markov Decision Processes 09-mdps.pdf 09-mdps-annotated.pdf part1 part2
Fri 24.11. Reinforcement Learning 10-rl.pdf 10-rl-annotated.pdf part1 part2
Fri 01.12. Reinforcement Learning II 11-rl2.pdf 11-rl2-annotated.pdf part1 part2
Fri 08.12. Reinforcement Learning III 12-rl-actor-critic.pdf 12-rl-actor-critic-annotated.pdf part1 part2
Fri 15.12. Model-based Deep RL 13-rl-model-based.pdf 13-rl-model-based-annotated.pdf part1 part2

Tutorials will be held on Thursdays, 16:00 to 18:00 in HG F7. The tutorials are also not live-streamed but recorded and also available afterwards on this webpage. The first tutorial will take place on Thursday, 28th September 2023, and the last tutorial will take place on Thursday, 14th December 2023. It is not mandatory to attend the tutorials.
Date Topic Slides Recording Homework/ Solution Moodle
Thu 28.09. Math/Probability Tutorial1/Annot Recording Homework 1/Solution 1 Quiz 1
Thu 5.10. Homework1 Tutorial2/Annot Recording
Thu 12.10. Gaussian Process Tutorial3/Annot Recording Homework 2/ Solution 2 Quiz 2
Thu 19.10. Homework2 Tutorial4/Annot Recording
Thu 26.10. Variational Inference Tutorial5/Annot Recording Homework 3/ Solution 3 Quiz 3
Thu 02.11. Homework3 Tutorial6/Annot Recording
Thu 09.11. Bayesian Deep Learning Tutorial7/Annot Recording Homework 4/ Solution 4 Quiz 4
Thu 16.11. Homework4 Tutorial8/Annot Recording
Thu 23.11. Markov Decision Processes Tutorial9/Annot Recording Homework 5/ Solution 5 Quiz 5
Thu 30.11. Homework5 Tutorial10/Annot Recording
Thu 07.12. Reinforcement Learning Tutorial11/Annot Recording Homework 6/ Solution 6 Quiz 6
Thu 14.12. Homework6 Tutorial12/Annot Recording

Q&A sessions
Q&A sessions (virtual office hours) will be held on Monday, 17:00 to 18:00 virtually on Zoom. Like the lectures and tutorials, the Q&As start 15 min past the full hour. To join the Zoom call, you have to be logged into your ETH zoom account (i.e., <nethz-login> and your email password). The session will be recorded and the recording will be made available afterwards. The Q&A sessions are an informal opportunity to ask questions about the course. You will be able to ask questions via the native Zoom chat or by speaking out. In the Q&A sessions after the deadlines of projects we will give a brief overview of the project and a sketch of a possible solution for students that are interested. We will also be there to answer any questions related to the project. These project Q&A’s will be hosted on Nov 27 (Covering Task 2 and 3), and Dec 18 (Covering Task 4). The first Q&A session will take place on Monday, 25th September 2022, and the last Q&A session will take place on Monday, 18th December 2023. It is not mandatory to attend the Q&A sessions. These sessions will be recorded and the recording will be made available after the lecture on this webpage.
Date Topic Recording
Mon 25.09. Session 1 Recording
Mon 02.10. Session 2 Recording
Mon 09.10. Session 3 Recording
Mon 16.10. Session 4 Recording
Mon 23.10. Session 5 Recording
Mon 30.10. Session 6 Recording
Mon 06.11. Session 7 Recording
Mon 13.11. Session 8 Recording
Mon 20.11. Session 9 Recording
Mon 27.11. Session 10 Recording
Mon 04.12. Session 11 Recording
Mon 11.12. Session 12 Recording
Mon 18.12. Session 13 Recording

Instructor Prof. Andreas Krause
Head TA Parnian Kassraie
Assistants Aayush Grover, Alex Immer, Arad Mohammadi, Bhavya Sukhija, Cynthia Chen, Daniel Paleka, Federico Arangath, Hugo Yeche, Jonas Hübotter, Jonas Rothfuss, Lars Lorch, Lenart Treven, Ludovica Cattaneo, Manish Parajapat, Michael Aerni, Miles Wang-Henderson, Mohammad Reza Karimi, Olga Mineeva, Pragnya Alatur, Scott Sussex, Viacheslav Borovitskiy, Vignesh Ram Somnath, Vukasin Bozic, Yarden As
Mailing List Please use Moodle for any questions regarding the course or ask your question in the lectures, tutorials or Q&A sessions. If you need to contact the Head TA or the lecturer directly, please send an email to Please think twice before you send an email though and make sure you read all information here carefully.
Fri 10-12 ETA F5 [ETF E1]
Fri 13-14 ETA F5 [ETF E1]
Thu 16-18 HG F7 Recordings
Questions & Answers
Mon 17-18 Virtual Link

We do not maintain a mailing list, but instead kindly request you to use Moodle to ask questions with regard to the course. Please ask your questions in the Moodle forum whose topic best fits your question. In special cases, if you need to contact the Head TA directly, please send an email to instead of contacting them at their personal email address. The head TA will not respond to requests sent to their personal email address. Please think twice before you send an email though and make sure you read all information here carefully. Based on previous experience, we received a lot of questions or requests that are resolvable with the information provided here.
The course includes a total of five projects. Projects are code assignments that require solving machine learning problems with methods taught in the course. For each project, you are allowed to work in a group of one to three students. It is your own responsibility to form a group and you can find teammates in the lectures or on Moodle. The first project (Task 0) will be ungraded; its purpose is to help you familiarize yourself with the code submission workflow. The remaining projects are graded and are accounted for in determining your final grade for the course. More information including a tentative schedule will soon become available. More information including a tentative schedule is available in the project information sheet and on the project server . Both are accessible from within the ETH network or via VPN.
We will publish a total of six (optional) homework assignments during the lecture series. The homework assignments will be published on this website and some questions from the homework assignment will additionally be made available as a Moodle quiz. These assignments are intended for you to apply and reinforce the material presented in the lecture and to get accustomed to the Moodle platform. You are encouraged, but not required to do the homework. Doing the homework assignments is not mandatory. Your performance in the homework will have no influence on your final grade. Homework assignments are expected to be published bi-weekly, with solutions following one week after or being directly visible in Moodle. The exact day and time a homework is being published may deviate slightly over the course of the semester.
Demos will be shown during the lecture and are made available to you here. They are hosted in a GitLab repository to which you need to be given access. Everyone who enrolled (on mystudies) to the course before October 2nd 2023, have been automatically granted access to this Gitlab repository. If you enrolled at a later date, please individually request access by sending an email to Use the subject line “Access Request: PAI 2023 Demos” and include your nethz in this email. The demos are Jupyter Notebooks.
Exam Time and Locations: The exam is scheduled for Wednesday 07.02.2024, starting at 9:30 am. The exam will last for 120 minutes and will be computer-based (Moodle). The language of the examination is English. Students are allowed to bring a summary of no more than two A4 pages and a simple, non-programmable calculator to the exam.
If you are registered for the exam, you should have received an email with your room assignment. The exam rooms are assigned by last name, unless you require a special arrangement.
Lastname Exam Room
All students with special arrangement HG G1
A – Ere ONA E25
Ern – Leu HG G1
Li – Sta ONA E7
Ste – Wo GLC E29.1
Wu – Z GLC E34.1

Repetition Exam: We hold an exam in the winter during the Examination Session, and we do not offer a repetition exam in summer. You will need to enrol next year, if you fail to participate in the winter exam, or obtain a passing grade.
Special Arrangement: If you are disadvantaged and have therefore been granted a special arrangement with extra time by the study administration, please email and attach a pdf attached that proves the special arrangement and the eligibility for extra time during the exam. You must do so by the exam de-registration deadline.
Study resources for the exam: You can download the exams from the previous two years with provisional solutions: [Exam-2021-A] [Solution-2021-A] [Exam-2021-B] [Solution-2021-B] [Exam-2022-A] [Solution-2022-A] [Exam-2022-B] [Solution-2022-B] [Exam-2023] [Solution-2023] [Exam-2024] [Solution-2024] to better prepare yourself for the final exam. Please note that we do not guarantee 100% correctness of the provided solutions. You are encouraged to think for yourself and discuss exam-related content on the Moodle forum or share any questions. Any exams that are older are not fully representative of the course content, because the course changed substantially two years ago. In case, you still do want to take a look at them, please refer to the course webpage of PAI 2020, where you can access exam sheets from 2012 to 2019.
Performance Assessment
In order to pass this course and be allowed to sit the session examination, you need to pass the projects. This is, you need to achieve a project grade of 4 or higher. If you don’t pass the projects, you are required to de-register from the exam and will otherwise be treated as a no-show. The final grade is computed as a weighted average of the session exam grade (70%) and the project grade (30%). There are no special arrangements for PhD students who are taking this course. In order to obtain a “Testat”, you need a passing grade for the course. This is you need to pass the projects as described above, take the exam and achieve an overall passing grade (4 or higher) for the course. If you passed the projects last year, you still need to do the projects again this year. The project grade cannot be carried over from the previous year.
Text Books
      • S. Russell, P. Norvig. Artificial Intelligence: A Modern Approach (4th edition).
      • C. E. Rasmussen, C. K. I. Williams Gaussian Processes for Machine Learning.
      • Christopher M. Bishop. Pattern Recognition and Machine Learning. [optional]
      • Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction.