MushroomBody_Pong v1

Synaptic weights for the Pong game of BeatTheFly -- A Smart Fruit Fly is playing Pong against you: a spiking network wired as the real Drosophila mushroom body connectome that moves a Pong paddle in real time.

The anatomical connectome gives you wiring, not synaptic strengths. Ours are trained.

Synaptic weights trained with PHCSSM parallel-scan mode, deployment in sequential RSNN mode (PHCSSM).

made by Po-Han Chiang @ NYCU

What the mushroom body does in the fly

The mushroom body is the fly's centre for associative learning and memory. Its gate is dopaminergic — 340 dopaminergic neurons over 3,160 real synapses — and what they write into the fast weight fades within about a frame and a half.

Architecture

  • Wiring: MaleCNS v1.0 mushroom body -- 4,510 neurons (KC 4,064; MBON 97; DAN 340; APL 2; other 7) and 1,027,152 neuron-to-neuron connections. The connectivity mask is fixed to the connectome; 732,618 connections carry a nonzero weight and 0 weights lie off the connectome.
  • Dale's law: one sign per presynaptic neuron from predicted neurotransmitters (excitatory 4,114, inhibitory 52, modulatory 344); 0 weights violate it.
  • Input: each frame provides 6 numbers seen from the fly's side of the court: the ball's position and velocity and the positions of both paddles. A linear encoder with LayerNorm drives only the input population: 4,064 Kenyon cells.
  • Neurons: leaky integrate-and-fire with per-neuron leak, threshold and reset; synaptic delay of one step.
  • Readout: linear map from the membrane voltage of the output population only, 97 MBON, to 3 paddle commands (stay, up, down).
  • Neuromodulatory gate: 340 of this region's own known-neuromodulator cells (DAN (dopaminergic)) gate the current into the output population, masked to the 3,160 real gate-cell -> output synapses in the connectome.
  • Fast weight: a value written onto the 61,210 real input -> output synapses, gated by the same cells, read back into the output neurons' voltages. It is read with the current frame's input spikes and written with the same frame's, and it decays: one trainable factor per output neuron, a decay time constant of about 1.41 frames (23.5 ms at 60 fps).
  • Deployment: sequential RSNN mode, one timestep per frame at 60 frames per second, with the neuron state carried across the whole game.

Data sources

Data source: actions of a scripted Pong player.

Evaluation

20 games to 11 points against each scripted player, the fly playing its top command every frame:

opponent games won point share fly's return rate
a noisy scripted player 10 / 20 0.506 87.0%
a weak scripted player 20 / 20 0.827 87.4%
a perfect scripted player 0 / 20 0.000 89.5%

On 131,072 held-out frames the fly's choice matches the scripted player's action on 97.0% in sequential RSNN mode, and the parallel-scan and sequential modes choose the same action on 99.69% of frames.

Files

  • manifest.json -- every tensor (file, dtype, shape, bytes), the model scalars and a connectome audit.
  • info.json -- neuron metadata used by the page (cell classes, hemispheres, soma coordinates).
  • selfcheck_<precision>.json -- reference observations and logits that the page replays when it loads.
  • fp16/, fp32/ -- raw little-endian arrays.

Two precisions are listed in the manifest: fp16w32 (default, 5.4 MB: float16 for the readout matrix dec_w, float32 for the recurrent weights and all other tensors) and fp16 (4.0 MB, recurrent weights in float16 as well).

The recurrent weight matrix W[dst, src] is stored in CSC order by source neuron (W_colptr, W_rowidx, W_vals): each step multiplies W by a sparse binary spike vector, so the engine visits only the columns of the neurons that spiked. in_idx lists the input population and out_idx the output population. enc_obs_T [6, H] is the observation encoder and dec_w [3, 97] is read against the output population's voltage.

name file dtype shape
enc_obs_T fp32/enc_obs_T.bin float32 6x4510
enc_obs_b fp32/enc_obs_b.bin float32 4510
ln_obs_w fp32/ln_obs_w.bin float32 4510
ln_obs_b fp32/ln_obs_b.bin float32 4510
teach_T fp32/teach_T.bin float32 6x340
teach_b fp32/teach_b.bin float32 340
W_gate fp32/W_gate.bin float32 97x340
W_val fp32/W_val.bin float32 97x340
gate_idx fp32/gate_idx.bin int32 340
fw_in fp32/fw_in.bin int32 61210
fw_out fp32/fw_out.bin int32 61210
gamma fp32/gamma.bin float32 97
dec_w fp16/dec_w.bin float16 3x97
dec_b fp32/dec_b.bin float32 3
alpha_exc fp32/alpha_exc.bin float32 4510
alpha_inh fp32/alpha_inh.bin float32 4510
v_th fp32/v_th.bin float32 4510
reset_weight fp32/reset_weight.bin float32 4510
in_idx fp32/in_idx.bin int32 4064
out_idx fp32/out_idx.bin int32 97
W_colptr fp32/W_colptr.bin uint32 4511
W_rowidx fp32/W_rowidx.bin uint16 732618
W_vals fp32/W_vals.bin float32 732618

Numerical check: 0 of 41,708,480 spike bits differ from the reference on the same weights (2,048 held-out frames and a 7,200-frame closed-loop game).

Limitations

The fly learned by copying a scripted player: it gets no reward and does not plan ahead. It has been tested only in this simulator and only against scripted players, and it loses every game to a perfect one.

License and attribution

Weights: CC-BY-NC-4.0. They are derived from the MaleCNS v1.0 connectome (Janelia FlyEM and collaborators, https://male-cns.janelia.org/, CC-BY-4.0) and trained with PHCSSM (https://arxiv.org/abs/2604.01295); please credit both.

Citation

PHCSSM: https://arxiv.org/abs/2604.01295

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for phclab/MushroomBody_Pong