Enhancing iEEG seizure identification and similarity search with Google Cloud
Sharanya Desai, Ph.D.
Technical Fellow, Director of AI, NeuroPace, Inc.
Iris Fang
Enterprise Customer Engineer, Google Cloud
Globally, epilepsy affects approximately 50 million people. Located in Mountain View, CA, NeuroPace, Inc.1 is committed to transforming the lives of those living with epilepsy by reducing or eliminating their seizures. The company's RNS® System,2 a responsive neurostimulation device, monitors brain activity to detect seizure precursors and delivers targeted electrical stimulation to prevent seizures. This device also captures iEEG (intracranial electroencephalogram) data, with over 15 million recordings from over 5,000 patients collected to date, making it the largest collection of ambulatory iEEG records available.
NeuroPace's AI team has developed electrographic seizure classifier models using clinical trial data from the RNS System and has fine-tuned these models through transfer learning to identify seizure onset times. Previously, machine learning (“ML”) training was constrained by the limited number of Graphical Processing Units (GPUs) available in on-premises virtual machines (VMs), slowing down the optimization of models and training processes. NeuroPace tackled this challenge by scaling ML workloads with Google Cloud, moving away from on-premises VMs and utilizing Vertex AI for more efficient training and hyperparameter tuning.
Leveraging Google Cloud AI infrastructure
Google Cloud's technologies have significantly improved and accelerated NeuroPace’s ML training capabilities. Searching through more than a million iEEG records to identify similar ones, a task that previously took minutes to hours, can now be completed in milliseconds using Google's AlloyDB AI, part of the AlloyDB for PostgreSQL database. Further, the integration of Vertex AI, GPUs, Compute Engine, and Google Cloud Storage has revolutionized NeuroPace’s ML training processes, enhancing scalability, automation, and efficiency.
Vertex AI, Google Cloud’s AI development platform, supports the entire ML workflow, including data engineering, model training, deployment, and monitoring. This integration enables NeuroPace's AI team to use various GPUs for model training, with L4 GPUs offering better price-performance compared to on-premises resources. With it, they’ve developed a cloud-native ML training system, achieving desired scalability and efficiency through Vertex AI and GPUs.
Patient similarity search with AlloyDB AI
Identifying similar electrophysiological features across epilepsy patients has the potential to aid in discovering effective treatment options. NeuroPace has conducted research studies to identify similar iEEG patterns within a large dataset of over 1 million time-series iEEG records, utilizing the built-in vector search capabilities in AlloyDB AI. By employing IVFFlat and HNSW indexing methods, searches for similar iEEG records in this dataset can now be executed in approximately ten milliseconds.
AlloyDB AI enables storing data embeddings in vector form directly in the database, facilitating easier and faster similarity searches compared to standard PostgreSQL. This eliminates the need for elaborate external processing pipelines.
The next-generation disease management system
Data captured from the NeuroPace RNS System may provide insights into seizure trends and triggers leading to optimizing and personalizing epilepsy treatment.3 The research efforts to integrate Google Cloud's infrastructure with NeuroPace's RNS System data are directed towards creating a sophisticated disease management system for epilepsy, emphasizing tailored treatments and enhanced patient well-being.
1. https://www.neuropace.com/
2. Rx Only. The RNS® System is an adjunctive therapy for adults with refractory, partial onset seizures with no more than 2 epileptogenic foci. See important safety information at http://www.neuropace.com/safety/.
3. The RNS System does not currently incorporate functionality that is based upon or utilizes AI features.