tiny Machine Learning and Data Centric Approach

dszc1201 59 views 44 slides Jul 08, 2024
Slide 1
Slide 1 of 44
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44

About This Presentation

A presentation about tiny Machine Learning and Data Centric Approach


Slide Content

ICITDA -2021 Owais A. Malik
TinyMLand Importance of Data-
Centric Approach
Owais Ahmed Malik
UniversitiBrunei Darussalam

ICITDA –2021 Owais A. Malik
TinyML
Data-
Centric AI
Applications, Opportunities and Challenges

ICITDA –2021 Owais A. Malik
*HarvardX
TinyML

ICITDA –2021 Owais A. Malik
TinyML
AI Computing –Past –Present -Future

ICITDA –2021 Owais A. Malik
TinyML
AI Computing –Past –Present -Future
Local Machines/Servers

ICITDA –2021 Owais A. Malik
TinyML
AI Computing –Past –Present -Future
Cloud Computing
Inference
Learning
Raw Data
Output
Local Machines/Servers

ICITDA –2021 Owais A. Malik
TinyML
AI Computing –Past –Present -Future
Cloud Computing
Inference
Learning
Raw Data
Output
Edge-Computing / On-device Analytics
Inference
Learning
Data
Model
Local Machines/Servers

ICITDA –2021 Owais A. Malik
TinyML
AI Computing –Past –Present -Future
Cloud Computing
Inference
Learning
Raw Data
Output
Edge-Computing / On-device Analytics
Inference
Learning
Data
Model
Local Machines/Servers

ICITDA –2021 Owais A. Malik
Knowledge-base
C3L
Optimization
TinyML
AI Computing –Past –Present -Future
InferenceLearning
Information
Future!!!

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Embedded
System
(ES/MC)
Machine
Learning
TinyML

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Embedded
System
(ES/MC)
Machine
Learning
TinyML
Embedded
System
(ES/MC)
Limited
Memory
Limited
Computing
Limited
flexibility/
specialized
Very small in
size
Long-life
battery
Pervasive

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
1 MB of flash memory and 256 kB of RAM
Arduino® Nano 33 BLE Sense

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Collect
Data
Pre-Process
Data
Design
Model
Train
Model

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Collect
Data
Pre-Process
Data
Design
Model
Train
Model
Evaluate
Model
Convert
Model
Optimize
Model
Deploy
Model at
Edge
Make
Inference
at Edge

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Collect
Data
Pre-Process
Data
Design
Model
Train
Model
Evaluate
Model
Convert
Model
Optimize
Model
Deploy
Model at
Edge
Make
Inference
at Edge
Data Engineering Model Engineering
Model Deployment Product Analytics

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Tensorflow
TensorflowLite TensorflowLiteMicro

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Model
Optimization
In MBs
In ~100s of
KB
In ~10s of
KB

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Model
Optimization
Post Training During Training
Pruning
Knowledge Distillation
Quantization

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Quantization
Quantization is an optimization that
works by reducing the precision of the
numbers that are used to represent a
model's parameters.

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Quantization
Smaller Model
Size
Faster
Computation &
Reduce Latency
Better
Portability
Compromise in accuracy

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
Quantization
Post Training
Quantization
(PTQ)
Quantization
Aware Training
(QAT)
Weight
Compression
(size)
Inference
Calculation
(latency)
Inject
Quantization
during Training

ICITDA -2021 Owais A. Malik
TinyML
Issues with Resource Constrained Devices
TinyML
Pre-
processing
Always-on
system
Larger NN
On when
required
Cloud
processing
Large
Models
Cascade Architecture –Multistage Model
•MitigateEnergy
Consumption
Problem
•SuitableofReal-
timeSystems

ICITDA -2021 Owais A. Malik
TinyML
Example Applications

ICITDA -2021 Owais A. Malik
TinyML
Example Applications

ICITDA –2021 Owais A. Malik
TinyML
AI Computing –Past –Present -Future
Knowledge-base
C3L
Optimization
InferenceLearning
Model
Information
Future!!!
Essential
Data

