Papers
Topics
Authors
Recent
Search
2000 character limit reached

SSI-GAN: Semi-supervised Spike Classification

Updated 8 January 2026
  • The paper introduces SSI-GAN, a semi-supervised framework that combines a transformer-based generator with a Swin-inspired shifted-window discriminator to classify neuronal spike trains.
  • It details a streamlined preprocessing pipeline on high-frequency MEA data and leverages innovative windowing strategies to capture temporal-spatial dependencies.
  • Empirical results demonstrate superior performance over CNN-GRU benchmarks, achieving near-perfect accuracy while reducing labeling efforts by up to 99%.

The Semi-supervised Swin-Inspired GAN (SSI-GAN) is a generative adversarial network architecture designed to classify neuronal spike trains in the context of arboviral infection detection. Addressing the critical challenge of limited labeled data in large-scale electrophysiology, SSI-GAN integrates a transformer-based generator and a Swin-inspired shifted-window discriminator for robust, semi-supervised classification. It markedly reduces manual labeling requirements while achieving high performance in distinguishing Zika, dengue, and control patterns in Aedes aegypti neuronal recordings (Sharifrazi et al., 1 Jan 2026).

1. Input Representation and Preprocessing Pipeline

SSI-GAN operates directly on neuronal spike data acquired via 60-electrode microelectrode arrays (MEA) sampled at 30 kHz. The raw signals undergo minimal preprocessing steps: a high-pass Butterworth filter (700 Hz cutoff) removes low-frequency local field potential (LFP) noise, while thresholding at ±10 μV zeroes out values in (−10,10) μV, effectively denoising the signal and focusing on salient spike events. The continuous recordings are segmented into non-overlapping windows of T = 100 samples, yielding inputs xR100×60x \in \mathbb{R}^{100 \times 60}, where C=60 denotes electrodes. In the semi-supervised regimen, only 3% of windows are labeled, with the remainder remaining unlabeled, reflecting realistic annotation constraints.

2. Transformer-based Generator Architecture

The SSI-GAN generator GG synthesizes plausible spike windows from Gaussian noise zN(0,I128)z \sim \mathcal{N}(0,I_{128}) with dimensionality dz=128d_z=128. The architecture comprises two stacked Transformer blocks, each with embedding dimension dmodel=128d_{\mathrm{model}}=128. Within each block:

  • Multi-head self-attention is utilized with h=4h=4 heads (dk=dv=dmodel/h=32d_k=d_v=d_{\mathrm{model}}/h=32).
  • Sinusoidal positional encoding is applied such that for position pos and channel i:

PEpos,2i=sin(pos100002i/dmodel),  PEpos,2i+1=cos(pos100002i/dmodel)\text{PE}_{\text{pos},2i} = \sin\left(\frac{\text{pos}}{10000^{2i/d_\text{model}}}\right),\; \text{PE}_{\text{pos},2i+1} = \cos\left(\frac{\text{pos}}{10000^{2i/d_\text{model}}}\right)

  • Feed-forward network (FFN) in each block has hidden dimension dff=64d_{\mathrm{ff}}=64 and employs GeLU or ReLU activations.
  • Layer Normalization, dropout (rate pdrop=0.29p_{drop}=0.29, optimized via Bayesian Optuna), and residual pathways enhance stability and regularization.

This configuration enables GG to generate high-frequency, realistic spike patterns consistent with observed neuronal signal properties.

3. Swin-Inspired Shifted-Window Discriminator

The discriminator applies a windowing strategy inspired by Swin transformer mechanisms. For input xR100×60x \in \mathbb{R}^{100 \times 60}, the time axis is partitioned into non-overlapping windows of length M=10. Even-numbered layers use these native partitions, while odd-numbered layers implement a “shifted-window” approach by rolling xx by M/2M/2 before repartitioning. This alternating schema fosters both localized intra-window attention and cross-boundary contextual integration by facilitating cross-window communications without full multi-head attention.

Within each window, the discriminator layers proceed as follows:

  • Window-based Multi-head Self-Attention (W-MSA): y=W-MSA(LayerNorm(x))+xy = \mathrm{W\text{-}MSA}(\mathrm{LayerNorm}(x)) + x
  • Feed-forward network plus residual: z=FFN(LayerNorm(y))+yz = \mathrm{FFN}(\mathrm{LayerNorm}(y)) + y
  • No hierarchical patch merging takes place; resolution is fully retained.
  • Cross-window attention in shifted layers enables elements from overlapping windows to attend over shared indices, embedding broader dependencies.

