Yan Chen * Abstract Accurate and timely seizure detection from Electroencephalography (EEG) is critical for clinical intervention, yet manual review of long-term recordings is labor-intensive. Recent efforts to encode EEG signals into large language models (LLMs) show promise in handling neural signals across diverse patients, but two significant challenges remain: (1) multi-channel heterogeneity , as seizure-relevant information varies substantially across EEG channels, and (2) computing inefficiency , as the EEG signals need to be encoded into a massive number of tokens for the prediction. To address these issues, we draw the EEG signal and propose the novel NeuroCanvas framework. Specifically, NeuroCanvas consists of two modules: (i) The Entropy-guided Channel Selector ( ECS ) selects the seizure-relevant channels input to LLM and (ii) the following Canvas of Neuron Signal ( CNS ) converts selected multi-channel heterogeneous EEG signals into structured visual representations. The ECS module alleviates the multi-channel heterogeneity issue, and the CNS uses compact visual tokens to represent the EEG signals that improve the computing efficiency. We evaluate NeuroCanvas across multiple seizure detection datasets, demonstrating a significant improvement of 20 % 20\% in F1 score and reductions of 88 % 88\% in inference latency. These results highlight NeuroCanvas as a scalable and effective solution for real-time and resource-efficient seizure detection in clinical practice. The code will be released at https://github.com/Yanchen30247/NeuroCanvas.git . marginparsep has been altered. topmargin has been altered. marginparpush has been altered. The page layout violates the ICML style. Please do not change the page layout, or include packages like geometry, savetrees, or fullpage, which change it for you. We’re not able to reliably undo arbitrary changes to the style. Please remove the offending package(s), or layout-changing commands and try again. August 10, 2026 NeuroCanvas: VLLM-Powered Robust Seizure Detection by Reformulating Multichannel EEG as Image 1 Introduction As one of the most prevalent neurological conditions, epilepsy poses a significant public health challenge Singh & Sander 2020 . It is characterized by the predisposition to generate recurrent seizures and impacts the lives of approximately 50 million people worldwide WHO 2024 . Consequently, accurate and timely seizure detection is vital for immediate medical intervention Devinsky et al. 2016 . Scalp electroencephalography (EEG) plays an important role in seizure detection. Clinically, the standard for identifying seizure activity involves the visual interpretation of long-term EEG recordings by specialized physicians or neurologists. However, this manual review process is labor-intensive and time-consuming Ramgopal et al. 2014 . To address these limitations, automated seizure detection systems based on deep learning have been proposed. These systems leverage advanced algorithms to enable continuous monitoring without the constraints of human fatigue Rasheed et al. 2020 . For instance, Tang et al. 2021 employed self-supervised graph neural networks (GNNs), while Afzal et al. 2024 utilized efficient recurrent update mechanisms to achieve impressive detection accuracy. Latest Evobrain Kotoge et al. 2025 further integrated a two-stream architecture within a time-graph framework to explicitly model the dynamic evolution of brain networks. Despite these advancements, two critical challenges persist: (1) seizure events are temporally sparse, occurring far less frequently than non-seizure events, and (2) EEG signals vary significantly across patients, limiting the generalization of deep learning models in practical scenarios. Recently, large language models (LLMs) have shown remarkable potential in addressing these challenges due to their strong generalization capabilities derived from pretraining. Pioneering works like NeuroLM Jiang et al. 2024 , UniMind Lu et al. 2025 , and EEG-GPT Kim et al. 2024 have explored novel approaches to tokenizing EEG signals or translating EEG features into verbal representations, enabling chat-style LLMs to perform prediction and detection tasks. These methods demonstrate promise in leveraging LLMs for seizure detection by handling both the scarcity of seizure events and patient-specific signal differences. However, integrating LLMs for EEG-based seizure detection is not without challenges. Two critical issues remain unresolved: (1) Multi-channel heterogeneity , where the importance of different EEG channels varies significantly across patients and environments, and indiscriminate use of multi-channel signals may introduce irrelevant noise that decrease prediction accuracy. (2) Computing inefficiency , as existing methods require massive tokenization of multi-channel signals, resulting in excessive computational demands that are incompatible with real-time seizure detection requirements. Addressing these challenges is crucial for developing scalable, efficient, and accurate seizure detection systems for practical clinical settings. Motivated by the observations above and the limitations in seizure detection, we propose NeuroCanvas , a novel framework that innovatively transforms EEG signals into visual representations, enabling robust seizure detection using vision-based large language models (VLLMs). Specifically, NeuroCanvas comprises two key components: ( i ) The Entropy-guided Channel Selector ( ECS ): This module uses channel-wise entropy to rank electrodes based on their informativeness, retaining only the most relevant channels for seizure detection. By filtering out irrelevant channels, the ECS module reduces noise and improves task accuracy, addressing the issue of multi-channel heterogeneity. ( ii ) The CNS : This module transforms multi-channel EEG windows into compact intensity maps, where pixel values encode normalized signal activity. Seizure-related bursts appear as salient spatiotemporal motifs, which can be effectively captured by pretrained visual models. The CNS module enhances computational efficiency by reducing the input tokens while preserving critical information. Finally, we fine-tune a pretrained VLLM to adapt its general-purpose visual representations for accurate seizure detection. In summary, our contributions are as follows: • EEG-to-Image Encoding: We introduce an innovative strategy to encode multi-channel EEG signals into compact intensity maps, enabling pretrained visual models to effectively capture seizure-related patterns. • VLLM-Driven Framework: We propose a robust seizure detection framework that combines entropy-guided channel selection with prompt-guided VLLM adaptation, ensuring efficient inference and maintaining reliability by filtering irrelevant EEG channels. • Experimental Validation: Extensive experiments on the TUSZ and CHB-MIT datasets demonstrate the superiority of NeuroCanvas, achieving a binary F1-score of 0.501 , over 20\% higher than the best previous model. Furthermore, NeuroCanvas remains robust under severe channel reduction, achieving accuracy of 0.8487 with only two EEG channels retained, and provides low-latency inference with 19 ms per sample. 2 Related Work Deep Learning Models for EEG Seizure Detection. Deep learning have become the dominant method for seizure detection Rasheed et al. 2020 . Classical methods widely used Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN) to capture spatiotemporal dependencies in EEG signals Acharya et al. 2018 ; Emami et al. 2019 ; O’Shea et al. 2020 ; Talathi 2017 ; Tsiouris et al. 2018 ; Zhang et al. 2022 . To further capture the non-Euclidean nature of brain connectivity, GNNs, such as DCRNN Tang et al. 2021 , REST Afzal et al. 2024 and EvoBrain Kotoge et al. 2025 , were proposed to model topological relationships. However, these models struggle with fixed channel configurations and poor generalization ability. Despite the architectural advancements of GNN-based models, they remain constrained by fixed channel configurations and poor generalization ability Afzal et al. 2024 ; Tang et al. 2021 . Thus, their performance decreases in clinical EEG signals characterized by heterogeneity and incompleteness. EEG–LLM Alignment and Tokenization. Recently, the rapid development of foundations models raises the potential to solve these limitations in the seizure detection. These approaches typically align EEG signals with the semantic space of LLMs to leverage their robust generalization capabilities Jiang et al. 2024 ; Lu et al. 2025 . However, application of text-based LLMs to high-dimensional EEG signals presents critical bottlenecks: token inefficiency and morphological information loss. As EEG is continuous and high dimensional, tokenization often yields long sequences that consume a disproportionate amount of the LLM’s context window Liu et al. 2025 ; Merrill et al. 2024 . Moreover, discrete tokens often fail to preserve fine-grained morphological features, such as the precise geometry of spikes or subtle rhythm changes, which are more naturally preserved in visual representations Zhang et al. 2025 ; Liu et al. 2025 . VLLM based approaches, thus, represent a promising paradigm which takes advantage of the inherent generalization of VLLM foundation models while preserving the morphological integrity Zeng et al. 2025 ; Liu et al. 2025 . Vision-Based Encoding for Time-Series. To align physiological data with the pre-trained VLLMs, recent frameworks have explored directly rendering time-series as waveform line plots with different color representing different channels Zhang et al. 2025 ; Liu et al. 2025 ; He et al. 2025 . However, such images are dominated by background, which makes Vision Transformers to inefficiently allocate attention resources to redundant pixels rather than features Liu et al. 2024 ; Marchetti et al. 2025 Distinct from sparse waveform plots, dense encoding strategies map normalized signal amplitudes directly into pixel intensity grids Ni et al. 2025 ; Chen et al. 2024 . Such representations preserve the intrinsic time–channel topology while reducing non-informative background regions, resulting in more compact visual inputs. Under fixed visual token budgets, this increased information density enables more efficient use of visual patches by reducing attention allocated to background regions Endo et al. 2025 . 3 Background Characteristics of EEG Seizure Data. In clinical environments, seizure detection is characterized by extreme class imbalance. Previous deep learning methods typically employ the balancing strategy to artificially equilibrate the training set Zhang et al. 2022 ; Tang et al. 2021 ; Afzal et al. 2024 . However, in previous deep learning models, this strategy introduces a prior shift between training and inference which biases the model toward the positive class. Consequently, when deployed for test recordings where non-seizure segments are overwhelmingly dominant, such models are prone to excessive false positive rates Lipton et al. 2018 ; Ingolfsson et al. 2024 . Compounding this issue is the challenge of channel heterogeneity as clinical EEG recordings frequently feature inconsistent or missing channels as seen in EEG datasets Shah et al. 2018 ; Guttag 2010 . Visual Representations of EEG Signals. Classical visual representation of EEG is time-frequency transforms such as the short-time Fourier transform (STFT) or Continuous Wavelet Transform (CWT) Peng et al. 2022 ; Li et al. 2018 ; Faust et al. 2015 . While this representation effectively renders non-stationary neural oscillations as distinct visual textures accessible to models like CNN, it faces severe scalability issues in clinical settings. Specifically, since STFT or CWT operate on a single-channel basis, processing a multi-channel EEG recording requires generating independent high-resolution two-dimensional images for every channel. Concatenating these spectrograms results in a massive input tensor with excessive spatial redundancy Allen & MacKinnon 2010 . Moreover, the high computational complexity required to compute time-frequency decompositions for multiple channels causes substantial latency, thereby obstructing the deployment of such systems for real-time seizure prediction Allen & MacKinnon 2010 . This work introduces NeuroCanvas , a novel EEG representation that maps multichannel EEG signals into information-dense intensity grids, enabling efficient and morphology-preserving alignment with vision–language models. We begin by formally defining the seizure detection task and providing an overview of the framework (Section 3.1 ). Next, we introduce the Entropy-guided Channel Selector ( ECS ) module, which identifies the most informative EEG channels for the task based on their entropy (Section 3.2 ). Finally, we present our novel CNS module, which visualizes the selected EEG channels on the “canvas” for vision large language mdoel training (Section 3.3 ). Detailed description about the base model architecture is in appendix B 3.1 Problem Formulation and Framework Overview Problem formulation. We formulate the seizure detection task as a binary classification problem over multi-channel EEG signals. \mathcal{D}=\{(X^{(i)},y^{(i)})\}_{i=1}^{N} represents a dataset that includes N EEG segments. Each input X^{(i)}\in\mathbb{R}^{C_{i}\times T} represents a EEG clip with C_{i} channels and T time steps. The corresponding label y^{(i)}\in\{0,1\} indicates the annotation, where y^{(i)}=1 donates the presence of seizure event and y^{(i)}=0 donates the normal background (non-seizure). Framework overview. The proposed NeuroCanvas operates in three parts. (a) Raw EEG signals are first received by the ECS module. Spectral entropy is calculated to find the most discriminative EEG channels for seizure detection. The top K channels selected by ECS is then fed to the CNS module(Figure 1 (a)). (b) The CNS module functions as a universal adapter for heterogeneous EEG signals. The selected signals are first normalized and clipped then they are mapped and chromatically encoded to generate a ”Visual Canvas”, donated as I_{\text{c}}\in\mathbb{R}^{H\times W\times 3} , where H and W represent the resolution and 3 corresponds to the RGB color channels (Figure 1 (b)). (c) Subsequently, the generated ”Visual Canvas” will be input to a pretrained VLLM for seizure prediction (Figure 1 (c)). In this stage, a visual encoder E_{\text{v}} first extract spatial embeddings Z_{v}=E_{\text{v}}(I_{\text{c}}) . These visual embeddings are concatenated with the token embeddings of a text prompt. Eventually, the LLM base model \mathcal{M} predicts the seizure detection result. Figure 1: Overview of the NeuroCanvas framework. 3.2 Entropy-guided Channel Selection Channel selection module identifies and retains a fixed subset of the top- K most discriminative channels based on the statistical divergence of their spectral entropy between seizure and non-seizure states. For each channel c in the training set, we first compute the Power Spectral Density (PSD), donated as P_{c}(f) , using the Fast Fourier Transform over a 0.5-70 Hz frequency band. The PSD is normalized to form a probability distribution \hat{P}_{c}(f) . The spectral entropy H_{c} is then donated as: H_{c}=-\sum_{f}\hat{P}_{c}(f)\log_{2}\hat{P}_{c}(f) (1) To determine which channels are the most informative, we compute a discriminative score S_{c} for each channel. This score quantifies the separation power of the channel by comparing the distribution of its entropy values across the seizure and non-seizure labels. Specifically, we calculate the means ( \mu_{c,\text{seizure}},\mu_{c,\text{normal}} ) and variance ( \sigma^{2}_{c,\text{seizure}},\sigma^{2}_{c,\text{normal}} ) of the spectral entropy for each channel across the training set. The discriminative score S_{c} is then calculated by a variance-pooled effect size metric: S_{c}=\frac{\left|\mu_{c,\text{seizure}}-\mu_{c,\text{normal}}\right|}{\sqrt{\frac{1}{2}\left(\sigma^{2}_{c,\text{seizure}}+\sigma^{2}_{c,\text{normal}}\right)}}, (2) Channels are ranked in order of S_{c} and We effectively apply a global mask to retain only the top- K channels with the highest scores. This channel selection ensures minimizing inference latency by reducing the visual token budget and directs the encoding focus exclusively toward the most informative channels, thereby facilitating robust detection across heterogeneous EEG inputs. 3.3 Canvas of Neuron Signal Direct tokenization of multi-channel signal like EEG ( X\in\mathbb{R}^{C\times T} ) represents a scaling challenge. Using numeric embedding layers for LLMs often result in a sequence length that is very large Liu et al. 2025 . Using waveform plots as an input works in some cases Liu et al. 2025 but the input image is inherently sparse with large amounts of white space. Furthermore, as number of channels increases, the overlapping amplitudes make it difficult to distinguish distinct channel. As an alternative to sparse time-domain visualization, frequency domain via Mel Spectrogram construction was proposed for robust audio encoding Radford et al. 2023 . While this approach aims to feed a more rich time-frequency representation to the model, it still has some constraints. Firstly, the approach introduces computational overheads of converting time-series data to time-frequency ( \mathcal{O}(T\log T) ). Secondly, it still does not solve the issue of feeding multiple channels of data to a LLM or VLLM in an efficient manner. In this method we will need C images for C channels. Thus, our approach of using CNS attempts to address this issue. The intensity maps will operate in the time domain and will stack multiple channels together, ensuring compact signal representations. Each pixel value will thus directly represent the normalized signal activity. Normalization and clipping. Clipping of the EEG signals will allow us to supress outliers while normalizing it will stabilize the amplitude distribution. Given a EEG clip X , we apply amplitude clipping and normalization with a fixed bound: \tilde{X}_{c,t}=\mathrm{clip}(X_{c,t},-A,A),\qquad\\ Z_{c,t}=\frac{\tilde{X}_{c,t}+A}{2A}\in[0,1] (3) Here, Z\in[0,1]^{C\times T} is a bounded representation whose values can be mapped to pixel intensities. Intensity-map construction. We convert Z into an image where the vertical axis corresponds to channels and the horizontal axis corresponds to time. We first get the grayscale encoding using: P_{c,t}=\left\lfloor 255\cdot Z_{c,t}\right\rceil\in\{0,\dots,255\} (4) To exploit the “third-dimension” capacity of images, we then map each scalar intensity to an RGB triplet via a colormap g:[0,1]\rightarrow[0,1]^{3} : I_{c,t,:}=g(Z_{c,t})\in[0,1]^{3}, (5) yielding a compact image I\in\mathbb{R}^{C\times T\times 3} . To represent the compactness of the information, we define the Information Density ( \rho ) as the ratio of non-zero feature pixels to the total pixel area H\times W . In waveform plots, \rho\ll 0.1 due to the inherent sparsity of line drawings. In contrast, our Intensity Map achieves \rho\approx 1.0 . Thus, allowing for a C -fold increase in channel capacity without expanding the model’s input dimensionality. 3.4 Network Architecture. The intensity map from our novel CNS module is encoded by the vision encoder which is then trained using instruction tuning according to the system prompt in Appendix C . The frozen LLM decoder then predicts the seizure status. 4 Experiments 4.1 Experiment Setup We evaluated NeuroCanvas on Widely used scalp EEG-seizure dataset: TUSZ Shah et al. 2018 and CHB-MIT Guttag 2010 . The details of preprocessing and the datasets is in Appendix D . Metrics. To show model’s performance under extreme class imbalance scenario, we report accuracy, precision, recall and binary F1-score Thölke et al. 2023 . Notably, we prioritize the binary F1-score over the weighted F1-score often cited in prior literature Afzal et al. 2024 ; Tang et al. 2021 ; Zhang et al. 2022 . Since the weighted F1-score is heavily dominated by the majority class, and this can mask poor performance on the minority seizure class. Baselines. We compared NeuroCanvas with SOTA seizure detection models, including REST Afzal et al. 2024 and DCRNN Tang et al. 2021 . Except these latest models, we also included more traditional used deep learning models which are also widely used for seizure detection: ResNet-LSTM Lee et al. 2022 , CNN-LSTM Ahmedt-Aristizabal et al. 2020 , Transformer Vaswani et al. 2017 , and GRU Cho et al. 2014 . Additionally, we included a text-augmented time series tasks finetuned LLM: Time-LLM Jin et al. 2023 to compare our model with the numeric input LLM. To ensure the rigor and validity of our comparative analysis, we restricted our baselines to methods which are replicable. Model training. We implemented NeuroCanvas using the Qwen2.5-VL-7B-Instruct architecture as the backbone foundation model Bai et al. 2025 . To adapt the visual-linguistic capabilities of the pre-trained model to the domain of EEG signal analysis, we adopted a fine-tuning strategy: the weights of the LLM decoder were frozen, while the vision encoder and the cross-modal projector (merger) were kept trainable. Optimization was performed using AdamW with a cosine decay learning rate scheduler. The training process utilized a per-device batch size of 2 with 8 gradient accumulation steps and was executed with BF16 precision on 2 NVIDIA H100 GPUs. More details in Appendix. Table 1: Seizure detection performance and efficiency on TUSZ dataset. Model Performance Model Efficiency Model Accuracy Precision Recall Binary F1 Inference time (ms) Parameter Count GRU 0.6434\pm 0.0521 0.1793\pm 0.0211 0.6969\pm 0.0596 0.2845\pm 0.0273 3.9701\pm 0.0406 763K CNN-LSTM 0.6528\pm 0.4327 0.1207\pm 0.0194 0.9297\pm 0.0504 0.2128\pm 0.0295 4.0706\pm 0.0344 349K Transformer 0.7966\pm 0.0128 0.2702\pm 0.0138 0.5896\pm 0.0272 0.3702\pm 0.0141 3.918\pm 0.0014 490K ResNet-LSTM 0.7349\pm 0.0448 0.2564\pm 0.0327 0.8326\pm 0.0198 0.3910\pm 0.0359 2.9263\pm 0.0211 3M DCRNN 0.7905\pm 0.0588 0.2643\pm 0.0463 0.8376\pm 0.0431 0.4074\pm 0.0546 7.8728\pm 0.0086 150K REST 0.7457\pm 0.0358 0.2418\pm 0.0166 0.7687\pm 0.0355 0.3643\pm 0.0150 1.3480\pm 0.0004 10K Time-LLM 0.4944\pm 0.1608 0.1595\pm 0.0358 0.8805\pm 0.0217 0.2686\pm 0.0517 92.031\pm 10.440 1.1B Our Model (19Ch DV) 0.7961\pm 0.0358 0.3068\pm 0.0124 0.8080\pm 0.0225 0.4438\pm 0.0137 1054.3\pm 23.71 7B Our Model (19Ch CNS ) 0.8306\pm 0.0212 0.3580\pm 0.0061 0.8225\pm 0.0324 0.5022\pm 0.0119 126.75\pm 1.251 7B Our Model (8Ch CNS ) 0.7984\pm 0.0183 0.3182\pm 0.0083 0.7544\pm 0.0416 0.4505\pm 0.0142 50.112\pm 0.8413 7B Our model (4Ch CNS ) 0.7542\pm 0.0141 0.2734\pm 0.0092 0.7973\pm 0.0391 0.4059\pm 0.0125 32.171\pm 0.6931 7B Our model (2Ch CNS ) 0.7139\pm 0.0098 0.2414\pm 0.0107 0.7880\pm 0.0231 0.3686\pm 0.0104 19.324\pm 0.6577 7B Table 2: Seizure detection performance and efficiency on CHB-MIT dataset. Model Performance Model Efficiency Model Accuracy Precision Recall Binary F1 Inference time (ms) Parameter Count GRU 0.6818\pm 0.1057 0.1830\pm 0.0401 0.7967\pm 0.0586 0.2951\pm 0.0501 3.8462\pm 0.0151 763K CNN-LSTM 0.7505\pm 0.0834 0.2410\pm 0.0328 0.8817\pm 0.0174 0.3742\pm 0.0450 4.4932\pm 0.0891 349K Transformer 0.7606\pm 0.0195 0.2173\pm 0.0113 0.6450\pm 0.0569 0.3318\pm 0.0151 4.2726\pm 0.0262 490K ResNet-LSTM 0.7583\pm 0.0134 0.2145\pm 0.0046 0.7561\pm 0.0047 0.3342\pm 0.0051 2.2490\pm 0.0753 3M DCRNN 0.8574\pm 0.005 0.3288\pm 0.008 0.7462\pm 0.002 0.4564\pm 0.008 0.9004\pm 0.1812 150K REST 0.6623\pm 0.1312 0.1658\pm 0.0492 0.7028\pm 0.1522 0.2608\pm 0.0471 19.736\pm 6.0947 10K Time-LLM 0.6838\pm 0.0392 0.0993\pm 0.0056 0.3622\pm 0.0385 0.1555\pm 0.0040 34.496\pm 1.2309 1.1B Our Model (16Ch DV) 0.8710\pm 0.0084 0.3636\pm 0.0039 0.6612\pm 0.0091 0.4692\pm 0.0059 752.44\pm 4.012 7B Our Model (16Ch CNS ) 0.8885\pm 0.0072 0.3954\pm 0.0056 0.7372\pm 0.0103 0.5146\pm 0.0059 107.75\pm 1.114 7B Our Model (8Ch CNS ) 0.9337\pm 0.0130 0.6270\pm 0.0067 0.4282\pm 0.0142 0.5089\pm 0.092 57.91\pm 0.9934 7B Our model (4Ch CNS ) 0.8965\pm 0.0207 0.4183\pm 0.0042 0.7425\pm 0.0183 0.5351\pm 0.092 31.65\pm 0.7826 7B Our model (2Ch CNS ) 0.8487\pm 0.0286 0.2884\pm 0.0075 0.6043\pm 0.0204 0.3905\pm 0.123 19.41\pm 0.6137 7B 4.2 Superior Performance TUSZ (Table 1 ): We observe improvements of {0.4944 - 0.8306, 0.1207 - 0.3580, 0.2128 - 0.5022} in accuracy, precision, and binary F1 scores respectively. These improvements underscore the increased seizure detection accuracy of our model. The slightly lower recall score compared to baseline is mitigated by the fact that models with higher recall (CNN-LSTM) have very poor precision. Thus, our model has better precision-recall balance. CHB-MIT(Table 2 ): The improvements of the model are also showcased in the CHB-MIT dataset with improvements of {0.6623 - 0.9337, 0.0993 - 0.6270, 0.3622 - 0.7425, 0.1555 - 0.5351} in accuracy, precision, and binary F1 scores respectively. We can see the same pattern for this dataset as well: baseline models with higher recall have very poor precision while our model maintains a better precision-recall balance. 4.3 Indepth Model Analysis Importance of CNS . We encode the raw waveforms into tokens in the Time-LLM framework Jin et al. 2023 . Using CNS image representations, instead of encoded raw waveforms Jin et al. 2023 lead to an improvement of binary F1 score of 87% and 231% in TUSZ and CHB-MIT dataset respectively. This shows that the CNS encoding offers a rich, informative visual input that pretrained vision models can easily understand, unlike token sequences. Furthermore, the proposed CNS image representation produces much better results than a direct time-series image representation of the EEG. Compared to using time-series image approach Liu et al. 2025 , our model achieved a relative improvement of 13% and 10% in TUSZ and CHB-MIT datasets respectively. This highlights the effectiveness of using CNS instead of a lineplot as an input to VLLM. Table 3: Ablation experiment results on the TUSZ dataset. Model Acc. Prec. Rec. F1 NeuroCanvas (8 highest ch, HT) 0.7984\pm 0.0183 0.3182\pm 0.0083 0.7544\pm 0.0416 0.4505\pm 0.0142 NeuroCanvas (8 lowest ch, HT) 0.7705\pm 0.0129 0.2990\pm 0.0048 0.8319\pm 0.0732 0.4353\pm 0.0126 NeuroCanvas (19Ch HT, qwen2.5-7B) 0.8306\pm 0.0212 0.3580\pm 0.0061 0.8225\pm 0.0324 0.5022\pm 0.0119 NeuroCanvas (19Ch HT, qwen2.5-3B) 0.8287\pm 0.0153 0.3473\pm 0.0054 0.7909\pm 0.0218 0.4827\pm 0.0096 Figure 2: Attention heatmap on CNS intensity map and direct time series visualization figure. Figure 3: (a) Layer-wise Pearson correlation coefficients between ” CNS ” and Direct Time-series. (b) Comparison of average attention scores across 19 EEG channels. Effect of ECS . In realistic scenarios, not all EEG channels may be available or helpful. Thus, we tested our model with fewer channels, using the ECS to choose the most informative electrodes. With only the top 8 channels, our model achieved binary F1 score higher than feeding lineplot to the VLLM. Even with 2 channels, our method achieved 73% of the peak binary F1 score. Thus showcasing that carefully selected channels can be used to effectively detect seizure. On top of that, using just 4 channels even gave the best result in CHB-MIT. This outcome may be attributed to the bipolar EEG montage employed in the dataset, which emphasizes localized differential activity and reduces common-mode noise, thereby allowing a smaller set of channels to remain highly discriminative. Model Efficiency. Even with over six times more parameters, our model achieved better inference time than Time-LLM at 8ch (TUSZ) and 4ch (CHB-MIT). Despite Time-LLM using patch tokenizer to encode the input signals, CNS and ECS allowed our model to outperform it. Attention heatmap visualization. To validate that our our CNS enhances the model’s ability to more efficiently capture useful information in the EEG representation, we visualize the attention score heatmap maps of the VLLM’s vision encoder (Figure 2 ). In the direct visualization (right), the visual attention weights are sparse and frequently scattered across non-informative background regions, as circled in the red blanket (Bad attention). We attribute this failure to the inherent visual sparsity of waveform line plots, normal Vision Transformers processes images via patch embeddings, which struggles to extract robust semantic features from patches dominated by whitespace with only minor line signals Dosovitskiy 2020 . The lack of textural coherency prevents the model from anchoring its attention on the physiological signal, leading to stochastic focus. In contrast, the CNS representation (left) effectively reformulates the seizure detection task into a visual object recognition problem. By encoding signal amplitude into chromatic intensity, CNS transforms transient seizure events into salient spatiotemporal representations. As observed in the heatmap, the VLLM’s visual attention is accurately directed toward signal regions strongly correlated with seizure detection. Figure 4: Number of input tokens across EEG representation pipelines. Compared with numeric and direct visualization inputs, CNS achieves up to a 95.56% reduction in input tokens. Layer-wise Pearson correlation analysis. To find out where along the vision encoder the two EEG representation methods begin to induce qualitatively different channel evidence, we compute a layer-wise Pearson R bar plot between CNS and direct visualization (Figure 3 a). The resulting trend provides evidence that CNS changes not only what regions are attended, but also when representation-dependent channel prioritization emerges in the encoder hierarchy. Specifically, the positive correlations in earlier layers suggest that both renderings share a common, representation agnostic stage where the model recovers coarse channel localization and allocates attention in broadly consistent ways. However, later layers show near-zero or negative correlations, indicating a re-ranking of channel importance where CNS and visualization inputs emphasize different channels, consistent with Figure 2 . This layer-dependent divergence is consistent with the general principle that earlier layers tend to encode more generic, transferable features, whereas deeper layers become increasingly specialized to input statistics and task-relevant abstractions Li et al. 2024 ; Raghu et al. 2021 . Importantly, the negative tail bars argues against interpreting CNS as a cosmetic reparameterization. Instead, it functions as an inductive bias that reorganizes how channel evidence is composed downstream. While attention-based explanations must be interpreted cautiously, attention flow is explicitly designed to trace how saliency propagates through transformer depth Abnar & Zuidema 2020 , making the observed late-layer inversion a meaningful signal of representational bifurcation rather than a visualization artifact. Attention score analysis. We further quantify the attention distribution on a channel-level. Figure 3 (b) shows that CNS produces a consistently higher and more discriminative attention allocation in most of the 19 channels. This indicates that CNS helps the model spend its limited visual capacity on channel-discriminative evidence rather than distributing attention uniformly over visually redundant regions. Additionally, visual attention of CNS concentrates on a smaller subset of channels (e.g. FP1, FP2), and this concentration indicates improved channel selectivity, suggesting that the model is less likely to diffuse its capacity across weakly informative channels and more likely to leverage discriminative channels. From a neuro signal perspective, this behavior is also consistent with the fact that seizure events can behave in spatially non-uniform patterns across channels, where only part of the image provides strong discriminative evidence at a certain time Fisher et al. 2017 . Token compression efficiency. Beyond improving attention allocation, CNS substantially reduces the effective input length presented to the VLLM. As shown in Figure 4 direct visualization consumes 9{,}000 input visual tokens due to over large, mostly redundant canvases. In contrast, CNS compresses the input by converting the multi-channel window into a compact, information-dense image, reducing token usage to \sim 3{,}000 for 19 channels and further to 1,350/700/400 tokens when retaining 8/4/2 channels, respectively up to a 95.56% input token reduction. Figure 5: Why CNS helps or fails, the attention distribution analysis. The “TP” denotes the true positive, and the “FN” means the false positive. The blue represents the Direct Visualization, and the red denotes CNS . Attention distribution analysis for CNS . To better understand how the CNS module contributes to predictions, we analyze the attention weights assigned to each EEG channel by CNS , which converts EEG signals into intensity maps, and compare them to the Direct Visualization method, which converts EEG signals into individual sub-figures. As shown in Figure 5 , the analysis is conducted across four scenarios: “TP v.s. TP”, “TP v.s. FN”, “FN v.s. TP”, and “FN v.s. FN”. ❶ TP v.s. TP : CNS consistently achieves higher attention scores than the Direct Visualization method. This indicates that CNS improves the signal-to-background ratio, stabilizing attention allocation while maintaining the underlying channel preference. ❷ TP v.s. FN : In cases where CNS correctly predicts while the Direct Visualization method fails, CNS allocates lower attention weights to specific channels, enabling it to avoid failure modes caused by waveform plots inducing attention toward irrelevant regions. ❸ FN v.s. TP : CNS struggles to capture critical channels, such as FP1 , in waveform morphology-dependent samples. This suggests that, for samples relying heavily on waveform shape, the intensity map compresses essential information. Further work is needed to enhance the representation of such channels within the intensity map. ❹ FN v.s. FN : The attention weight distribution for this scenario resembles the pattern observed in ”TP v.s. TP.” This behavior may be attributed to issues in data distribution or label noise, which warrant additional investigation. Overall, this analysis highlights the strengths of CNS in improving attention allocation and avoiding failure modes, while identifying limitations in handling waveform-dependent samples. Future research should explore strategies to better preserve critical channel information in intensity maps. 4.4 Ablation Experiment Effectiveness of Entropy-Guided Channel Selection. To verify the effectiveness of ECS , we compared our proposed strategy (selecting the Top- 8 channels with the highest discriminative spectral entropy scores) against a counter-factual baseline that selects the 8 channels with the lowest scores. As shown in Table 3 , the model employing the Top- 8 channels with the highest spectral entropy secures superior performance, achieving relative improvements of 3.62% in accuracy and 3.49% in binary F1-score. This result indicates that spectral entropy acts as an effective metric for channel discriminability. Prioritizing high-entropy channels preserves more informative spatiotemporal dynamics for CNS , which translates into better overall detection quality. Notably, using low spectral entropy score channels attains higher recall but but substantially lower precision, suggesting that selecting low-entropy channels biases the model toward a more permissive decision boundary and increases false alarms. Impact of Base Model. We further investigate the impact of the base model by deploying NeuroCanvas with Qwen2.5-VL-7B and Qwen2.5-VL-3B under the same 19-channel CNS setting (Table 3 ). Both settings achieve comparable accuracy, indicating that our CNS representation are not strongly reliant on model scale. Nevertheless, the 7B model consistently provides stronger precision and a higher binary F1 score, reflecting improved calibration and fewer false positives at similar recall. These findings suggest that while a larger base model relatively elevates the performance, the performance improvements from NeuroCanvas are largely driven by the proposed CNS and will remain robust even when the base model is downsized. 5 Conclusion and Future Work In this work, we introduced NeuroCanvas, a novel framework detecting seizure by transforming multi-channel EEG signals into information-dense intensity map visual representations tailored for VLLMs. Our approach includes two key components: CNS and ECS to address the critical challenges of multi-channel heterogeneity and computational inefficiency in seizure detection. Extensive experiments on the TUSZ and CHB-MIT datasets demonstrate the superiority of NeuroCanvas. Our model achieves a binary F1-score of 0.5022 on the challenging TUSZ benchmark, outperforming SOTA baselines by over 20%. It also reduces 88% of inference latency compare to traditional EEG visual representations. Future work will focus on optimizing NeuroCanvas for deployment on resource-constrained medical devices. Additionally, we plan to leverage reinforcement learning to further enhance the model’s reasoning capabilities and diagnostic precision. Impact Statement The datasets utilized in this research, the Temple University Hospital Seizure Corpus (TUSZ) and the CHB-MIT Scalp EEG Database, are anonymized and publicly accessible resources that adhere to ethical standards for patient privacy Shah et al. 2018 ; Guttag 2010 . The authors declare no conflicts of interest, and the methodology presented does not generate harmful insights. NeuroCanvas demonstrates a significant reduction in inference latency and improved performance in the seizure detection domain. This research highlights the potential of foundation models to democratize access to high-quality neurological monitoring across diverse clinical settings. Appendix Appendix A Entropy scores of channels Figure 6: Entropy scores calculted for (a) TUSZ (b) CHB-MIT dataset Figure 6 shows the entropy scores calculated for TUSZ and CHB-MIT dataset. Interestingly, the frontopolar channels (FP1, FP2) are quite discriminative for TUSZ. On the other hand, the bipolar recordings of CHB-MIT show that ”FP1-F7” and ”F7-T7” are the most discriminative. Appendix B Model Architecture For different visual representations, they have different resolutions. In direct visualization, multichannel EEG is rendered as waveform plot. To preserve readability, the input image is scaled with the number of channels and the desired amplitude. In CNS canvas, since the amplitude of the signal has been encoded as color, the resolution of the CNS canvas is only related to the number of input channels. Detailed resolutions of each types of visual representation are in Appendix (Table 4 ). Table 4: Resolution comparison between Direct Visualization and CNS across different channel settings. Visual Representation Resolution (Width \times Height) TUSZ Direct Visualize 19 Channels 1538\times 4650 CNS 19 Channels 1464\times 860 CNS 8 Channels 1464\times 379 CNS 4 Channels 1464\times 204 CNS 2 Channels 1464\times 111 CHB-MIT Direct Visualize 16 Channels 1538\times 3914 CNS 16 Channels 1464\times 729 CNS 8 Channels 1464\times 379 CNS 4 Channels 1464\times 204 CNS 2 Channels 1464\times 111 NeuroCanvas is deployed on a pretrained base VLLM with three standard blocks: ( i ) a vision encoder E_{v} that converts an input image into a sequence of visual tokens, ( ii ) a cross-modal projector P that maps visual features into the LLM hidden space, and ( iii ) a LLM decoder \mathcal{M} that performs conditional generation given visual and text tokens. Given a canvas image I_{c} , the vision encoder extracts spatial embeddings Z_{v}=E_{v}(I_{v}) , which are then projected into the language space \tilde{Z}_{v}=P(Z_{v}) . In parallel, a task prompt p (Details in Appendix C ) is tokenized and embedded as Z_{t}=\mathrm{Emb}(p) . The decoder then consumes the concatenation of cross-modal tokens and predicts the output. Appendix C Prompt for training We cast seizure detection as prompt-guided binary decision. Concretely, the model is prompted to generate a short answer token from a constrained label set \{\texttt{Seizure},\texttt{Non-seizure}\} ). Example Prompt: ”Question: Input image is a 19-Channel EEG signal intensity map, the color refers to the amplitude of the EEG, is the image represents Seizure or Non-seizure? \n Options: \n 1. Seizure \n 2. Non-seizure”. Appendix D Details of Preprocessing and Dataset Splitting TUSZ. In v2.0.3 release, TUSZ contains 315 subjects and 1643 recording sessions. All recordings utilize 19 channels in standard 10-20 system. Importantly, TUSZ reflects real clinical imbalance: the corpus includes over 504 hours of annotated EEG, with seizure activity comprising about 36 hours (around 7%) CHB-MIT. This dataset contains recordings from 22 subjects, each having between 9 and 42 sessions. Due to inconsistencies in the available channels for some subjects, we utilized the 16 channels in standard 10-20 system that are present in all subjects. Preprocessing. To stay consistent with previous studies Tang et al. 2021 ; Afzal et al. 2024 ; Zhang et al. 2022 , we resampled the EEG signals into 200Hz for TUSZ dataset and 256Hz for CHB-MIT dataset. The continuous EEG recordings are then segmented into non-overlapping clips with a fixed duration of T=12 seconds. We selected this 12-second window size based on prior empirical benchmarks, which demonstrate that it provides the optimal trade-off between capturing sufficient temporal context for seizure detection and latency for the model inference Tang et al. 2021 ; Afzal et al. 2024 . Dataset splitting. For the TUSZ dataset, we followed the officially defined data partitions. The original provided training set was randomly split into training and validation subsets with a 90/10 ratio, while the official evaluation set served as the standardized test set. For the CHB-MIT dataset, since no predefined splits are provided, we randomly divided the data into approximately 80% for training, 10% for validation, and 10% for testing. To ensure robust evaluation, this splitting was performed on a subject level, preventing the model from being tested on patients included in the training set. Detailed statistics regarding the data distribution across splits are provided in the Appendix. For training set of both TUSZ and CHB-MIT, we employed random under-sampling on the non-seizure class so that the number of non-seizure clips matched the number of seizure clips. The test sets remained imbalanced to reflect real imbalanced scenarios. Appendix E Computing Layer-wise Pearson Correlations For each layer \ell , we derive an attention-induced saliency over visual tokens using attention rollout up to \ell , then project token scores back to a two-dimensional map using the model’s image placeholder mask and the image grid metadata. We subsequently aggregate the saliency map into an attention vector by averaging within each channel’s spatial band. Finally, we compute Pearson’s r between the two attention vectors ( CNS vs. direct visualization) per layer and report the mean across paired samples. Appendix F Further Analysis of Case Study Figure 7: Why CNS helps or fails, the attention distribution analysis in Layer-wise. The “TP” denotes the true positive, and the “FN” means the false positive. The blue represents the Direct Visualization, and the red denotes CNS . To better understand how CNS changes model behavior beyond aggregate metrics, we conduct a case study over four outcome conditions defined by the detection correctness under CNS versus direct visualization: (1) TP/TP, (2) TP/FN, (3) FN/FN, and (4) FN/TP. To ensure statistical representativeness, we randomly sampled 100 instances for each outcome condition and conducted the analysis based on their averaged attention profiles. For each condition, we inspected the mean attention score per layer (averaged across channels), and the attention distribution on each channel. We use these analyses as a diagnostic lens to characterize the routing of representation-dependent evidence through the vision encoder. Condition 1: TP/TP. In condition where both models correctly detect the seizure, the channel-wise attention distribution is strongly aligned (Pearson’s r=0.732 , p<0.001 ). This correlation indicates that both representations prioritize a similar subset of channels; however, CNS consistently assigns higher attention magnitudes across most channels. Layer-wise analysis corroborates this, as CNS maintains a higher mean attention score, whereas the direct pipeline remains lower throughout. The combination of high cross-representation alignment and stronger attention suggests that in this condition, CNS acts as an amplifier rather than altering the fundamental evidence path. It does not change what evidence is used when the waveform already exposes discriminative cues, but rather increases the saliency of that shared evidence, making it accessible earlier in the hierarchy. Practically, this implies that CNS improves the signal-to-background ratio, stabilizing attention allocation without shifting the underlying channel preference that drives correct decisions. Condition 2: TP/FN. In condition where CNS succeeds but the direct visualization fails is characterized by a systematic disagreement in channel prioritization (Pearson’s r=-0.405 , p=0.085 ). The two representations induce partially inverted channel-wise attention distribution, indicating CNS effectively performs evidence re-ranking. Notably, the direct visualization allocates substantial attention mass to a broad set of channels, which often emphasizes posterior or midline regions. However, it fails to detect the seizure. In contrast, CNS corrects this representation-induced bias by concentrating attention on a distinct subset of channels. Layer-wise analysis show that direct visualization maintains relatively high mean attention across many mid-layers. This supports that direct visualization method faces misallocated search without correctly deetcting the seizure. On the other hand, CNS exhibits very strong early-layer attention followed by a rapid decline, consistent with the earlier localization of discriminative evidence. This indicates that CNS can avoid failure modes where waveform plots induce attention toward visually salient but diagnostically unhelpful structures. Condition 3: FN/TP. In condition where CNS fails while the direct visualization succeeds, the channel profiles are nearly uncorrelated (Pearson’s r=-0.064 , p=0.796 ), indicating their reliance on fundamentally different channel preferences. Although CNS again shows substantially higher mean attention across early layers, this increased focus does not translate into a correct detection, demonstrating that greater attention magnitude is not equivalent to better evidence quality. According to the distribution of attention on channels, the CNS strongly allocates attention to central channels, while the direct visualization places relatively more attention on front channels. This divergence suggests that the discriminative evidence for these samples depends on waveform morphology (e.g. transient sharpness or brief rhythmic evolution), that remains visible in line plots but becomes distorted during amplitude-to-color encoding. Condition 4:FN/FN. In condition where both CNS and direct visualization fail to detect the seizure, channel-wise attention shows relatively strong agreement between CNS and direct visualization (Pearson’s r=0.418 , p=0.075 ). While both representations shows weak concentration on certain channels, CNS spreads high attention across a broad range of electrodes. Layer-wise, CNS maintains consistent high attention, whereas direct visualization remains lower and flatter. This pattern reflects a condition that neither representation provides sufficiently separable evidence within the signal clip. This might be caused by signal-noise ratio, weak seizure morphology, or strong non-seizure confounds. In this context, attention fails to concentrate on a discriminative channel subset. The broader and higher attention score observed in CNS is consistent with the model trying hard but failing to resolve a clear decision boundary, highlighting that representation improvements alone cannot compensate for segments with intrinsically low evidence or label noise. 22