Skip to content

nirdslab/asd-detection

Repository files navigation

ASD Detection

Collection of Neural Architectures for Detection of ASD, using EEG data.

Data

TRAINING: X=(311, 150, 5, 10, 5), Y=(311,), Z=(311,)
TESTING: X=(180, 150, 5, 10, 5), Y=(180,), Z=(180,)

Models Used

  • CONV - Convolution Model
  • LSTM - LSTM Model
  • CAPS - CapsNet Model

Results

Model: "asd_conv"
3/3 - 3s - loss: 1.2569 - crossentropy_loss: 0.5766 - mae: 5.7903 - acc: 0.7778
________________________________________________________________________________
Model: "asd_lstm"
3/3 - 0s - loss: 1.0333 - crossentropy_loss: 0.6479 - mae: 7.1305 - acc: 0.6444
________________________________________________________________________________
Model: "asd_caps"
3/3 - 3s - loss: 0.4085 - margin_loss: 0.0961 - mae: 5.9307 - acc: 0.8611
________________________________________________________________________________
Model Loss MAE Accuracy
CONV 1.2569 5.7903 0.7778
LSTM 1.0333 7.1305 0.6444
CAPS 0.4085 5.9307 0.8611

Electrode Placement

Full-Scale Minimal

Power Spectrum Visualizations

Participant 007 (NT) Participant 018 (ASD)

Model Architecture

CONV model

______________________________________________________________________________________________________________________________________________________
Layer (type)                                     Output Shape                     Param #           Connected to                                      
======================================================================================================================================================
input_1 (InputLayer)                             [(None, 30, 5, 10, 5)]           0                                                                   
______________________________________________________________________________________________________________________________________________________
reshape (Reshape)                                (None, 30, 50, 5)                0                 input_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
conv2d (Conv2D)                                  (None, 27, 50, 8)                168               reshape[0][0]                                     
______________________________________________________________________________________________________________________________________________________
batch_normalization (BatchNormalization)         (None, 27, 50, 8)                32                conv2d[0][0]                                      
______________________________________________________________________________________________________________________________________________________
re_lu (ReLU)                                     (None, 27, 50, 8)                0                 batch_normalization[0][0]                         
______________________________________________________________________________________________________________________________________________________
dense_block (DenseBlock)                         (None, 27, 50, 40)               4096              re_lu[0][0]                                       
______________________________________________________________________________________________________________________________________________________
transition_block (TransitionBlock)               (None, 13, 50, 40)               1800              dense_block[0][0]                                 
______________________________________________________________________________________________________________________________________________________
dense_block_1 (DenseBlock)                       (None, 13, 50, 72)               8704              transition_block[0][0]                            
______________________________________________________________________________________________________________________________________________________
transition_block_1 (TransitionBlock)             (None, 6, 50, 72)                5544              dense_block_1[0][0]                               
______________________________________________________________________________________________________________________________________________________
dense_block_2 (DenseBlock)                       (None, 6, 50, 104)               13312             transition_block_1[0][0]                          
______________________________________________________________________________________________________________________________________________________
transition_block_2 (TransitionBlock)             (None, 3, 50, 104)               11336             dense_block_2[0][0]                               
______________________________________________________________________________________________________________________________________________________
dense_block_3 (DenseBlock)                       (None, 3, 50, 136)               17920             transition_block_2[0][0]                          
______________________________________________________________________________________________________________________________________________________
transition_block_3 (TransitionBlock)             (None, 1, 50, 136)               19176             dense_block_3[0][0]                               
______________________________________________________________________________________________________________________________________________________
flatten (Flatten)                                (None, 6800)                     0                 transition_block_3[0][0]                          
______________________________________________________________________________________________________________________________________________________
l (Dense)                                        (None, 2)                        13602             flatten[0][0]                                     
______________________________________________________________________________________________________________________________________________________
s (Dense)                                        (None, 1)                        6801              flatten[0][0]                                     
======================================================================================================================================================
Total params: 102,491
Trainable params: 99,339
Non-trainable params: 3,152
______________________________________________________________________________________________________________________________________________________

LSTM Model

