Does a fruit-fly brain forecast Polish wind and solar power?

The wiring of 1,000 neurons from the FlyWire whole-brain connectome of Drosophila melanogaster is used as the fixed recurrent layer (reservoir) of an echo state network that forecasts national wind and PV generation in Poland 1, 6 and 24 hours ahead. It is compared with random reservoirs of the same size and density, with rewired and reshuffled versions of the same connectome, and with standard forecasting baselines. Test period: 01 Oct 2025 to 30 Sep 2026 (hourly, PSE data). Code and method: https://github.com/kwwaleszczynski-del/fly-connectome-forecast.

1.000connectome / random ESN test RMSE, mean of 6 tasks, each tuned (1,000 neurons)
2 / 0 of 6tasks where the connectome beats the random ESN in all 5 seeds: own settings / classic ESN setting
0.4% vs 72%eigenvalues above half the spectral radius: connectome vs random matrix
+0.15 / +0.15wind +24 h skill: connectome ESN / ridge on lags
+0.62wind +24 h skill of the PSE day-ahead plan (uses weather forecasts)

The reservoir

The 1,000 neurons with the most synapses in FlyWire v783 (133,383 neurons, 2,664,099 connections with at least 5 synapses, 33,630,557 synapses after removing modulatory neurons), with 20,055 connections between them. Colour: predicted transmitter (ACh excitatory, GABA and glutamate inhibitory; grey: dopamine and serotonin neurons, which only receive input in the reservoir); size: synapse count. Layout: force-directed, strongest 3,000 connections drawn. Hover a neuron for its FlyWire root id.

Connection matrices ordered by each neuron's main neuropil. The real wiring is clustered into brain regions; the degree-preserving control keeps every neuron's number of inputs and outputs but scatters them, the random ESN has no structure at all.

Eigenvalues after scaling to spectral radius 1. A random matrix fills a disc (circular law); the connectome has a few dominant eigenvalues and most of the spectrum close to zero.

Forecast skill on the test year

RMSE skill against persistence (1 = perfect, 0 = as good as "the next hours look like now", negative = worse). Click legend entries to show the other controls.

Model: test RMSE in MW (± std over seeds) / skillWind +1 hWind +6 hWind +24 hPV +1 hPV +6 hPV +24 h
ESN, fly connectome241 ±1
+0.23
930 ±2
+0.19
1,529 ±0
+0.15
301 ±1
+0.72
1,119 ±16
+0.77
1,114 ±3
+0.06
ESN, random (classic)241 ±1
+0.23
926 ±3
+0.20
1,539 ±1
+0.15
296 ±2
+0.73
1,141 ±4
+0.77
1,112 ±3
+0.06
ESN, connectome, shuffled weights247 ±4
+0.22
936 ±3
+0.19
1,586 ±10
+0.12
312 ±7
+0.71
1,136 ±54
+0.77
1,102 ±7
+0.07
ESN, random wiring, fly weights241 ±1
+0.23
926 ±1
+0.20
1,539 ±1
+0.15
299 ±2
+0.72
1,154 ±8
+0.76
1,115 ±5
+0.06
ESN, fly wiring, random weights241 ±1
+0.24
926 ±1
+0.20
1,539 ±1
+0.15
298 ±2
+0.72
1,164 ±8
+0.76
1,115 ±3
+0.06
ESN, degree-preserving rewired241 ±1
+0.23
928 ±6
+0.20
1,539 ±1
+0.15
300 ±2
+0.72
1,159 ±8
+0.76
1,115 ±3
+0.06
ESN, no recurrence (W = 0)255 ±0
+0.19
930 ±1
+0.19
1,536 ±1
+0.15
364 ±1
+0.66
1,208 ±5
+0.75
1,120 ±2
+0.06
Persistence315
+0.00
1,153
+0.00
1,802
+0.00
1,077
+0.00
4,882
+0.00
1,186
+0.00
Persistence, same hour yesterday1,802
-4.73
1,802
-0.56
1,802
+0.00
1,186
-0.10
1,186
+0.76
1,186
+0.00
Ridge on 24 h of lags257
+0.18
963
+0.17
1,536
+0.15
358
+0.67
1,065
+0.78
1,090
+0.08
Gradient boosting on lags246
+0.22
943
+0.18
1,641
+0.09
334
+0.69
983
+0.80
1,157
+0.02
PSE day-ahead plan (uses weather forecasts)678
-1.15
678
+0.41
678
+0.62
655
+0.39
655
+0.87
655
+0.45

Does the wiring matter? Controls paired by seed

Each control uses the same input weights as the random ESN with the same seed, so the ratio isolates the recurrent matrix. Below 1 = better than a classic random reservoir. First with every reservoir at its own tuned setting (the fair forecasting comparison):

Then all reservoirs at one shared setting, as in Costi et al., so that only the matrix differs: at the setting tuned for the random ESN (spectral radius 0.5, leak rate 1.0, input scaling 0.05),

and at the setting tuned for the connectome (spectral radius 1.1, leak rate 1.0, input scaling 0.1), where the reference is the random ESN at that same setting:

A regional reservoir: 1,000 neurons of the right mushroom body (the fly's learning centre), only synapses inside its neuropils, each variant at its own tuned setting.

Overfitting: learning curves and noisy inputs

Training windows from 7 days to all data before the test year, every reservoir at the two shared settings (solid: random-ESN setting; dashed: connectome setting). The ratio is the median over 5 seeds of the connectome's test RMSE divided by the random reservoir's with the same seed. With an almost unregularised readout (ridge penalty 1e-8), where overfitting shows first:

With the ridge penalty chosen inside each training window (fitted on its first 80%, scored on the last 20%):

Absolute learning curves with the baselines. Hover for the training error; dashed grey: persistence.

Gaussian noise added to the observed wind, PV and demand inputs (targets stay clean), each reservoir at its own setting.

Forecast explorer

Drag on the chart to zoom; double click to reset.