Basic components
Softmax
Convolve
Sharpen
Softmax
Convolve
Sharpen
Architectures
S2
S3
Frame1
Frame2
Frame3
Frame4
Frame5
Frame6
Frame7
Frame5
Frame6
Frame7
Level 1
Sample1
Sample2
Frame4
Frame3
Frame2
Frame1
Level 2
Sample1
Sample2
Level 3
Sample1
Sample2
Level 4
Sample1
Sample2
C
C
C
CNN
Layer
Conv3-32
x4
Maxpool
Conv3-64
x2
Maxpool
(2x2)
Conv3-128
x1
Maxpool
(2x2)
FC-512
Feature
Vector
Output
Input
32x32x3
L
L
L
L
L
L
L
L
L
L
L
L
L
L
AM
FC
SM
Conv
C
C
C
C
C
C
C
L
L
L
L
L
L
L
Conv
C
C
C
C
C
C
C
FC
SM
L
L
L
L
L
L
L
C
C
C
C
C
C
C
FC
SM
L
L
L
C
C
C
C
C
C
C
C
C
C
FC
SM
C
C
C
Conv
A) LSTM
B) Mixed LSTM / 1D Conv
D) Mixed Att-BiLSTM / 1D Conv
C) Mixed BiLSTM / 1D Conv
A) LSTM
B) LSTM / 1D Conv
D) Att-BiLSTM / 1D Conv
C) BiLSTM / 1DConv
Level 1
Sample1
Sample2
Level 2
Sample1
Sample2
Level 3
Sample1
Sample2
Level 4
Sample1
Sample2
Frame1
Frame2
Frame3
Frame4
Frame5
Frame6
Frame7
Frame8
Frame9
Frame10
Frame1
Frame2
Frame3
Frame4
Frame5
Frame6
Frame7
Frame8
Frame9
Frame10
S7
S8
L
L
L
L
L
L
L
C
C
C
C
C
C
C
FC
SM
L
L
L
C
C
C
Conv
AM
L
L
L
L
L
L
L
C
C
C
C
C
C
C
FC
SM
L
L
L
C
C
C
AM
L
L
L
L
L
L
L
C
C
C
C
C
C
C
FC
SM
L
L
L
C
C
C
L
L
L
L
L
L
L
C
C
C
C
C
C
C
FC
SM
L
L
L
C
C
C
Conv
L
L
L
L
L
L
L
C
C
C
C
C
C
C
FC
SM
L
L
L
C
C
C
Conv
AM
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
C
C
C
C
C
C
C
FC
SM
L
L
L
C
C
C
Conv
C
C
C
C
C
C
C
LSTM layer
Attention layer
CNN
layer
C
C
C
C
C
C
C
C
C
C
C
C
C
LSTM layer
Attention layer
CNN
layer
L
L
L
L
L
L
L
AM
FC
SM
Conv
C
C
C
C
C
C
C
Input Layer
Hidden Layers
Output Layer
X = A[0]
a[4]
A[1]
A[3]
X
Ŷ
a[1]1
a[1]2
a[1]3
a[1]n
a[2]1
a[2]2
a[2]3
a[2]n
a[3]1
a[3]2
a[3]3
a[3]n
A[2]
A[4]
Input Layer
Hidden Layers
Output Layer
X = A[0]
a[4]
A[1]
A[3]
X
Ŷ
[1a]1
a[1]2
a[1]3
a[1]n
a[2]1
a[2]2
a[2]3
a[2]n
a[3]1
a[3]2
a[3]3
a[3]n
A[2]
A[4]
Input Layer
Hidden Layers
Output Layer
X = A[0]
a[4]
A[1]
A[3]
X
Ŷ
a[1]1
a[1]2
a[1]3
a[1]n
a[2]1
a[2]2
a[2]3
a[2]n
a[3]1
a[3]2
a[3]3
a[3]n
A[2]
A[4]
NxNx3
+b1
+b2
MxM
MxM
+b1
+b2
ReLU
ReLU
a[l]
MxMX2
a[l-1]
CONV operation
NxNx3
+b1
+b2
MxM
MxM
+b1
+b2
ReLU
ReLU
MxMX2
CONV operation
NxNx3
+b1
+b2
MxM
MxM
+b1
+b2
ReLU
ReLU
MxMX2
CONV operation
S=1
S=2
Striding in CONV
NxNx192
NxNx64
NxNx32
NxNx128
NxNx192
1x1 Same
3x3 Same
5x5 Same
MaxPool Same s=1
Inception Module
Multi-Head
Attention
Add & Norm
Input
Embedding
Output
Embedding
Feed
Forward
Add & Norm
Masked
Multi-Head
Attention
Add & Norm
Multi-Head
Attention
Add & Norm
Feed
Forward
Add & Norm
Linear
Softmax
Inputs
Outputs (shifted right)
Positional
Encoding
Positional
Encoding
Multi-Head
Attention
Add & Norm
Input
Embedding
Output
Embedding
Feed
Forward
Add & Norm
Masked
Multi-Head
Attention
Add & Norm
Multi-Head
Attention
Add & Norm
Feed
Forward
Add & Norm
Linear
Softmax
Inputs
Outputs (shifted right)
Positional
Encoding
Positional
Encoding
Tokenize
I
love
coding
and
writing
“I love coding and writing”
ML Concepts
Size
#bed
ZIP
Wealth
Family?
Walk?
School
PRICE ŷ
X
Y
X
Ŷ = 0
Ŷ = 1
How does NN work (Insprired from Coursera)
Logistic Regression
Basic Neuron Model
Size
$
Size
$
Linear regression
ReLU(x)
NxN
NxN
NxN
NxN
256
225
56
.
.
.
214
210
211
R-G-B
Unrolling Feature vectors
Large NN
Med NN
Small NN
SVM,LR etc
η
Amount of Data
Why does Deep learning work?
a[1]1
a[1]2
a[1]3
Input
Hidden
Output
X = A[0]
a[1]4
a[2]
A[1]
A[2]
X
Ŷ
One hidden layer neural network
a[1]1
a[1]2
x[1]
a[2]
x[2]
x[2]
x[3]
x[1]
Neural network templates
Train
Valid
Test
x1
x2
x1
x2
x1
x2
Train-Dev-Test vs. Model fitting
Underfitting
Good fit
Overfitting
x[2]
x[3]
x[1]
a[L]
x1
x2
r=1
x1
x2
DropOut
Normalization
w1
w1
w2
J
w1
w2
J
w1
w2
w2
Before Normalization
After Normalization
Early stopping
Dev
Train
Err
it.
x1
x2
w[1]
w[2]
w[L-2]
w[L-1]
w[L]
FN
TN
TP
FP
Deep neural networks
Understanding
Precision & Recall
w1
w2
SGD
BGD
w1
w2
SGD
Batch vs. Mini-batch �Gradient Descent
Batch �Gradient Descent vs. SGD
x[2]
x[3]
x[1]
p[1]
p[2]
Softmax Prediction with 2 outputs
Abstract backgrounds
dair.ai
Gradient Backgrounds
ML and Health
ICA
Conv
Conv
Conv
Conv
Conv
Conv
EEG Time Series
Time slice
Conv
Spatial Feature Learning
EEG Images
Spectral Topography Maps
Alpha
LSTM+AM
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Temporal Feature Aggregation
Pain Intensity Assessment
Delta
Alpha
Beta
Pain Location Assessment
ICA
Conv
Conv
Conv
Conv
Conv
Conv
EEG Time Series
Time slice
Conv
Spatial Feature Learning
EEG Images
Spectral Topography Maps
Alpha
Alpha
Theta
LSTM+AM
Beta
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Temporal Feature Aggregation
Pain Intensity Assessment
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Conv
Activations
(U=WX)
Scalp maps
( )
Test Subject | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 | S10 | S11 | S12 | S13 | Average Accuracy |
Pain Intensity | 0.8209 | 0.8882 | 0.9569 | 0.9625 | 0.9322 | 0.9563 | 1 | 0.9707 | 0.9809 | 0.9226 | 0.9015 | 0.892 | 0.8094 | 0.922623077 |
Pain Location | 0.7243 | 0.8028 | 0.9397 | 0.9951 | 0.9286 | 1 | 0.9948 | 0.9088 | 0.8844 | 0.8956 | 0.8816 | 0.7081 | 0.7591 | 0.878684615 |
Level 1
Level 2
Level 3
Level 4
No Pain
Low Pain
Moderate Pain
High Pain
Signal Segmentation
Time
Withdraw
hand
Immerse
hand
Level 1
Level 2
Level 3
Level 4
No Pain
Low Pain
Moderate Pain
High Pain
Time
Immerse
hand
Withdraw
hand
AEP
Bicubic
Spectral Topography Map
PSD
AEP
Delta
Alpha
Beta
FFT
PSD
Theta(4~8Hz)
Alpha(8~13Hz)
Beta(13~30Hz)
Bicubic
Spectral Topography Map
Image Generation
AEP
Conv3-32
x4
Maxpool
(2x2)
Conv3-64
x2
Maxpool
(2x2)
Conv3-
128
Maxpool
(2x2)
FC-512
Feature
Vector
Input
32x32x3
Output
ConvNet Configuration
Conv3-32
Conv3-32
Conv3-32
Max-Pool
Conv3-32
Conv3-128
Max-Pool
Conv3-64
Conv3-64
Max-Pool
Input
Conv
Conv
Max-Pool
Max-Pool
FC
Layer1
Softmax
FC
Layer2
Layer3
Layer4
Stack1
Stack2
Stack3
Input
Conv3-32
Conv3-32
Conv3-32
Max-Pool
Conv3-32
Conv3-128
Conv3-64
Conv3-64
Max-Pool
Layer1
Layer2
Layer3
FC-512
Output
Max-Pool
FC-512
Output
ConvNet Configuration
Stack4
Conv3-32
Conv3-32
Conv3-32
Max-Pool
Conv3-32
Conv3-128
Max-Pool
Conv3-64
Conv3-64
Max-Pool
Stack1
Stack2
Stack3
FC-512
Output
Stack4
Level 1
Level 2
Level 3
Level 4
Time
Level 5
No Pain
LowPain
MediumPain
High
Pain
Unbearable
Pain
(a)
(b)
Level 1
Level 2
Level 3
Level 4
Time
Level 5
No Pain
LowPain
MediumPain
High
Pain
Unbearable
Pain
(a)
(b)
Miscellaneous
3
64
16
16
32
32
64
128
128
256
256
128+256
128
1
64+128
64
32+64
32
16+32
16
16
Convolution 3x3
Max Pooling 2x2
Convolution 1x1
Skip connection
Up Sampling 2x2
Conv3-32
Conv3-32
Conv3-32
Max-Pool
Conv3-32
Conv3-128
Max-Pool
Conv3-64
Conv3-64
Max-Pool
Input
Conv
Conv
Max-Pool
Max-Pool
FC
Layer1
Softmax
FC
Layer2
Layer3
Layer4
Layer1
Layer2
Layer3
Layer4
Input
Conv3-32
Conv3-32
Conv3-32
Max-Pool
Conv3-32
Conv3-128
Conv3-64
Conv3-64
Max-Pool
Layer1
Layer2
Layer3
Feature
Vector
FC-512
Output
Max-Pool
FC-512
Output
Previous layer
1x1 convolutions
1x1 convolutions
3x3 convolutions
1x1 convolutions
5x5 convolutions
3x3 max pooling
1x1 convolutions
Filter concatenation
Previous layer
1x1 convolutions
1x1 convolutions
3x3 convolutions
1x1 convolutions
5x5 convolutions
3x3 max pooling
1x1 convolutions
Filter concatenation
Input
1x11 conv
1x11 conv
Inception 1
Inception 2
1x7 conv
1x7 conv
FC
FC
Output
Inception 2
Inception 2
Previous layer
1x3 conv,
1 padding
1x5 conv,
2 padding
1x3 conv,
1 padding
1x7 conv,
3 padding
Filter concatenation
1x3 conv,
1 padding
1x3 conv,
1 padding
Input
Conv
Max-Pool
Max-Pool
Max-Pool
Inception
Inception
Max-Pool
Conv
Max-Pool
Conv
Inception
Inception
Inception
Inception
Inception
Inception
Inception
Avg-Pool
Conv
FC
FC
Softmax
Avg-Pool
Conv
FC
Softmax
Avg-Pool
Conv
FC
FC
Softmax
Auxiliary Classifier
Auxiliary Classifier
Previous layer
1x1 conv.
1x1 conv.
3x3 conv.
1x1 conv.
3x3 conv.
Pool
1x1 conv.
Filter concatenation
3x3 conv.
Previous layer
1x1 conv.
1x1 conv.
1x1 conv.
3x3 conv.
Pool
1x1 conv.
Filter concatenation
1x3 conv.
3x1 conv.
1x3 conv.
3x1 conv.
(a)
(b)
R1
R2
R3
R1
R2
R3
R1
R1
R1
R2
Stacked layers
Previous input
x
F(x)
y=F(x)
Stacked layers
Previous input
x
F(x)
y=F(x)+x
x
identity
+
Input
Conv
Avg-Pool
Dense Block 2
Dense Block 3
Conv
Avg-Pool
Conv
Dense Block 1
Avg-Pool
FC
Softmax
Transition layers
3x3 conv
(a)
add
identity
3x3 conv
5x5 conv
3x3 avg
identity
3x3 avg
3x3 avg
3x3 conv
5x5 conv
add
add
add
add
Filter concatenation
hi
hi-1
...
hi+1
hi
hi-1
...
7x7 conv
5x5 conv
7x7 conv
3x3 max
5x5 conv
3x3 avg
add
add
add
identity
3x3 avg
3x3 max
3x3 conv
add
add
Filter concatenation
hi+1
(b)
1
1
2
4
5
6
7
8
3
2
1
0
1
2
3
4
6
8
3
4
Max(1,1,5,6) = 6
Image Representation
Y
X
Pooling performed with a 2x2 kernel and a stride of 2
ML System Design / Infrastructure
脑电波头盔
疼痛等级
疼痛位置
APP
治疗力度
治疗方案
疼痛治疗仪
使用者的治疗时长、治疗方案、治疗反馈记录