SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.01694 · 2023

Spike-driven Transformer

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2307.01694.json · badge: /api/ran/2307.01694.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
biclab/spike-driven-transformer canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
TET_loss Ran
ran; our contract draft was wrong, not the code
biclab/spike-driven-transformer/criterion.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from qiwang233/dailydvs-200, is pointer only (licence: NONE) · get_code("a71accca7675fc44")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from qiwang233/dailydvs-200, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

drop_by_area Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
biclab/spike-driven-transformer/dvs_utils/dvs_augment.py
code served (permissive licence) · get_code("1fa0df834a6e5df1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

np.random.seed(0)

# Create a small events array with shape (num_events, 4)
# The function accesses events[:, 2] and events[:, 3] for x and y coordinates
# So we need at least 4 columns
events = np.array([
    [0, 1, 10, 20],
    [1, 2, 50, 60],
    [2, 3, 100, 110],
    [3, 4, 5, 15],
], dtype=np.float32)

ARGS = {
    "events": events,
    "resolution": (128, 128),
    "area_ratio": 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 4) — shape (4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
drop_by_time Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
biclab/spike-driven-transformer/dvs_utils/dvs_augment.py
code served (permissive licence) · get_code("096d3cc0ddfddc9a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small events array with timestamps in the first column
# Shape: (5, 3) - 5 events with timestamp + 2 other features
events = np.array([
    [0.1, 1.0, 2.0],
    [0.3, 3.0, 4.0],
    [0.5, 5.0, 6.0],
    [0.7, 7.0, 8.0],
    [0.9, 9.0, 10.0]
], dtype=np.float32)

ARGS = {
    "events": events,
    "T": 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 3) — shape (4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
event_drop Ran
ran, honoured the contract we drafted
biclab/spike-driven-transformer/dvs_utils/dvs_augment.py
code served (permissive licence) · get_code("101efd23952db50b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (8, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import random

# Set seed for reproducibility
np.random.seed(0)
random.seed(0)

# Create a sample events array
# Events format: [timestamp, polarity, x, y, ...]
# Shape: (N_events, 4) where columns are: [time, polarity, x, y]
events = np.array([
    [0.1, 1, 10, 20],
    [0.2, 0, 30, 40],
    [0.3, 1, 50, 60],
    [0.4, 0, 70, 80],
    [0.5, 1, 90, 100],
    [0.6, 0, 15, 25],
    [0.7, 1, 35, 45],
    [0.8, 0, 55, 65],
], dtype=np.float32)

# Define resolution parameter
resolution = (128, 128)

ARGS = {
    'events': events,
    'resolution': resolution
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (8, 4) — shape (8, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
split_to_train_test_set Ran
ran; our contract draft was wrong, not the code
biclab/spike-driven-transformer/dvs_utils/dvs_utils.py
code served (permissive licence) · get_code("4760b7f7cbe7cd94")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)
np.random.seed(0)

class SimpleDataset(torch.utils.data.Dataset):
    def __init__(self, num_samples=12, num_classes=3):
        self.num_samples = num_samples
        self.num_classes = num_classes
        self.data = torch.randn(num_samples, 4)
        self.labels = torch.tensor([i % num_classes for i in range(num_samples)])
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        return (self.data[idx], self.labels[idx])

origin_dataset = SimpleDataset(num_samples=12, num_classes=3)

ARGS = {
    'train_ratio': 0.7,
    'origin_dataset': origin_dataset,
    'num_classes': 3,
    'random_split': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
TET_loss 2 other papers
2 later
2405.16466 (2024-05)
High-Performance Temporal Reversible Spiking Neural Networks with $O(L)$ Training Memory and $O(1)$ Inference Cost
2407.05106 (2024-07)
DailyDVS-200: A Comprehensive Benchmark Dataset for Event-Based Action Recognition
drop_by_area 1 other paper
1 later
Lee_Spiking_Transformer_with_Spatial-Temporal_Attention_CVPR_2025_paper (2025 (year only))
Spiking Transformer with Spatial-Temporal Attention
drop_by_time 1 other paper
1 later
Lee_Spiking_Transformer_with_Spatial-Temporal_Attention_CVPR_2025_paper (2025 (year only))
Spiking Transformer with Spatial-Temporal Attention
event_drop 1 other paper
1 later
Lee_Spiking_Transformer_with_Spatial-Temporal_Attention_CVPR_2025_paper (2025 (year only))
Spiking Transformer with Spatial-Temporal Attention
split_to_train_test_set 1 other paper
1 later
Lee_Spiking_Transformer_with_Spatial-Temporal_Attention_CVPR_2025_paper (2025 (year only))
Spiking Transformer with Spatial-Temporal Attention

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Spiking Neural Networks (SNNs) provide an energy-efficient deep learning option due to their unique spike-based event-driven (i.e., spike-driven) paradigm. In this paper, we incorporate the spike-driven paradigm into Transformer by the proposed Spike-driven Transformer with four unique properties: 1) Event-driven, no calculation is triggered when the input of Transformer is zero; 2) Binary spike communication, all matrix multiplications associated with the spike matrix can be transformed into sparse additions; 3) Self-attention with linear complexity at both token and channel dimensions; 4) The operations between spike-form Query, Key, and Value are mask and addition. Together, there are only sparse addition operations in the Spike-driven Transformer. To this end, we design a novel Spike-Driven Self-Attention (SDSA), which exploits only mask and addition operations without any multiplication, and thus having up to $87.2\times$ lower computation energy than vanilla self-attention. Especially in SDSA, the matrix multiplication between Query, Key, and Value is designed as the mask operation. In addition, we rearrange all residual connections in the vanilla Transformer before the activation functions to ensure that all neurons transmit binary spike signals. It is shown that the Spike-driven Transformer can achieve 77.1\% top-1 accuracy on ImageNet-1K, which is the state-of-the-art result in the SNN field. The source code is available at https://github.com/BICLab/Spike-Driven-Transformer.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2307.01694")
get_code_for_paper("2307.01694")
have("2307.01694")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2307.01694.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2307.01694.svg)](https://syntology.ai/paper/2307.01694)

Connect an agent — have() is free.