valence

How it reads

One input, four stages, three real synapse tables.

  1. 01. Project

    512 features, a locality-sensitive linear projection, 54 channels.

    A block of input features on the left folds through a locality-sensitive linear projection into a column of glomerular channels on the right; a few bright lines show several features feeding one channel.
  2. Input layer

    245 uniglomerular projection neurons; 1,210 of 22,586 raw rows dropped.

    A single row of white cells, one per glomerular channel, each labelled with its glomerulus name and bracketed into the dorsal and ventral families.
  3. 02. Expand

    20,600 real PN to KC edges onto 4,064 Kenyon cells, 5.07 glomeruli each.

    A row of glomerular channels above a dense field of Kenyon cells; faint lines fan from channels into cells, and a handful of bright lines converge on one outlined cell.
  4. 03. Sparsify

    2 APL neurons, 4,693 and 4,633 real edges, about 11.6% active.

    Two APL cells above a field of Kenyon cells, joined by a loop that reads the field up one side and feeds back down the other; a sparse scatter of bright cells marks the ones that survive.
  5. 04. Read out

    61,210 real KC to MBON edges, 97 MBONs, 16 signed compartments.

    A field of Kenyon cells above a row of MBON cells grouped under their compartment names; faint lines fall from the field to the row, and one outlined cell sends bright lines to its own targets.

One read, start to finish

Input sentence to scalar, about 0.65 ms.

Seven dark cards on a dashed line trace one read from left to right: the input sentence, the feature block, the channel grid, the sparse Kenyon field, the MBON grid, sixteen signed bars and the final scalar, over a time axis.

The loop holds the rate

Kenyon cells firing per read: CV 0.1110 real, 0.2177 flattened, 0.3577 fixed threshold.

Three rows compare how many Kenyon cells fire per read: a wide dithered span for a fixed threshold, a narrower grey span for the APL loop with flattened counts, and a tight white span for the loop with the real counts, each with its coefficient of variation.

One byte in, a little out

Near versus far separation at the tenth percentile of seeds.

  • Linear projection0.8791
  • sha256 instead-0.0847

What a read costs

3,000 reads after 200 warm-up reads, one thread.

  • 0.648 msper read, pre-featurised
  • 0.652 msfrom a string
  • 1,542reads a second

A recorded read

Recorded at build time, checked on every rebuild.

$ scripts/valence read "the build failed and the oncall page fired"
  compartment  sign   <- aversive appetitive ->    z
  a1           +              │██▏          +0.57
  b'1          +             ▎│             -0.06
  b'2          +           ▎██│             -0.59
  b1           +              │██▎          +0.59
  b2           +              │████         +1.09
  g3           +         ▌████│             -1.20
  g4           +           ▉██│             -0.78
  g5           +            ██│             -0.54
  CA           0              │█▋           +0.42
  a'1          -             █│             -0.29
  a'2          -              │█▉           +0.49
  a'3          -           ▋██│             -0.70
  a2           -              │█▊           +0.46
  a3           -              │██▎          +0.60
  g1           -            ▎█│             -0.32
  g2           -          ▍███│             -0.92
  scalar                     ▉│             -0.0792   (appetitive - aversive)
  KC sparsity: 446/4064 active = 10.97%   APL iterations: 8