atlas

Research map / Architectures and efficiency / Spiking networks

Toward Relative Positional Encoding in Spiking Transformers

NeurIPS 2025 · Architectures and efficiency › Spiking networks · approach: Training deep spiking networks · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Gray-PE and Log-PE, two relative positional encodings for spiking Transformers that keep spike (binary) representations, using XNOR-based spiking self-attention, and evaluates them on time-series forecasting, text classification and patch-based image classification.

Problem

Relative positional encoding has not been integrated into spiking Transformers, since adding RPE (ALiBi, RoPE) to binary spike queries and keys disrupts spike representations and performance.

Approach

Gray Code encodings of position indices concatenated to binary Q/K, where a power-of-two relative offset yields a constant Hamming distance (proved), combined with XNOR-based attention; Log-PE adds a non-negative logarithmic relative distance bias directly to the integer attention map.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add Log-PE with XNOR attentionSpikformer · Time-series forecasting (4 benchmarks, Avg.)R²: .733 -> .750Helped
Add Gray-PE with XNOR attentionSpikformer · Text classification (6 benchmarks, Avg.)accuracy: 77.25 -> 80.11Helped
Add Log-PE with XNOR attentionSpikformer · Long text classification (Avg.)accuracy: 81.46 -> 83.62Helped
Use 2D rather than 1D Gray-PE (ablation)Spikformer-XNOR · Patch-based image classification (Avg.)accuracy: 74.95 -> 75.39; 0.44%Helped
Replace dot-product attention with XNOR attention while retaining Conv-PE (ablation)Spikformer · Time-series forecasting (4 benchmarks, Avg.)R²: .733 -> .733No clear effect
Remove XNOR attention while retaining Log-PE (ablation)Spikformer-XNOR w/ Log-PE · Electricity (prediction length 24)R²: .974 -> .710*Hurt
Replace Log-PE with complete RPE (ablation)Spikformer-XNOR · Metr-la (prediction length 24)R²: .535 -> .158*Hurt
Replace Log-PE with complete RPE (ablation)Spikformer-XNOR · Electricity (prediction length 24)R²: .974 -> .710*Hurt
Add Log-PE rather than Gray-PESpikformer-XNOR · Long text classification (Avg.)accuracy: 82.36 -> 83.62Helped
Add Gray-PE or Log-PEQKFormer · Patch-based image classificationaccuracy: 79.67 -> 79.03; 79.67 -> 79.56Mixed
Use Gray-PE 2D rather than Gray-PE 1D (ablation)QKFormer-XNOR · Patch-based image classification (Avg.)accuracy: 79.03 -> 79.56Helped
Use 2D Log-PE (ablation)Spiking Transformer · Patch-based image classificationconvergenceHurt

Surprising findings

Limitations

Experimental setup

Datasets: Metr-la Pems-bay Solar Electricity MR SST-2 SST-5 Subj ChnSenti Waimai AGNEWS IMDB

Benchmarks: Metr-la Pems-bay Solar Electricity MR SST-2 SST-5 Subj ChnSenti Waimai AGNEWS IMDB

Metrics: R^2 RSE accuracy

Baselines: Spikformer w/ Conv-PE CPG-PE ALiBi RoPE Sin-PE Spikingformer SDT-V1 QKFormer Fine-tuned BERT Vision-Transformer

Builds on: Spikformer ALiBi RoPE SeqSNN QKFormer

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy