Fly Trader

An animated demonstration of the research: a model of the fruit-fly brain, built from the map of its connections, learns to tell apart situations in the altcoin market. When the terminal signals, it ranks coins from strong to weak. All tests run on historical data only; these are not trading signals and not investment advice.

Research project Historical data only Illustration
The fly reads a newspaper in an armchair; when the terminal signals, it walks to the computer and ranks the coins RESEARCH · TEST 55 coins ranking: — waiting for a signal historical data only Kenyon cells · active 0 of 5,177 > ranking 55 coins… STRONG — STRONG — WEAK — WEAK — result recorded ✓ TERM MARKET NEWS Altcoins: buyers more active !
Reading market news
day 1

The Fly’s brain at work

rest
  • Inputs — five market “senses”. Signals travel from them to the mushroom body.
  • Kenyon cells — about 5,000. Only a small share of them fires for each market picture: this is how the fly tells similar situations apart.
  • Outputs — “strong coin” and “weak coin”. Connections to them change after every test.
  • Dopamine — an evaluation signal after each test: a correct forecast strengthens connections, a wrong one weakens them.

Schematic only: the dots are placed for clarity; this is neither an anatomical map nor our market data.

Energy per decision: fly brain vs language model

~1,900 times less energy for the Fly

Measured on the same computer (Ryzen 5 3600 CPU) on the same task: ranking coins by strength. Energy = compute time × 88 W for both models. The language model is llama 3.2 (3 billion parameters) running locally. Preliminary measurement from experiment No. 56; the scale is logarithmic — each step is 10 times the previous one.

Hardware estimates (not measured): the Fly as a response table plus learned weights on a microcontroller — about a microjoule per decision; a large language model in a data centre — thousands of joules.

How our Fly is learning

Tests since 1 October
42
4 confirmed · 9 partly · 27 no
Kenyon cells firing
79 % → 25 %
the brain stopped going “blind”
Ranking quality
+14 %
vs the first spiking version
Trades per day
4–5 times fewer
lower fees

Ranking quality by version — how closely the fly’s order of coins matches the real one, in arbitrary units. All tests follow rules written down in advance, on historical data, with no real money.

  1. 27.09
    First run on market dataThe brain “as is” did no better than a coin toss: 79 % of cells fired for any market picture.
  2. 27.09
    Curing the “blindness”The share of firing cells was reduced and the brain began to tell situations apart.
  3. 29.09
    Online learningThe fly learns after every outcome and beats a simple model on a narrow market.
  4. 03.10
    Spiking brain on a GPUFull model with neuron spikes, 3,125 market pictures.
  5. 04.10
    New input encoding and a filterRanking quality rose by 14 %; the signal proved to be its own, not a copy of a simple rule.
  6. next
    Forward test on a demo account8–12 weeks on new data, with no real money.

Scientific description of the project

Summary. “Mukha” (Ukrainian for “fly”) is a research project asking whether a model of the fruit-fly brain Drosophila melanogaster, built from the complete map of its neuronal connections (the FlyWire connectome), can serve as a system for recognising situations in the crypto market. We take the mushroom body — the brain region for learning and memory — and test whether its code distinguishes market situations better than simple models. All hypotheses are tested on historical data under rules written down in advance, with no real money.

Model

A spiking model of the whole fly brain: about 138,000 neurons and 50 million synapses from the FlyWire map (version 783), leaky integrate-and-fire (LIF) neurons following Shiu et al. (2024). It runs on a GPU via GeNN. The working part is about 5,000 Kenyon cells of the mushroom body.

Input and readout

A few aggregate market features are converted into the firing rates of input neurons. For each market picture we record which Kenyon cells fired. An external learner works on top of this sparse code and learns online after every outcome — by analogy with dopamine-driven learning at the output of the mushroom body.

How we test

  • Test rules are written down before computing; each test is run once.
  • Mandatory baselines: the same model with shuffled wiring, a simple machine-learning model, random choice.
  • Exchange fees and trading frequency are taken into account.
  • A “it works” conclusion only after a forward test on new data (demo account).