______________________________________________________________________________________________________________________________________________________
Layer (type)                                     Output Shape                     Param #           Connected to                                      
======================================================================================================================================================
input_1 (InputLayer)                             [(None, 30, 5, 10, 5)]           0                                                                   
______________________________________________________________________________________________________________________________________________________
reshape (Reshape)                                (None, 30, 250)                  0                 input_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
lstm (LSTM)                                      (None, 30, 32)                   36224             reshape[0][0]                                     
______________________________________________________________________________________________________________________________________________________
lstm_1 (LSTM)                                    (None, 30, 32)                   8320              lstm[0][0]                                        
______________________________________________________________________________________________________________________________________________________
concatenate (Concatenate)                        (None, 30, 64)                   0                 lstm[0][0]                                        
                                                                                                    lstm_1[0][0]                                      
______________________________________________________________________________________________________________________________________________________
lstm_2 (LSTM)                                    (None, 30, 32)                   12416             concatenate[0][0]                                 
______________________________________________________________________________________________________________________________________________________
concatenate_1 (Concatenate)                      (None, 30, 96)                   0                 lstm[0][0]                                        
                                                                                                    lstm_1[0][0]                                      
                                                                                                    lstm_2[0][0]                                      
______________________________________________________________________________________________________________________________________________________
lstm_3 (LSTM)                                    (None, 30, 32)                   16512             concatenate_1[0][0]                               
______________________________________________________________________________________________________________________________________________________
concatenate_2 (Concatenate)                      (None, 30, 128)                  0                 lstm[0][0]                                        
                                                                                                    lstm_1[0][0]                                      
                                                                                                    lstm_2[0][0]                                      
                                                                                                    lstm_3[0][0]                                      
______________________________________________________________________________________________________________________________________________________
lstm_4 (LSTM)                                    (None, 32)                       20608             concatenate_2[0][0]                               
______________________________________________________________________________________________________________________________________________________
dense (Dense)                                    (None, 32)                       1056              lstm_4[0][0]                                      
______________________________________________________________________________________________________________________________________________________
l (Dense)                                        (None, 2)                        66                dense[0][0]                                       
______________________________________________________________________________________________________________________________________________________
s (Dense)                                        (None, 1)                        33                dense[0][0]                                       
======================================================================================================================================================
Total params: 95,235
Trainable params: 95,235
Non-trainable params: 0
______________________________________________________________________________________________________________________________________________________

CAPS Model

______________________________________________________________________________________________________________________________________________________
Layer (type)                                     Output Shape                     Param #           Connected to                                      
======================================================================================================================================================
input_1 (InputLayer)                             [(None, 30, 5, 10, 5)]           0                                                                   
______________________________________________________________________________________________________________________________________________________
reshape (Reshape)                                (None, 30, 50, 5)                0                 input_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
conv2d (Conv2D)                                  (None, 27, 50, 8)                168               reshape[0][0]                                     
______________________________________________________________________________________________________________________________________________________
batch_normalization (BatchNormalization)         (None, 27, 50, 8)                32                conv2d[0][0]                                      
______________________________________________________________________________________________________________________________________________________
re_lu (ReLU)                                     (None, 27, 50, 8)                0                 batch_normalization[0][0]                         
______________________________________________________________________________________________________________________________________________________
dense_block (DenseBlock)                         (None, 27, 50, 40)               4096              re_lu[0][0]                                       
______________________________________________________________________________________________________________________________________________________
transition_block (TransitionBlock)               (None, 13, 50, 40)               1800              dense_block[0][0]                                 
______________________________________________________________________________________________________________________________________________________
dense_block_1 (DenseBlock)                       (None, 13, 50, 72)               8704              transition_block[0][0]                            
______________________________________________________________________________________________________________________________________________________
transition_block_1 (TransitionBlock)             (None, 6, 50, 72)                5544              dense_block_1[0][0]                               
______________________________________________________________________________________________________________________________________________________
conv_caps2d (ConvCaps2D)                         (None, 2, 50, 8, 4)              9248              transition_block_1[0][0]                          
______________________________________________________________________________________________________________________________________________________
lambda (Lambda)                                  (None, 2, 50, 8, 4)              0                 conv_caps2d[0][0]                                 
______________________________________________________________________________________________________________________________________________________
dense_caps (DenseCaps)                           (None, 2, 8)                     51200             lambda[0][0]                                      
______________________________________________________________________________________________________________________________________________________
lambda_1 (Lambda)                                (None, 2, 8)                     0                 dense_caps[0][0]                                  
______________________________________________________________________________________________________________________________________________________
lambda_2 (Lambda)                                (None, 8)                        0                 lambda_1[0][0]                                    
______________________________________________________________________________________________________________________________________________________
l (Lambda)                                       (None, 2)                        0                 lambda_1[0][0]                                    
______________________________________________________________________________________________________________________________________________________
s (Dense)                                        (None, 1)                        9                 lambda_2[0][0]                                    
======================================================================================================================================================
Total params: 80,801
Trainable params: 79,857
Non-trainable params: 944
______________________________________________________________________________________________________________________________________________________

