Table of Contents
Fetching ...

The Case for Cleaner Biosignals: High-fidelity Neural Compressor Enables Transfer from Cleaner iEEG to Noisier EEG

Francesco Stefano Carzaniga, Gary Tom Hoppeler, Michael Hersche, Kaspar Anton Schindler, Abbas Rahimi

TL;DR

BrainCodec addresses the challenge of efficiently storing and transmitting EEG and iEEG signals without sacrificing downstream analysis accuracy. It introduces a high-fidelity quantized autoencoder with residual vector quantization and a multi-scale STFT discriminator, trained with time- and frequency-domain losses plus a line-length term to preserve EEG-relevant features. The key findings show that training on higher-SNR iEEG improves reconstruction quality on EEG, including cross-modal and mixed-modal setups, enabling up to $64\times$ compression with no degradation in seizure detection or motor imagery tasks, and that mixed-modal training yields further gains. The work demonstrates practical impact for long-term clinical monitoring and wearable devices, and provides reproducible code on GitHub.

Abstract

All data modalities are not created equal, even when the signal they measure comes from the same source. In the case of the brain, two of the most important data modalities are the scalp electroencephalogram (EEG), and the intracranial electroencephalogram (iEEG). They are used by human experts, supported by deep learning (DL) models, to accomplish a variety of tasks, such as seizure detection and motor imagery classification. Although the differences between EEG and iEEG are well understood by human experts, the performance of DL models across these two modalities remains under-explored. To help characterize the importance of clean data on the performance of DL models, we propose BrainCodec, a high-fidelity EEG and iEEG neural compressor. We find that training BrainCodec on iEEG and then transferring to EEG yields higher reconstruction quality than training on EEG directly. In addition, we also find that training BrainCodec on both EEG and iEEG improves fidelity when reconstructing EEG. Our work indicates that data sources with higher SNR, such as iEEG, provide better performance across the board also in the medical time-series domain. BrainCodec also achieves up to a 64x compression on iEEG and EEG without a notable decrease in quality. BrainCodec markedly surpasses current state-of-the-art compression models both in final compression ratio and in reconstruction fidelity. We also evaluate the fidelity of the compressed signals objectively on a seizure detection and a motor imagery task performed by standard DL models. Here, we find that BrainCodec achieves a reconstruction fidelity high enough to ensure no performance degradation on the downstream tasks. Finally, we collect the subjective assessment of an expert neurologist, that confirms the high reconstruction quality of BrainCodec in a realistic scenario. The code is available at https://github.com/IBM/eeg-ieeg-brain-compressor.

The Case for Cleaner Biosignals: High-fidelity Neural Compressor Enables Transfer from Cleaner iEEG to Noisier EEG

TL;DR

BrainCodec addresses the challenge of efficiently storing and transmitting EEG and iEEG signals without sacrificing downstream analysis accuracy. It introduces a high-fidelity quantized autoencoder with residual vector quantization and a multi-scale STFT discriminator, trained with time- and frequency-domain losses plus a line-length term to preserve EEG-relevant features. The key findings show that training on higher-SNR iEEG improves reconstruction quality on EEG, including cross-modal and mixed-modal setups, enabling up to compression with no degradation in seizure detection or motor imagery tasks, and that mixed-modal training yields further gains. The work demonstrates practical impact for long-term clinical monitoring and wearable devices, and provides reproducible code on GitHub.

Abstract

All data modalities are not created equal, even when the signal they measure comes from the same source. In the case of the brain, two of the most important data modalities are the scalp electroencephalogram (EEG), and the intracranial electroencephalogram (iEEG). They are used by human experts, supported by deep learning (DL) models, to accomplish a variety of tasks, such as seizure detection and motor imagery classification. Although the differences between EEG and iEEG are well understood by human experts, the performance of DL models across these two modalities remains under-explored. To help characterize the importance of clean data on the performance of DL models, we propose BrainCodec, a high-fidelity EEG and iEEG neural compressor. We find that training BrainCodec on iEEG and then transferring to EEG yields higher reconstruction quality than training on EEG directly. In addition, we also find that training BrainCodec on both EEG and iEEG improves fidelity when reconstructing EEG. Our work indicates that data sources with higher SNR, such as iEEG, provide better performance across the board also in the medical time-series domain. BrainCodec also achieves up to a 64x compression on iEEG and EEG without a notable decrease in quality. BrainCodec markedly surpasses current state-of-the-art compression models both in final compression ratio and in reconstruction fidelity. We also evaluate the fidelity of the compressed signals objectively on a seizure detection and a motor imagery task performed by standard DL models. Here, we find that BrainCodec achieves a reconstruction fidelity high enough to ensure no performance degradation on the downstream tasks. Finally, we collect the subjective assessment of an expert neurologist, that confirms the high reconstruction quality of BrainCodec in a realistic scenario. The code is available at https://github.com/IBM/eeg-ieeg-brain-compressor.

Paper Structure

This paper contains 19 sections, 9 equations, 5 figures, 4 tables.

Figures (5)

  • Figure 1: BrainCodec training and usage. a. BrainCodec can be trained on EEG or iEEG data. b. BrainCodec trained on iEEG can compress both iEEG and EEG data, while BrainCodec trained on EEG can only compress other EEG data. c. BrainCodec's high-fidelity compressed signals can be used to perform downstream classification on iEEG and EEG data.
  • Figure 2: Cross-modality signal reconstruction fidelity of BrainCodec. BrainCodec trained on iEEG (higher SNR) always performs better at moderate and higher compression ratios compared to BrainCodec trained on scalp EEG (lower SNR), even when compressing EEG.
  • Figure 3: Mixed-modality signal reconstruction fidelity of BrainCodec. BrainCodec trained on both intracranial EEG and scalp EEG maintains the reconstruction fidelity of an iEEG-model when compressing iEEG. At the same time, it improves performance at high compression ratios with respect to a scalp EEG-trained model compressing scalp EEG.
  • Figure 4: Within-modality signal reconstruction fidelity of BrainCodec on intracranial EEG (iEEG). BrainCodec trained only on the SWEC dataset shows increased performance across the board both on the SWEC and MC dataset, and also reaches higher compression ratios while maintaining a moderate PRD.
  • Figure 5: Within-modality signal reconstruction fidelity of BrainCodec on scalp EEG. BrainCodec trained only on the CHB dataset, shows increased performance across the board both on the CHB and the BONN dataset, and also reaches higher compression ratios while maintaining a moderate PRD.