Automatic Detection of Action
Potentials in a Noisy Neural
Recording
I. Sadek, M. Elawady
Supervisor: Dr. Mathini Sellathurai
1B31XM Advanced Image Analysis
2B31XM Advanced Image Analysis
Spike Detection and Clustering With Unsupervised
Wavelet Optimization in Extracellular Neural
RecordingsVahid Shalchyan, Winnie Jensen and Dario Farina
IEEE Trans. Biomed. Engineering, 59(9):2576-2585,
2012.
Agenda
• Overview
• Related Work
• Methodology
• Results
• Conclusion
B31XM Advanced Image Analysis 3
Agenda
• Overview
• Related Work
• Methodology
• Results
• Conclusion
B31XM Advanced Image Analysis 4
Overview
B31XM Advanced Image Analysis 5
Action Potential (AP)
A series of changes result from applying an electric stimulation to excitable tissues
(i.e. nerves, all types of muscle).
Overview
B31XM Advanced Image Analysis 6
Problem Definition
The signals acquired from the microelectrodes are contaminated by background
noise
Noisy Simulated APs
Filtered Simulated APs
Agenda
• Overview
• Related Work
• Methodology
• Results
• Conclusion
B31XM Advanced Image Analysis 7
Related Work
B31XM Advanced Image Analysis 8
Methods Pros Cons
Amplitude Thresholding Low computational load
• Threshold selection for a tradeoff
between false negatives (FNs)
and false positives (FPs)
• Failed when spike amplitude are
close to or lower than the
background noise
Template Matching High detection performanceSpike shape knowledge are
required
Nonlinear Energy Operator
(NEO)
& Multi-resolution
Teager Energy Operator
(MTEO)
Easy implementation and
computational simplicitySame as Amplitude Thresholding
Wavelet Transformation
If wavelet shape is selected
properly, the wavelet transform can
be seen as a bank of matched filters
Prior knowledge about spike
shapes are required
Agenda
• Overview
• Related Work
• Methodology
• Results
• Conclusion
B31XM Advanced Image Analysis 9
Methodology
B31XM Advanced Image Analysis 10
Wavelet Transform
Wavelets are defined by two primary functions :
•Wavelet function (mother wavelet) ψ(t)
•Scaling function (father wavelet) φ(t)
where a is scalar factor and b is translation factor
Haar Wavelet Transform
Methodology
B31XM Advanced Image Analysis 11
Stationary Wavelet Transform (SWT)
DWT SWT
Methodology
B31XM Advanced Image Analysis 12
Wavelet Parameterization
Filter length = 4One independent parameter (α)
Methodology
B31XM Advanced Image Analysis 13
Flowchart
Noisy Signals
Filtered Signals
Detection(SWT)
Clustering(DWT)
Methodology
B31XM Advanced Image Analysis 14
Flowchart
Noisy Signals
Filtered Signals
Detection(SWT)
Clustering(DWT)
Methodology
B31XM Advanced Image Analysis 15
Detection
SWT five levels decomposition
Hard thresholding
Three maximum energy scale
selection
Summation & Filtering
Selection Criteria I
Final AP Candidates
AP Candidates
Methodology
B31XM Advanced Image Analysis 16
Detection
SWT five levels decomposition
Hard thresholding
Three maximum energy scale
selection
Summation & Filtering
Selection Criteria I
Final AP Candidates
AP Candidates
Methodology
B31XM Advanced Image Analysis 17
Detection
SWT five levels decomposition
Hard thresholding
Three maximum energy scale
selection
Summation & Filtering
Selection Criteria I
Final AP Candidates
AP Candidates
Methodology
B31XM Advanced Image Analysis 18
Detection – Thresholding I
Median Absolute Deviation (MAD) Operator
Example:
• Consider the data (1, 1, 2, 2, 4, 6, 9).
• It has a median value of 2.
• The absolute deviations about 2 are (1, 1, 0, 0, 2, 4, 7).
• The sorted absolute deviations are (0, 0, 1, 1, 2, 4, 7).
• So the median absolute deviation (MAD) for this data is 1
Methodology
B31XM Advanced Image Analysis 19
Detection – Thresholding II
Threshold level at each scale is computed as follows:
Where N is the number of samples (n) and σj is the noise standard
deviation at scale j which is estimated with (MAD) operator
80% of this threshold level are used to keep the highest 20% candidates
for detection
Methodology
B31XM Advanced Image Analysis 20
Detection – Thresholding III
Hard thresholding can be described as follows:
wavelet coefficient after thresholding at scale j
Methodology
B31XM Advanced Image Analysis 21
Detection
SWT five levels decomposition
Hard thresholding
Three maximum energy scale
selection
Summation & Filtering
Selection Criteria I
Final AP Candidates
AP Candidates
Methodology
B31XM Advanced Image Analysis 22
Detection – Energy Selection
The signal energy at each scale (Ewj) is calculated as
Wavelet coefficient after thresholding at scale j
Average value at each scale
Methodology
B31XM Advanced Image Analysis 23
Detection
SWT five levels decomposition
Hard thresholding
Three maximum energy scale
selection
Summation & Filtering
Selection Criteria I
Final AP Candidates
AP Candidates
Methodology
B31XM Advanced Image Analysis 24
Detection – Summation & Filtering
S(n) is calculated as the summation of the absolute values of the wavelet
coefficients
Wavelet coefficient after thresholding at scale j
for removing flase peaks, S(n) is filtered with smoothing window W(n)
Methodology
B31XM Advanced Image Analysis 25
Detection
SWT five levels decomposition
Hard thresholding
Three maximum energy scale
selection
Summation & Filtering
Selection Criteria
Final AP Candidates
AP Candidates
Methodology
B31XM Advanced Image Analysis 26
Detection – Selection Criteria
The optimal wavelet basis selection is based on the correlation similarity
(wave form x(n) and wave form y(n))
Where E is the expected value operator
Designated label for i(n) Median value of APs
KD = 0.4 Rejects very far outliers
Methodology
B31XM Advanced Image Analysis 27
Flowchart
Noisy Signals
Filtered Signals
Detection(SWT)
Clustering(DWT)
Methodology
B31XM Advanced Image Analysis 28
Clustering
DWT five levels decomposition
ClusteringSelection Criteria II
Final Classified APs
Classified APs
Final AP Candidates
Based on normal distance
measurement
KC = 0.8 represents the high similarity of shapes
between APs
Agenda
• Overview
• Related Work
• Methodology
• Results
• Conclusion
B31XM Advanced Image Analysis 29
Results
B31XM Advanced Image Analysis 30
Detector Output
a-band pass filtered data b-THR detector c-NEO detector
d-MTEO detector e-DWT product detector f-Proposed method
Results
B31XM Advanced Image Analysis 31
Comparison of average TPR vs SNR
Results
B31XM Advanced Image Analysis 32
Detection Performance
1st
2nd
Agenda
• Overview
• Related Work
• Methodology
• Results
• Conclusion
B31XM Advanced Image Analysis 33
Conclusion
B31XM Advanced Image Analysis 34
• Introduce unsupervised optimization for the best
basis selection of detection & clustering APs.
• Improve the spike sorting performance by applying
unsupervised criterion based on the correlation
similarity.
References
B31XM Advanced Image Analysis 35
• Rieder, P.; Gerganoff, K.; Gotze, J.; Nossek, J.A., “Parameterization and
implementation of orthogonal wavelet transforms,” Acoustics, Speech,
and Signal Processing, 1996. ICASSP-96. Conference Proceedings.,
1996 IEEE International Conference on , vol.3, no., pp.1515,1518 vol. 3,
7-10 May 1996.
• Shalchyan, V.; Jensen, W.; Farina, D., “Spike Detection and Clustering
With Unsupervised Wavelet Optimization in Extracellular Neural
Recordings,” Biomedical Engineering, IEEE Transactions on , vol.59,
no.9, pp.2576,2585, Sept. 2012.
• Zhou, X.; Zhou, C.; Stewart, B.G., “Comparisons of discrete wavelet
transform, wavelet packet transform and stationary wavelet transform in
denoising PD measurement data,” Electrical Insulation, 2006.
Conference Record of the 2006 IEEE International Symposium on , vol.,
no., pp.237,240, 11-14 June 2006.
B31XM Advanced Image Analysis 36