ADSEQ: A library for Autodifferentiable spike-event queues for brain simulation on AI accelerators
Installation
pip install adseq
RSNN example
Q = adseq.implementations.FIFORing.sized(3)
syn = adseq.synapse.mk_synapses(Q,
delay_ms=delays, dt_ms=dt,
vthres=vthres, tau_syn_ms=tau_syn, n=n*n,
max_delay_ms=7
)
syn_step = jax.jit(type(syn).timestep_spike_detect_pre)
v = jnp.zeros(n)
state = v, syn
def step(state, t):
v, syn = state
isyn = weight @ syn.isyn.reshape((n,n)).sum(0)
vnext, s = lif_step(v, isyn, tau_mem, dt, vthres)
syn = syn.timestep_spike_detect_pre(
ts=t,
v=jnp.repeat(v, n),
vnext=jnp.repeat(vnext, n))
state = vnext, syn
return state, (v, s)
_, trace = jax.lax.scan(step, state, xs=ts = jnp.arange(10000)*dt)
Bridges
adseq does not aim to be another brain simulation package. Instead, it provides 'bridges' to other existing packages.
Jaxley example
Support is a bit experimental. Note that performance will be suboptimal, and limited to singlespike implemetations, until Jaxley PR646 is merged
import jaxley as jx
import adseq.bridges.jaxley_bridge as adseq
# [...]
net = jx.Network([cell, cell])
jx.connect(net.cell(0).branch(0).loc(0.0),
net.cell(1).branch(0).loc(0.0),
adseq.DelaySynapse(vthres=10.0))
net.set('DelaySynapse_delay', 10.0)
net.set('DelaySynapse_weight', 0.05)
net.make_trainable('DelaySynapse_delay')
# [...]
parameters = net.get_parameters()
transform = jx.ParamTransform([
{'DelaySynapse_delay': jx.optimize.transforms.SigmoidTransform(.1, 50.0)},
])
def loss(opt_params):
s = jx.integrate(net, delta_t=dt, params=transform.forward(opt_params))
t = jnp.linspace(0, 1, s.shape[1])
conv = jnp.exp(-10*(t - 0.7)**2) # move spike towards 70% of simulation time
return - (s[1] * conv).mean()
for i in range(100):
l, gradient = loss(opt_params), jax.jacfwd(loss)(opt_params)
updates, opt_state = optimizer.update(gradient, opt_state)
opt_params = optax.apply_updates(opt_params, updates)
Flax bridge
import flax.linen as nn
import adseq.bridges.flax_bridge as adseq
dt = 0.1
model = adseq.Sequential([
# single spike hidden layer
adseq.DenseInput(dt, 30, queue=adseq.implementations.SingleSpike),
adseq.LIF(dt, output='single_spike'),
# ttfs output layer
adseq.Dense(dt, 2, weight_init=nn.initializers.uniform(1.5)),
adseq.LIF(dt, output='ttfs'),
])
x = jnp.zeros((100, 4))
x = x.at[0, 0].set(1)
x = x.at[100, 1].set(1)
x = x.at[50, 2].set(1)
x = x.at[10, 3].set(1)
params = model.init(jax.random.key(0), None, x)
ttfs = model.apply(params, x, method='trace')
Module Documentation
Citation
@article{landsmeer2025eventqueues,
title={EventQueues: Autodifferentiable spike event queues for brain simulation on AI accelerators},
author={Landsmeer, Lennart PL and Movahedin, Amirreza and Hamdioui, Said and Strydis, Christos},
journal={arXiv preprint arXiv:2512.05906},
year={2025}
}
Metadata
Release files for adseq 0.9.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adseq-0.9.4.tar.gz | 24.3 kB | With provenance | Details for adseq-0.9.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adseq-0.9.4-py3-none-any.whl | Python 3 | none | any | Details for adseq-0.9.4-py3-none-any.whl |
Total release size: 53.2 kB
Release files / adseq-0.9.4.tar.gz
| Download URL | adseq-0.9.4.tar.gz |
|---|---|
| Size | 24.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6faa3278404b104ffaac97d29dc1487b9da816d80e188f212253a7b6998e473
|
|
BLAKE2b-256 checksum How to use checksums |
595841dba92ab6ddfc97aa9da963d8f65801549bcf7fef5a2d383fc2a065ea1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency logRelease files / adseq-0.9.4-py3-none-any.whl
| Download URL | adseq-0.9.4-py3-none-any.whl |
|---|---|
| Size | 28.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca9bc9e36dfe5faed16fc53f9d593466b9edf28feaffef5d2ea99bc31460524c
|
|
BLAKE2b-256 checksum How to use checksums |
70e7eb3dc29d2c6b23f32086aebf6f7206b0cab57d915ee572c00e1cd1bf5a71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency logSecurity for adseq 0.9.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for adseq-0.9.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.