EnK: Encoding time-information in convolution

Avinash Kumar Singh, Chin‐Teng Lin · DOI

Abstract

Recent development in deep learning techniques has attracted attention in decoding and classification in EEG signals. Despite several efforts utilizing different features of EEG signals, a significant research challenge is to use time-dependent features in combination with local and global features. There have been several efforts to remodel the deep learning convolution neural networks (CNNs) to capture time-dependency information by incorporating hand-crafted features, slicing the input data in a smaller time-windows, and recurrent convolution. However, these approaches partially solve the problem, but simultaneously hinder the CNN's capability to learn from unknown information that might be present in the data. To solve this, we have proposed a novel time encoding kernel (EnK) approach, which introduces the increasing time information during convolution operation in CNN. The encoded information by EnK lets CNN learn time-dependent features in-addition to local and global features. We performed extensive experiments on several EEG datasets: cognitive conflict (CC), physical-human robot collaboration (pHRC), P300 visual-evoked potentials, movement-related cortical potentials (MRCP). EnK outperforms the state-of-art by 12% (F1 score). Moreover, the EnK approach required only one additional parameter to learn and can be applied to a virtually any CNN architectures with minimal efforts. These results support our methodology and show high potential to improve CNN performance in the context of time-series data in general.

Introduction

Electroencephalogram (EEG) signals are a cornerstone for understanding brain activity, yet they present significant processing challenges. As time-series data, the sequence and timing of signals are as critical as their magnitude. While Convolutional Neural Networks (CNNs) excel at identifying spatial patterns—"local" features—they often fail to capture the "global" temporal flow inherent in raw EEG data.

Previous attempts to address this have relied on hand-crafted features, data windowing, or computationally intensive Recurrent Neural Networks (RNNs). These methods often require expert labor or limit the network's ability to discover novel patterns. The proposed Time Encoding Kernel (EnK) seeks to integrate time-awareness directly into the convolution operation, offering a simpler and more efficient alternative.

Methodology: The Time Encoding Kernel (EnK)

The core innovation is the Time Encoding Kernel (EnK). In a standard convolution, a fixed filter slides across the data. In EnK, the kernel values are linearly scaled as the filter moves across the time dimension.

Comparison between standard convolution (A) and EnK convolution (B). In EnK, the kernel value increases linearly as it slides over columns, encoding time information.

Mathematically, this adds a single learnable scale parameter ($b$). As the kernel advances to the $n$-th time step, its effective value becomes $kernel + n \cdot b$. This simple tweak allows the network to "know" when a specific feature occurred in the sequence.

EnK is designed as a "plug-and-play" module. It can be seamlessly integrated into existing CNN architectures, such as EEGNet or DeepConvNet, typically following the initial convolution layer.

Integration of EnK into single and multiple convolution baseline models, demonstrating its 'plug-and-play' nature.

Experimental Evaluation

The EnK approach was validated across four diverse EEG datasets to ensure generalizability:

  • Cognitive Conflict (CC): Detecting brain responses to unexpected visual stimuli.
  • Physical-Human Robot Collaboration (pHRC): EEG data from real-world human-robot interactions.
  • P300 Visual-Evoked Potentials: A classic "oddball" paradigm used in communication tools.
  • Movement-Related Cortical Potentials (MRCP): Classifying voluntary hand and foot movements.

Key Results and Insights

The experimental results demonstrate significant performance gains across all tasks:

  • Superior Performance in MRCP: On the MRCP dataset, EnK achieved a 12% improvement in F1 score over state-of-the-art baselines.
  • Consistent Accuracy Gains: For the CC dataset, accuracy improved by approximately 2.3%.
  • Minimalist Efficiency: Unlike many deep learning enhancements that add millions of parameters, EnK requires only one additional trainable parameter.
  • Robustness to Noise: Comparisons with Gaussian noise-augmented models confirmed that EnK captures meaningful temporal information rather than acting as a simple regularizer.
  • Feature Discovery: Visualization using Grad-CAM revealed that EnK enables models to identify specific neurological components, such as the N400 (related to meaning processing), which are often missed by standard architectures.

Conclusion

The EnK approach provides a lightweight, architecture-agnostic method for encoding time-information in CNNs. By treating time as a learnable feature, it significantly enhances the decoding of EEG signals. While the current implementation uses linear encoding, future work will explore non-linear functions to better match the complex dynamics of brain activity. Furthermore, the potential applications of EnK extend beyond EEG to any time-series data, such as financial or sensor-based signals.

Summary updated

BibTeX
@misc{singh2020enk,
  author = {Avinash Kumar Singh and Chin‐Teng Lin},
  title = {{EnK: Encoding time-information in convolution}},
  year = {2020},
  eprint = {2006.04198},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.04198},
}
Figure