HP-GSBS accelerates neural activity segmentation by over 150 times

HP-GSBS: Accelerating greedy state boundary search with reusable interval statistics

Computational Engineering, Finance, and Science

Summary

Detecting when the brain shifts between different activity states is important but slow using current methods. The authors developed HP-GSBS, a faster version that reuses calculations and reduces repeated work to speed up this process dramatically. They tested it on both simulated and real brain signals, showing it finds the same transitions much faster without losing accuracy. This helps scientists analyze large brain datasets more efficiently.

What this means in practice

  • For neural data analysts: Process large neural recordings faster by applying HP-GSBS to identify brain state changes without adding computational cost.
  • For clinical neurophysiology teams: Speed up EEG analysis pipelines by integrating HP-GSBS to segment stable brain activity states more efficiently.

Authors

Yanzhe Zhao, Yongzhang Ji

Abstract

Greedy State Boundary Search (GSBS) identifies transitions between relatively stable neural activity patterns, but repeated candidate evaluation makes large analyses expensive. HP-GSBS is an open-source Python package that reorganizes the search around reusable interval contributions and correlation statistics. Streaming candidate reduction and local refinement further reduce repeated work; CPU, PyTorch CUDA and Triton backends share sequential segmentation decisions. Across seven controlled workloads with two realizations each, median same-input speedups range from 154 to 1730 times. All 168 optimized executions reproduce original boundaries and selected state counts, with maximum absolute t-distance difference $1.88\times10^{-11}$. Four frozen EEG recordings provide complementary validation, including a complete input-to-segmentation application example. Batch processing, versioned result persistence and optional low-memory execution support recording collections and longer inputs. By removing redundant computation, HP-GSBS makes established neural-state segmentation faster while preserving its scientific outputs.