Edge-Fog Computing-Enabled EEG Data Compression via Asymmetrical Variational Discrete Cosine Transform Network

Xin Zhu, Hongyi Pan, Ahmet Enis Çetin

TL;DR

Brain-Computer Interfaces (BCIs) generate massive amounts of EEG data, creating a bottleneck for real-time transmission over bandwidth-limited IoT networks. This paper introduces AVDCT-Net, an asymmetrical compression network that pairs a lightweight, frequency-domain encoder on edge devices with a powerful, attention-based decoder on fog servers. By exploiting both intra- and inter-channel correlations, the model achieves state-of-the-art compression ratios while preserving—and even slightly enhancing—the signal features necessary for downstream BCI classification tasks.

What Problem Does This Paper Address?

As BCIs move from the lab into real-world industrial and medical applications (like Industry 4.0 smart factories), they increasingly rely on the Internet of Things (IoT). However, multi-channel EEG headsets generate vast volumes of continuous data. Transmitting this raw data directly to the cloud causes latency, drains batteries, and eats up limited bandwidth.

Edge-fog computing solves this by compressing data near the sensor (the edge) and decompressing/analyzing it on a local network server (the fog). The challenge is that edge devices lack the compute power for heavy neural network compressors (like deep autoencoders). Conversely, traditional lightweight methods (like standard Discrete Cosine Transform, or DCT) process channels independently, ignoring the rich spatial correlations between different EEG electrodes. This results in sub-optimal compression and poor signal reconstruction.

Methods

The authors propose the Asymmetrical Variational Discrete Cosine Transform Network (AVDCT-Net). It is "asymmetrical" because the computational heavy lifting is offloaded to the fog decoder, keeping the edge encoder lean.

  • The Edge Encoder: Instead of heavy convolutional layers, the encoder uses a low-complexity multi-channel DCT compression block. It transforms the EEG signal into the frequency domain and applies trainable hard-thresholding and scaling operators. This acts as a learned filter bank that drops noisy, redundant high-frequency coefficients while keeping the core latent representation.
  • The Fog Decoder: The decoder uses an adaptive filter bank to merge features across adjacent EEG channels, recovering information that might have been lost during compression. It then uses a novel Inverse DCT Reconstructed Multi-Head Attention (IRMHA) module to capture global and local dependencies before reconstructing the final time-domain signal.
  • A Custom Loss Function: The authors derived a new Evidence Lower Bound (ELBO) loss based on variational inference. Standard sparsity constraints force all latent variables toward zero, which can destroy important primary signal coefficients. This new ELBO assumes a Laplacian distribution and constrains the sum of the coefficients to a small, non-zero value, perfectly balancing compression efficiency with reconstruction fidelity.

Datasets

The model was evaluated on two standard public BCI datasets:

  • BCI2 (Dataset-IIa): 64-channel EEG recordings from 3 subjects, sampled at 160 Hz, commonly used for motor imagery tasks.
  • BCI3 (Dataset-II): 64-channel EEG recordings used for P300 speller tasks, sampled at 240 Hz.

No new datasets were introduced, but these standard benchmarks allowed for direct comparison with existing state-of-the-art compression techniques.

Key Insights and Ideas

  • Compression as Denoising: The hard-thresholding in the DCT domain naturally filters out high-frequency noise. Because of this, downstream classification tasks actually performed better on the compressed/reconstructed data than on the raw data.
  • Inter-channel Correlation is a Safety Net: By using an adaptive filter bank in the decoder to share information across adjacent channels, the model successfully compensates for data lost during the aggressive, lossy compression at the edge.
  • Smarter Sparsity: The custom ELBO loss function proves that penalizing all coefficients toward zero is a mistake for EEG data. Allowing a small, non-zero sum of coefficients preserves the structural integrity of the brainwaves.
  • Asymmetry Works for IoT: By shifting the complex Multi-Head Attention mechanism entirely to the fog layer, the edge device only needs to perform basic DCT and linear scaling, making it highly feasible for real-world, battery-powered BCI headsets.

Key Results

  • Compression vs. Fidelity: On the BCI2 dataset, AVDCT-Net achieved a Compression Ratio (CR) of 7.82 with a Percent Root Mean Square Difference (PRD) of 17.07, outperforming state-of-the-art methods like Variational Autoencoders (VAEs) and K-means clustering approaches.
  • Downstream Task Accuracy: In a P300 speller detection task (BCI3 dataset), a classifier achieved an 89.38% accuracy on the reconstructed data, slightly edging out the 89.21% baseline accuracy on the original uncompressed data.
  • Hardware Efficiency: Tested on a Raspberry Pi 400, the encoder required only 4,547 trainable parameters and 561K MACs (a 61% and 23% reduction compared to a VAE, respectively).
  • Speed and Power: The edge encoder achieved an inference latency of just 0.0067 seconds and consumed only 0.0422 Joules per inference.

Limitations and Future Work

  • Limitations: While the paper proves the concept on a Raspberry Pi 400, this is still a relatively powerful edge device (featuring a quad-core ARM Cortex-A72) compared to the ultra-low-power microcontrollers often found in wearable biosensors.
  • Future Work: The authors plan to deploy and test AVDCT-Net across a wider, more constrained range of edge devices. This includes low-power IoT hardware (like standard Arduinos), embedded systems (FPGAs, DSPs), and mobile computing platforms (smartphones, NVIDIA Jetson).

Summary updated

BibTeX
@article{zhu2025edge,
  author = {Xin Zhu and Hongyi Pan and Ahmet Enis Çetin},
  title = {{Edge-Fog Computing-Enabled EEG Data Compression via Asymmetrical Variational Discrete Cosine Transform Network}},
  journal = {IEEE Internet of Things Journal},
  year = {2025},
  url = {https://openreview.net/forum?id=6EzFLBfJ2a},
}
Figure