ICITDA –2021 Owais A. Malik
TinyML
AI Computing –Past –Present -Future
Knowledge-base
C3L
Optimization
InferenceLearning
Model
Information
Future!!!
Essential
Data
•C3L–continuouslifelonglearningapproach
foredgedevices
•Bioinspiredlearning
•Federatedlearning
•Self-supervisedlearning(SSL)

ICITDA –2021 Owais A. Malik
TinyML
Challenges
•Communication –with other devices, with base stations
•Security, protection of data –hacking of devices, false alarm generation,
personal data accessibility
•Quality data collection
•Quality of experience
•Digital footprints –leaving digital debris, affecting Green AI

ICITDA -2021 Owais A. Malik
Data-Centric AI
•Paradigm shift
•Model-centric to Data-centric AI
AI is driven by
data –not code
Training data is
the new newoil
Models are
becoming a
commodity
Data Programming
http://ai.stanford.edu/blog/data-centric-ai-retrospective/

ICITDA -2021 Owais A. Malik
Data-Centric AI
Data
Model 1
Model 2
Model k
Compare
Performance
Reference
Model-centric vs Data-centric

ICITDA -2021 Owais A. Malik
Data-Centric AI

ICITDA -2021 Owais A. Malik
Data-Centric AI
Reference
Need for a Systematic Approach
https://www.deeplearning.ai/wp-content/uploads/2021/06/MLOps-From-Model-centric-to-Data-centric-AI.pdf

ICITDA -2021 Owais A. Malik
Data-Centric AI
•More data is always equivalent to better data???
Volume
•Sufficient amount of relevant data
•Error analysis of the current model before adding more data
Consistency
•Requirement for consistently labelled dataset
•Careful design of annotation/labeling instructions
Quality
•Cover all variations possibly present in deployment data
Characteristics of Data

ICITDA -2021 Owais A. Malik
Data-Centric AI
Modify the
erroneous
ones in the
current
dataset
If not,
collect more
data or
synthetically
create those
data points
Check
training
data has
enough
samples to
learn for
such cases
Check for
corner cases
Pick the
instances
where best
model is
failing to
perform
Pick the
best-
performing
model
Understand
how data
behaves
across
candidate
models
Find a
baseline
model
Practical Steps

ICITDA -2021 Owais A. Malik
Data-Centric AI Challenges
•Noestablishedframeworkformakingdatasetsthatareaccessiblefor
machinelearningmodels-SnorkelAIanexample
•Availabilityoflargeamountsofunstructuredheterogenousdata
•Requirementforhighlevelofknowledge,tediousmanualworkand
proficientcodingskillstoturnunstructureddataintoMLcode
friendlydata

ICITDA –2021 Owais A. Malik
TinyMLand Data-Centric AI
Problem–Design a tinyMLbased ECG classification that can be deployed as a wearable device.

ICITDA –2021 Owais A. Malik
TinyMLMeets Data-Centric AI

ICITDA -2021 Owais A. Malik
TinyMLand Data-Centric AI
Frantz Bouchereau-MathWorks

ICITDA -2021 Owais A. Malik
TinyMLand Data-Centric AI
•An energy efficient system is required
•Data-centric approach to reduce the transfer of data to the cloud
•Research on C3L for embedded device on-going

ICITDA –2021 Owais A. Malik

ICITDA –2021 Owais A. Malik

ICITDA -2021 Owais A. Malik
References/Acknowledgments
•HarvardX–Applications of TinyMLCourse
•http://ai.stanford.edu/blog/data-centric-ai-retrospective/
•https://www.deeplearning.ai/wp-content/uploads/2021/06/MLOps-From-Model-centric-to-Data-
centric-AI.pdf
•https://towardsdatascience.com/tiny-machine-learning-the-next-ai-revolution-495c26463868
•https://elucidata.io/getting-started-with-data-centric-ai-development-tips-from-andrew-ng/
•https://www.embeddedonlineconference.com/speaker/Frantz_Bouchereau