Probabilistic Graphical Models

Innehåll visas utifrån dina val

Om du inte hittar någon sida, schemahändelse eller nyhet på din kurswebb kan det bero på att du inte ser den kursomgången/gruppen inom kursen som innehållet tillhör.

Veta mer om din kurswebb

Din kurswebb är sidorna för en kurs du prenumererar på. Du väljer sedan vilka omgångar/grupper inom kursen du vill ha information från. Är du registrerad på en kursomgång sköts prenumeration och val av kursomgäng automatiskt åt dig. Vill du ändra något av detta gör du det under Mina inställningar.

När du är inloggad på din kurswebb ser du:
  • Kursöversikt, nyheter och schema med information som är filtrerat utifrån dina valda omgångar/grupper inom kursen
  • Allmänna sidor för hela kursen
  • Kurswikin som är sidor som alla, lärare och studenter, kan skapa och redigera
  • Sidor som hör till de omgångar/grupper inom kursen du valt eller som valts för dig

Log in to your course web

You are not logged in KTH, so we cannot customize the content.

Probabilistic Graphical Models

Probabilistic Graphical models are a foundation for understanding many methods of estimation, artificial intelligence, and machine learning.  This is an advanced course with a flexible set of self-learning activities that allow students to chose and between topics to explore.    The grade is based on which learning activities the student chooses.  The activities range from ones that cover the basic learning goals to very advanced topics.  Those advance, higher grade, parts will require most students to search out and learn on their own to be able to complete the tasks.  The most advanced topics are learned by reading actual research articles that may be challenging to understand.  

Bayesian models are at the heart of most estimation methods.  Formulation of the these models is the first step in developing an estimation methodology.  The estimation itself is in many cases just inference on the model given some evidence.   Approximate inference techniques such as those covered in this course are important in solving many very hard estimation problems in science and engineering. 

Machine learning provides algorithms for solving problems by using training data.  This course will give insight into how to formulate problems so that machine learning can be used effectively.   While end-to-end learning using generic machine learning methods is a successful approach, data is often limited.  Building good models can help learn with less data by constraining the learning space.  Variational approaches to learning are being used in combination with neural nets to develop new methodologies for solving harder problems.  We will cover variational method at length.

In AI, decisions are made by computers.  To do that, programs must perform inference of estimated probabilities given some evidence.  That inference can be difficult or even intractable.   The methods learned in this course will allow the student to formulate the AI problem and do both exact and approximate inference.  

Course Content

We will go through the main concepts of graphical models, inference and how to learn the parameters of the models:

  • Graph Representations:  Discriminative vs Generative Models, Bayes Nets (DAG), Undirected Models (MRF/Factor Graphs), Exponential Family (features), D-Separation, Markov Blanket, 
  • Exact Inference: Message Passing, Variable Elimination, Factor Graphs from DAGs, Sum Product Algorithm, Clique Graphs/Trees,  Inference with evidence, Junction Tree Algorithm,
  • Approximate Inference: Loopy Belief Propagation, Monte Carlo Principle, Direct Sampling,  Importance Sampling, Evidence, Rejection Sampling,  MCMC, Gibbs Sampling, Collapsed Importance Sampling, Variational methods (Projections),  MAP inference.   
  • Learning: Parameter Estimation, Max Likelihood Estimation, Sufficient Statistics, Bayesian Parameter Estimation, Conjugate Prior, Gaussian/Beta/Dirichlet Distributions, Partially Observed Data,  Gradient Ascent, Expectation Maximization, Gaussian Mixture Learning

There is significant overlap with course DD2447 (Statistical Methods) and one should not take both these courses.   

Course Setup

We will have lectures covering the topics above. There will be a number of tutorial exercises, some  of which cover basic knowledge and are mandatory  for a passing grade.  Then motivated students can earn higher grades by choosing from a set of progressively more difficult tutorials.  Some self learning is needed for those. There is also a P/F written exam on the basic concepts.     

The tutorials were originally developed by and for PhD students and cover topics ranging from basic concepts  (such as message passing on directed and undirected graphs and conditional random fields) to current research articles that use PGM  (such as , graph SLAM, Variational Inference, latent Dirichlet allocation for clustering text documents or combining variational inference and sequential MC methods,...)   This is an on-going process where new tutorials are added each year. 

Some Python and Matlab will be needed.  If you are a programmer in another language the level is low here so you can learn what you need.   If you never programmed do not take this course.  

You will not have to write lots of code to pass but you will be expected to be able to read through source code and understand how it works and write simple bits.  You can pass with moderate programming knowledge but to get through the more difficult tutorials in reasonable time you will need to be good at figuring out the gist of someone else's code, write small bits, and be able to understand published articles.   There is also a rather strict pace that must be maintained to be able to examine the tutorials for  higher grades.  Examinations can not be left to the end as it is one per week max.   


The  student should have the equivalent to SF1604 Linear Algerbra, SF1626 Multivariable Calculus and  SF1901 Probability and Statistics.   As probability theory is fundamental to all the topics of the course some students find they need to improve their knowledge at the start, 

Some experience programming in matlab and python is recommended. 

Some Machine Learning or AI background will be helpful.  It is not strictly necessary but most of the material is targeted to machine learning applications so not having seen these before may be a source of confusion and may make it hard to achieve a high grade.

This course cannot be counted in the degree if the student has taken DD2447.  


Feedback News