Foundations of artificial intelligence
ME-390
Media
Course information
Course format
In-person lectures, in-person exercise hours.
Assessment
2 in-person quizzes, during exercise hour 10% each, one programming assignment 10%, one end of semester written final exam (70%). The quiz and assignment grades are counted if they help your final grade. So, your final grade is calculated as follows:
final grade = max(70% final + 10% q1 + 10% q2 + 10% a1, 80% final + 10% q1 + 10% q2, ..., 100% final)
Above, q1,q2, refer to quizzes 1, 2, and and a1 refers to assignment 1. It follows that your final grade is the maximum among 8 possible combination of quiz grades, assignment grade and the final exam grade.
Quizzes are on 15.10, 26.11 during the exercise hour. They are 20 minutes and no aid is allowed (no books/notes, no electronics). The assignment should be handed in by 17.12.
The final exam is closed-book. You are allowed one printed cheatsheet, where you can use a double-sided page to write any material from the course.
Teaching assistants
- Anna Maddux (anna.maddux@epfl.ch)
- Tingting Ni (tingting.ni@epfl.ch)
- Philip Jordan (philip.jordan@epfl.ch)
- Kai Ren (kai.ren@epfl.ch)
- Giulio Salizzoni (giulio.salizzoni@epfl.ch)
- Gabriel Vallat (gabriel.vallat@epfl.ch)
- Saurabh Dilip Vaishampayan (saurabh.vaishampayan@epfl.ch)
Recommended but not required references
There are many resources online on artificial intelligence and machine learning. While these sources might provide a good intuition, not all have the same depth and rigour. I recommend the following.
1. Book: on machine learning with engineering applications: Machine Learning for Engineers, Using Data to Solve Problems for Physical Systems by Ryan G. McClarren. We refer to it as ML4Engineers in the course
6. Online course: The machine learning course at Stanford, referred here as MLStanford: EE 104, Stanford
The lecture notes are inspired by the EPFL Course, CIVIL-226 created by the Vita lab.
Summary: We introduced the course and the administrative matters of the course. We introduced artificial intelligence (AI) and the machine learning (ML) approach to AI. We defined supervised learning and unsupervised learning, and introduced linear regression as a supervised learning approach.
Exercise hour: For python exercises, we will go through 00, 01 and 02 from Preparation-exercises. For course notes, you can ask questions about the "Background and notations" file.
Optional: For a thorough introduction to learning you can read Sections 1.1-1.3 of the UnderstandingML book.
- Background and notations - Solution (File)
- Lecture slides (File)
- Lecture 01 video (URL)
- Python exercise (URL)
- Background and notations (File)
Summary: We defined the loss function for linear regression and reviewed concepts from unconstrained optimization: convexity, gradient and Hessian of a scalar-valued function, positive semi-definiteness of a matrix, and gradient-descent algorithm. We also discussed overfitting/underfitting and went over the rational for regularized loss function to address overfitting. Lastly, we discussed train, validate, test sets in machine learning for training and setting the hyper-parameters of the mode.
Review of gradient and Hessian: for deriving gradient and Hessian of affine and quadratic functions, please see the here.
Python: For looking up some python commands and comparison of the commands with matlab, you may use the following cheat sheet.
We presented logistic regression for classification, and discussed the logistic loss function both in binary classification and multinomial classification. We provided interpretation in terms of the cross-entropy. Lastly, we discussed the performance metrics in terms of the confusion matrix.
Additional resources: Sections 2.3 and 2.4 up to 2.4.2 of the ML4Engineers book and pages 45,46 (norms) and 48, 49, 50 of the LinAlgebra book.
Additional resources: Chapter 5, Sections 5.1, 5.2 from ML4Engineers book, Chapter 20, Sections 20.1, 20.2, 20.3 from Understanding Machine Learning book.
- Lecture 04 slides (File)
- Lecture 04 video (URL)
- Problem set 2 (File)
- Problem set 2 - Solutions (File)
Additional reading: Chapters 5, and 6 ofML4Engineers book. For transfer learning, see the case study in 6.5 of ML4Engineers book
Note: there was a problem with projection and lecture recording in the first hour, so hour 1 has only 12 minutes of lecture recording.
Typo: on sldie 22, the first index of x should be i-1.
- Python exercise 5 (URL)
- Lecture 05 slides (File)
- Lecture 05 - minutes 0-12 (URL)
- Lecture 05 - hour 2 (URL)
We had an interactive hour on Conditions for AI to benefit humanity. To moderate this hour, we had a guest lecturer Professor Sascha Nick. In the second hour, we introduced discrete-time dynamical systems as a background for our lecture on reinforcement learning.
Additional resources: Utop'IA graphic novel for our discussion on conditions for AI to benefit humanity.
- Link for discussion (URL)
- Discussion inputs from groups (URL)
- Lecture 06 slides (File)
- Lecture 06 video (URL)
- Problem set 3 (File)
- Problem set 3 solutions (File)
- Assignment instructions (File)
We completed our discussion on policy gradient in reinforcement learning, and went through a small example where you could compute the gradients by hand. We introduced recurrent neural networks for time-series prediction, and discuss their training. We saw an example of their application in auto-complete.
Additional resources: Chapter 7 up to Section 7.2 of ML4Engineers book on recurrent neural networks.
We presented Naive Bayes probabilistic classification approach.
- Lecture 09 slides (File)
- Lecture 09 recording (URL)
- Problem set 5 (File)
- Problem set 5 solutions (File)
We reviewed reinforcement learning (estimating policy gradient from trajectory samples) and recurrent neural networks for time-series prediction.
Next, we discussed k-nearest neighbor approach for classification and regression.
Note: this week during the exercise hour you will have a quiz (optional - see grading on the front page of Moodle). You will do the k-nearest neighbor python exercise next week during the exercise hour.
We started the topic of unsupervised learning. We discussed dimensionality reduction, and the principal component analysis approach to learning a lower dimensional subspace on which the data approximately lies. We discussed its application to text processing. Furthermore, we discussed autoencoders as a nonlinear approach to dimensionality reduction.
Exercises this week: python codes on kNN and PCA.
We continued our discussion on dimensionality reduction and presented an overview of autoencoders as an approach to reduce dimension to a possibility nonlinear subspace of the original data space. We then presented the topic of clustering and discussed the K-means approach to clustering. We ended by giving an overview of kernelized k-means in case the decision boundaries between clusters is nonlinear.