- ECTS Credits: 5
Classic approaches in data analysis are use a static procedure for both collecting and processing data. Modern approaches deal with the adaptive procedures which in practice almost always are used.
In this course you will learn how to design systems that adaptively collect and process data in order to make decisions autonomously or in collaboration with humans.
The course applies core principles from machine learning, artificial intelligence and databases to real-world problems in safety, reproducibility, causal reasoning, privacy and fairness.
- Mathematics R1+R2
- Python programming (e.g. IN1900 – Introduction to Programming with Scientific Applications).
- Elementary knowledge of probability and statistics (STK1000/STK1100)
- Elementary calculus and linear algebra (MAT1100 or MAT1110)
There are two types of learning outcomes. Firstly, those that are the core of the course, and secondly methodologies that are used as part of the course.
Core learning outcomes:
- Ensuring reproducibility in both science and AI development.
- Recognising privacy issues and be able to mitigate them using appropriate formalisms.
- Mitigating issues with potential fairness and discrimination when algorithms are applied at scale.
- Performing inference when there are causal elements.
- Developing adaptive experimental design protocols for online and scientific applications.
- Understanding when it is possible to provide performance guarantees for AI algorithms.
AI learning outcomes:
- Understanding how to use data for learning, estimation and testing to create reproducible research.
- Understanding Bayesian inference and decision theory and being able to describe dependencies with graphical models.
- Understanding neural networks and how to apply stochastic optimisation algorithms.
- Understanding and using differential privacy as a formalism.
- Understanding causal inference, interventions and counterfactuals.
- Understanding the recommendation problem in terms of both modelling and decision making.
The course is split in 6 modules, which should be taken in sequence.
Module 1. Reproducibility: bootstrapping, Bayesian inference, decision problems, false discovery, confidence bounds. Module 2. Privacy: Databases, k-anonymity, graphical models, differential privacy Module 3. Fairness: Decision diagrams, conditional independence, meritocracy, discrimination. Module 4. The web: Recommendation systems, clustering, latent variable models. Module 5. Causality: Interventions and counterfactuals. Module 6. Adaptive experiment design: Bandit problems, stochastic optimisation, Markov decision processes, dynamic programming.
There are 2 projects (formally take-home exams), split into 3 parts each. Each one takes 2-4 hours and is partly done in a tutorial session.
Each question is weighted equally in each home exam, so that by correctly answering the elementary parts of each question, students can be guaranteed a passing grade. Each exam counts for 40% of the score. A final exam is also given by the students. This counts for 20% of the final score.
Criteria for full marks in each part of the exam are the following.
- Documenting of the work in a way that enables reproduction.
- Technical correctness of their analysis.
- Demonstrating that they have understood the assumptions underlying their analysis.
- Addressing issues of reproducibility in research.
- Addressing ethical questions where applicable, and if not, clearly explain why they are not.
- Consulting additional resources beyond the source material with proper citations.
The follow marking guidelines are what one would expect from students attaining each grade.
- Submission of a detailed report from which one can definitely reconstruct their work without referring to their code. There should be no ambiguities in the described methodology. Well-documented code where design decisions are explained.
- Extensive analysis and discussion. Technical correctness of their analysis. Nearly error-free implementation.
- The report should detail what models are used and what the assumptions are behind them. The conclusions of the should include appropriate caveats. When the problem includes simple decision making, the optimality metric should be well-defined and justified. Simiarly, when well-defined optimality criteria should given for the experiment design, when necessary. The design should be (to some degree of approximation, depending on problem complexity) optimal according to this criteria.
- Appropriate methods to measure reproducibility. Use of cross-validation or hold-out sets to measure performance. Use of an unbiased methodology for algorithm, model or parameter selection. Appropriate reporting of a confidence level (e.g. using bootstrapping) in their analytical results. Relevant assumptions are mentioned when required.
- When dealing with data relating to humans, privacy and/or fairness should be addressed. A formal definition of privacy and/or should be selected, and the resulting policy should be examined.
- The report contains some independent thinking, or includes additional resources beyond the source material with proper citations. The students go beyond their way to research material and implement methods not discussed in the course.
- Submission of a report from which one can plausibly reconstruct their work without referring to their code. There should be no major ambiguities in the described methodology.
- Technical correctness of their analysis, with a good discussion. Possibly minor errors in the implementation.
- The report should detail what models are used, as well as the optimality criteria, including for the experiment design. The conclusions of the report must contain appropriate caveats.
- Use of cross-validation or hold-out sets to measure performance. Use of an unbiased methodology for algorithm, model or parameter selection.
- When dealing with data relating to humans, privacy and/or fairness should be addressed. While an analysis of this issue may not be performed, there is a substantial discussion of the issue that clearly shows understanding by the student.
- The report contains some independent thinking, or the students mention other methods beyond the source material, with proper citations, but do not further investigate them.
- Submission of a report from which one can partially reconstruct most of their work without referring to their code. There might be some ambiguities in parts of the described methodology.
- Technical correctness of their analysis, with an adequate discussion. Some errors in a part of the implementation.
- The report should detail what models are used, as well as the optimality criteria and the choice of experiment design. Analysis caveats are not included.
- Either use of cross-validation or hold-out sets to measure performance, or use of an unbiased methodology for algorithm, model or parameter selection - but in a possibly inconsistent manner.
- When dealing with data relating to humans, privacy and/or fairness are addressed superficially.
- There is little mention of methods beyond the source material or independent thinking.
- Submission of a report from which one can partially reconstruct most of their work without referring to their code. There might be serious ambiguities in parts of the described methodology.
- Technical correctness of their analysis with limited discussion. Possibly major errors in a part of the implementation.
- The report should detail what models are used, as well as the optimality criteria. Analysis caveats are not included.
- Either use of cross-validation or hold-out sets to measure performance, or use of an unbiased methodology for algorithm, model or parameter selection - but in a possibly inconsistent manner.
- When dealing with data relating to humans, privacy and/or fairness are addressed superficially or not at all.
- There is little mention of methods beyond the source material or independent thinking.
- Submission of a report from which one can obtain a high-level idea of their work without referring to their code. There might be serious ambiguities in all of the described methodology.
- Technical correctness of their analysis with very little discussion. Possibly major errors in only a part of the implementation.
- The report might mention what models are used or the optimality criteria, but not in sufficient detail and caveats are not mentioned.
- Use of cross-validation or hold-out sets to simultaneously measure performance and optimise hyperparameters, but possibly in a way that introduces some bias.
- When dealing with data relating to humans, privacy and/or fairness are addressed superficially or not at all.
- There is no mention of methods beyond the source material or independent thinking.
- The report does not adequately explain their work.
- There is very little discussion and major parts of the analysis are technically incorrect, or there are errors in the implementation.
- The models used might be mentioned, but not any other details.
- There is no effort to ensure reproducibility or robustness.
- When applicable: Privacy and fairness are not mentioned.
- There is no mention of methods beyond the source material or independent thinking.
Algorithms from Artificial Intelligence are becoming ever more complicated and are used in manifold ways in today’s society: from prosaic applications like web advertising to scientific research. Their indiscriminate use creates many externalities that can be, however, precisely quantified and mitigated against.
The purpose of this course is to familiarise students with societal and scientific effects due to the use of artificial intelligence at scale. It will equip students with all the requisite knowledge to apply state-of-the-art machine learning tools to a problem, while recognising potential pit-falls. The focus of the course is not on explaining a large set of models. It uses three basic types of models for illustration: k nearest-neighbour, neural networks and probabilistic graphical models, with an emphasis on the latter for interpretability and the first for lab work. It is instead on the issues of reproducibility, data colletion and experiment design, privacy, fairness and safety when applying machine learning algorithms. For that reason, we will cover technical topics not typically covered in an AI course: false discovery rates, differential privacy, fairness, causality and risk. Some familiarity with machine learning concepts and artificial intelligence is expected, but not necessary.
- Programming differential privacy - A book about DP, for programmers. Near and Abuah, 2021.
- IBM’s DP library - Very much like sklearn
- Tensorflow privacy - Tensorflow with DP!
- opendp.org - more resources and low-level code
| 20 Sep | L1. Reproducibility, kNN |
| 27 Sep | L1. Python, scikitlearn, classification, holdouts, overfitting |
| 4 Oct | L2. Scikitlearn: Bootstrapping, XV, project introduction |
|---|---|
| 11 Oct | L2. Classification, Decision Problems |
| 18 Oct | L3. Decisions, inference, optimisation. |
| 25 Oct | |
| 9 Sep | L4. Bayesian inference tutorial |
| 10 Sep | A4. Project Lab |
| 16 Sep | L5. Databases, anonymity, privacy |
| 17 Sep | A5. DB tutorial/distributed computing |
| 23 Sep | L6. Differential privacy |
| 24 Sep | A6. Project DP tutorial: Laplace mechanism |
| 25 Sep | Project 1 Deadline 1 |
| 30 Sep | L7. Fairness and graphical models |
| 1 Oct | A7. Production ML: SageMaker/Pipelines |
| 7 Oct | L8. Estimating conditional independence |
| 8 Oct | A8. Project: fairness |
| 9 Oct | Project 1 Deadline 2 |
| 14 Oct | L9. Recommendation systems [can be skipped?] |
| 15 Oct | A9. Restful APIs |
| 21 Oct | L10. Latent variables and importance sampling |
| 22 Oct | A10. An example latent variable model? |
| 23 Oct | Project 1 Final Deadline |
| 28 Oct | L11. Causality |
| 29 Oct | A11. Causality lab |
| 4 Nov | L12. Interventions and Counterfactuals |
| 5 Nov | A12. Interventions lab |
| 6 Nov | Project 2 Deadline 1 |
| 11 Nov | L13. Bandit problems |
| 12 Nov | A13. Bandit optimisationm lab |
| 18 Nov | L14. Experiment design |
| 19 Nov | A14. Experiment design lab |
| 20 Nov | Project 2 Deadline 2 |
| 23 Nov | Exam |
| 6 Dec | Project 2 Final Deadline |
| Date | Lecture | Exercise | Extra Reading |
|---|---|---|---|
| 22.9 | Algorithms | k-anonymity | Netflix paper |
| Privacy | |||
| Fairness | |||
| Reproducibility | |||
| 29.09 | Differential privacy | Randomized response | Randomized-Response |
| Randomized response | |||
| Neighbourhoods | |||
| 6.10 | Laplace Mechanism | Project Proposal | Staircase mechanism |
| Exponential Mechanism | |||
| 13.10 | Exponential Mechanism | Renyi DP | |
| Approximate DP | |||
| Gaussian Mechanism | |||
| 20.10 | Privacy Amplification | Shuffle privacy | |
| Federated learning | |||
| 03.11 | Group fairness | Kleinberg paper | |
| Equalised odds | |||
| 10.11 | Balance | Project Report | |
| Calibration | |||
| 17.11 | Meritocracy | top-k | |
| 24.11 | Smoothness | Fairness through Awareness | |
| 01.12 | Reproducibility | 5. Repro | GWA |
| Train/Test | |||
| 08.12 | Application | ||
| 15.12 | Project presentations | ||
| 22.12 |
| Date | Lecture | Exercise | Paper |
|---|---|---|---|
| 27.9 | Algorithms | Math Test | The randomised response mechanism |
| Privacy | |||
| Fairness | |||
| Reproducibility | |||
| 04.10 | Privacy and anonymity | Netflix paper | |
| k-anonymity | k-anonymity | ||
| 11.10 | Differential Privacy | Project1 | Staircase mechanism |
| Randomised response | |||
| Laplace Mechanism | |||
| 18.10 | Approximate DP | Renyi DP | |
| Gaussian Mechanism | |||
| 25.10 | Exponential mechanism | Shuffle privacy | |
| Privacy amplification | Federated learning | ||
| 01.11 | Group fairness | Kleinberg paper | |
| Equalised odds | |||
| 08.11 | Balance | Project2 | |
| Calibration | |||
| 15.11 | Meritocracy | top-k | |
| 22.11 | Smoothness | Fairness through Awareness | |
| 29.11 | Reproducibility | 5. Repro | GWA |
| Train/Test | |||
| 06.12 | GWAS | ||
| 13.12 | Project presentations | ProjectP | |
| 20.12 | Project3 |
- Randomised Response: A Survey Technique for Eliminating Evasive Answer Bias, Warner, 1965.
- Broken Promises of Privacy: Responding to the Surprising Failure of Anonymization, Ohm, 2009.
- Robust De-anonymization of Large Sparse Datasets. Narayanan and Shmatikov.
- Calibrating noise to sensitivity in private data analysis. Dwork et al. 2006. (Approximate DP: See also https://github.com/frankmcsherry/blog/blob/master/posts/2017-02-08.md )
- Our Data, Ourselves: Privacy Via Distributed Noise Generation, Dwork et al. 2006.
- The staircase mechanism in differential privacy. Geng et al. 2015.
- Renyi Differential Privacy, Mironov, 2017.
- Distributed Differential Privacy via Shuffling. Cheu et al, 2019.
- Federated Naive Bayes under Differential Privacy. Marchioro et al.
- Big Data’s Disparate Impact. Barocas and Selbst, 2016.
- Fair prediction with disparate impact: A study of bias in recidivism prediction instruments, Chouldechova, 2017.
- Inherent Trade-Offs in the Fair Determination of Risk Scores, Kleinberg et al. 2016.
- Meritocratic Fairness for Cross-Population Selection, Kearns et al. 2017.
- Fairness through awareness, Dwork et al. 2011.
- Resolving Individuals Contributing Trace Amounts of DNA to Highly Complex Mixtures Using High-Density SNP Genotyping Microarrays, Homer et al. 2008.
- Needles in the Haystack: Identifying Individuals Present in Pooled Genomic Data, Braun et al. 2009.
- Privacy Preserving GWAS Data Sharing. Uhlerop et al. 2013.
- A New Analysis of Differential Privacy’s Generalization Guarantees, Jung et al. 2019.
| Theory | Practice | ||
|---|---|---|---|
| 24.8 | Decision problems | 25.8 | Expected utility |
| Probability and Utility | Conditional probability | ||
| Decision problems in ML | |||
| 27.8 | Assignment 1 | DEADLINE | |
| 31.8 | Infinite Decision Spaces | 1.9 | Experiment pipeline |
| Stochastic Gradient | Basic experiment design | ||
| Tensor Flow Keras | |||
| 7.9 | Conditional Probability | 8.9 | n-Meteorologists |
| Conjugate priors | Beta/Bernoulli | ||
| 10.9 | Assignment 2 | DEADLINE | |
| 14.9 | Bayes-optimal decisions | 15.9 | Beta/Bernoulli for hypothesis testing |
| Hypothesis testing | Hierarchical models | ||
| [Project introduction] | |||
| 21.9 | Non-Conjugate Priors | TFP Graphical Models | |
| 28.9 | Privacy and anonymity | 29.9 | SQL, DB tutorial |
| 30.9 | Project 1 | PRELIMINARY REPORT | |
| 5.09 | Lab: Randomised Response | 6.09 | Laplace and Exponential Mechanisms |
| 12.10 | Lab: Exponential vs Laplace Mechanism. | 13.10 | Fairness |
| OpenDP (optionally) | |||
| (Dirk) | Conditional Independence | ||
| 19.10 | Fairness | 20.10 | Balance |
| Calibration | |||
| Meritocracy | |||
| 22.10 | Project 1 | DEADLINE | |
| 26.10 | Fairness | 27.10 | Latent Variable Models |
| Recommender Systems | |||
| 2.11 | Latent Variable Models | 3.11 | Lab: Latent Variables with TFP |
| Recommender Systems | |||
| Group work | |||
| 5.11 | Project 2 | Deadline #1 | |
| 9.11 | Causality | 10.11 | Group work |
| Interventions | |||
| Counterfactuals | |||
| 16.11 | Markov Decision Processes | 17.11 | Lab: Project work |
| 18.10 | Project 2 | Deadline #2 | |
| 23.11 | Group work | 24.11 | Group work |
| 3.12 | Project 2 | Final Deadline |
Reading: Chapter 1
Here the students get familiar with the concept of expected utility. They perform simple exercises in python. We define utility in terms of the classification accuracy for individual decisions and in terms of the generalisation performance in terms of choosing a specific classifier model.
src/decision-problems/expected-utility.py
Reading: Sec. 2.4.1, 2.2, 2.1, 2.6
This includes how data will be collected and processed, focusing on automation of the process. I will encourage students to develop an automated pipeline mainly through simulation, where all the variables can be perfectly controlled.
- Optimal decisions in continuous cases: stochastic gradient descent and Bayesian quadrature.
Reading; Sec 2.3
Introduction to BI through the meteorolgical prediction problem. Dicsussion of simple conjugate priors (Beta, Normal).
Day 1, Part 1
- Graphical model recap (5’)
- Conditional probability (5’)
- Bayes Theorem (5’)
- Marginal distributions (5’)
- The n-meteorologists problem (25’)
Day 1, Part 2
- Suffficient Statistics / Conjugate priors (15’)
- The Beta-Bernoulli conjugate pair (15’)
- The Normal-Normal conjugate pair (15’)
Day 2, Part 1
- Estimating which classifier is best (45’)
– Beta-Bernoulli (15’) – Bootstrapping (15’)
- Assignment 2 discussion (45’)
Reading: Sec. 2.4-2.6, 4.1.3
- Bayesian decisions for models.
- Hypothesis testing: Hierarchical Bayesian models
- Contrast credible intervals with bootstrapping.
Reading: None
Here we will focus on logistic regression as an example, the module will be mainly practical and focus on TF probability.
See https://arxiv.org/pdf/2001.11819.pdf
Reading: Chapter 3.
Introduction to databases, SQL and k-anonymity, consent, and the GDPR. Various mechanisms for DP. Pointers to the opendp.org framework for differential privacy. Comparison of various mechanisms in an ML task.
Reading: Chapter 4.
Introduction to fairness and condtional independence. Fairness as parity, balance, calibration, meritocracy or smoothness. Measuring conditional independence. Balancing performance with fairness constraints through constrained or penalised optimisation, or Bayesian methods.
Reading: Chapter 5.
Examples: (a) Gaussian mixture model (b) epsilon-contamination model and outliers (c) preferences and attributes in recommendation systems
Practical work with Tensorflow probability, including outlier detection etc.
Reading: Chapter 6.
Confounders, Instrumental variables, Interventions, Counterfactuals. Hands-on: Importance sampling for estimating the impact of decisions. Lab: tfcausalimpact
Reading: Chapter 7.
Here we discuss experiment design in the adaptive setting, where our future experiments depend on data we have not seen yet. Two interesting cases are bandits (e.g. for recommendation systems) and active learning (e.g. for classification).
| 19 Aug | L1. Reproducibility, kNN | Christos |
| 20 Aug | A1. Python, scikitlearn, classification, holdouts, overfitting | Dirk |
| 26 Aug | A2. Bootstrapping, XV, project #1 introduction | Dirk |
| 27 Aug | L2. Classification, Decision Problems | Christos |
|---|---|---|
| 2 Aug | L3. Decisions, inference, optimisation. | Christos |
| 3 Sep | A3. Compare kNN/MLP, discover interesting features | Dirk |
| 9 Sep | L4. Bayesian inference tutorial | Christos |
| 10 Sep | A4. Project Lab | Dirk |
| 16 Sep | L5. Databases, anonymity, privacy | Christos |
| 17 Sep | A5. DB tutorial/distributed computing | Dirk |
| 23 Sep | L6. Differential privacy | Christos |
| 24 Sep | A6. Project DP tutorial: Laplace mechanism | Dirk |
| 25 Sep | Project 1 Deadline 1 | |
| 30 Sep | L7. Fairness and graphical models | Christos |
| 1 Oct | A7. Production ML: SageMaker/Pipelines | Dirk |
| 7 Oct | L8. Estimating conditional independence | Christos |
| 8 Oct | A8. Project: fairness | Dirk |
| 9 Oct | Project 1 Deadline 2 | |
| 14 Oct | L9. Recommendation systems [can be skipped?] | Christos |
| 15 Oct | A9. Restful APIs | Dirk |
| 21 Oct | L10. Latent variables and importance sampling | Christos |
| 22 Oct | A10. An example latent variable model? | Dirk |
| 23 Oct | Project 1 Final Deadline | |
| 28 Oct | L11. Causality | Christos |
| 29 Oct | A11. Causality lab | Dirk |
| 4 Nov | L12. Interventions and Counterfactuals | Christos |
| 5 Nov | A12. Interventions lab | Dirk |
| 6 Nov | Project 2 Deadline 1 | |
| 11 Nov | L13. Bandit problems | Christos |
| 12 Nov | A13. Bandit optimisationm lab | Dirk |
| 18 Nov | L14. Experiment design | Christos |
| 19 Nov | A14. Experiment design lab | Dirk |
| 20 Nov | Project 2 Deadline 2 | |
| 23 Nov | Exam | |
| 6 Dec | Project 2 Final Deadline |
| 21 Aug | L1. Reproducibility, kNN | Christos |
| 22 Aug | L2. Classification, Decision Problems, Project Overview | Christos |
| 29 Aug | A1. Python, scikitlearn, classification, holdouts, overfitting | Dirk |
| 29 Aug | A2. Bootstrapping, XV, project #1 introduction | Dirk |
| 30 Aug | Mini-assigment | |
|---|---|---|
| 4 Sep | L3. Bayesian inference, Networks, SGD | Christos |
| 5 Sep | L4. Bayesian inference tutorial; neural networks | Christos |
| 12 Sep | A3. Compare kNN/MLP, discover interesting features | Dirk |
| 12 Sep | A4. Project Lab | Dirk |
| 18 Sep | Project 1 1st Deadline | |
| 18 Sep | L5. Databases, anonymity, privacy | Christos |
| 19 Sep | L6. Differential privacy | Christos |
| 26 Sep | A5. DB tutorial/distributed computing | Dirk |
| 26 Sep | A6. Project DP tutorial: Laplace mechanism | Dirk |
| 2 Oct | Project 1 2nd Deadline | |
| 2 Oct | L7. Fairness and graphical models | Christos |
| 3 Oct | L8. Estimating conditional independence | Christos |
| 10 Oct | A7. Production ML: SageMaker/Pipelines | Dirk |
| 10 Oct | A8. Project: fairness | Dirk |
| 16 Oct | Project 1 Final Deadline | |
| 16 Oct | L9. Recommendation systems [can be skipped?] | Christos |
| 17 Oct | L10. Latent variables and importance sampling | Christos |
| 24 Oct | A9. Restful APIs | Dirk |
| 24 Oct | A10. An example latent variable model? | Dirk |
| 30 Oct | L11. Causality | Christos |
| 31 Oct | L12. Interventions and Counterfactuals | Christos |
| 7 Nov | A11. Causality lab | Dirk |
| 7 Oct | A12. Causality lab | Dirk |
| 13 Nov | L13. Bandit problems | Christos |
| 14 Nov | L14. Experiment design | Christos |
| 20 Nov | A13. Experiment design lab | Dirk |
| 21 Nov | A14. Experiment design lab | Dirk |
| 2 Dec | Exam: 9AM Lessart Lesesal A Eilert Sundts hus, A-blokka | |
| 11 Dec | Project 2 Deadline |
- kNN, Reproducibility
- Bayesian Inference, Decision Problems, Hypothesis Testing
- Neural Networks, Stochastic Gradient Descent
- Databases, k-anonymity, differential privacy
- Fairness, Graphical models
- Recommendation systems, latent variables, importance sampling
- Causality, intereventions, counterfactuals
- Bandit problems and experiment design
- Markov decision processes
- Reinforcement learning