MLP Model

______________________________________________________________________________________________________________________________________________________
Layer (type)                                     Output Shape                     Param #           Connected to                                      
======================================================================================================================================================
input_1 (InputLayer)                             [(None, 80)]                     0                                                                   
______________________________________________________________________________________________________________________________________________________
dense (Dense)                                    (None, 16)                       1296              input_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
dense_1 (Dense)                                  (None, 32)                       544               dense[0][0]                                       
______________________________________________________________________________________________________________________________________________________
dense_2 (Dense)                                  (None, 64)                       2112              dense_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
l (Dense)                                        (None, 2)                        130               dense_2[0][0]                                     
______________________________________________________________________________________________________________________________________________________
s (Dense)                                        (None, 1)                        65                dense_2[0][0]                                     
======================================================================================================================================================
Total params: 4,147
Trainable params: 4,147
Non-trainable params: 0
______________________________________________________________________________________________________________________________________________________

CONV-MLP Model

______________________________________________________________________________________________________________________________________________________
Layer (type)                                     Output Shape                     Param #           Connected to                                      
======================================================================================================================================================
input_1 (InputLayer)                             [(None, 30, 5, 10, 5)]           0                                                                   
______________________________________________________________________________________________________________________________________________________
reshape (Reshape)                                (None, 30, 50, 5)                0                 input_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
conv2d (Conv2D)                                  (None, 27, 50, 8)                168               reshape[0][0]                                     
______________________________________________________________________________________________________________________________________________________
batch_normalization (BatchNormalization)         (None, 27, 50, 8)                32                conv2d[0][0]                                      
______________________________________________________________________________________________________________________________________________________
re_lu (ReLU)                                     (None, 27, 50, 8)                0                 batch_normalization[0][0]                         
______________________________________________________________________________________________________________________________________________________
dense_block (DenseBlock)                         (None, 27, 50, 40)               4096              re_lu[0][0]                                       
______________________________________________________________________________________________________________________________________________________
transition_block (TransitionBlock)               (None, 13, 50, 40)               1800              dense_block[0][0]                                 
______________________________________________________________________________________________________________________________________________________
dense_block_1 (DenseBlock)                       (None, 13, 50, 72)               8704              transition_block[0][0]                            
______________________________________________________________________________________________________________________________________________________
transition_block_1 (TransitionBlock)             (None, 6, 50, 72)                5544              dense_block_1[0][0]                               
______________________________________________________________________________________________________________________________________________________
dense_block_2 (DenseBlock)                       (None, 6, 50, 104)               13312             transition_block_1[0][0]                          
______________________________________________________________________________________________________________________________________________________
transition_block_2 (TransitionBlock)             (None, 3, 50, 104)               11336             dense_block_2[0][0]                               
______________________________________________________________________________________________________________________________________________________
input_2 (InputLayer)                             [(None, 80)]                     0                                                                   
______________________________________________________________________________________________________________________________________________________
dense_block_3 (DenseBlock)                       (None, 3, 50, 136)               17920             transition_block_2[0][0]                          
______________________________________________________________________________________________________________________________________________________
dense (Dense)                                    (None, 16)                       1296              input_2[0][0]                                     
______________________________________________________________________________________________________________________________________________________
transition_block_3 (TransitionBlock)             (None, 1, 50, 136)               19176             dense_block_3[0][0]                               
______________________________________________________________________________________________________________________________________________________
dense_1 (Dense)                                  (None, 32)                       544               dense[0][0]                                       
______________________________________________________________________________________________________________________________________________________
flatten (Flatten)                                (None, 6800)                     0                 transition_block_3[0][0]                          
______________________________________________________________________________________________________________________________________________________
dense_2 (Dense)                                  (None, 64)                       2112              dense_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
concatenate_16 (Concatenate)                     (None, 6864)                     0                 flatten[0][0]                                     
                                                                                                    dense_2[0][0]                                     