Global average pooling (GAP) aggregates feature embeddings into gRdmodelg \in \mathbb{R}^{d_{\mathrm{model}}}, which feeds two output heads:

  • Classification head: 3-way softmax distinguishes Zika, dengue, and control categories, y^=softmax(Wclsg+bcls)Δ2\hat{y} = \mathrm{softmax}(W_{\text{cls}}g + b_{\text{cls}}) \in \Delta^2.
  • Adversarial head: Sigmoid outputs real/fake discrimination probability, s=σ(wadvTg+badv)(0,1)s = \sigma(w_{\text{adv}}^Tg + b_{\text{adv}}) \in (0,1).

4. Semi-supervised Learning Protocol

SSI-GAN’s workflow leverages both labeled and unlabeled spike windows for model optimization:

  • Data split: 80% of windows for training, 20% for test; within training, 3% are labeled and the rest unlabeled, with 1% held back as validation for early stopping.
  • Loss functions:

    • Adversarial loss for D and G:

    LGAND=Expdata[logs(x)]Ezpz[log(1s(G(z)))]L_{\text{GAN}}^D = -\mathbb{E}_{x\sim p_{\text{data}}}[\log s(x)] - \mathbb{E}_{z\sim p_z}[\log(1 - s(G(z)))]

    LGANG=Ezpz[logs(G(z))]L_{\text{GAN}}^G = -\mathbb{E}_{z\sim p_z}[\log s(G(z))] - Classification loss on labeled data:

    Lcls=E(x,y)labeledc=021y=clogy^c(x)L_{\text{cls}} = -\mathbb{E}_{(x,y)\sim \text{labeled}}\sum_{c=0}^{2} \mathbf{1}_{y=c}\,\log \hat{y}_c(x) - Composite objectives:

    LD=LGAND+λclsLcls,    λcls=1.0L_D = L_{\text{GAN}}^D + \lambda_{\text{cls}} L_{\text{cls}},\;\; \lambda_{\text{cls}} = 1.0

    LG=LGANG  (optionally with small feature-matching term)L_G = L_{\text{GAN}}^G \;\text{(optionally with small feature-matching term)}

This bifurcated loss structure enables SSI-GAN to extract discriminative spike features from the scarce labels while adversarially regularizing via synthetic spike generation.

5. Hyperparameter Optimization and Validation Strategy

SSI-GAN applies Bayesian Optuna for rigorous hyperparameter search over the generator and discriminator settings. Parameters explored include dz{64,100,128}d_z \in \{64,100,128\}, number of attention heads {2,4,8}\{2,4,8\}, head size {64,128,256}\{64,128,256\}, dff{32,64,128}d_{\mathrm{ff}} \in \{32,64,128\}, number of blocks (1–4), dropout (0.1–0.5), learning rate (1×1051\times10^{-5}1×1031\times10^{-3}), and batch size {64,128}\{64,128\} over 20 trials. The objective maximizes classification accuracy on the 1% validation split. Optimal hyperparameters identified: dz=128d_z=128, heads=4, head size=128, dff=64d_{\mathrm{ff}}=64, blocks=2, dropout=0.29, learning rate=9e-4, batch size=128.

Monte Carlo cross-validation is performed on five randomly partitioned data splits per run, reporting mean and standard deviation of accuracy, precision, recall, and F1-score, mitigating sensitivity to sample selection and ensuring statistical robustness.

6. Empirical Performance and Comparative Analysis

SSI-GAN’s evaluation on 15,728,580 spike windows across five post-infection days (0, 1, 2, 3, and 7 dpi) and three classes (control, DENV, ZIKV) demonstrates near-perfect classification with minimal supervision. Performance metrics at 3% labeled data are:

Time-point (dpi) SSI-GAN Accuracy (%) Best Baseline CNN-GRU (%)
0 99.45 91.6
1 99.61 91.1
2 97.09 83.2
3 99.82
7 99.93

SSI-GAN consistently outperforms the strongest supervised baseline (CNN-GRU) by more than 8% at all reported time-points, while using only 1–3% labels—a 97–99% reduction in annotation effort. Accuracy standard deviation over five Monte Carlo runs remains below 0.5% at all days post-infection; paired t-tests indicate statistical significance (p<0.01p<0.01) versus baselines.

7. Impact and Implications in Neurovirology Spike Classification

SSI-GAN advances semi-supervised learning capabilities for large-scale neurovirology, offering state-of-the-art accuracy in classifying mosquito neuronal infection status with severely limited labels. By dispensing with exhaustive spike annotation and leveraging a shifted-window, transformer-based architecture, it makes mass deployment in field studies feasible, supporting viral neurotropism surveillance. The architecture’s novel combination of windowed and shifted-window attention mechanisms in the discriminator is empirically superior for high-frequency, sparse spike classification and may suggest broader applicability in electrophysiological pattern recognition. These findings set new data-efficient performance benchmarks in spike-based infection classification and demonstrate robust generalization across temporal stages of infection (Sharifrazi et al., 1 Jan 2026).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Semi-supervised Swin-Inspired GAN (SSI-GAN).