Downloads · 30 days
0
phclab/MushroomBody_Pong
MushroomBody_Pong is a machine learning model from phclab. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-4.0.
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.
Downloads · 30 days
0
Access
Public
Updated Sep 16, 2026
Repo size
6.9 MB
Likes
0
Public
Click a slice to open those files.
.bin6.9 MB · 98%
From the Hugging Face model README
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
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.
Data source: actions of a scripted Pong player.
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.
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).
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.
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.
PHCSSM: https://arxiv.org/abs/2604.01295