What we have learned

  • The brain “as is” goes “blind” on market input: almost 80 % of Kenyon cells fire and all situations look the same. Reducing activity to levels close to a living fly restores the ability to discriminate.
  • The best results come when most cells are silent and all features arrive at once: Kenyon cells act as coincidence detectors.
  • The real connectome wiring is so far no better than shuffled wiring with the same number of connections — consistent with work on random projections in the mushroom body. The code’s strength lies in sparseness and width, not in the exact wiring.
  • The Fly’s signal is its own, not a copy of simple rules. But on the broad market a simple machine-learning model is still stronger.
  • The main obstacle is exchange fees and trading frequency, not the model’s “intelligence”.

Limitations

This is research, not a trading product and not investment advice. Results on historical data do not guarantee future results. We have not yet achieved learning inside the brain model itself; the external readout is what learns.

Authors of the idea and the data

Software and repositories used

Papers

  1. Dorkenwald S. et al. Neuronal wiring diagram of an adult brain. Nature 634, 2024. doi:10.1038/s41586-024-07558-y
  2. Schlegel P. et al. Whole-brain annotation and multi-connectome cell typing of Drosophila. Nature, 2024. doi:10.1038/s41586-024-07686-5
  3. Shiu P.K. et al. A Drosophila computational brain model reveals sensorimotor processing. Nature, 2024. doi:10.1038/s41586-024-07763-9
  4. Litwin-Kumar A. et al. Optimal degrees of synaptic connectivity. Neuron, 2017. doi:10.1016/j.neuron.2017.01.030
  5. Dasgupta S., Stevens C.F., Navlakha S. A neural algorithm for a fundamental computing problem. Science, 2017. doi:10.1126/science.aam9868
  6. Caron S.J.C. et al. Random convergence of olfactory inputs in the Drosophila mushroom body. Nature, 2013. doi:10.1038/nature12063
  7. Lin A.C. et al. Sparse, decorrelated odor coding in the mushroom body enhances learned odor discrimination. Nature Neuroscience, 2014. doi:10.1038/nn.3660
  8. Barak O., Rigotti M., Fusi S. The sparseness of mixed selectivity neurons controls the generalization–discrimination trade-off. J. Neurosci., 2013. jneurosci 33:3844
  9. Xie M. et al. Task-dependent optimal representations for cerebellar learning. eLife, 2023. eLife 82914
  10. Aso Y. et al. The neuronal architecture of the mushroom body provides a logic for associative learning. eLife, 2014. eLife 04577
  11. Aso Y., Rubin G.M. Dopaminergic neurons write and update memories with cell-type-specific rules. eLife, 2016. eLife 16135
  12. Bennett J.E.M., Philippides A., Nowotny T. Learning with reinforcement prediction errors in a model of the Drosophila mushroom body. Nature Communications, 2021. doi:10.1038/s41467-021-22592-4
  13. Jiang L., Litwin-Kumar A. Models of heterogeneous dopamine signaling in an insect learning and memory center. PLOS Comput. Biol., 2021. doi:10.1371/journal.pcbi.1009205
  14. Gârleanu N., Pedersen L.H. Dynamic trading with predictable returns and transaction costs. J. Finance, 2013. J. Finance 68(6)
  15. Novy-Marx R., Velikov M. A taxonomy of anomalies and their trading costs. Rev. Financ. Stud., 2016. RFS 29(1)
  16. Liu Y., Tsyvinski A., Wu X. Common risk factors in cryptocurrency. J. Finance, 2022. J. Finance 77(2)
  17. Kelly B., Malamud S., Zhou K. The virtue of complexity in return prediction. J. Finance, 2024. doi:10.1111/jofi.13298; Nagel S. Seemingly virtuous complexity, NBER, 2025. w34104

Project lead: Sergii Bielik. Eon “Mukha” is a non-commercial research project; FlyWire data are used under CC BY-NC 4.0 with attribution.