2025-Lecture06-MachineLearning
2025-Lecture06-MachineLearning
2
Machine learning
An introduction
What is machine learning?
• Machine learning provides machines the ability to learn from
past experiences to identify patterns and make predictions.
• ML approaches are traditionally categorized into
5
Supervised learning (SL)
• A SL model learns from labeled examples to map from inputs
to outputs.
• Each example is a pair of input and output values.
Supervised learning
𝑋 𝑦 algorithm
Model
𝑦ො
6
Supervised learning (SL)
Labeled data
Grapes
Prediction
Model
Apple
training
Labels
7
Classification vs. Regression
Regression
Classification
9
Classification: Problem types
• Single-label classification: Each example is assigned to only
one class from a set of mutually exclusive classes.
• E.g., a fruit is either an "Apple" or "Banana," but not both.
• Multi-label classification: Each example can be at once
assigned to multiple classes that are not mutually exclusive.
• E.g., an image tagged as "Beach" and "Sunset."
10
Image credit: Research Gate
Classify protein structures at different levels
Unsupervised learning
𝑋 𝑦 algorithm
Model
𝑦ො
12
Unsupervised learning (USL)
Categorized data
Group 1
Group 2
Group 1
Prediction
Model Group 2
training
13
Common unsupervised learning tasks
High dimensional data Raw data points Transactional data
Outlier detection
16
Semi-supervised
learning
• The model is initially trained
with a small amount of
labeled data and a large
amount of unlabeled data.
17
Human
action
recognition
problem
Semi-Supervised Learning
and Capsule Network for
Video Action Detection.
RIVF 2023. (HCMUS)
18
Reinforcement learning (RL)
• The agent learns from the environment by interacting with it
and receives rewards for performing actions.
19
Image credit: Datatonic
Reinforcement learning
• The agent learns from the environment by interacting with it
and receives rewards for performing actions.
Source: An introduction 22
to Machine learning
Machine learning and related areas
23
Machine learning and related areas
• Machine learning serves a key step in Data science process,
providing tools to analyze data for better insights.
24
Image credit: GUVI
Advanced technologies
in AI
Generative AI
• Generative AI refers to AI models that are able to generate
new, original content using generative models.
Prompt
27
Image credit: Turing
Text generation and summarization
• Text generation finds applications in various fields, including
content creation, chatbots, news summarization, and more.
• It is a dynamic area of research and development in the broader field
of Natural language processing and Artificial intelligence.
29
ChatGPT: An introduction
• ChatGPT is built upon either GPT-3.5 or GPT-4, that were
fine-tuned to target conversational usage.
• It leverages both supervised learning and reinforcement learning in a
process called reinforcement learning from human feedback (RLHF).
unofficial though30
Image credit: SearchUnify
Transformer:
The key technique
• Transformer is a versatile
neural network architecture
for both unsupervised and
supervised learning tasks.
StyleGAN
32
Text-to-image translation
• The task aims to generate an image that corresponds to a
given textual description.
A modern architectural
building with large glass Meaningful
windows, situated on a representation
cliff overlooking a serene
ocean at sunset
Created by DALLE 3
33
DALL·E: An introduction
• DALL·E is a text-to-image model using deep learning to
generate digital images from natural language prompts.
3.5 billion parameters,
a diffusion model
conditioned on CLIP
image embeddings
A multimodal
implementation of
GPT-3 with 12 Released natively into
billion parameters ChatGPT Plus
Implemented in Bing's
Image Creator
34
DALL·E 2: Demonstration
36
Image-to-image translation
• The task is the process of transforming an image from one
domain to another.
Paired Unpaired
Paired training data (left) consists of training examples have one to one
correspondence. Unpaired training set has no such correspondence. 37
Image-to-image translation tasks
38
Image credit: CVF
Image inpainting using GAN
40
Virtual try-on
Lee, Sangyun, Gyojung Gu, Sunghyun Park, Seunghwan Choi, and Jaegul Choo. "High-
resolution virtual try-on with misalignment and occlusion-handled conditions." In European
Conference on Computer Vision, pp. 204-219. Cham: Springer Nature Switzerland, 2022. 41
Key techniques in image generation
Autoencoder
Generative
adversarial
network
42
Key techniques in image generation
Diffusion Model
43
Stable diffusion model: An explanation
44
Image credit: Toward Data Science
Video generation: Deepfake
46
Virtual Interior
Design “Japanese style,
wooden wall,
cotton puff”
“A Van Gogh
style painting
Original image on the wall”
Le, Minh-Hien, Chi-Bien Chu, Khanh-Duy Le, Tam V. Nguyen, Minh-Triet Tran, and Trung-Nghia
Le. "VIDES: Virtual Interior Design via Natural Language and Visual Guidance." ISMAR 2023.
47
Trong-Vu Hoang, Quang-Binh Nguyen, Minh-Triet Tran, and Trung-Nghia Le. “Generative AI
for Human Creativity." Honor program thesis year 2020. 48
Explainable AI (XAI)
• XAI enables a ML model to provide an explanation for its
decisions and action, which can be understood by humans.
• It contrasts with the "black box" concept in ML where we cannot
explain why an AI arrived at a specific decision.
• XAI is desired in use cases involving accountability, fairness
and transparency, with the aims of enhancing the trust
between humans and machines
• Higher visibility into model decision-making process (which
helps with transparency)
49
Explainable AI (XAI)
50
Image credit: Lawtomated
Explainable AI: Challenges
• How to generate explanations that are both accurate and
understandable.
• XAI models can be more difficult to be trained and tuned,
compared to non-explainable machine learning models.
• XAI systems are more difficult to deploy since explainability
features need some level of human-in-the-loop intervention.
• Explainability is how to take an ML model and explain the behavior in
human terms.
51
Marked areas in the image were relevant for
Context image the answer and hidden areas were irrelevant
The AI
answer
The AI
answer
The AI
answer
55