______________________________________________________________________________________________________________________________________________________
l (Dense)                                        (None, 2)                        13730             concatenate_16[0][0]                              
______________________________________________________________________________________________________________________________________________________
s (Dense)                                        (None, 1)                        6865              concatenate_16[0][0]                              
======================================================================================================================================================
Total params: 106,635
Trainable params: 103,483
Non-trainable params: 3,152
______________________________________________________________________________________________________________________________________________________

LSTM-MLP Model

______________________________________________________________________________________________________________________________________________________
Layer (type)                                     Output Shape                     Param #           Connected to                                      
======================================================================================================================================================
input_1 (InputLayer)                             [(None, 30, 5, 10, 5)]           0                                                                   
______________________________________________________________________________________________________________________________________________________
reshape (Reshape)                                (None, 30, 250)                  0                 input_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
lstm (LSTM)                                      (None, 30, 32)                   36224             reshape[0][0]                                     
______________________________________________________________________________________________________________________________________________________
lstm_1 (LSTM)                                    (None, 30, 32)                   8320              lstm[0][0]                                        
______________________________________________________________________________________________________________________________________________________
concatenate (Concatenate)                        (None, 30, 64)                   0                 lstm[0][0]                                        
                                                                                                    lstm_1[0][0]                                      
______________________________________________________________________________________________________________________________________________________
lstm_2 (LSTM)                                    (None, 30, 32)                   12416             concatenate[0][0]                                 
______________________________________________________________________________________________________________________________________________________
concatenate_1 (Concatenate)                      (None, 30, 96)                   0                 lstm[0][0]                                        
                                                                                                    lstm_1[0][0]                                      
                                                                                                    lstm_2[0][0]                                      
______________________________________________________________________________________________________________________________________________________
lstm_3 (LSTM)                                    (None, 30, 32)                   16512             concatenate_1[0][0]                               
______________________________________________________________________________________________________________________________________________________
input_2 (InputLayer)                             [(None, 80)]                     0                                                                   
______________________________________________________________________________________________________________________________________________________
concatenate_2 (Concatenate)                      (None, 30, 128)                  0                 lstm[0][0]                                        
                                                                                                    lstm_1[0][0]                                      
                                                                                                    lstm_2[0][0]                                      
                                                                                                    lstm_3[0][0]                                      
______________________________________________________________________________________________________________________________________________________
dense_1 (Dense)                                  (None, 16)                       1296              input_2[0][0]                                     
______________________________________________________________________________________________________________________________________________________
lstm_4 (LSTM)                                    (None, 32)                       20608             concatenate_2[0][0]                               
______________________________________________________________________________________________________________________________________________________
dense_2 (Dense)                                  (None, 32)                       544               dense_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
dense (Dense)                                    (None, 32)                       1056              lstm_4[0][0]                                      
______________________________________________________________________________________________________________________________________________________
dense_3 (Dense)                                  (None, 64)                       2112              dense_2[0][0]                                     
______________________________________________________________________________________________________________________________________________________
concatenate_3 (Concatenate)                      (None, 96)                       0                 dense[0][0]                                       
                                                                                                    dense_3[0][0]                                     
______________________________________________________________________________________________________________________________________________________
l (Dense)                                        (None, 2)                        194               concatenate_3[0][0]                               
______________________________________________________________________________________________________________________________________________________
s (Dense)                                        (None, 1)                        97                concatenate_3[0][0]                               
======================================================================================================================================================
Total params: 99,379
Trainable params: 99,379
Non-trainable params: 0
______________________________________________________________________________________________________________________________________________________

