Courses and Tutorials
Within ELSA, we aim to create sustainable content to share our research results and knowledge with the community. Our members are giving lectures, seminars, and tutorials. In a world where more and more AI systems are being deployed, we raise awareness about the importance of both foundational research and the development if secure and safe systems.
Below, you can find a collection of courses and tutorials by the ELSA network.
Introductory Materials
“Foundation of LLM Security”
Content
- Word Vectors
- Recurrent Neural Networks
- Sequence to Sequence Models and Machine Translation
- Transformers
- Pretraining
- Post-training (RLHF, SFT)
- Efficient Adaptation (few shot, prompt learning, etc.)
- Security and Privacy
- Prompt Injection Attacks
- Poisoning Attacks
- Extracting Training Data from Large Language Models
- Quantifying Memorization Across Neural Language Models
- Code Generation
- Multimodal Language Models
Links: coming soon
PhD course
“Foundations of LLMs, Applications, and Security Risks “
Content
This module delves into Generative AI, particularly emphasizing large language
models (LLMs) and their various applications. Foundational concepts are
explained to build a solid technical understanding. The module covers efficient
LLM adaptation techniques that make LLMs more accurate and effective for
specific tasks. Considering their high impact on user safety, the module highlights
LLMs’ vulnerabilities to adversarial attacks (e.g., adversarial examples and prompt
injection attacks) and methods for extracting training data from LLMs. Finally, it
covers practical aspects of developing LLMs and testing their robustness.
Link: slides
Material by Antonio Emanuele Cinà (UNIGE)
“Introduction to ML”
Content
- Inference: induction, deduction, and abduction
- Statistical inference
- Machine Learning
- Deep Learning
- Model selection and error estimation
- Implementation and Applications
Link: overview
PhD course by Luca Oneto (UNIGE)
“Introduction to ML Security”
Content
This module provides an introduction to machine learning security. After a brief summarization of the advantages of machine learning, it explains that these algorithms can be fooled, providing compelling examples. Then, it describes the desired properties of trustworthy AI systems.
Module by Battista Biggio (UNICA)
“Trustworthy AI”
Content
- Introduction to Artificial Intelligence (AI) and Machine Learning (ML)
- Trustworthy AI and ML
- Reliable ML
- Fair ML
- Private ML
- Interpretable/Explainable ML
Link: overview
PhD course by Luca Oneto (UNIGE)
Technical Robustness and Safety
Certified Robustness and Verifiable Machine Learning
Content
This module will provide an overview of formal verification for neural networks, which can be used to certify that the networks are robust to adversarial perturbations. Local robustness verification focuses on deciding the presence or absence of adversarial examples within a perturbation neighborhood of an input. An alternative approach for neural network analysis is to construct the preimage abstraction of its predictions. Given a set of outputs, the preimage is defined as the set of all inputs mapped by the neural network to that output set. By characterizing the preimage symbolically in an abstract representation, e.g., polyhedra, one can perform more complex analysis for a wider class of properties beyond local robustness, such as computing the proportion of inputs satisfying a property. Finally, a probabilistic variant of neural networks, called Bayesian neural networks, will be introduced. Bayesian neural networks return a probability distribution on outputs, so their verification draws on bound propagation and involves bounding the posterior probability.
Link: slides
Module by Marta Kwiatkowska (UOXF)
Data Poisoning Attacks
Content
This module focuses on poisoning attacks, which alter a small percentage of the training dataset to cause subsequent misclassifications at test time. It covers the different typologies of poisoning attacks: (i) indiscriminate poisoning attacks,
whose goal is to make the system unusable by legitimate users, for example,
enforcing the system to make a high number of errors; (ii) targeted poisoning attacks, whose goal is to have specific test samples classified as the attacker
desired, without decreasing the model accuracy on the remaining samples to avoid detection; (iii) backdoor poisoning, whose goal is to have only some test samples containing a peculiar pattern misclassified as the desired class. It also presents the state-of-the-art defenses developed against them.
As poisoning can be formulated as a bi-level optimization problem, we also
provided a lecture about bi-level optimization that can help deepen its comprehension.
Links
“Poisoning ML attack and defenses”: Slides, video, code
“Principled and Efficient Bilevel Optimization for Machine Learning”: Slides
Module by Battista Biggio (UNICA), Massimiliano Pontil (IIT), Riccardo Grazzi, (IIT)
“Evasion Attacks (aka. Adversarial Examples)”
Content
This module focuses on evasion attacks, which slightly perturb test data to have them misclassified. It explains how evasion attacks can be computed against binary and multiclass classifiers and when the attacker has a different knowledge of the target systems. Considering the most popular evasion attack algorithms, it illustrates the differences between the different types of attack, including sparse and dense and minimum- and max-confidence. Then, it describes the most frequent problems encountered in conducting a security evaluation of a machine learning model and explains how to make it more reliable. Finally, it describes the techniques that can be employed to improve the security of machine learning systems against evasion attacks.
Module by Battista Biggio (UNICA)
Security of Large Language Models
Content
This module delves into Generative AI, particularly emphasizing large language models (LLMs) and their various applications. Foundational concepts are explained to build a solid technical understanding. The module covers efficient LLM adaptation techniques that make LLMs more accurate and effective for specific tasks. Considering their high impact on user safety, the module highlights LLMs’ vulnerabilities to adversarial attacks (e.g., adversarial examples and prompt injection attacks) and methods for extracting training data from LLMs. Finally, it covers practical aspects of developing LLMs and testing their robustness.
Link: “Foundations of LLMs, Applications, and Security Risks”: slides
Module by Antonio Emanuele Cinà (UNIGE)
Threat Modeling for Machine Learning
Content
This module focuses on the root causes behind the potential vulnerabilities of machine learning algorithms and the methodology that should be followed to defend them. It explains that the first step to creating a robust system is to characterize the adversaries it can face by their goals, knowledge, and capabilities. Then, the defender should anticipate the adversary by assessing the system’s performance against the attacks it can face in the worst-case scenarios and protect it from them. Moreover, it presents an overview of the different attacks that can threaten machine learning algorithms.
Link: slides
Module by Battista Biggio (UNICA)
Uncertainty Quantification and Out-of-Distribution Detection
Content
This module is composed of two main sections: uncertainty quantification, classifier confidence calibration and out-of-distribution detection. First, we provide a primer on the different types of uncertainty and what they can reveal about the potential problems at hand. We will then focus on the appealing properties of Deep Ensembles and describe different recent strategies to improve the efficiency of ensembles in terms of training cost, run-time cost, number of forward passes. We will also delve into a key tool for model-based decision making: geometric probabilistic models, i.e., probabilistic models on non-Euclidean domains such as graphs or manifolds. In the following we cover the problem of confidence calibration (how well a model’s prediction confidence matches its correctness). After introducing calibration, we present two main lines of approaches for improving calibration: post-hoc calibration methods and approaches that inject calibration-aware priors in a model during training. In the final section on out-of-distribution detection we cover in-depth three aspects of this field: (i) technical challenges, (ii) methodology overview, and (iii) real-world applications.
Links
Uncertainty estimation and next generation ensembles: slides, video
Geometric Probabilistic Models: slides, code
Calibration of Deep Neural Networks: slides
Out-of-distribution detection: slides, video
Open World: Generalize and Recognize Novelty: slides
Module by Andrei Bursuc (Valeo), Viacheslav Borovitskiy (ETH Zurich) Alexander Terenin (Cornell University, not funded by ELSA), Puneet Dokhania (Five AI, University of Oxford),Sharon Yixuan Li (University of Wisconsin-Madison), Tatiana Tommasi (Politecnico di Torino)
Privacy and Infrastructures
Private Machine Learning
Content
This module focuses on the principles and techniques of maintaining privacy in machine learning. It introduces key concepts such as differential privacy, federated learning, and homomorphic encryption. Students will explore methods for training models on sensitive data without compromising individual privacy, including the use of secure multi-party computation and privacy-preserving data mining. Practical applications and case studies demonstrate how these techniques are implemented in real-world scenarios. The module emphasizes the balance between model performance and privacy, and discusses regulatory frameworks and ethical considerations.
Links
Introduction to Privacy Preserving Machine Learning: slides, video, code
Privacy Preserving Machine Learning: video
Module by Luca Oneto (UNIGE) and Joonas Jälkö (University of Helsinki)
Human Agency and Oversight
Fair Machine Learning
Content
This module delves into the concept of fairness in machine learning algorithms, exploring how biases in data and models can lead to unfair outcomes. It covers various definitions of fairness, including statistical parity, equalized odds, and disparate impact. The module discusses techniques for detecting and mitigating bias, such as pre-processing, in-processing, and post-processing methods. Real-world case studies illustrate the consequences of algorithmic bias and the importance of fairness in diverse applications.
Links: Introduction to Algorithmic Fairness: slides, video, code
Module by Luca Oneto (UNIGE)
Interpretable/Explainable Machine Learning
Content
This module explores the importance of interpretability and explainability in machine learning models, ensuring that their decisions can be understood and trusted by humans. It covers various techniques for creating interpretable models, such as decision trees, rule-based systems, and linear models, alongside methods for explaining complex models like neural networks and ensemble methods. Topics include feature importance, SHAP values, LIME, and model-agnostic interpretability techniques.
Links
Introduction to Interpretable/Explainable Machine Learning: slides, video, code
Explainable AI (XAI): slides
Module by Luca Oneto (UNIGE) and Plamen Angelov (Lancaster University)
Modern Challenges of Human–in-the-loop AI in the context of the Big Data Systems
Content
This module highlights the problems of Data procurement and Transparency, interpretable AI, drawing upon the applications of big data systems to environmental science, using distributed computing, as well as safety and security and sustainability challenges.
Link: “Research Challenges”: slides
Module by Dmitry Kangin (Lancaster University)
Tutorials
“A Bayesian Odyssey in Uncertainty: from Theoretical Foundations to Real-World Applications”
Content
This module aims to to help researchers understand and handle uncertainty in their models, making them more reliable using Bayesian methods. We first explore the critical role of uncertainty quantification (UQ) in computer vision (CV), why it’s essential to consider uncertainty in CV, especially concerning decision-making in complex environments. We introduce real-world scenarios where uncertainty can profoundly impact model performance and safety, setting the stage for deeper exploration throughout the tutorial. We then follow the evolution of UQ techniques, starting from classic approaches such as maximum a posteriori estimation to the more elaborate Bayesian Neural Networks. We dive then into the core part of the course: the process of estimating the posterior distribution of BNNs. The participants get insights into the computational complexities involved in modeling uncertainty through a comprehensive overview of techniques such as Variational Inference (VI), Hamiltonian Monte Carlo (HMC), and Langevin Dynamics. Further we explore the characteristics and visual representation of posterior distributions, providing a better understanding of Bayesian inference.
In the second part of the tutorial, we explore different strategies towards computationally-efficient BNNs: from intermediate checkpoints, weight trajectories during a training run, variational subnetworks, but also post-hoc inference techniques allowing to convert a pretrain deep neural network into a BNN, e.g., using Laplace approximations.
Links
Uncertainty Quantification – What is it useful for?: slides
Neural Network Surfaces and BNNs: slides
Computationally-efficient BNNs for Computer Vision: slides
Laplace Approximations for Deep Learning: slides
Material by Andrei Bursuc (Valeo), Pavel Izmailov (Anthropic & NYU), Gianni Franchi (ENSTA) and Alexandre Immer
“The Many Faces of Reliability of Deep Learning for Real-World Deployment”
Content
- Setting the stage: reliability in the real world by Patrick Perez (slides // video)
- Uncertainty estimation and next generation ensembles by Andrei Bursuc (slides // video)
- Calibration of Deep Neural Networks by Puneet Dokhania (slides)
- Out-of-distribution detection by Sharon Yixuan Li (slides // video)
- Domain adaptation on wheels by Dengxin Dai and Tuan-Hung Vu (slides)
- Performance monitoring by Andrei Bursuc (slides // video)
- Trends and perspectives by Andrei Bursuc (slides // video)
Tutorial delivered at ICCV 2023 by Patrick Pérez (Valeo)
Lecture
“Trustworthy AI and A Cybersecurity Perspective on Large Language Models”
Content
- Introduction: AI maturity and impacts on robustness, privacy, transparency, accountability & explainability
- Future AI methodology
- Misinformation, deepfakes, and other key concerns
- Mitigations
- Future development and new research challenges
e-Lecture delivered for AIDA – Artificial Intelligence Doctoral Academy by Mario Fritz (CISPA)
Use CaseS MaterialS
Below, you can find a collection of tutorials for the ELSA Use Cases. We aim to share ELSA materials and knowledge contribute to the education and further training of talents.
If you have any questions regarding the materials, please feel fee to reach out to the respective persons in charge.
Use Case: Autonomous Driving
The starting question for this module is, “How reliably can one deploy Deep Neural Networks (DNNs) to real-world applications for autonomous driving?” Answering this very question requires understanding all the relevant failure modes of DNNs, which have been mainly investigated. However, in small and separated pockets of the research community. Nevertheless, these failure modes might not be as dissimilar as we think they are, and to understand their interplay, similarities and dissimilarities, it is essential to discuss them together. This is precisely the goal of this course, where we offer an overview of the efforts towards reliable DNNs (main challenges, evaluations, research directions, and trends). We then dive into two main lines of approaches with high practical interest: domain adaptation (how to deal with adverse weather conditions using limited labels and data points) and performance monitoring (how to automatically verify that a model is making correct predictions).
This module is structured into three main sections:
Introduction
Content
Setting the stage of this module describing the similarities and differences between typical benchmarks used in scientific papers and real-world situations through the lens of autonomous driving applications.
Link: Reliability in the real world: slides, video
Material by Patrick Perez (Valeo)
Domain Adaption on Wheels
Content
Autonomous vehicles are expected to operate under adverse weather and illumination conditions (e.g., fog, rain, snow, low light, nighttime, glare and shadows) that create visibility problems for their sensors. Even the top-performing algorithms undergo severe performance degradation under adverse conditions, a shift of distribution from the clear weather training data. We aim here to describe existing research on robust vision algorithms for adverse weather and lighting conditions through the lens of domain adaptation and domain generalization methods.
Link: Domain adaptation on wheels: slides
Material by Tuan-Hung Vu (Valeo) & Dengxin Dai
(Huawei)
Performance Monitoring
Use Case: Robotics
This module focuses on the question, “How can we develop safe machine learning for robotics in human-centric environments?” To answer this question, the team explored two complementary views of modern robotics: the controller view, i.e., how to build robotic controllers using modern machine learning methods that act safely in human-centric environments, and the hardware view, i.e., how to design real-world physical systems to be used safely for complex tasks in human-centric environments. These components are intertwined, as the capabilities of modern robotics are limited by both hardware constraints (e.g., available degrees of freedom, sensor quality) and controller quality (e.g., generalization issues, formal guarantees of safety). As such, this module presents a holistic view of the current challenges and recent advances in both safe machine learning for robots and industrial robot design.
This module is structured into two main sections:
Safe Robot Learning
Content
This module highlights that relying solely on large datasets from simulations does not address all safety concerns due to the complexity of the real world, and that to ensure safety we should impose online verification of the behavior of the robot.
Link: Safe robot learning through online verification: video
Material by Chris Pek (Delft University of Technology)
Robots for Human-centric Environments
Content
This module highlights that no single solution fits all scenarios: robot platforms must be tailored to their specific tasks, whether in social contexts, industry, retail, or health care. Emphasizing user-centric design and incorporating user feedback are essential for the successful deployment of these technologies.
Link: Robotics in human-centric environment: video
Material by Thomas Peyrucain (PAL Robotics)
Use Case: Multimedia
Machine-generated images are becoming increasinlgy popular in the digital world, thanks to the widespread adoption of Deep Learning models that can generate visual data such as Generative Adversarial Networks and Diffusion Models. While image generation tools can be employed for lawful goals (e.g., to assist content creators, generate simulated datasets, or enable multi-modal interactive applications), there is a growing concern that they might also be used for illegal and malicious purposes, such as the forgery of natural images, the generation of images in support of fake news, misogyny or the like.
This module is structured into three main sections:
Making Fake Images Detectable
Content
This section focuses on the detection and identification of deepfake images. Key topics include the creation of a supervised training network for real/fake classification and the significance of feature vectors in distinguishing between authentic and manipulated images. The module will cover the use of multimodal deepfake datasets such as COCOFake, which includes over 600,000 fake images generated from real COCO captions, and D3 with more than 9 million generated images. Techniques for fake detection, including the impact of image transformations on deepfake detection, will be explored.
Making Fake Images Sustainable
Content
This section addresses the challenges of making deepfake generation more sustainable. It includes discussions on the efficiency of diffusion models, which are used for generating high-quality images but often require significant computational resources. The module will explore methods to reduce generation time, such as predicting final results during the iterative diffusion process and early hallucination detection. Techniques to minimize the dependency on random seeds and improve generation accuracy will be covered. The goal is to find ways to save time, energy, and computational resources while maintaining high-quality outputs.
Making Fake Images Safer
Content
This section explores the ethical and safe use of deepfake technology. It delves into methods for mitigating the risks associated with deepfakes, such as the propagation of misinformation, privacy violations, and malicious use. The focus is on developing frameworks for safe deepfake generation, including the implementation of safety measures to prevent the creation of harmful content. The module also discusses the concept of “unlearning” toxic or inappropriate content from models to ensure that generated images adhere to ethical standards.
Links
Do we want (better) Deep Fakes: slides
Unlearning Toxicity in Multimodal Foundation Models: video
Retrieval Augmented, Reflective, and Safe Multimodal Foundation Models: slides
Material by Rita Cucchiara (UNIMORE) and Lorenzo Baraldi (UNIMORE)
Use Case: Cybersecurity
Machine Learning is a key technology for fighting the spread of malware, computer programs, or mobile applications that exhibit illegal, harmful or malicious behaviors against compromised devices. With the significant increase in activity by malicious actors, we assist in a massive production of malware. Instead of being subverted by such a vast threat, we can use all these as part of large training datasets to create effective and efficient Machine Learning models that recognize malware. Hence, the use case team has contributed to the rise of antivirus programs implemented with Machine Learning components, which are now shipped in many commercial solutions. Due to its popularity, there is also a need for novel testing strategies that can be used to assess the correct functioning of these systems in the presence of advanced attackers, whose goal is to compromise these next-generation antivirus systems.
Hence, this module focuses on how to create novel antivirus programs with machine learning, by dissecting the way data is treated and used as training data, which models from the literature can be used, and how they react inside a dynamic environment. Then, the module will cover new testing strategies that leverage the literature of adversarial machine learning to create attacks specific to this domain.
The course will focus primarily on Windows malware detection, but all the content, resources, and explained techniques can be easily ported also to other domains, like Android or PDF malware detection.
Learning maliciousness from data
Content
For the first section of this module, we leverage cutting-edge technologies like GPT and Self-supervised Learning to improve malware detection and classification. In particular, the module highlights the need for new models that can take decisions by looking at the activities produced by programs, thus spotting malicious behaviors from textual reports produced during the analysis.
Link: GPT-like Pre-Training on Unlabeled System Logs for Malware Detection: Slides, video
Material by Dmitrijs Trizna and Luca Demetrio (UNIGE)
Security testing of malware detectors
Content
The second section of this module focuses on understanding the security risks of models put in production. In particular, the module covers the difficulties of testing the robustness of Windows malware detectors with conventional adversarial attacks. Since the domain is deeply different from images, there are constraints that must be enforced to maintain the original functionality of the input sample. Hence, we will teach how recent research bridges this gap by differently formulating the optimization problem and the manipulation used. As a result, the seminar highlights the threat of adversarial EXEmples, which are the equivalent of adversarial examples for images but crafted against Windows malware detectors.
Link: Adversarial EXEmples: functionality-preserving optimization of adversarial Windows malware: Slides, video
Material by Luca Demetrio (UNIGE)
Use Case: Document Intelligence
The issues of privacy and restricted access to documents have long been core problems in document analysis and recognition (DAR) with significant repercussions for the way the community conducts research. One effect is that many models are still trained on private, undisclosed datasets, while public document analysis datasets tend to be small or focus on particular, narrow domains.
The fields of privacy-preserving Machine Learning and collaborative learning methods offer potential solutions to these problems. Still, they are not widely understood within the community and are only sporadically applied in practice.
To bridge this gap, this module provides a tutorial on key topics in private and collaborative DL, focusing on the practical use case of document intelligence, organized into the following sections.
Federated Learning
Content
This section motivates the case of document models that must be trained on distributed, confidential datasets, and introduces federated learning (FL) as an answer to this issue. It presents the theoretical background behind decentralized training of document models, and explores the practical details of specific aggregation algorithms; their implementations, advantages and drawbacks.
Links
PCL-Dar Tutorial: Federated Learning: slides, code, landing page
Introduction to Federated Learning: slides, video
Materials by Dimosthenis Karatzas (CVC), Raouf Kerkouche (CISPA), Vincent Poulain d’Andecy (Yooz) and Deborah Caldarola (Politecnico di Torino)
Differential Privacy
Content
This section introduces the privacy risks that are especially pertinent to document intelligence models, including adversarial attacks that expose information in the federated setting. It motivates the need for differential privacy (DP) in training such models, and gives an overview of the primary topics in differentially private machine learning. It provides the theoretical basis and geometric intuition for the core optimization algorithm of DP-SGD, and gives an overview of privacy accounting and formal DP mechanisms.
Link: PCL-Dar Tutorial: Differential Privacy: slides, video
Material by Joonas Jälkö (UH), Ernest Valveny (CVC)
Private, Federated DocVQA
Content
This section comprises a practical hands-on exercise centred around a real-life document intelligence use-case that must preserve the privacy of document providers. It provides a dataset and a problem scenario as part of an interactive code notebook, and gradually builds up to working code examples that implement the algorithms outlined in previous modules in a simple but realistic setting.
Link: PCL-Dar Tutorial: Use Case and Practical Session: slides, video
Material by Joonas Jälkö (UH), Marlon Tobaben (UH), Ernest Valveny (CVC)
Summer Schools
ELSA is also involved in Summer Schools. These events support young researchers and offer a unique opportunity to learn from experienced researchers and build a valuable network.
So far, ELSA has supported the following Summer Schools:
CISPA ELLIS Summer School on trustworthy AI 2025: Secure and Safe Foundation Models: event website
CISPA Summer School on Trustworthy Artificial Intelligence 2022: event website