FFBF · fruit fly bloom filter

Mushroom Body Bench

A fly does not remember what it smelled. It keeps a relief of synaptic weights that every odour carves, and that time fills back in. Send a stimulus and watch the same three things the Rust filter does: fire k detectors, read the memory under them, then dent it.

The circuit

64 input lines · 300 KC→MBON synapses · hover the relief to read one synapse

reel ▶ plays a 45-second captioned run at presentation scale, for screen capture. Esc leaves it.

novelty score — waiting
baseline—
stimulus—
add() calls0
tick() calls0
carved0
state1.2 kB

Score against its own past

last 120 add() calls · the shaded field is where a score counts as novel

Scripted runs

D is a source the warm-up never used. The first copy scores high and carves; the rest fall into the dent it left.

Three familiar inputs, then E — which the filter has never met. Run it twice and E is no longer a stranger.

400 ticks of passive decay fill the relief back in, then A arrives again. It reads as new.

Learning

0.50 How deep one exposure carves. w ← w·(1−δ)
0.030 Saturation forgetting: a memory fades as other things arrive.
15 The top-k winners out of m = 300. Wider k generalises harder.

Forgetting & verdict

Which memories tick() gives back first.
0.010 EdgeAndFront only. Set it to zero for EdgeOnly behaviour.
1.00 is_novel(x, t) ⇔ novelty(x) ≥ mean(window) · t

Event log

the last twelve add() calls, verdict taken before the update

#stimulusnoveltybaselineverdictcarved KCs

The wiring never changes

Each of the 300 KCs reads a fixed random slice of the input — round(0.12 · 64) = 8 lines, drawn once from a seeded shuffle. That is the hash. Similar inputs light similar detectors, which is the whole reason a near-duplicate scores low.

Only the weights move

On add(): the k winners get w ← max(w·(1−δ), 1e-3), everyone else w ← min(w+ε, 1). The score is the mean weight under the winners, read before the write.

Novelty is relative

The verdict compares the score to the mean of a rolling window of recent scores, not to a fixed number. A stream that drifts drags its own baseline along.