CAPS-MLP Model

______________________________________________________________________________________________________________________________________________________
Layer (type)                                     Output Shape                     Param #           Connected to                                      
======================================================================================================================================================
input_1 (InputLayer)                             [(None, 30, 5, 10, 5)]           0                                                                   
______________________________________________________________________________________________________________________________________________________
reshape (Reshape)                                (None, 30, 50, 5)                0                 input_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
conv2d (Conv2D)                                  (None, 27, 50, 8)                168               reshape[0][0]                                     
______________________________________________________________________________________________________________________________________________________
batch_normalization (BatchNormalization)         (None, 27, 50, 8)                32                conv2d[0][0]                                      
______________________________________________________________________________________________________________________________________________________
re_lu (ReLU)                                     (None, 27, 50, 8)                0                 batch_normalization[0][0]                         
______________________________________________________________________________________________________________________________________________________
dense_block (DenseBlock)                         (None, 27, 50, 40)               4096              re_lu[0][0]                                       
______________________________________________________________________________________________________________________________________________________
transition_block (TransitionBlock)               (None, 13, 50, 40)               1800              dense_block[0][0]                                 
______________________________________________________________________________________________________________________________________________________
input_2 (InputLayer)                             [(None, 80)]                     0                                                                   
______________________________________________________________________________________________________________________________________________________
dense_block_1 (DenseBlock)                       (None, 13, 50, 72)               8704              transition_block[0][0]                            
______________________________________________________________________________________________________________________________________________________
dense (Dense)                                    (None, 16)                       1296              input_2[0][0]                                     
______________________________________________________________________________________________________________________________________________________
transition_block_1 (TransitionBlock)             (None, 6, 50, 72)                5544              dense_block_1[0][0]                               
______________________________________________________________________________________________________________________________________________________
dense_1 (Dense)                                  (None, 32)                       544               dense[0][0]                                       
______________________________________________________________________________________________________________________________________________________
conv_caps2d (ConvCaps2D)                         (None, 2, 50, 8, 4)              9248              transition_block_1[0][0]                          
______________________________________________________________________________________________________________________________________________________
dense_2 (Dense)                                  (None, 64)                       2112              dense_1[0][0]                                     
______________________________________________________________________________________________________________________________________________________
lambda (Lambda)                                  (None, 2, 50, 8, 4)              0                 conv_caps2d[0][0]                                 
______________________________________________________________________________________________________________________________________________________
dense_3 (Dense)                                  (None, 16)                       1040              dense_2[0][0]                                     
______________________________________________________________________________________________________________________________________________________
dense_caps (DenseCaps)                           (None, 2, 8)                     51200             lambda[0][0]                                      
______________________________________________________________________________________________________________________________________________________
reshape_1 (Reshape)                              (None, 2, 8)                     0                 dense_3[0][0]                                     
______________________________________________________________________________________________________________________________________________________
lambda_1 (Lambda)                                (None, 2, 8)                     0                 dense_caps[0][0]                                  
______________________________________________________________________________________________________________________________________________________
lambda_2 (Lambda)                                (None, 2, 8)                     0                 reshape_1[0][0]                                   
______________________________________________________________________________________________________________________________________________________
add (Add)                                        (None, 2, 8)                     0                 lambda_1[0][0]                                    
                                                                                                    lambda_2[0][0]                                    
______________________________________________________________________________________________________________________________________________________
lambda_3 (Lambda)                                (None, 2, 8)                     0                 add[0][0]                                         
______________________________________________________________________________________________________________________________________________________
lambda_4 (Lambda)                                (None, 8)                        0                 lambda_3[0][0]                                    
______________________________________________________________________________________________________________________________________________________
l (Lambda)                                       (None, 2)                        0                 lambda_3[0][0]                                    
______________________________________________________________________________________________________________________________________________________
s (Dense)                                        (None, 1)                        9                 lambda_4[0][0]                                    
======================================================================================================================================================
Total params: 85,793
Trainable params: 84,849
Non-trainable params: 944
______________________________________________________________________________________________________________________________________________________

Releases

No releases published

Packages

No packages published

Languages