0% found this document useful (0 votes)
8 views

2025-Lecture06-MachineLearning

Uploaded by

lpminh22
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

2025-Lecture06-MachineLearning

Uploaded by

lpminh22
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

MACHINE LEARNING

Nguyễn Ngọc Thảo – Nguyễn Hải Minh


{nnthao, nhminh}@fit.hcmus.edu.vn
Outline
• Machine learning: An introduction
• Advanced technologies in AI

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

Image credit: Toolbox


4
Why learning agents?

The designers cannot anticipate all possible future situations


• A robot for maze navigation must learn the layout of each new maze
it encounters.

Environment changes over time


• An agent for stock market prices prediction must be adaptive to
sudden changes, from boom to bust.

No idea how to program a solution


• Face recognition, fingerprint recognition, etc.

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

Broccoli Apple Grapes

Labels

7
Classification vs. Regression

Regression

• Train a model to predict a continuous dependent variable

Classification

• Train a model to predict a categorical dependent variable


8
Classification: Problem types
• A binary classification task involves only two classes, while a
multi-class classification one handles more than two classes.

Spam detection Object detection

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

Tuan-Luc Huynh, Thanh-Danh Le, Van-Tam Nguyen, Trung-Nghia Le,


and Minh-Triet Tran. “Efficient 3D Brain Tumor Segmentation with
Axial-Coronal-Sagittal Embedding“. PSIVT

Bui, Nhat-Tan, Dinh-Hieu Hoang, Quang-Thuc Nguyen, Minh-Triet Tran,


and Ngan Le. "MEGANet: Multi-Scale Edge-Guided Attention Network
for Weak Boundary Polyp Segmentation." WACV 2024. (Arkansas Uni. -
HCMUS)
11
Unsupervised learning (USL)
• A USL model learns from unlabeled examples to describe
patterns and insights in the data.

Unsupervised learning
𝑋 𝑦 algorithm
Model

𝑦ො
12
Unsupervised learning (USL)
Categorized data
Group 1

Group 2

Unlabeled data Group 3

Group 1
Prediction

Model Group 2
training

13
Common unsupervised learning tasks
High dimensional data Raw data points Transactional data

Dimensionality Reduction Clustering Association Analysis

Low dimensional data Clustered data points Causal relationships


14
Social
network
Biology: a taxonomy of living things analysis:
community
detection

Outlier detection

Information retrieval: document clustering


15
Shevtsov, Alexander, et al. "Analysis of Twitter and YouTube during US elections 2020."
arXiv e-prints (2020): arXiv-2010.

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.

Learning to ride a bike requires trial and error, much like


reinforcement learning. (Video courtesy of Mark Harris,
who says he is “learning reinforcement” as a parent.) 20
Reinforcement learning: Demo

Source: YouTube video 21


Machine learning algorithms

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.

• It also motivates the studies of new learning algorithms to


meet the challenges of massive data.

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

A cute corgi lives


in a house made
out of sushi.

Image credit: ChatGPT, Gemini


26
Generative AI

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.

• Most of the tools rely on large language models (LLMs).


28
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).

ChatGPT ChatGPT Plus

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.

Vaswani, Ashish, Noam Shazeer, Niki


Parmar, Jakob Uszkoreit, Llion Jones,
Aidan N. Gomez, Łukasz Kaiser, and Illia
Polosukhin. "Attention is all you
need." Advances in neural information
processing systems 30 (2017).
31
Image generation and manipulation
• Image generation include art creation, data augmentation for
ML models, creating realistic scenes for movies, and more.
• It is an evolving field with continuous advancements in both
traditional and machine learning-based approaches.

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 DALLE 3

• It is a reverse task to image captioning.

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

Source: YouTube video 35


Image generation with prompts

Various image synthesis with IP-Adapter applied on the


pretrained text-to-image diffusion models with different styles

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

Zhou, Yuqian, et al. "TransFill: Reference-guided Image Inpainting by Merging Multiple


Color and Spatial Transformations." Proceedings of the IEEE/CVF CVPR. 2021. 39
Image synthesis 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

Stable Diffusion Model

43
Stable diffusion model: An explanation

44
Image credit: Toward Data Science
Video generation: Deepfake

Source: YouTube video 45


Audio generation: AI music
• Generative AI empowers creators to generate new warbles,
chimes, measures, and even entire songs.

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

XAILab Demo: Explainable VQA


52
Context image Marked areas in the image were relevant for
the answer and hidden areas were irrelevant

The AI
answer

XAILab Demo: Explainable VQA


53
Context image Marked areas in the image were relevant for
the answer and hidden areas were irrelevant

The AI
answer

XAILab Demo: Explainable VQA


54
Acknowledgements
• Some parts of the slide are adapted from
• Maria-Florina Balcan, Introduction to Machine Learning, 10-401,
Spring 2018, Carnegie Mellon University
• Ryan Urbanowicz, An Introduction to Machine Learning, PA CURE
Machine Learning Workshop: December 17, School of Medicine,
University of Pennsylvania

55

You might also like