CoolFace
Modelpublic

phclab/AntennalLobe_Chess

sourceHugging Facecc-by-nc-4.0updated 10d agoView on Hugging Face
0likes
Model Card

AntennalLobe_Chess v1

Synaptic weights for the antennal lobe opponent of [BeatTheFly](https://phclab.github.io/BeatTheFly/chess/) -- A Smart Fruit Fly is playing chess against you: a spiking network wired as the real Drosophila antennal lobe connectome that plays chess.

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 antennal lobe does in the fly

In the real fly, the antennal lobe is the first stop for smell. It sorts signals from the olfactory receptor neurons into glomeruli (one channel per odor-receptor type) and passes them on to the mushroom body and lateral horn. It filters sensory input rather than making decisions.

Architecture

  • —Wiring: MaleCNS v1.0 antennal lobe -- 3,874 neurons (Receptor neurons (ORN, TRN, HRN) 2,730; Projection neurons 700; Local and interneurons 444) and 465,373 neuron-to-neuron connections. The connectivity mask is fixed to the connectome; 352,207 connections carry a nonzero weight and 0 weights lie off the connectome.
  • —Dale's law: one sign per presynaptic neuron from predicted neurotransmitters (excitatory 3,355, inhibitory 458, modulatory 61); 0 weights violate it.
  • —Inputs: each ply provides the move token (one of 1,970 UCI moves) and the board after it (789 binary features: piece per square, castling rights, en-passant file, 50-move-clock buckets, seen from the side to move). Two linear encoders with their own LayerNorm drive only the input population: 2,730 olfactory, thermo- and hygrosensory receptor neurons.
  • —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: 700 projection neurons (ALPN, ALON).
  • —No dopamine gate and no fast weight (those belong to the mushroom body).
  • —Deployment: sequential RSNN mode, one timestep per ply, with the neuron state carried across the whole game.

Data sources

Data source: human games from the Lichess open database (lichess.org, CC0).

Evaluation

4,000 held-out Lichess blitz games (1500–1800), compared with the move the human played:

overallopeningearly middlegamemiddlegameendgame
top readout move = human move21.1%39.9%29.4%18.4%13.8%
top readout move is legal79.8%94.8%90.1%81.4%70.8%
move-match, readout restricted to legal moves (as played on the page)26.2%41.6%32.3%22.6%21.5%

Strength: Beats a random mover (71–123–6); loses to a simple material-greedy bot (1–31–168) and to Stockfish at its lowest level. Matches: 200 games per opponent, colours swapped, argmax play.

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 moves and logits that the page replays when it loads.
  • —chess_uci_vocab.json -- the move vocabulary.
  • —fp16/, fp32/ -- raw little-endian arrays.

Two precisions are listed in the manifest: fp16w32 (default, 26.4 MB: float16 for the large dense matrices, float32 for the recurrent weights and all small tensors) and fp16 (25.7 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. Dense matrices are stored in the orientation they are read: enc_tok_T [vocab, H] (a move token selects one row), enc_brd_T [789, H] (sum of the active rows) and dec_w [vocab, 700] (read against the output population's voltage).

namefiledtypeshape
enc_tok_Tfp16/enc_tok_T.binfloat161970x3874
enc_tok_bfp32/enc_tok_b.binfloat323874
ln_tok_wfp32/ln_tok_w.binfloat323874
ln_tok_bfp32/ln_tok_b.binfloat323874
enc_brd_Tfp16/enc_brd_T.binfloat16789x3874
enc_brd_bfp32/enc_brd_b.binfloat323874
ln_brd_wfp32/ln_brd_w.binfloat323874
ln_brd_bfp32/ln_brd_b.binfloat323874
dec_wfp16/dec_w.binfloat161970x700
dec_bfp32/dec_b.binfloat321970
alpha_excfp32/alpha_exc.binfloat323874
alpha_inhfp32/alpha_inh.binfloat323874
v_thfp32/v_th.binfloat323874
reset_weightfp32/reset_weight.binfloat323874
in_idxfp32/in_idx.binint322730
out_idxfp32/out_idx.binint32700
W_colptrfp32/W_colptr.binuint323875
W_rowidxfp32/W_rowidx.binuint16352207
W_valsfp32/W_vals.binfloat32352207

Numerical check: legal top-1 1966/1973 vs the fp32 reference (24 held-out games); 0 of 7,666,646 spike bits differ from the reference on the same weights.

Limitations

There is no search and no evaluation function: each move is a single timestep of the network, restricted to legal moves on the page.

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