GRFNet: A Lightweight PyTorch Model Designed for Multichannel Time-Series Classification

GRFNet: A lightweight PyTorch model based on an improved ROCKET, designed for EEG and other multichannel time-series classification.
GRFNet is an open-source lightweight PyTorch model designed for multichannel time-series classification, especially EEG decoding. It is based on the ROCKET architecture, using random frozen convolution kernels to extract features, and introduces learnable spatial filters and gating mechanisms to mix channels and combine statistics. The default model has only 3,847 parameters and supports arbitrary input lengths and adaptive sampling rates. The developer plans to conduct strict subject-independent evaluation on the PhysioNet EEGMMIDB dataset and compare with models such as EEGNet and ShallowConvNet. The project is currently in its early stages with no benchmark results yet, and the developer seeks community feedback.
In the field of time-series classification, especially for tasks like EEG decoding where signals are complex and data is limited, models often need to strike a balance between parameter count and generalization ability. Recently, a developer open-sourced a PyTorch model called GRFNet, aiming to provide a lightweight and efficient solution for multichannel time-series classification. The model originated from his master's research on EEG decoding, and has now been released as an open-source project seeking community feedback.
According to the original Reddit post, GRFNet is designed to address several key challenges of EEG data: small dataset sizes, high inter-subject variability, and large differences in signal acquisition parameters. The model improves upon the ROCKET architecture by using random, untrained convolution kernels to extract strong time-series features, while introducing learnable spatial filters to mix input channels. If sensor location information is provided, these filters are initialized from the electrode layout rather than random noise.

Model Architecture and Features
The core pipeline of GRFNet can be summarized as follows: first, input channels are mixed through spatial filters to obtain several components; these components then pass through a set of dilated convolutions (most of the kernels are random and frozen, with only a few learnable); next, various summary statistics are extracted from the convolution outputs and combined via a learned gating mechanism; finally, a small classification head performs the classification.
This design draws on ROCKET's idea of using random convolution kernels, but adds learnable spatial filtering and gating mechanisms to better adapt to the characteristics of EEG signals. The default model targets 22 channels and 4 classes, with only 3,847 parameters—very lightweight. In addition, the model accepts arbitrary input lengths and adapts to sampling rates, facilitating application to different datasets.
The ROCKET architecture is a training-free feature extraction method for time-series classification. Its core idea is to convolve input sequences with a large number of randomly generated kernels (with varying lengths, dilation rates, and weights), then extract summary statistics such as maximum and mean from each convolution output, and finally use a linear classifier (e.g., ridge regression) for classification. Since the kernels require no training, ROCKET is highly computationally efficient while maintaining high accuracy, making it especially suitable for small-sample scenarios. GRFNet borrows this random-kernel idea but embeds it into an end-to-end trainable PyTorch framework, adding spatial filtering and gating mechanisms to better handle multichannel EEG signals.
Research Background and Evaluation Plan
The developer states that GRFNet stems from his master's thesis work, which focused on EEG decoding. Since EEG data typically suffers from small samples and high subject variability, traditional deep learning models are prone to overfitting. By introducing random convolution kernels and a lightweight design, GRFNet attempts to maintain good generalization performance with limited data.
Currently, the developer is building a subject-independent evaluation protocol using the PhysioNet EEGMMIDB dataset (containing 109 subjects). The evaluation uses a strict subject-independent split, i.e., each subject's data belongs entirely to either the training set or the test set. Plans include comparisons with classic models such as EEGNet and ShallowConvNet, and reporting scalp topographies, confusion matrices, saliency maps, and speed benchmarks. In addition, four variants will be built to compare results and analyze the reasons.
Subject-independent evaluation is a strict validation protocol in EEG decoding that requires the training and test sets to contain entirely different subjects. This split simulates the model's generalization ability to new users, but is far more difficult than subject-dependent evaluation (where the same subject's data is used for both training and testing). Due to significant individual differences in EEG signals (e.g., skull thickness, electrode impedance, neural activity patterns), model performance typically drops noticeably under subject-independent settings. Therefore, this evaluation protocol more realistically reflects the model's practical value and is a key benchmark when comparing GRFNet with classic models such as EEGNet and ShallowConvNet.
The EEGMMIDB dataset (PhysioNet EEG Motor Movement/Imagery Dataset) is a publicly available dataset widely used in EEG decoding, containing EEG recordings from 109 subjects. Subjects perform or imagine various motor tasks (e.g., clenching fists, opening hands), with data collected at a 160 Hz sampling rate using 64-channel electrodes. This dataset is commonly used to evaluate motor imagery classification algorithms, but the classification task is challenging due to large inter-subject differences and low signal-to-noise ratio. GRFNet plans to conduct subject-independent evaluation on this dataset and compare with models such as EEGNet and ShallowConvNet to verify the effectiveness of its lightweight design in real EEG tasks.
Open-Source Progress and Community Engagement
GRFNet has been released as an open-source PyTorch model, and the developer hopes to receive directional advice from the community. Since the project is still in its early stages, there are no benchmark numbers yet beyond the master's work. The developer encourages interested users to star and follow the project to support its development.
For researchers and developers in time-series classification, GRFNet offers a lightweight alternative, especially suitable for resource-constrained or small-sample scenarios. Its design approach also demonstrates how to combine random feature methods with learnable components to address domain-specific challenges. As evaluation results are published, the model's actual performance will be further validated.
Key Takeaways
- GRFNet is a lightweight PyTorch model for multichannel time-series classification, with only 3,847 parameters in its default configuration.
- The model is based on the ROCKET architecture, combining random convolution kernels with learnable spatial filters to adapt to the small-sample and high-variability characteristics of EEG signals.
- It supports arbitrary input lengths and adaptive sampling rates, facilitating application to different datasets.
- The developer plans to conduct subject-independent evaluation on the PhysioNet EEGMMIDB dataset and compare with EEGNet and ShallowConvNet.
- The project is open source and seeks community feedback; no benchmark results are available yet.
One-line Summary
GRFNet: A lightweight PyTorch model based on an improved ROCKET, designed for multichannel time-series classification such as EEG.
Related articles
Tech FrontiersColdframe: A Honeypot Disguised as a Supermarket Freezer Controller
Coldframe is a honeypot disguised as Danfoss AK-SM 800A and Dixell XWEB freezer controllers, built as a single Python file that detects CVE-2025-41450 attempts and is identified as real devices on Shodan.
Tech FrontiersCUDA-Accelerated Rocket League Simulator: A Player-Made Hardcore Experiment
A Reddit post shows a "100% Accurate" Rocket League simulator accelerated with CUDA. We analyze its technical context, CUDA's value in game physics simulation, and the significance and limitations of such community projects.
Tech FrontiersStylome Bot Slammed as Useless Junk: Why Do AI Detection Tools Keep Failing?
Reddit users test the Stylome AI detection bot: Gemini-rewritten text judged human-written, consistently low confidence. An analysis of AI text detection's technical dilemmas, privacy concerns, and credibility crisis in community governance.