Prediction of Critical Intracranial States through Medical Signal Processing
Tejas Thvar1, Abhejit Rajagopal 2
1Mountain View High School, 3535 Truman Ave, Mountain View, CA 94040
e-mail address: [email protected]
2Department of Electrical and Computer Engineering, University of California, Santa Barbara, CA, 93106
Intracranial hypertension and epileptic seizures are debilitating conditions. While surgical intervention can be lifesaving in these critical brain states, current state of the art monitoring/diagnostic techniques are inadequate as they detect these events after they occur. It is critical to develop predictive techniques to enable early intervention and prevent irreversible brain damage or death. The goal of this work is to develop such predictive techniques to identify critical brain states. Intracranial pressure signals were first processed into three-dimensional time varying signals using tracking algorithms that were previously developed. These signals were then processed using newly developed linear algebra based algorithms to identify critical states. The algorithm was validated against test data sets and was shown to be effective in predicting trajectory of critical states.
Keywords: Medical Signal Processing, Intracranial Pressure, Big Data, Regression Analysis
The brain is an organ constantly emitting signals through the firing of neurons along pathways to the rest of the body. Therefore, the brain’s health and its monitoring is essential in maintaining a strong body. Cerebrospinal fluid, or CSF, is a transparent liquid suspending and serving as a pillow to the rest of the brain and the spinal cord- circulating nutrients as well as filtering chemicals throughout the cranium1. Pressure exerted by this fluid is called Intracranial Pressure (ICP) and is measured in milligrams of mercury (mm Hg). Increase in ICP often represents deleterious or critical conditions such as a mass that is forming or internal bleeding. A healthy level of ICP for a normal adult is around 10 mm Hg, a poor, unhealthy level is 20-40 mm Hg, and a fatal level is 60 mm Hg1, 2.
A rise in ICP is an extremely significant problem, as it can lead to serious hemorrhage, intracranial hypertension, as well as epileptic seizures. If one is suspected to have high ICP, which usually occurs in intensive care at the hospital due to head injury, extremely invasive procedures will follow. Intra-ventricular catheters, a common method of monitoring pressure, requires a hole to be drilled inside the skull of the patient, and the catheter to be placed inside the lateral ventricle of the brain3. Through this, ICP signal data is taken as a raw waveform. If early detection of an ICP spike occurs, then doctors can do a simple neurosurgical shunt to drain CSF out of the head. A neurosurgical shunt is a relatively non-invasive procedure in which a catheter attached to a valve is placed in the peritoneal cavity. However, if the ICP is high and has not been detected early on, doctors will have to perform an extremely invasive craniotomy in which the patient’s head must be cut open (form a cranial flap) and multiple holes are bored into the skull. Dura, the membrane surrounding the brain and spinal cord, also must be sutured back together. Side effects of a craniotomy include infected cranial flaps, infected dura, and even death: elevated ICP is actually one of the leading causes of death in brain-related diseases, with a mortality rate of over 20 %2, 4.
Current state of the art monitoring and diagnostic techniques are inadequate as they detect high levels of ICP after they occur. It is critical to develop predictive techniques to enable early intervention and prevent irreversible brain damage or death. Spikes in ICP are typically attributed to a mass bleeding into the brain, or brain swelling, which can lead to major problems if not detected as soon as possible. The goal of this work is to develop such predictive techniques to identify critical brain states.
The newly developed RST04 algorithm is a cutting edge analysis tool able to extrapolate regression lines from pieces of “training data”, and apply the trends to calculate trajectories. This dataset originates from a UCLA study on 70 patients treated for various ICP related conditions. ECG and ICP signals were recorded, creating a data manifold starting 15 minutes before a spike occurs, and ending 5 minutes after its occurrence. Signals were recorded on these patients with raising ICP. This signal data was processed through the use of the RajagopalScalzo01 (RS01) algorithm, into simple three-dimensional data points5.
The applications of the algorithm are endless- if a high level of precision can be attained, then ICP levels approaching critical states can be predicted upon the manifold, leading to advancement in brain signal detection. This can lead to the less invasive procedures having to occur, such as neurosurgical shunts, improving the mortality rates of ICP-related diseases, and generally allowing for early detection to be possible in epileptic seizures and intracranial hypertension. We believed that this algorithm could potentially be able to assist in elevated ICP predictions with a high accuracy rate.
II. ALGORITHM OVERVIEW
A. Algorithm Cycle
The RST04 Algorithm comprises of 7 main sections, coded in Python (numpy and scipy). Prior to the implementation of the algorithm, noisy data was processed using the RS01 algorithm, and the resulting processed data was mapped and indexed, as shown in section A.2. Training data was separated into regression groups based on varying time intervals (ex: -15 minutes to -10 minutes, etc.). Optimal group number was found to be around 48 groups. Then, the final set of points in the testing data was interpolated using the curve of best-fit technique developed. The fit for the points was then compared to the regression groups of the training data, by the comparing of the angle between the 3- dimensional vectors using the dot product as well as the vector projections. Once the closest match was identified, this was recorded in a list, and if the list contained three “precursor” trajectories, then the trajectory is classified as critical. This algorithm utilizes three main mathematical analysis techniques- Vandermonde based polynomial interpolation, solved by the least squares method, the dot product, and vector projection. Training Data was fed into the three different stages in order, and then applied to a larger testing set.
A. 1. De-noising of ICP Raw Signal Data
When ICP Signals are collected, they appear in extremely noisy (fluctuating) waves, as shown in figure 1, which make real-time processing/software for ICP analysis extremely difficult. The RS01 algorithm, developed by mentor Abhejit Rajagopal, takes in noisy ICP and ECG data signals (in the form of pulses), and projects them onto a three-dimensional manifold in a denoised estimate, as shown in figure 2.
Figure 1: Example ICP Data Signals
Figure 2: Processed ICP Data after RS01 is Implemented
A.2 Mapping and Indexing
Initial work on the algorithm is based on the idea of indexing and mapping three-dimensional ICP processed data signals to colors. The algorithm developed contains a user interface that allows one to input data, and come up with color-mapped data, as shown in figures 3 and 4. The different axes represent the different components of the processed signal once fed into the RS01 algorithm (example of mapped signal shown in figure 2).
Figure 3: Original XYZ Training Data Signals
Figure 4: Color-Mapped XYZ data
A.3 Polynomial Interpolation Techniques
Vandermonde based polynomial interpolation techniques were utilized in order to calculate regression lines for the training data set. The computations for calculating the same are detailed in section III. A.
A.4 Vector Comparison
Two mathematical analysis techniques were used to compare the three-dimensional vectors stemming from the processed xyz data signals- the dot product, and projection. Computations are detailed in section III. B.
III. MATHEMATICS USED
A. Vandermonde based Polynomial Interpolation
The algorithms developed utilize a polynomial interpolation technique based on the use of Vandermonde matrix systems. To find the coefficients of a certain polynomial P (x) the simplest way is to write a linear system of equations, as shown in equation 1.
In equation 2, coefficients and variables of the polynomial are placed into a matrix equation format, forming the basis of the Vandermonde matrix, which can then be solved using multiple methods of finding solutions for matrix systems6.
This separates a complex matrix problem into a simple A*x = b matrix equation form. However, to solve the problem, one must approach a multi-dimensional matrix system with either simple Gaussian elimination,t, or utilize derivative availability, which are inefficient. Polynomial based interpolation in the algorithm utilizes a least squares approach to solve the matrix system as efficiently as possible. The least squares method can solve matrix equations that are not in the correct rows by columns formatting.
B. Least Squares Approximation
Least Squares approximation takes a matrix equation in A*x= B form that is not in the correct columns vs. rows notations, and applies the Least Squares Approximation formula, as shown in equation 3. The formula takes the transposed matrix AT, (rows and columns switch places), and uses it to solve the matrix equation.
C.1 Vector Comparison using the Dot Product
The crux of the RST04 algorithm is in the use of vectors to compare ICP trajectories. Unit vectors were created in groups of the training data set, and were compared to the created testing data vectors by using the dot product and projection. The dot product, as shown in equation 4, is a form of vector “multiplication” (multiplication of individual components)7. Because the vectors are normalized, the largest dot product signifies the most similarity between the vector.
Fig 5: Graphical Representation- Projection Vector6
Fig 6: Graphical Algorithm Visualization
C.2 Vector Comparison using Projection
The dot product is one simple way of calculating the “similarity” of two normalized vectors; however, projection, which utilizes the dot product, is a secondary way. Projection, as shown in figure 5 and equation 5, drops down a vector onto another one, in a right angle, to compare similarity. Once again, the largest magnitude of the projection vector entails the most similarity between testing and training vectors. Figure 6 shows a graphical visualization of the methods used in the algorithm.
IV. Results and Discussion
Testing data sets provided by the above described UCLA study was ran through the RST04 algorithm. Once the algorithm was implemented upon the data set, the resultant ICP prediction is shown in figure 6, and data table 1. Prediction error mean is 1.391 mm Hg, and percent error is 5.107 % error, when utilizing the dot product method. Whereas, when using the projection method, as shown in figure 7 and data table 2, the percent error is 5.691 %, and the average prediction error is 1.551 mm Hg.
The dot product method has a slightly better prediction accuracy than the projection method mainly due to a minor spike in data around t= -4 minutes, not part of the actual ICP data. This spike is most likely due to a fluctuating vector magnitude affecting the projection output, leading to slightly lower prediction accuracy.
However, despite the RST04’s 95% accuracy, the algorithm may not work for extremely noisy testing data, due to the fact that the training data and testing data used in the project were relatively similar. Neuronal noise, caused by random electric fluctuations in neuron networks may aid to the data’s noisiness. f data is extremely noisy, then the vector comparison may not fully work, and trajectory prediction will be extremely flawed. Additional data sets need to be processed through the RST04 algorithm to verify its robustness.
Fig 6: Dot Product Data
Fig 7: Dot Product Errors
Fig 8: Projection Data
Figure 9: Projection Errors
V. Conclusions/further Work
The newly developed RST04 algorithm was proven to be an effective diagnostic and monitoring technique in the prediction of intracranial pressure spikes, showing that prediction is possible. The RST04 algorithm can be utilized to predict critical intracranial states upon the data manifold with around 95% accuracy, which is extremely significant in early intervention with ICP-related diseases. This can be applied to advance brain data predictions and suffice as a monitoring and diagnostic technique, which is able to predict the onset of intracranial hypertension and epileptic seizures. Improvements to the algorithm may be in using the differences in the vectors to calculate trajectory on the manifold more accurately. More data sets also may have to be run through the algorithm to verify its accuracy rate and robustness. Further work could include applying a similar technique to heart pulse signal data, to predict heart failure. Heart signal processing, (using EKG heart signals), similar to brain signal processing, is an extremely important field, and is extremely significant in advances for cardiovascular disease detection.
I would like to thank Abhejit Rajagopal for his mentorship and support as well as the rest of my group members, and Ross Melczer for his constant responses on paper structure. I would like to thank Dr. Kim and the RMP program for the opportunity to conduct research at a collegiate level. Finally, I would like to thank my parents for all of the support extended towards me.
 National Multiple Sclerosis Society
 “Increased intracranial pressure: MedlinePlus Medical Encyclopedia,” U.S National Library of Medicine, 03-Aug-2009. [Online]. Available: https://www.nlm.nih.gov/medlineplus/ency/article/000793.htm. [Accessed: 23-Jul-2016].
 J. H. Medical Institute, "Johns Hopkins medicine health library," in Johns Hopkins Medical Institute, 2009. [Online]. Available: http://www.hopkinsmedicine.org/healthlibrary/test_procedures/neurological/craniotomy_92,p08767/. Accessed: Jul. 27, 2016.
 “Intracranial pressure monitoring: MedlinePlus Medical Encyclopedia,” U.S National Library of Medicine, 03-Sep-2009. [Online]. Available: https://www.nlm.nih.gov/medlineplus/ency/article/003411.htm. [Accessed: 23-Jul-2016].
 Abhejit Rajagopal, Robert Hamilton, Fabien Scalzo
Noise reduction in intracranial pressure signal using causal shape manifolds
U. of W. M., “Interpolation using the Vandermonde matrix,” Interpolation using the Vandermonde matrix,
12-Oct-2009. [Online]. Available: http://pages.cs.wisc.edu/~sifakis/courses/cs412-s13/lecture_notes/cs412_12_feb_2013.pdf. [Accessed: 07-Jul-2016].
 2016 P. Dawkins, "Calculus II - dot product," 2003. [Online]. Available:
http://tutorial.math.lamar.edu/Classes/CalcII/DotProduct.aspx. Accessed: Jul. 20, 2016.